Java Code Examples for com.intellij.codeInsight.CodeInsightBundle#message()

The following examples show how to use com.intellij.codeInsight.CodeInsightBundle#message() . 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 File: OptimizeImportsAction.java    From consulo with Apache License 2.0 6 votes vote down vote up
@Nullable
@Override
protected JComponent createCenterPanel() {
  JPanel panel = new JPanel();
  BoxLayout layout = new BoxLayout(panel, BoxLayout.Y_AXIS);
  panel.setLayout(layout);

  panel.add(new JLabel(myText));
  myOnlyVcsCheckBox = new JCheckBox(CodeInsightBundle.message("process.scope.changed.files"));
  boolean lastRunVcsChangedTextEnabled = myLastRunOptions.getLastTextRangeType() == TextRangeType.VCS_CHANGED_TEXT;

  myOnlyVcsCheckBox.setEnabled(myContextHasChanges);
  myOnlyVcsCheckBox.setSelected(myContextHasChanges && lastRunVcsChangedTextEnabled);
  myOnlyVcsCheckBox.setBorder(new EmptyBorder(0, 10, 0, 0));
  panel.add(myOnlyVcsCheckBox);
  return panel;
}
 
Example 2
Source File: ParameterInfoComponent.java    From consulo with Apache License 2.0 6 votes vote down vote up
private void setShortcutLabel() {
  if (myShortcutLabel != null) remove(myShortcutLabel);

  String upShortcut = KeymapUtil.getFirstKeyboardShortcutText(IdeActions.ACTION_METHOD_OVERLOAD_SWITCH_UP);
  String downShortcut = KeymapUtil.getFirstKeyboardShortcutText(IdeActions.ACTION_METHOD_OVERLOAD_SWITCH_DOWN);
  if (!myAllowSwitchLabel || myObjects.length <= 1 || !myHandler.supportsOverloadSwitching() || upShortcut.isEmpty() && downShortcut.isEmpty()) {
    myShortcutLabel = null;
  }
  else {
    myShortcutLabel = new JLabel(upShortcut.isEmpty() || downShortcut.isEmpty()
                                 ? CodeInsightBundle.message("parameter.info.switch.overload.shortcuts.single", upShortcut.isEmpty() ? downShortcut : upShortcut)
                                 : CodeInsightBundle.message("parameter.info.switch.overload.shortcuts", upShortcut, downShortcut));
    myShortcutLabel.setForeground(CONTEXT_HELP_FOREGROUND);
    Font labelFont = UIUtil.getLabelFont();
    myShortcutLabel.setFont(labelFont.deriveFont(labelFont.getSize2D() - (SystemInfo.isWindows ? 1 : 2)));
    myShortcutLabel.setBorder(JBUI.Borders.empty(6, 10, 0, 10));
    add(myShortcutLabel, BorderLayout.SOUTH);
  }
}
 
Example 3
Source File: ReformatCodeAction.java    From consulo with Apache License 2.0 6 votes vote down vote up
@Nullable
private static ReformatFilesOptions getLayoutProjectOptions(@Nonnull Project project, @Nullable Module module) {
  if (ApplicationManager.getApplication().isUnitTestMode()) {
    return myTestOptions;
  }

  final String text = module != null ? CodeInsightBundle.message("process.scope.module", module.getModuleDir())
                                     : CodeInsightBundle.message("process.scope.project", project.getPresentableUrl());

  final boolean enableOnlyVCSChangedRegions = module != null ? FormatChangedTextUtil.hasChanges(module)
                                                             : FormatChangedTextUtil.hasChanges(project);

  LayoutProjectCodeDialog dialog =
          new LayoutProjectCodeDialog(project, CodeInsightBundle.message("process.reformat.code"), text, enableOnlyVCSChangedRegions);
  if (!dialog.showAndGet()) {
    return null;
  }
  return dialog;
}
 
Example 4
Source File: RenameFileReferenceIntentionAction.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
@Nonnull
public String getFamilyName() {
  return CodeInsightBundle.message("rename.file.reference.family");
}
 
Example 5
Source File: EnumMacro.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public String getPresentableName() {
  return CodeInsightBundle.message("macro.enum");
}
 
Example 6
Source File: GotoImplementationHandler.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
protected String getNotFoundMessage(@Nonnull Project project, @Nonnull Editor editor, @Nonnull PsiFile file) {
  return CodeInsightBundle.message("goto.implementation.notFound");
}
 
Example 7
Source File: GotoImplementationHandler.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
protected String getFindUsagesTitle(@Nonnull PsiElement sourceElement, String name, int length) {
  return CodeInsightBundle.message("goto.implementation.findUsages.title", name, length);
}
 
Example 8
Source File: LiveTemplatesConfigurable.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public String getDisplayName() {
  return CodeInsightBundle.message("templates.settings.page.title");
}
 
Example 9
Source File: RenameFileFix.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
@Nonnull
public String getText() {
  return CodeInsightBundle.message("rename.file.fix");
}
 
Example 10
Source File: GotoTestOrCodeHandler.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
protected String getNotFoundMessage(@Nonnull Project project, @Nonnull Editor editor, @Nonnull PsiFile file) {
  return CodeInsightBundle.message("goto.test.notFound");
}
 
Example 11
Source File: DocumentationComponent.java    From consulo with Apache License 2.0 4 votes vote down vote up
private ExternalDocAction() {
  super(CodeInsightBundle.message("javadoc.action.view.external"), null, AllIcons.Actions.PreviousOccurence);
  registerCustomShortcutSet(ActionManager.getInstance().getAction(IdeActions.ACTION_EXTERNAL_JAVADOC).getShortcutSet(), null);
}
 
Example 12
Source File: CapitalizeMacro.java    From consulo with Apache License 2.0 4 votes vote down vote up
public CapitalizeMacro() {
  super("capitalize", CodeInsightBundle.message("macro.capitalize.string"));
}
 
Example 13
Source File: RenameFileReferenceIntentionAction.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
@Nonnull
public String getText() {
  return CodeInsightBundle.message("rename.file.reference.text", myExistingElementName);
}
 
Example 14
Source File: EnableDisableIntentionAction.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
@Nonnull
public String getText() {
  final IntentionManagerSettings mySettings = IntentionManagerSettings.getInstance();
  return CodeInsightBundle.message(mySettings.isEnabled(myAction) ? "disable.intention.action" : "enable.intention.action", myFamilyName);
}
 
Example 15
Source File: IntentionSettingsConfigurable.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public String getDisplayName() {
  return CodeInsightBundle.message("intention.settings");
}
 
Example 16
Source File: ImplementationViewComponent.java    From consulo with Apache License 2.0 4 votes vote down vote up
public BackAction() {
  super(CodeInsightBundle.message("quick.definition.back"), null, AllIcons.Actions.Back);
}
 
Example 17
Source File: ReplaceUnderscoresToCamelCaseMacro.java    From consulo with Apache License 2.0 4 votes vote down vote up
public ReplaceUnderscoresToCamelCaseMacro() {
  super("underscoresToCamelCase", CodeInsightBundle.message("macro.undescoresToCamelCase.string"));
}
 
Example 18
Source File: DebuggerTreeWithHistoryContainer.java    From consulo with Apache License 2.0 4 votes vote down vote up
public GoForwardAction() {
  super(CodeInsightBundle.message("quick.definition.forward"), null, AllIcons.Actions.Forward);
}
 
Example 19
Source File: FileNameMacro.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public String getPresentableName() {
  return CodeInsightBundle.message("macro.file.name");
}
 
Example 20
Source File: IntroduceLocalVariableIntention.java    From consulo-csharp with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
public String getText()
{
	return CodeInsightBundle.message("intention.introduce.variable.text");
}