当前位置: 首页>>代码示例>>Java>>正文


Java FindBundle.message方法代码示例

本文整理汇总了Java中com.intellij.find.FindBundle.message方法的典型用法代码示例。如果您正苦于以下问题:Java FindBundle.message方法的具体用法?Java FindBundle.message怎么用?Java FindBundle.message使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.find.FindBundle的用法示例。


在下文中一共展示了FindBundle.message方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createCenterPanel

import com.intellij.find.FindBundle; //导入方法依赖的package包/类
@Override
protected JComponent createCenterPanel() {
  JPanel panel = new JPanel(new GridBagLayout());

  JPanel _panel = new JPanel(new BorderLayout());
  panel.add(_panel, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
                                           new Insets(0, 0, 0, 0), 0, 0));

  if (myIsShowInNewTabVisible) {
    myCbToOpenInNewTab = new JCheckBox(FindBundle.message("find.open.in.new.tab.checkbox"));
    myCbToOpenInNewTab.setSelected(myToShowInNewTab);
    myCbToOpenInNewTab.setEnabled(myIsShowInNewTabEnabled);
    _panel.add(myCbToOpenInNewTab, BorderLayout.EAST);
  }

  JPanel allOptionsPanel = createAllOptionsPanel();
  if (allOptionsPanel != null) {
    panel.add(allOptionsPanel, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
                                                      new Insets(0, 0, 0, 0), 0, 0));
  }
  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:AbstractFindUsagesDialog.java

示例2: createPresentation

import com.intellij.find.FindBundle; //导入方法依赖的package包/类
@NotNull
private static UsageViewPresentation createPresentation(@NotNull PsiElement psiElement,
                                                        @NotNull FindUsagesOptions options,
                                                        boolean toOpenInNewTab) {
  UsageViewPresentation presentation = new UsageViewPresentation();
  String scopeString = options.searchScope.getDisplayName();
  presentation.setScopeText(scopeString);
  String usagesString = generateUsagesString(options);
  presentation.setUsagesString(usagesString);
  String title = FindBundle.message("find.usages.of.element.in.scope.panel.title", usagesString, UsageViewUtil.getLongName(psiElement),
                       scopeString);
  presentation.setTabText(title);
  presentation.setTabName(FindBundle.message("find.usages.of.element.tab.name", usagesString, UsageViewUtil.getShortName(psiElement)));
  presentation.setTargetsNodeText(StringUtil.capitalize(UsageViewUtil.getType(psiElement)));
  presentation.setOpenInNewTab(toOpenInNewTab);
  return presentation;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:FindUsagesManager.java

示例3: getPresentableName

import com.intellij.find.FindBundle; //导入方法依赖的package包/类
public static String getPresentableName(@NotNull FindModel.SearchContext searchContext) {
  @PropertyKey(resourceBundle = "messages.FindBundle") String messageKey = null;
  if (searchContext == FindModel.SearchContext.ANY) {
    messageKey = "find.context.anywhere.scope.label";
  } else if (searchContext == FindModel.SearchContext.EXCEPT_COMMENTS) {
    messageKey = "find.context.except.comments.scope.label";
  } else if (searchContext == FindModel.SearchContext.EXCEPT_STRING_LITERALS) {
    messageKey = "find.context.except.literals.scope.label";
  } else if (searchContext == FindModel.SearchContext.EXCEPT_COMMENTS_AND_STRING_LITERALS) {
    messageKey = "find.context.except.comments.and.literals.scope.label";
  } else if (searchContext == FindModel.SearchContext.IN_COMMENTS) {
    messageKey = "find.context.in.comments.scope.label";
  } else if (searchContext == FindModel.SearchContext.IN_STRING_LITERALS) {
    messageKey = "find.context.in.literals.scope.label";
  }
  return messageKey != null ? FindBundle.message(messageKey) : searchContext.toString();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:FindDialog.java

示例4: createDirectionPanel

import com.intellij.find.FindBundle; //导入方法依赖的package包/类
@NotNull
private JPanel createDirectionPanel() {
  JPanel directionPanel = new JPanel();
  directionPanel.setBorder(IdeBorderFactory.createTitledBorder(FindBundle.message("find.direction.group"), true));
  directionPanel.setLayout(new BoxLayout(directionPanel, BoxLayout.Y_AXIS));

  myRbForward = new JRadioButton(FindBundle.message("find.direction.forward.radio"), true);
  directionPanel.add(myRbForward);
  myRbBackward = new JRadioButton(FindBundle.message("find.direction.backward.radio"));
  directionPanel.add(myRbBackward);
  ButtonGroup bgDirection = new ButtonGroup();
  bgDirection.add(myRbForward);
  bgDirection.add(myRbBackward);

  return directionPanel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:FindDialog.java

示例5: createScopePanel

import com.intellij.find.FindBundle; //导入方法依赖的package包/类
@NotNull
private JPanel createScopePanel() {
  JPanel scopePanel = new JPanel();
  scopePanel.setBorder(IdeBorderFactory.createTitledBorder(FindBundle.message("find.scope.group"), true));
  scopePanel.setLayout(new BoxLayout(scopePanel, BoxLayout.Y_AXIS));

  myRbGlobal = new JRadioButton(FindBundle.message("find.scope.global.radio"), true);
  scopePanel.add(myRbGlobal);
  myRbSelectedText = new JRadioButton(FindBundle.message("find.scope.selected.text.radio"));
  scopePanel.add(myRbSelectedText);
  ButtonGroup bgScope = new ButtonGroup();
  bgScope.add(myRbGlobal);
  bgScope.add(myRbSelectedText);

  ActionListener actionListener = new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      updateControls();
    }
  };
  myRbGlobal.addActionListener(actionListener);
  myRbSelectedText.addActionListener(actionListener);

  return scopePanel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:FindDialog.java

示例6: createOriginPanel

import com.intellij.find.FindBundle; //导入方法依赖的package包/类
@NotNull
private JPanel createOriginPanel() {
  JPanel originPanel = new JPanel();
  originPanel.setBorder(IdeBorderFactory.createTitledBorder(FindBundle.message("find.origin.group"), true));
  originPanel.setLayout(new BoxLayout(originPanel, BoxLayout.Y_AXIS));

  myRbFromCursor = new JRadioButton(FindBundle.message("find.origin.from.cursor.radio"), true);
  originPanel.add(myRbFromCursor);
  myRbEntireScope = new JRadioButton(FindBundle.message("find.origin.entire.scope.radio"));
  originPanel.add(myRbEntireScope);
  ButtonGroup bgOrigin = new ButtonGroup();
  bgOrigin.add(myRbFromCursor);
  bgOrigin.add(myRbEntireScope);

  return originPanel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:FindDialog.java

示例7: createPresentation

import com.intellij.find.FindBundle; //导入方法依赖的package包/类
@NotNull
private static UsageViewPresentation createPresentation(@NotNull PsiElement psiElement,
                                                        @NotNull FindUsagesOptions findUsagesOptions,
                                                        boolean toOpenInNewTab) {
  UsageViewPresentation presentation = new UsageViewPresentation();
  String scopeString = findUsagesOptions.searchScope == null ? null : findUsagesOptions.searchScope.getDisplayName();
  presentation.setScopeText(scopeString);
  String usagesString = generateUsagesString(findUsagesOptions);
  presentation.setUsagesString(usagesString);
  String title = scopeString == null
                 ? FindBundle.message("find.usages.of.element.panel.title", usagesString, UsageViewUtil.getLongName(psiElement))
                 : FindBundle.message("find.usages.of.element.in.scope.panel.title", usagesString, UsageViewUtil.getLongName(psiElement),
                                      scopeString);
  presentation.setTabText(title);
  presentation.setTabName(FindBundle.message("find.usages.of.element.tab.name", usagesString, UsageViewUtil.getShortName(psiElement)));
  presentation.setTargetsNodeText(StringUtil.capitalize(UsageViewUtil.getType(psiElement)));
  presentation.setOpenInNewTab(toOpenInNewTab);
  return presentation;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:20,代码来源:FindUsagesManager.java

示例8: generateUsagesString

import com.intellij.find.FindBundle; //导入方法依赖的package包/类
@NotNull
@Override
public final String generateUsagesString() {
  String separator = " " + FindBundle.message("find.usages.panel.title.separator") + " ";
  LinkedHashSet<String> strings = new LinkedHashSet<String>();
  addUsageTypes(strings);
  if (strings.isEmpty()) {
    strings.add(FindBundle.message("find.usages.panel.title.usages"));
  }
  return StringUtil.join(strings, separator);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:JavaFindUsagesOptions.java

示例9: showHint

import com.intellij.find.FindBundle; //导入方法依赖的package包/类
protected static void showHint(final Editor editor) {
  String message = FindBundle.message("select.next.occurence.not.found.message");
  final LightweightHint hint = new LightweightHint(HintUtil.createInformationLabel(message));
  HintManagerImpl.getInstanceImpl().showEditorHint(hint,
                                                   editor,
                                                   HintManager.UNDER,
                                                   HintManager.HIDE_BY_TEXT_CHANGE | HintManager.HIDE_BY_SCROLLING,
                                                   0,
                                                   false);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:SelectOccurrencesActionHandler.java

示例10: getLongDescriptiveName

import com.intellij.find.FindBundle; //导入方法依赖的package包/类
@NotNull
@Override
public String getLongDescriptiveName() {
  SearchScope searchScope = myOptions.searchScope;
  String scopeString = searchScope.getDisplayName();
  PsiElement psiElement = getElement();

  return psiElement == null ? UsageViewBundle.message("node.invalid") :
         FindBundle.message("recent.find.usages.action.popup", StringUtil.capitalize(UsageViewUtil.getType(psiElement)),
                            DescriptiveNameUtil.getDescriptiveName(psiElement),
                            scopeString
  );
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:PsiElement2UsageTargetAdapter.java

示例11: getFindAllAction

import com.intellij.find.FindBundle; //导入方法依赖的package包/类
@NotNull
private Action getFindAllAction() {
  return myFindAllAction = new AbstractAction(FindBundle.message("find.all.button")) {
    @Override
    public void actionPerformed(ActionEvent e) {
      doOKAction(true);
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:FindDialog.java

示例12: createNorthPanel

import com.intellij.find.FindBundle; //导入方法依赖的package包/类
@Override
public JComponent createNorthPanel() {
  JPanel panel = new JPanel(new GridBagLayout());

  JLabel prompt = new JLabel(FindBundle.message("find.text.to.find.label"));
  panel.add(prompt, new GridBagConstraints(0,0,1,1,0,1, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,0,UIUtil.DEFAULT_VGAP,UIUtil.DEFAULT_HGAP), 0,0));

  myInputComboBox = new ComboBox(300);
  revealWhitespaces(myInputComboBox);
  initCombobox(myInputComboBox);

  myReplaceComboBox = new ComboBox(300);
  revealWhitespaces(myReplaceComboBox);

  initCombobox(myReplaceComboBox);
  final Component editorComponent = myReplaceComboBox.getEditor().getEditorComponent();
  editorComponent.addFocusListener(
    new FocusAdapter() {
      @Override
      public void focusGained(FocusEvent e) {
        myReplaceComboBox.getEditor().selectAll();
        editorComponent.removeFocusListener(this);
      }
    }
  );


  panel.add(myInputComboBox, new GridBagConstraints(1,0,1,1,1,1, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0,0,UIUtil.DEFAULT_VGAP,0), 0,0));
  prompt.setLabelFor(myInputComboBox.getEditor().getEditorComponent());

  myReplacePrompt = new JLabel(FindBundle.message("find.replace.with.label"));
  panel.add(myReplacePrompt, new GridBagConstraints(0,1,1,1,0,1, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,0,UIUtil.DEFAULT_VGAP,UIUtil.DEFAULT_HGAP), 0,0));

  panel.add(myReplaceComboBox, new GridBagConstraints(1, 1, 1, 1, 1, 1, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
                                                      new Insets(0, 0, UIUtil.DEFAULT_VGAP, 0), 0, 0));
  myReplacePrompt.setLabelFor(myReplaceComboBox.getEditor().getEditorComponent());
  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:39,代码来源:FindDialog.java

示例13: createResultsOptionPanel

import com.intellij.find.FindBundle; //导入方法依赖的package包/类
private JPanel createResultsOptionPanel(JPanel optionsPanel, GridBagConstraints gbConstraints) {
  JPanel resultsOptionPanel = new JPanel();
  resultsOptionPanel.setLayout(new BoxLayout(resultsOptionPanel, BoxLayout.Y_AXIS));

  myScopePanel = new HideableTitledPanel(FindBundle.message("results.options.group"), resultsOptionPanel,
                                         myPreviousResultsExpandedState);
  optionsPanel.add(myScopePanel, gbConstraints);
  return resultsOptionPanel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:FindDialog.java

示例14: generateUsagesString

import com.intellij.find.FindBundle; //导入方法依赖的package包/类
@Override
public final String generateUsagesString() {
  String suffix = " " + FindBundle.message("find.usages.panel.title.separator") + " ";
  LinkedHashSet<String> strings = new LinkedHashSet<String>();
  addUsageTypes(strings);
  if (strings.isEmpty()) {
    strings.add(FindBundle.message("find.usages.panel.title.usages"));
  }
  return StringUtil.join(strings, suffix);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:11,代码来源:JavaFindUsagesOptions.java

示例15: getLongDescriptiveName

import com.intellij.find.FindBundle; //导入方法依赖的package包/类
@Nonnull
@Override
public String getLongDescriptiveName() {
  SearchScope searchScope = myOptions.searchScope;
  String scopeString = searchScope.getDisplayName();
  PsiElement psiElement = getElement();

  return psiElement == null
         ? UsageViewBundle.message("node.invalid")
         : FindBundle.message("recent.find.usages.action.popup", StringUtil.capitalize(UsageViewUtil.getType(psiElement)), DescriptiveNameUtil.getDescriptiveName(psiElement), scopeString);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:12,代码来源:PsiElement2UsageTargetAdapter.java


注:本文中的com.intellij.find.FindBundle.message方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。