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


Java UIBundle.message方法代码示例

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


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

示例1: createCenterPanel

import com.intellij.ui.UIBundle; //导入方法依赖的package包/类
protected JComponent createCenterPanel() {
  final JPanel panel = new JPanel(new GridBagLayout());
  final JLabel header = new JLabel(UIBundle.message("label.class.filter.editor.add.dialog.filter.pattern"));
  myClassName = new TextFieldWithBrowseButton(new JTextField(35));
  final JLabel iconLabel = new JLabel(Messages.getQuestionIcon());
  
  panel.add(header, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 10, 0, 0), 0, 0));
  panel.add(myClassName, new GridBagConstraints(1, 1, 1, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 10, 0, 0), 0, 0));
  panel.add(iconLabel, new GridBagConstraints(0, 0, 1, 2, 0.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(15, 0, 0, 0), 0, 0));

  myClassName.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
      PsiClass currentClass = getSelectedClass();
      TreeClassChooser chooser = TreeClassChooserFactory.getInstance(myProject).createNoInnerClassesScopeChooser(
        UIBundle.message("class.filter.editor.choose.class.title"), GlobalSearchScope.allScope(myProject), null, null);
      if (currentClass != null) {
        PsiFile containingFile = currentClass.getContainingFile();
        if (containingFile != null) {
          PsiDirectory containingDirectory = containingFile.getContainingDirectory();
          if (containingDirectory != null) {
            chooser.selectDirectory(containingDirectory);
          }
        }
      }
      chooser.showDialog();
      PsiClass selectedClass = chooser.getSelected();
      if (selectedClass != null) {
        myClassName.setText(selectedClass.getQualifiedName());
      }
    }
  });

  myClassName.setEnabled(myProject != null);

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

示例2: process

import com.intellij.ui.UIBundle; //导入方法依赖的package包/类
@Override
public boolean process(final VirtualFile file, final Document document) {
  String message = UIBundle.message("file.cache.conflict.message.text", file.getPresentableUrl());

  final DialogBuilder builder = new DialogBuilder();
  builder.setCenterPanel(new JLabel(message, Messages.getQuestionIcon(), SwingConstants.CENTER));
  builder.addOkAction().setText(UIBundle.message("file.cache.conflict.load.fs.changes.button"));
  builder.addCancelAction().setText(UIBundle.message("file.cache.conflict.keep.memory.changes.button"));
  builder.addAction(new AbstractAction(UIBundle.message("file.cache.conflict.show.difference.button")) {
    @Override
    public void actionPerformed(ActionEvent e) {
      final ProjectEx project = (ProjectEx)ProjectLocator.getInstance().guessProjectForFile(file);

      FileType fileType = file.getFileType();
      String fsContent = LoadTextUtil.loadText(file).toString();
      DocumentContent content1 = DiffContentFactory.getInstance().create(fsContent, fileType);
      DocumentContent content2 = DiffContentFactory.getInstance().create(project, document, file);
      String title = UIBundle.message("file.cache.conflict.for.file.dialog.title", file.getPresentableUrl());
      String title1 = UIBundle.message("file.cache.conflict.diff.content.file.system.content");
      String title2 = UIBundle.message("file.cache.conflict.diff.content.memory.content");
      DiffRequest request = new SimpleDiffRequest(title, content1, content2, title1, title2);
      request.putUserData(DiffUserDataKeys.GO_TO_SOURCE_DISABLE, true);
      DialogBuilder diffBuilder = new DialogBuilder(project);
      DiffRequestPanel diffPanel = DiffManager.getInstance().createRequestPanel(project, diffBuilder, diffBuilder.getWindow());
      diffPanel.setRequest(request);
      diffBuilder.setCenterPanel(diffPanel.getComponent());
      diffBuilder.setDimensionServiceKey("FileDocumentManager.FileCacheConflict");
      diffBuilder.addOkAction().setText(UIBundle.message("file.cache.conflict.save.changes.button"));
      diffBuilder.addCancelAction();
      diffBuilder.setTitle(title);
      if (diffBuilder.show() == DialogWrapper.OK_EXIT_CODE) {
        builder.getDialogWrapper().close(DialogWrapper.CANCEL_EXIT_CODE);
      }
    }
  });
  builder.setTitle(UIBundle.message("file.cache.conflict.dialog.title"));
  builder.setButtonsAlignment(SwingConstants.CENTER);
  builder.setHelpId("reference.dialogs.fileCacheConflict");
  return builder.show() == 0;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:41,代码来源:FileDocumentManagerImpl.java

示例3: ColorBlindnessPanel

import com.intellij.ui.UIBundle; //导入方法依赖的package包/类
public ColorBlindnessPanel() {
  super(new HorizontalLayout(JBUI.scale(10)));
  add(HorizontalLayout.LEFT, myCheckBox);
  add(HorizontalLayout.LEFT, myComboBox);

  JLabel label = new SwingActionLink(new AbstractAction(UIBundle.message("color.blindness.link.to.help")) {
    @Override
    public void actionPerformed(ActionEvent event) {
      HelpManager.getInstance().invokeHelp("Colorblind_Settings");
    }
  });
  add(HorizontalLayout.LEFT, label);
  
  myCheckBox.setSelected(false);
  myCheckBox.addChangeListener(this);
  myCheckBox.setText(UIBundle.message("color.blindness.checkbox.text"));
  int count = 0;
  for (ColorBlindness blindness : ColorBlindness.values()) {
    String name = UIBundle.message(blindness.key);
    if (!name.isEmpty()) {
      myComboBox.addItem(new Item(blindness, name));
      count++;
    }
  }
  myComboBox.setEnabled(false);
  myComboBox.setVisible(count > 1);
  setVisible(count > 0);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:ColorBlindnessPanel.java

示例4: updateStatus

import com.intellij.ui.UIBundle; //导入方法依赖的package包/类
private void updateStatus(PsiFile file) {
  if (isStateChangeable(file)) {
    if (PowerSaveMode.isEnabled()) {
      myCurrentIcon = AllIcons.Ide.HectorNo;
      myToolTipText = "Code analysis is disabled in power save mode.\n";
    }
    else if (HighlightingLevelManager.getInstance(myProject).shouldInspect(file)) {
      myCurrentIcon = AllIcons.Ide.HectorOn;
      myToolTipText = "Current inspection profile: " +
                      InspectionProjectProfileManager.getInstance(file.getProject()).getInspectionProfile().getName() +
                      ".\n";
    }
    else if (HighlightingLevelManager.getInstance(myProject).shouldHighlight(file)) {
      myCurrentIcon = AllIcons.Ide.HectorSyntax;
      myToolTipText = "Highlighting level is: Syntax.\n";
    }
    else {
      myCurrentIcon = AllIcons.Ide.HectorOff;
      myToolTipText = "Inspections are off.\n";
    }
    myToolTipText += UIBundle.message("popup.hints.panel.click.to.configure.highlighting.tooltip.text");
  }
  else {
    myCurrentIcon = AllIcons.Ide.HectorNo;
    myToolTipText = null;
  }

  if (!ApplicationManager.getApplication().isUnitTestMode() && myStatusBar != null) {
    myStatusBar.updateWidget(ID());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:32,代码来源:TogglePopupHintsPanel.java

示例5: createPopupGroup

import com.intellij.ui.UIBundle; //导入方法依赖的package包/类
public final ActionGroup createPopupGroup() {
  final DefaultActionGroup group = createGearPopupGroup();

  group.add(myToggleContentUiTypeAction);

  final DefaultActionGroup moveGroup = new DefaultActionGroup(UIBundle.message("tool.window.move.to.action.group.name"), true);
  final ToolWindowAnchor anchor = myInfo.getAnchor();
  if (anchor != ToolWindowAnchor.TOP) {
    final AnAction topAction = new ChangeAnchorAction(UIBundle.message("tool.window.move.to.top.action.name"), ToolWindowAnchor.TOP);
    moveGroup.add(topAction);
  }
  if (anchor != ToolWindowAnchor.LEFT) {
    final AnAction leftAction = new ChangeAnchorAction(UIBundle.message("tool.window.move.to.left.action.name"), ToolWindowAnchor.LEFT);
    moveGroup.add(leftAction);
  }
  if (anchor != ToolWindowAnchor.BOTTOM) {
    final AnAction bottomAction =
      new ChangeAnchorAction(UIBundle.message("tool.window.move.to.bottom.action.name"), ToolWindowAnchor.BOTTOM);
    moveGroup.add(bottomAction);
  }
  if (anchor != ToolWindowAnchor.RIGHT) {
    final AnAction rightAction =
      new ChangeAnchorAction(UIBundle.message("tool.window.move.to.right.action.name"), ToolWindowAnchor.RIGHT);
    moveGroup.add(rightAction);
  }
  group.add(moveGroup);

  DefaultActionGroup resize = new DefaultActionGroup(ActionsBundle.groupText("ResizeToolWindowGroup"), true);
  resize.add(new ResizeToolWindowAction.Left(myToolWindow, this));
  resize.add(new ResizeToolWindowAction.Right(myToolWindow, this));
  resize.add(new ResizeToolWindowAction.Up(myToolWindow, this));
  resize.add(new ResizeToolWindowAction.Down(myToolWindow, this));

  group.add(resize);

  group.addSeparator();
  group.add(new HideAction());
  return group;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:40,代码来源:InternalDecorator.java

示例6: updateStatus

import com.intellij.ui.UIBundle; //导入方法依赖的package包/类
private void updateStatus(PsiFile file) {
  if (isStateChangeable(file)) {
    if (PowerSaveMode.isEnabled()) {
      myCurrentIcon = AllIcons.Ide.HectorNo;
      myToolTipText = "Code analysis is disabled in power save mode. ";
    }
    else if (HighlightLevelUtil.shouldInspect(file)) {
      myCurrentIcon = AllIcons.Ide.HectorOn;
      myToolTipText = "Current inspection profile: " +
                      InspectionProjectProfileManager.getInstance(file.getProject()).getInspectionProfile().getName() +
                      ". ";
    }
    else if (HighlightLevelUtil.shouldHighlight(file)) {
      myCurrentIcon = AllIcons.Ide.HectorSyntax;
      myToolTipText = "Highlighting level is: Syntax. ";
    }
    else {
      myCurrentIcon = AllIcons.Ide.HectorOff;
      myToolTipText = "Inspections are off. ";
    }
    myToolTipText += UIBundle.message("popup.hints.panel.click.to.configure.highlighting.tooltip.text");
  }
  else {
    myCurrentIcon = AllIcons.Ide.HectorNo;
    myToolTipText = null;
  }

  if (!ApplicationManager.getApplication().isUnitTestMode() && myStatusBar != null) {
    myStatusBar.updateWidget(ID());
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:32,代码来源:TogglePopupHintsPanel.java

示例7: getText

import com.intellij.ui.UIBundle; //导入方法依赖的package包/类
@Nonnull
public String getText() {
  final Editor editor = getEditor();
  if (editor != null) {
    return editor.isColumnMode()
           ? UIBundle.message("status.bar.column.status.text")
           : editor.isInsertMode()
             ? UIBundle.message("status.bar.insert.status.text")
             : UIBundle.message("status.bar.overwrite.status.text");

  }

  return "";
}
 
开发者ID:consulo,项目名称:consulo,代码行数:15,代码来源:InsertOverwritePanel.java

示例8: askReloadFromDisk

import com.intellij.ui.UIBundle; //导入方法依赖的package包/类
public boolean askReloadFromDisk(VirtualFile file, Document document) {
  String message = UIBundle.message("file.cache.conflict.message.text", file.getPresentableUrl());

  final DialogBuilder builder = new DialogBuilder();
  builder.setCenterPanel(new JLabel(message, Messages.getQuestionIcon(), SwingConstants.CENTER));
  builder.addOkAction().setText(UIBundle.message("file.cache.conflict.load.fs.changes.button"));
  builder.addCancelAction().setText(UIBundle.message("file.cache.conflict.keep.memory.changes.button"));
  builder.addAction(new AbstractAction(UIBundle.message("file.cache.conflict.show.difference.button")) {
    @Override
    public void actionPerformed(ActionEvent e) {
      final ProjectEx project = (ProjectEx)ProjectLocator.getInstance().guessProjectForFile(file);

      FileType fileType = file.getFileType();
      String fsContent = LoadTextUtil.loadText(file).toString();
      DocumentContent content1 = DiffContentFactory.getInstance().create(project, fsContent, fileType);
      DocumentContent content2 = DiffContentFactory.getInstance().create(project, document, file);
      String title = UIBundle.message("file.cache.conflict.for.file.dialog.title", file.getPresentableUrl());
      String title1 = UIBundle.message("file.cache.conflict.diff.content.file.system.content");
      String title2 = UIBundle.message("file.cache.conflict.diff.content.memory.content");
      DiffRequest request = new SimpleDiffRequest(title, content1, content2, title1, title2);
      request.putUserData(DiffUserDataKeys.GO_TO_SOURCE_DISABLE, true);
      DialogBuilder diffBuilder = new DialogBuilder(project);
      DiffRequestPanel diffPanel = DiffManager.getInstance().createRequestPanel(project, diffBuilder, diffBuilder.getWindow());
      diffPanel.setRequest(request);
      diffBuilder.setCenterPanel(diffPanel.getComponent());
      diffBuilder.setDimensionServiceKey("FileDocumentManager.FileCacheConflict");
      diffBuilder.addOkAction().setText(UIBundle.message("file.cache.conflict.save.changes.button"));
      diffBuilder.addCancelAction();
      diffBuilder.setTitle(title);
      if (diffBuilder.show() == DialogWrapper.OK_EXIT_CODE) {
        builder.getDialogWrapper().close(DialogWrapper.CANCEL_EXIT_CODE);
      }
    }
  });
  builder.setTitle(UIBundle.message("file.cache.conflict.dialog.title"));
  builder.setButtonsAlignment(SwingConstants.CENTER);
  builder.setHelpId("reference.dialogs.fileCacheConflict");
  return builder.show() == 0;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:40,代码来源:MemoryDiskConflictResolver.java

示例9: updateStatus

import com.intellij.ui.UIBundle; //导入方法依赖的package包/类
private void updateStatus(PsiFile file) {
  if (isDisposed()) return;
  if (isStateChangeable(file)) {
    if (PowerSaveMode.isEnabled()) {
      myCurrentIcon = AllIcons.Ide.HectorNo;
      myToolTipText = "Code analysis is disabled in power save mode.\n";
    }
    else if (HighlightingLevelManager.getInstance(myProject).shouldInspect(file)) {
      myCurrentIcon = AllIcons.Ide.HectorOn;
      myToolTipText = "Current inspection profile: " +
                      InspectionProjectProfileManager.getInstance(file.getProject()).getInspectionProfile().getName() +
                      ".\n";
    }
    else if (HighlightingLevelManager.getInstance(myProject).shouldHighlight(file)) {
      myCurrentIcon = AllIcons.Ide.HectorSyntax;
      myToolTipText = "Highlighting level is: Syntax.\n";
    }
    else {
      myCurrentIcon = AllIcons.Ide.HectorOff;
      myToolTipText = "Inspections are off.\n";
    }
    myToolTipText += UIBundle.message("popup.hints.panel.click.to.configure.highlighting.tooltip.text");
  }
  else {
    myCurrentIcon = AllIcons.Ide.HectorNo;
    myToolTipText = null;
  }

  if (!ApplicationManager.getApplication().isUnitTestMode() && myStatusBar != null) {
    myStatusBar.updateWidget(ID());
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:33,代码来源:TogglePopupHintsPanel.java

示例10: getContentChooserTitle

import com.intellij.ui.UIBundle; //导入方法依赖的package包/类
@NotNull
@Override
protected String getContentChooserTitle(@Nullable final Editor editor, @NotNull final JComponent focusedComponent) {
    return UIBundle.message("choose.content.to.paste.dialog.title");
}
 
开发者ID:vsch,项目名称:MissingInActions,代码行数:6,代码来源:MiaMultiplePasteAction.java

示例11: getActionName

import com.intellij.ui.UIBundle; //导入方法依赖的package包/类
@NotNull
public String getActionName() {
  return UIBundle.message("tool.window.name.debug");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:DefaultDebugExecutor.java

示例12: getTooltipText

import com.intellij.ui.UIBundle; //导入方法依赖的package包/类
public String getTooltipText() {
  return isReadonlyApplicable() ? UIBundle.message("read.only.attr.panel.double.click.to.toggle.attr.tooltip.text") : null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ToggleReadOnlyAttributePanel.java

示例13: getTooltipText

import com.intellij.ui.UIBundle; //导入方法依赖的package包/类
public String getTooltipText() {
  return UIBundle.message("go.to.line.command.double.click");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:PositionPanel.java

示例14: createPopupGroup

import com.intellij.ui.UIBundle; //导入方法依赖的package包/类
public final ActionGroup createPopupGroup(boolean skipHideAction) {
  final DefaultActionGroup group = createGearPopupGroup();
  if (!ToolWindowId.PREVIEW.equals(myInfo.getId())) {
    group.add(myToggleContentUiTypeAction);
  }

  final DefaultActionGroup moveGroup = new DefaultActionGroup(UIBundle.message("tool.window.move.to.action.group.name"), true);
  final ToolWindowAnchor anchor = myInfo.getAnchor();
  if (anchor != ToolWindowAnchor.TOP) {
    final AnAction topAction = new ChangeAnchorAction(UIBundle.message("tool.window.move.to.top.action.name"), ToolWindowAnchor.TOP);
    moveGroup.add(topAction);
  }
  if (anchor != ToolWindowAnchor.LEFT) {
    final AnAction leftAction = new ChangeAnchorAction(UIBundle.message("tool.window.move.to.left.action.name"), ToolWindowAnchor.LEFT);
    moveGroup.add(leftAction);
  }
  if (anchor != ToolWindowAnchor.BOTTOM) {
    final AnAction bottomAction =
      new ChangeAnchorAction(UIBundle.message("tool.window.move.to.bottom.action.name"), ToolWindowAnchor.BOTTOM);
    moveGroup.add(bottomAction);
  }
  if (anchor != ToolWindowAnchor.RIGHT) {
    final AnAction rightAction =
      new ChangeAnchorAction(UIBundle.message("tool.window.move.to.right.action.name"), ToolWindowAnchor.RIGHT);
    moveGroup.add(rightAction);
  }
  group.add(moveGroup);

  DefaultActionGroup resize = new DefaultActionGroup(ActionsBundle.groupText("ResizeToolWindowGroup"), true);
  resize.add(new ResizeToolWindowAction.Left(myToolWindow, this));
  resize.add(new ResizeToolWindowAction.Right(myToolWindow, this));
  resize.add(new ResizeToolWindowAction.Up(myToolWindow, this));
  resize.add(new ResizeToolWindowAction.Down(myToolWindow, this));
  resize.add(ActionManager.getInstance().getAction("MaximizeToolWindow"));

  group.add(resize);
  if (!skipHideAction) {
    group.addSeparator();
    group.add(new HideAction());
  }
  return group;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:43,代码来源:InternalDecorator.java

示例15: getCloseActionName

import com.intellij.ui.UIBundle; //导入方法依赖的package包/类
@Override
public String getCloseActionName() {
  return UIBundle.message("tabbed.pane.close.tab.action.name");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:TabContentLayout.java


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