com.intellij.openapi.editor.actions.ScrollToTheEndToolbarAction Java Examples
The following examples show how to use
com.intellij.openapi.editor.actions.ScrollToTheEndToolbarAction.
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: DuplexConsoleView.java From consulo with Apache License 2.0 | 6 votes |
@Nonnull private List<AnAction> mergeConsoleActions(@Nonnull List<AnAction> actions1, @Nonnull Collection<AnAction> actions2) { return ContainerUtil.map(actions1, action1 -> { final AnAction action2 = ContainerUtil.find(actions2, action -> action1.getClass() == action.getClass() && StringUtil.equals(action1.getTemplatePresentation().getText(), action.getTemplatePresentation().getText())); if (action2 instanceof ToggleUseSoftWrapsToolbarAction) { return new MergedWrapTextAction(((ToggleUseSoftWrapsToolbarAction)action1), (ToggleUseSoftWrapsToolbarAction)action2); } else if (action2 instanceof ScrollToTheEndToolbarAction) { return new MergedToggleAction(((ToggleAction)action1), (ToggleAction)action2); } else if (action2 instanceof ConsoleViewImpl.ClearAllAction) { return new MergedAction(action1, action2); } else { return action1; } }); }
Example #2
Source File: BsToolWindowFactory.java From reasonml-idea-plugin with MIT License | 5 votes |
@NotNull private ActionToolbar createToolbar(@NotNull BsConsole console) { DefaultActionGroup group = new DefaultActionGroup(); group.add(new ScrollToTheEndToolbarAction(console.getEditor())); group.add(new ClearLogAction(console)); group.add(new BsMakeAction()); group.add(new BsMakeWorldAction()); ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar("left", group, false); toolbar.setTargetComponent(console.getComponent()); return toolbar; }
Example #3
Source File: DuneToolWindowFactory.java From reasonml-idea-plugin with MIT License | 5 votes |
@NotNull private ActionToolbar createToolbar(@NotNull BsConsole console) { DefaultActionGroup group = new DefaultActionGroup(); group.add(new ScrollToTheEndToolbarAction(console.getEditor())); group.add(new ClearLogAction(console)); group.add(new DuneBuildAction()); group.add(new DuneCleanAction()); group.add(new DuneInstallAction()); ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar("left", group, false); toolbar.setTargetComponent(console.getComponent()); return toolbar; }
Example #4
Source File: EsyToolWindowFactory.java From reasonml-idea-plugin with MIT License | 5 votes |
@NotNull private ActionToolbar createToolbar(@NotNull BsConsole console) { DefaultActionGroup group = new DefaultActionGroup(); group.add(new ScrollToTheEndToolbarAction(console.getEditor())); group.add(new ClearLogAction(console)); group.add(new EsyInstallAction()); group.add(new EsyBuildAction()); group.add(new EsyShellAction()); ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar("left", group, false); toolbar.setTargetComponent(console.getComponent()); return toolbar; }
Example #5
Source File: ConsoleLogToolWindowFactory.java From aem-ide-tooling-4-intellij with Apache License 2.0 | 5 votes |
private static ActionToolbar createToolbar(Project project, Editor editor, ConsoleLogConsole console) { DefaultActionGroup group = new DefaultActionGroup(); group.add(new EditNotificationSettings(project)); group.add(new DisplayBalloons()); group.add(new ToggleSoftWraps(editor)); group.add(new ScrollToTheEndToolbarAction(editor)); group.add(ActionManager.getInstance().getAction(IdeActions.ACTION_MARK_ALL_NOTIFICATIONS_AS_READ)); group.add(new ConsoleLogConsole.ClearLogAction(console)); group.add(new ContextHelpAction(ConsoleLog.HELP_ID)); return ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, group, false); }
Example #6
Source File: EventLogToolWindowFactory.java From consulo with Apache License 2.0 | 5 votes |
private static ActionToolbar createToolbar(Project project, Editor editor, EventLogConsole console) { DefaultActionGroup group = new DefaultActionGroup(); group.add(new EditNotificationSettings(project)); group.add(new DisplayBalloons()); group.add(new ToggleSoftWraps(editor)); group.add(new ScrollToTheEndToolbarAction(editor)); group.add(ActionManager.getInstance().getAction(IdeActions.ACTION_MARK_ALL_NOTIFICATIONS_AS_READ)); group.add(new EventLogConsole.ClearLogAction(console)); group.add(new ContextHelpAction(EventLog.HELP_ID)); return ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, group, false); }
Example #7
Source File: ConsoleViewImpl.java From consulo with Apache License 2.0 | 5 votes |
@Override @Nonnull public AnAction[] createConsoleActions() { //Initializing prev and next occurrences actions final CommonActionsManager actionsManager = CommonActionsManager.getInstance(); final AnAction prevAction = actionsManager.createPrevOccurenceAction(this); prevAction.getTemplatePresentation().setText(getPreviousOccurenceActionName()); final AnAction nextAction = actionsManager.createNextOccurenceAction(this); nextAction.getTemplatePresentation().setText(getNextOccurenceActionName()); final AnAction switchSoftWrapsAction = new ToggleUseSoftWrapsToolbarAction(SoftWrapAppliancePlaces.CONSOLE) { @Override protected Editor getEditor(@Nonnull AnActionEvent e) { return myEditor; } }; final AnAction autoScrollToTheEndAction = new ScrollToTheEndToolbarAction(myEditor); List<AnAction> consoleActions = new ArrayList<>(); consoleActions.add(prevAction); consoleActions.add(nextAction); consoleActions.add(switchSoftWrapsAction); consoleActions.add(autoScrollToTheEndAction); consoleActions.add(ActionManager.getInstance().getAction("Print")); consoleActions.add(new ClearThisConsoleAction(this)); consoleActions.addAll(customActions); List<ConsoleActionsPostProcessor> postProcessors = ConsoleActionsPostProcessor.EP_NAME.getExtensionList(); AnAction[] result = consoleActions.toArray(AnAction.EMPTY_ARRAY); for (ConsoleActionsPostProcessor postProcessor : postProcessors) { result = postProcessor.postProcess(this, result); } return result; }