use of com.intellij.openapi.actionSystem.AnAction in project intellij-community by JetBrains.
the class GradleTestsExecutionConsoleManager method getRestartActions.
@Override
public AnAction[] getRestartActions(@NotNull final GradleTestsExecutionConsole consoleView) {
JavaRerunFailedTestsAction rerunFailedTestsAction = new GradleRerunFailedTestsAction(consoleView);
rerunFailedTestsAction.setModelProvider(() -> consoleView.getResultsViewer());
return new AnAction[] { rerunFailedTestsAction };
}
use of com.intellij.openapi.actionSystem.AnAction in project intellij-community by JetBrains.
the class ApplyGradlePluginCallback method hyperlinkActivated.
@Override
protected void hyperlinkActivated(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
new GotoSourceNotificationCallback(myNotificationData, myProject).hyperlinkActivated(notification, event);
final AnAction action = ActionManager.getInstance().getAction(AddGradleDslPluginAction.ID);
assert action instanceof AddGradleDslPluginAction;
final AddGradleDslPluginAction addGradleDslPluginAction = (AddGradleDslPluginAction) action;
ActionManager.getInstance().tryToExecute(addGradleDslPluginAction, ActionCommand.getInputEvent(AddGradleDslPluginAction.ID), null, ActionPlaces.UNKNOWN, true);
}
use of com.intellij.openapi.actionSystem.AnAction in project intellij-community by JetBrains.
the class QuickChangeCodeStyleSchemeAction method fillActions.
@Override
protected void fillActions(Project project, @NotNull DefaultActionGroup group, @NotNull DataContext dataContext) {
final CodeStyleSettingsManager manager = CodeStyleSettingsManager.getInstance(project);
if (manager.PER_PROJECT_SETTINGS != null) {
//noinspection HardCodedStringLiteral
group.add(new AnAction("<project>", "", manager.USE_PER_PROJECT_SETTINGS ? ourCurrentAction : ourNotCurrentAction) {
@Override
public void actionPerformed(@NotNull AnActionEvent e) {
manager.USE_PER_PROJECT_SETTINGS = true;
}
});
}
CodeStyleScheme currentScheme = CodeStyleSchemes.getInstance().getCurrentScheme();
for (CodeStyleScheme scheme : CodeStyleSchemesImpl.getSchemeManager().getAllSchemes()) {
addScheme(group, manager, currentScheme, scheme, false);
}
}
use of com.intellij.openapi.actionSystem.AnAction in project intellij-community by JetBrains.
the class AutoPopupController method setupListeners.
private void setupListeners() {
ActionManagerEx.getInstanceEx().addAnActionListener(new AnActionListener() {
@Override
public void beforeActionPerformed(AnAction action, DataContext dataContext, AnActionEvent event) {
cancelAllRequest();
}
@Override
public void beforeEditorTyping(char c, DataContext dataContext) {
cancelAllRequest();
}
@Override
public void afterActionPerformed(final AnAction action, final DataContext dataContext, AnActionEvent event) {
}
}, this);
IdeEventQueue.getInstance().addActivityListener(() -> cancelAllRequest(), this);
}
use of com.intellij.openapi.actionSystem.AnAction in project intellij-community by JetBrains.
the class UseConsoleInputAction method setSelected.
@Override
public void setSelected(AnActionEvent event, boolean state) {
useProcessStdIn = !state;
LanguageConsoleView consoleView = (LanguageConsoleView) event.getData(LangDataKeys.CONSOLE_VIEW);
assert consoleView != null;
DaemonCodeAnalyzer daemonCodeAnalyzer = DaemonCodeAnalyzer.getInstance(consoleView.getProject());
PsiFile file = consoleView.getFile();
daemonCodeAnalyzer.setHighlightingEnabled(file, state);
daemonCodeAnalyzer.restart(file);
PropertiesComponent.getInstance().setValue(processInputStateKey, useProcessStdIn);
List<AnAction> actions = ActionUtil.getActions(consoleView.getConsoleEditor().getComponent());
ConsoleExecuteAction action = ContainerUtil.findInstance(actions, ConsoleExecuteAction.class);
action.myExecuteActionHandler.myUseProcessStdIn = !state;
}
Aggregations