Java 类com.intellij.openapi.editor.EditorBundle 实例源码

项目:intellij-ce-playground    文件:ForcedSoftWrapsNotificationProvider.java   
@Nullable
@Override
public EditorNotificationPanel createNotificationPanel(@NotNull final VirtualFile file, @NotNull final FileEditor fileEditor) {
  if (!(fileEditor instanceof TextEditor)) return null;
  final Editor editor = ((TextEditor)fileEditor).getEditor();
  final Project project = editor.getProject();
  if (project == null 
      || !Boolean.TRUE.equals(editor.getUserData(EditorImpl.FORCED_SOFT_WRAPS)) 
      || PropertiesComponent.getInstance().isTrueValue(DISABLED_NOTIFICATION_KEY)) return null;

  final EditorNotificationPanel panel = new EditorNotificationPanel();
  panel.setText(EditorBundle.message("forced.soft.wrap.message"));
  panel.createActionLabel(EditorBundle.message("forced.soft.wrap.hide.message"), new Runnable() {
    @Override
    public void run() {
      editor.putUserData(EditorImpl.FORCED_SOFT_WRAPS, null);
      EditorNotifications.getInstance(project).updateNotifications(file);
    }
  });
  panel.createActionLabel(EditorBundle.message("forced.soft.wrap.dont.show.again.message"), new Runnable() {
    @Override
    public void run() {
      PropertiesComponent.getInstance().setValue(DISABLED_NOTIFICATION_KEY, "true");
      EditorNotifications.getInstance(project).updateAllNotifications();
    }
  });
  return panel;
}
项目:consulo    文件:EditorNotificationPanel.java   
@Nls
@Nonnull
@Override
public String getText() {
  String text = myLabel.getText();
  return StringUtil.isEmpty(text) ? EditorBundle.message("editor.notification.default.action.name") : StringUtil.shortenTextWithEllipsis(text, 50, 0);
}
项目:consulo    文件:ForcedSoftWrapsNotificationProvider.java   
@RequiredReadAction
@RequiredDispatchThread
@Nullable
@Override
public EditorNotificationPanel createNotificationPanel(@Nonnull final VirtualFile file, @Nonnull final FileEditor fileEditor) {
  if (!(fileEditor instanceof TextEditor)) return null;
  final Editor editor = ((TextEditor)fileEditor).getEditor();
  final Project project = editor.getProject();
  if (project == null ||
      !Boolean.TRUE.equals(editor.getUserData(EditorImpl.FORCED_SOFT_WRAPS)) ||
      PropertiesComponent.getInstance().isTrueValue(DISABLED_NOTIFICATION_KEY)) {
    return null;
  }

  final EditorNotificationPanel panel = new EditorNotificationPanel();
  panel.setText(EditorBundle.message("forced.soft.wrap.message"));
  panel.createActionLabel(EditorBundle.message("forced.soft.wrap.hide.message"), new Runnable() {
    @Override
    public void run() {
      editor.putUserData(EditorImpl.FORCED_SOFT_WRAPS, null);
      EditorNotifications.getInstance(project).updateNotifications(file);
    }
  });
  panel.createActionLabel(EditorBundle.message("forced.soft.wrap.dont.show.again.message"), new Runnable() {
    @Override
    public void run() {
      PropertiesComponent.getInstance().setValue(DISABLED_NOTIFICATION_KEY, "true");
      EditorNotifications.getInstance(project).updateAllNotifications();
    }
  });
  return panel;
}
项目:hybris-integration-intellij-idea-plugin    文件:DefaultCommonIdeaService.java   
@Override
public boolean isTypingActionInProgress() {
    return StringUtils.equals(
        this.commandProcessor.getCurrentCommandName(), EditorBundle.message("typing.in.editor.command.name")
    );
}
项目:intellij-ce-playground    文件:ChangeEditorFontSizeAction.java   
protected IncreaseEditorFontSize() {
  super(EditorBundle.message("increase.editor.font"), 1);
}
项目:intellij-ce-playground    文件:ChangeEditorFontSizeAction.java   
protected DecreaseEditorFontSize() {
  super(EditorBundle.message("decrease.editor.font"), -1);
}
项目:intellij-ce-playground    文件:EditorActionManagerImpl.java   
@Override
public void handle(ReadOnlyFragmentModificationException e) {
  Messages.showErrorDialog(EditorBundle.message("guarded.block.modification.attempt.error.message"),
                           EditorBundle.message("guarded.block.modification.attempt.error.title"));
}
项目:tools-idea    文件:EditorActionManagerImpl.java   
@Override
public void handle(ReadOnlyFragmentModificationException e) {
  Messages.showErrorDialog(EditorBundle.message("guarded.block.modification.attempt.error.message"),
                           EditorBundle.message("guarded.block.modification.attempt.error.title"));
}
项目:consulo    文件:EditorNotificationPanel.java   
@Nls
@Nonnull
@Override
public String getText() {
  return EditorBundle.message("editor.notification.settings.option.name");
}
项目:consulo    文件:ChangeEditorFontSizeAction.java   
protected IncreaseEditorFontSize() {
  super(EditorBundle.message("increase.editor.font"), 1);
}
项目:consulo    文件:ChangeEditorFontSizeAction.java   
protected DecreaseEditorFontSize() {
  super(EditorBundle.message("decrease.editor.font"), -1);
}
项目:consulo    文件:EditorActionManagerImpl.java   
@Override
public void handle(ReadOnlyFragmentModificationException e) {
  Messages.showErrorDialog(EditorBundle.message("guarded.block.modification.attempt.error.message"),
                           EditorBundle.message("guarded.block.modification.attempt.error.title"));
}