Java Code Examples for com.intellij.ide.IdeBundle

The following examples show how to use com.intellij.ide.IdeBundle. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: consulo   Source File: TipPanel.java    License: Apache License 2.0 6 votes vote down vote up
public void nextTip() {
  if (myTips.size() == 0) {
    myBrowser.setText(IdeBundle.message("error.tips.not.found", ApplicationNamesInfo.getInstance().getFullProductName()));
    return;
  }
  GeneralSettings settings = GeneralSettings.getInstance();
  int lastTip = settings.getLastTip();
  TipAndTrickBean tip;
  lastTip++;
  if (lastTip - 1 >= myTips.size()) {
    tip = myTips.get(0);
    lastTip = 1;
  }
  else {
    tip = myTips.get(lastTip - 1);
  }

  setTip(tip, lastTip, myBrowser, settings);
}
 
Example 2
Source Project: consulo   Source File: GotoCustomRegionDialog.java    License: Apache License 2.0 6 votes vote down vote up
@RequiredReadAction
protected GotoCustomRegionDialog(@Nullable Project project, @Nonnull Editor editor) {
  super(project);
  myEditor = editor;
  myProject = project;
  Collection<FoldingDescriptor> descriptors = getCustomFoldingDescriptors();
  init();
  if (descriptors.size() == 0) {
    myScrollPane.setVisible(false);
    myContentPane.add(new JLabel(IdeBundle.message("goto.custom.region.message.unavailable")), BorderLayout.NORTH);
    setOKActionEnabled(false);
  }
  else {
    myRegionsList.setModel(new MyListModel(orderByPosition(descriptors)));
    myRegionsList.setSelectedIndex(0);
  }
  setTitle(IdeBundle.message("goto.custom.region.command"));
}
 
Example 3
Source Project: consulo   Source File: TodoFileNode.java    License: Apache License 2.0 6 votes vote down vote up
@Override
protected void updateImpl(@Nonnull PresentationData data) {
  super.updateImpl(data);
  String newName;
  if (myBuilder.getTodoTreeStructure().isPackagesShown()) {
    newName = getValue().getName();
  }
  else {
    newName = mySingleFileMode ? getValue().getName() : getValue().getVirtualFile().getPresentableUrl();
  }

  data.setPresentableText(newName);
  int todoItemCount;
  try {
    todoItemCount = myBuilder.getTodoTreeStructure().getTodoItemCount(getValue());
  }
  catch (IndexNotReadyException e) {
    return;
  }
  if (todoItemCount > 0) {
    data.setLocationString(IdeBundle.message("node.todo.items", todoItemCount));
  }
}
 
Example 4
Source Project: consulo   Source File: FileTemplateUtil.java    License: Apache License 2.0 6 votes vote down vote up
private static String mergeTemplate(String templateContent, final VelocityContext context, boolean useSystemLineSeparators) throws IOException {
  final StringWriter stringWriter = new StringWriter();
  try {
    VelocityWrapper.evaluate(null, context, stringWriter, templateContent);
  }
  catch (final VelocityException e) {
    LOG.error("Error evaluating template:\n" + templateContent, e);
    ApplicationManager.getApplication().invokeLater(() -> Messages.showErrorDialog(IdeBundle.message("error.parsing.file.template", e.getMessage()), IdeBundle.message("title.velocity.error")));
  }
  final String result = stringWriter.toString();

  if (useSystemLineSeparators) {
    final String newSeparator = CodeStyleSettingsManager.getSettings(ProjectManagerEx.getInstanceEx().getDefaultProject()).getLineSeparator();
    if (!"\n".equals(newSeparator)) {
      return StringUtil.convertLineSeparators(result, newSeparator);
    }
  }

  return result;
}
 
Example 5
Source Project: consulo   Source File: EarlyAccessProgramConfigurable.java    License: Apache License 2.0 6 votes vote down vote up
private static JComponent createWarningPanel() {
  VerticalLayoutPanel panel = JBUI.Panels.verticalPanel();
  panel.setBackground(LightColors.RED);
  panel.setBorder(new CompoundBorder(JBUI.Borders.customLine(JBColor.GRAY), JBUI.Borders.empty(5)));

  JBLabel warnLabel = new JBLabel("WARNING", AllIcons.General.BalloonWarning, SwingConstants.LEFT);
  warnLabel.setFont(UIUtil.getFont(UIUtil.FontSize.BIGGER, warnLabel.getFont()).deriveFont(Font.BOLD));
  panel.addComponent(warnLabel);
  JTextArea textArea = new JTextArea(IdeBundle.message("eap.configurable.warning.text"));
  textArea.setLineWrap(true);
  textArea.setFont(JBUI.Fonts.label());
  textArea.setOpaque(false);
  textArea.setEditable(false);
  panel.addComponent(textArea);
  return panel;
}
 
Example 6
Source Project: consulo   Source File: DumbServiceImpl.java    License: Apache License 2.0 6 votes vote down vote up
private void showModalProgress() {
  NoAccessDuringPsiEvents.checkCallContext();
  try {
    ((ApplicationEx2)ApplicationManager.getApplication()).executeSuspendingWriteAction(myProject, IdeBundle.message("progress.indexing"), () -> {
      assertState(State.SCHEDULED_TASKS);
      runBackgroundProcess(ProgressManager.getInstance().getProgressIndicator());
      assertState(State.SMART, State.WAITING_FOR_FINISH);
    });
    assertState(State.SMART, State.WAITING_FOR_FINISH);
  }
  finally {
    if (myState.get() != State.SMART) {
      assertState(State.WAITING_FOR_FINISH);
      updateFinished();
      assertState(State.SMART, State.SCHEDULED_TASKS);
    }
  }
}
 
Example 7
Source Project: consulo   Source File: ModifyKeywordDialog.java    License: Apache License 2.0 6 votes vote down vote up
protected JComponent createNorthPanel() {
  JPanel panel = new JPanel(new GridBagLayout());
  GridBagConstraints gc = new GridBagConstraints();
  gc.gridx = 0;
  gc.gridy = 0;
  gc.weightx = 0;
  gc.insets = new Insets(5, 0, 5, 10);
  gc.anchor = GridBagConstraints.BASELINE;
  panel.add(new JLabel(IdeBundle.message("editbox.keyword")), gc);

  gc = new GridBagConstraints();
  gc.gridx = 1;
  gc.gridy = 0;
  gc.weightx = 1;
  gc.fill = GridBagConstraints.HORIZONTAL;
  gc.gridwidth = 2;
  gc.insets = new Insets(0, 0, 5, 0);
  panel.add(myKeywordName, gc);

  panel.setPreferredSize(new Dimension(220, 40));
  return panel;
}
 
Example 8
Source Project: consulo   Source File: OpenFileAction.java    License: Apache License 2.0 6 votes vote down vote up
@RequiredUIAccess
private static void doOpenFile(@Nullable final Project project, @Nonnull final VirtualFile[] result) {
  for (final VirtualFile file : result) {
    if (file.isDirectory()) {
      ProjectUtil.openAsync(file.getPath(), project, false, UIAccess.current()).doWhenDone(openedProject -> FileChooserUtil.setLastOpenedFile(openedProject, file));
      return;
    }

    if (OpenProjectFileChooserDescriptor.canOpen(file)) {
      int answer = Messages.showYesNoDialog(project, IdeBundle.message("message.open.file.is.project", file.getName()), IdeBundle.message("title.open.project"), Messages.getQuestionIcon());
      if (answer == 0) {
        ProjectUtil.openAsync(file.getPath(), project, false, UIAccess.current()).doWhenDone(openedProject -> FileChooserUtil.setLastOpenedFile(openedProject, file));
        return;
      }
    }

    FileType type = FileTypeChooser.getKnownFileTypeOrAssociate(file, project);
    if (type == null) return;

    if (project != null) {
      openFile(file, project);
    }
  }
}
 
Example 9
Source Project: consulo   Source File: BrowserLauncherImpl.java    License: Apache License 2.0 6 votes vote down vote up
@Override
protected void doShowError(@Nullable final String error, @Nullable final WebBrowser browser, @Nullable final Project project, final String title, @Nullable final Runnable launchTask) {
  AppUIUtil.invokeOnEdt(new Runnable() {
    @Override
    public void run() {
      if (Messages.showYesNoDialog(project, StringUtil.notNullize(error, "Unknown error"), title == null ? IdeBundle.message("browser" + ".error") : title, Messages.OK_BUTTON,
                                   IdeBundle.message("button.fix"), null) == Messages.NO) {
        final BrowserSettings browserSettings = new BrowserSettings();

        AsyncResult<Void> result = ShowSettingsUtil.getInstance().editConfigurable(project, browserSettings, browser == null ? null : (Runnable)() -> browserSettings.selectBrowser(browser));
        result.doWhenDone(() -> {
          if (launchTask != null) {
            launchTask.run();
          }
        });
      }
    }
  }, project == null ? null : project.getDisposed());
}
 
Example 10
Source Project: consulo   Source File: ActionMacroManager.java    License: Apache License 2.0 6 votes vote down vote up
public void stopRecording(@Nullable Project project) {
  LOG.assertTrue(myIsRecording);

  if (myWidget != null) {
    myWidget.delete();
    myWidget = null;
  }

  myIsRecording = false;
  myLastActionInputEvent.clear();
  String macroName;
  do {
    macroName = Messages.showInputDialog(project, IdeBundle.message("prompt.enter.macro.name"), IdeBundle.message("title.enter.macro.name"), Messages.getQuestionIcon());
    if (macroName == null) {
      myRecordingMacro = null;
      return;
    }

    if (macroName.isEmpty()) macroName = null;
  }
  while (macroName != null && !checkCanCreateMacro(macroName));

  myLastMacro = myRecordingMacro;
  addRecordedMacroWithName(macroName);
  registerActions();
}
 
Example 11
Source Project: consulo   Source File: ActionMacroManager.java    License: Apache License 2.0 6 votes vote down vote up
private void addRecordedMacroWithName(@Nullable String macroName) {
  if (macroName != null) {
    myRecordingMacro.setName(macroName);
    myMacros.add(myRecordingMacro);
    myRecordingMacro = null;
  }
  else {
    for (int i = 0; i < myMacros.size(); i++) {
      ActionMacro macro = myMacros.get(i);
      if (IdeBundle.message("macro.noname").equals(macro.getName())) {
        myMacros.set(i, myRecordingMacro);
        myRecordingMacro = null;
        break;
      }
    }
    if (myRecordingMacro != null) {
      myMacros.add(myRecordingMacro);
      myRecordingMacro = null;
    }
  }
}
 
Example 12
Source Project: consulo   Source File: PackageViewPane.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void deleteElement(@Nonnull DataContext dataContext) {
  List<PsiDirectory> allElements = Arrays.asList(getSelectedDirectories());
  List<PsiElement> validElements = new ArrayList<PsiElement>();
  for (PsiElement psiElement : allElements) {
    if (psiElement != null && psiElement.isValid()) validElements.add(psiElement);
  }
  final PsiElement[] elements = PsiUtilCore.toPsiElementArray(validElements);

  LocalHistoryAction a = LocalHistory.getInstance().startAction(IdeBundle.message("progress.deleting"));
  try {
    DeleteHandler.deletePsiElement(elements, myProject);
  }
  finally {
    a.finish();
  }
}
 
Example 13
Source Project: consulo   Source File: SearchAgainAction.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void actionPerformed(final AnActionEvent e) {
  final Project project = e.getData(CommonDataKeys.PROJECT);
  final FileEditor editor = e.getData(PlatformDataKeys.FILE_EDITOR);
  if (editor == null || project == null) return;
  CommandProcessor commandProcessor = CommandProcessor.getInstance();
  commandProcessor.executeCommand(
      project, new Runnable() {
      @Override
      public void run() {
        PsiDocumentManager.getInstance(project).commitAllDocuments();
        IdeDocumentHistory.getInstance(project).includeCurrentCommandAsNavigation();
        if(FindManager.getInstance(project).findNextUsageInEditor(editor)) {
          return;
        }

        FindUtil.searchAgain(project, editor, e.getDataContext());
      }
    },
    IdeBundle.message("command.find.next"),
    null
  );
}
 
Example 14
Source Project: consulo   Source File: LibraryEditingUtil.java    License: Apache License 2.0 6 votes vote down vote up
public static BaseListPopupStep<LibraryType> createChooseTypeStep(final ClasspathPanel classpathPanel,
                                                                  final ParameterizedRunnable<LibraryType> action) {
  return new BaseListPopupStep<LibraryType>(IdeBundle.message("popup.title.select.library.type"), getSuitableTypes(classpathPanel)) {
        @Nonnull
        @Override
        public String getTextFor(LibraryType value) {
          String createActionName = value != null ? value.getCreateActionName() : null;
          return createActionName != null ? createActionName : IdeBundle.message("create.default.library.type.action.name");
        }

        @Override
        public Icon getIconFor(LibraryType aValue) {
          return aValue != null ? TargetAWT.to(aValue.getIcon()) : AllIcons.Nodes.PpLib;
        }

        @Override
        public PopupStep onChosen(final LibraryType selectedValue, boolean finalChoice) {
          return doFinalStep(new Runnable() {
            @Override
            public void run() {
              action.run(selectedValue);
            }
          });
        }
      };
}
 
Example 15
Source Project: consulo-csharp   Source File: CreateUnresolvedElementFix.java    License: Apache License 2.0 5 votes vote down vote up
@Nullable
protected static Editor openEditor(@Nonnull PsiElement anchor, int offset)
{
	PsiFile containingFile = anchor.getContainingFile();
	if(containingFile == null)
	{
		return null;
	}
	VirtualFile virtualFile = containingFile.getVirtualFile();
	if(virtualFile == null)
	{
		return null;
	}

	Project project = containingFile.getProject();
	FileEditorProviderManager editorProviderManager = FileEditorProviderManager.getInstance();
	if(editorProviderManager.getProviders(project, virtualFile).length == 0)
	{
		Messages.showMessageDialog(project, IdeBundle.message("error.files.of.this.type.cannot.be.opened", ApplicationNamesInfo.getInstance()
				.getProductName()), IdeBundle.message("title.cannot.open.file"), Messages.getErrorIcon());
		return null;
	}

	OpenFileDescriptor descriptor = new OpenFileDescriptor(project, virtualFile);
	Editor editor = FileEditorManager.getInstance(project).openTextEditor(descriptor, true);
	if(editor != null)
	{
		editor.getCaretModel().moveToOffset(offset);
		editor.getScrollingModel().scrollToCaret(ScrollType.RELATIVE);
		return editor;
	}
	return null;
}
 
Example 16
Source Project: intellij-thrift   Source File: ThriftStructureViewModel.java    License: Apache License 2.0 5 votes vote down vote up
@NotNull
public ActionPresentation getPresentation() {
  return new ActionPresentationData(
    IdeBundle.message("action.structureview.show.fields"),
    null,
    PlatformIcons.FIELD_ICON
  );
}
 
Example 17
Source Project: consulo   Source File: WebReferenceDocumentationProvider.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public String getQuickNavigateInfo(PsiElement element, PsiElement originalElement) {
  if (element instanceof WebReference.MyFakePsiElement) {
    return IdeBundle.message("open.url.in.browser.tooltip");
  }
  return null;
}
 
Example 18
Source Project: consulo   Source File: CreateFromTemplateDialog.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void doOKAction() {
  String fileName = myAttrPanel.getFileName();
  if (fileName != null && fileName.length() == 0) {
    Messages.showMessageDialog(myAttrComponent, IdeBundle.message("error.please.enter.a.file.name"), CommonBundle.getErrorTitle(), Messages.getErrorIcon());
    return;
  }
  doCreate(fileName);
  if (myCreatedElement != null) {
    super.doOKAction();
  }
}
 
Example 19
Source Project: consulo   Source File: ScopeEditorPanel.java    License: Apache License 2.0 5 votes vote down vote up
private void updateCaretPositionText() {
  if (myErrorMessage != null) {
    myCaretPositionLabel.setText(IdeBundle.message("label.scope.editor.caret.position", myCaretPosition + 1));
  }
  else {
    myCaretPositionLabel.setText("");
  }
  myPositionPanel.setVisible(myErrorMessage != null);
  myCaretPositionLabel.setVisible(myErrorMessage != null);
  myPanel.revalidate();
}
 
Example 20
Source Project: consulo   Source File: NavBarPresentation.java    License: Apache License 2.0 5 votes vote down vote up
@Nonnull
public static String calcPresentableText(Object object, boolean forPopup) {
  if (!NavBarModel.isValid(object)) {
    return IdeBundle.message("node.structureview.invalid");
  }
  for (NavBarModelExtension modelExtension : NavBarModelExtension.EP_NAME.getExtensionList()) {
    String text = modelExtension.getPresentableText(object, forPopup);
    if (text != null) return text;
  }
  return object.toString();
}
 
Example 21
Source Project: consulo   Source File: DumbServiceImpl.java    License: Apache License 2.0 5 votes vote down vote up
private void startBackgroundProcess() {
  try {
    ProgressManager.getInstance().run(new Task.Backgroundable(myProject, IdeBundle.message("progress.indexing"), false) {
      @Override
      public void run(@Nonnull final ProgressIndicator visibleIndicator) {
        runBackgroundProcess(visibleIndicator);
      }
    });
  }
  catch (Throwable e) {
    queueUpdateFinished();
    LOG.error("Failed to start background index update task", e);
  }
}
 
Example 22
Source Project: consulo   Source File: ProcessPopup.java    License: Apache License 2.0 5 votes vote down vote up
public ProcessPopup(final InfoAndProgressPanel progressPanel) {
  myProgressPanel = progressPanel;

  buildActiveContent();
  myInactiveContentComponent = new JLabel(IdeBundle.message("progress.window.empty.text"), null, JLabel.CENTER) {
    @Override
    public Dimension getPreferredSize() {
      return getEmptyPreferredSize();
    }
  };
  myInactiveContentComponent.setFocusable(true);

  switchToPassive();
}
 
Example 23
Source Project: consulo   Source File: NamedLibraryElementNode.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void update(PresentationData presentation) {
  presentation.setPresentableText(getValue().getName());
  final OrderEntry orderEntry = getValue().getOrderEntry();

  if (orderEntry instanceof ModuleExtensionWithSdkOrderEntry) {
    final ModuleExtensionWithSdkOrderEntry sdkOrderEntry = (ModuleExtensionWithSdkOrderEntry)orderEntry;
    final Sdk sdk = sdkOrderEntry.getSdk();
    presentation.setIcon(SdkUtil.getIcon(((ModuleExtensionWithSdkOrderEntry)orderEntry).getSdk()));
    if (sdk != null) { //jdk not specified
      final String path = sdk.getHomePath();
      if (path != null) {
        presentation.setLocationString(FileUtil.toSystemDependentName(path));
      }
    }
    presentation.setTooltip(null);
  }
  else if (orderEntry instanceof LibraryOrderEntry) {
    presentation.setIcon(getIconForLibrary(orderEntry));
    presentation.setTooltip(StringUtil.capitalize(IdeBundle.message("node.projectview.library", ((LibraryOrderEntry)orderEntry).getLibraryLevel())));
  }
  else if(orderEntry instanceof OrderEntryWithTracking) {
    Image icon = null;
    CellAppearanceEx cellAppearance = OrderEntryAppearanceService.getInstance().forOrderEntry(orderEntry);
    if(cellAppearance instanceof ModifiableCellAppearanceEx) {
      icon = ((ModifiableCellAppearanceEx)cellAppearance).getIcon();
    }
    presentation.setIcon(icon == null ? AllIcons.Toolbar.Unknown : icon);
  }
}
 
Example 24
Source Project: consulo   Source File: ScopeChooserConfigurable.java    License: Apache License 2.0 5 votes vote down vote up
@Override
@Nonnull
public AnAction[] getChildren(@Nullable AnActionEvent e) {
  if (myChildren == null) {
    myChildren = new AnAction[2];
    myChildren[0] = new AnAction(IdeBundle.message("add.local.scope.action.text"), IdeBundle.message("add.local.scope.action.text"), myLocalScopesManager.getIcon()) {
      @RequiredUIAccess
      @Override
      public void actionPerformed(AnActionEvent e) {
        createScope(true, IdeBundle.message("add.scope.dialog.title"), null);
      }
    };
    myChildren[1] = new AnAction(IdeBundle.message("add.shared.scope.action.text"), IdeBundle.message("add.shared.scope.action.text"), mySharedScopesManager.getIcon()) {
      @RequiredUIAccess
      @Override
      public void actionPerformed(AnActionEvent e) {
        createScope(false, IdeBundle.message("add.scope.dialog.title"), null);
      }
    };
  }
  if (myFromPopup) {
    final AnAction action = myChildren[getDefaultIndex()];
    action.getTemplatePresentation().setIcon(IconUtil.getAddIcon());
    return new AnAction[]{action};
  }
  return myChildren;
}
 
Example 25
Source Project: consulo   Source File: ModifyKeywordDialog.java    License: Apache License 2.0 5 votes vote down vote up
public ModifyKeywordDialog(Component parent, String initialValue) {
  super(parent, false);
  if (initialValue == null || "".equals(initialValue)) {
    setTitle(IdeBundle.message("title.add.new.keyword"));
  }
  else {
    setTitle(IdeBundle.message("title.edit.keyword"));
  }
  init();
  myKeywordName.setText(initialValue);
}
 
Example 26
Source Project: consulo   Source File: BrowseTypeHierarchyAction.java    License: Apache License 2.0 5 votes vote down vote up
@RequiredUIAccess
@Override
public final void update(final AnActionEvent event){
  final Presentation presentation = event.getPresentation();
  if (!ActionPlaces.MAIN_MENU.equals(event.getPlace())) {
    presentation.setText(IdeBundle.message("action.browse.type.hierarchy"));
  }
  super.update(event);
}
 
Example 27
Source Project: consulo   Source File: CustomFileTypeEditor.java    License: Apache License 2.0 5 votes vote down vote up
public void applyEditorTo(AbstractFileType type) throws ConfigurationException {
  if (myFileTypeName.getText().trim().length() == 0) {
    throw new ConfigurationException(IdeBundle.message("error.name.cannot.be.empty"),
                                     CommonBundle.getErrorTitle());
  }
  else if (myFileTypeDescr.getText().trim().length() == 0) {
    myFileTypeDescr.setText(myFileTypeName.getText());
  }
  type.setName(myFileTypeName.getText());
  type.setDescription(myFileTypeDescr.getText());
  type.setSyntaxTable(getSyntaxTable());
}
 
Example 28
Source Project: consulo   Source File: FileTextFieldImpl.java    License: Apache License 2.0 5 votes vote down vote up
private void showNoSuggestions(boolean isExplicit) {
  hideCurrentPopup();

  if (!isExplicit) return;

  final JComponent message = HintUtil.createErrorLabel(IdeBundle.message("file.chooser.completion.no.suggestions"));
  final ComponentPopupBuilder builder = JBPopupFactory.getInstance().createComponentPopupBuilder(message, message);
  builder.setRequestFocus(false).setResizable(false).setAlpha(0.1f).setFocusOwners(new Component[]{myPathTextField});
  myNoSuggestionsPopup = builder.createPopup();
  myNoSuggestionsPopup.showInScreenCoordinates(getField(), getLocationForCaret(myPathTextField));
}
 
Example 29
Source Project: consulo   Source File: SplitAction.java    License: Apache License 2.0 5 votes vote down vote up
public void update(final AnActionEvent event) {
  final Project project = event.getData(CommonDataKeys.PROJECT);
  final Presentation presentation = event.getPresentation();
  presentation.setText (myOrientation == SwingConstants.VERTICAL
                        ? IdeBundle.message("action.split.vertically")
                        : IdeBundle.message("action.split.horizontally"));
  if (project == null) {
    presentation.setEnabled(false);
    return;
  }
  final FileEditorManagerEx fileEditorManager = FileEditorManagerEx.getInstanceEx(project);
  presentation.setEnabled(fileEditorManager.hasOpenedFile ());
}
 
Example 30
Source Project: consulo   Source File: FileTextFieldImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Nullable
public String getAdText(CompletionResult result) {
  if (result.myCompletionBase == null) return null;
  if (result.myCompletionBase.length() == result.myFieldText.length()) return null;

  String strokeText = KeymapUtil.getFirstKeyboardShortcutText(ActionManager.getInstance().getAction("EditorChooseLookupItemReplace"));
  return IdeBundle.message("file.chooser.completion.ad.text", strokeText);
}