use of com.intellij.execution.RunnerAndConfigurationSettings in project intellij-community by JetBrains.
the class MavenProjectsNavigator method listenForProjectsChanges.
private void listenForProjectsChanges() {
myProjectsManager.addProjectsTreeListener(new MyProjectsListener());
myShortcutsManager.addListener(new MavenShortcutsManager.Listener() {
@Override
public void shortcutsUpdated() {
scheduleStructureRequest(() -> myStructure.updateGoals());
}
});
myTasksManager.addListener(new MavenTasksManager.Listener() {
@Override
public void compileTasksChanged() {
scheduleStructureRequest(() -> myStructure.updateGoals());
}
});
RunManagerEx.getInstanceEx(myProject).addRunManagerListener(new RunManagerListener() {
@Override
public void beforeRunTasksChanged() {
scheduleStructureRequest(() -> myStructure.updateGoals());
}
});
MavenRunner.getInstance(myProject).getSettings().addListener(new MavenRunnerSettings.Listener() {
@Override
public void skipTestsChanged() {
scheduleStructureRequest(() -> myStructure.updateGoals());
}
});
((RunManagerEx) RunManager.getInstance(myProject)).addRunManagerListener(new RunManagerListener() {
private void changed() {
scheduleStructureRequest(() -> myStructure.updateRunConfigurations());
}
@Override
public void runConfigurationAdded(@NotNull RunnerAndConfigurationSettings settings) {
changed();
}
@Override
public void runConfigurationRemoved(@NotNull RunnerAndConfigurationSettings settings) {
changed();
}
@Override
public void runConfigurationChanged(@NotNull RunnerAndConfigurationSettings settings) {
changed();
}
});
}
use of com.intellij.execution.RunnerAndConfigurationSettings in project intellij-community by JetBrains.
the class EditMavenRunConfigurationAction method actionPerformed.
@Override
public void actionPerformed(@NotNull AnActionEvent e) {
Project project = e.getProject();
RunnerAndConfigurationSettings settings = MavenDataKeys.RUN_CONFIGURATION.getData(e.getDataContext());
assert settings != null && project != null;
RunManager.getInstance(project).setSelectedConfiguration(settings);
EditConfigurationsDialog dialog = new EditConfigurationsDialog(project);
dialog.show();
}
use of com.intellij.execution.RunnerAndConfigurationSettings in project intellij-community by JetBrains.
the class EditMavenRunConfigurationAction method update.
@Override
public void update(@NotNull AnActionEvent e) {
Project project = e.getProject();
RunnerAndConfigurationSettings settings = MavenDataKeys.RUN_CONFIGURATION.getData(e.getDataContext());
boolean enabled = settings != null && project != null;
e.getPresentation().setEnabledAndVisible(enabled);
}
use of com.intellij.execution.RunnerAndConfigurationSettings in project intellij-community by JetBrains.
the class CloudGitRemoteDetector method projectOpened.
@Override
public void projectOpened() {
myProject.getMessageBus().connect().subscribe(GitRepository.GIT_REPO_CHANGE, this);
myRunManager.addRunManagerListener(new RunManagerListener() {
@Override
public void runConfigurationAdded(@NotNull RunnerAndConfigurationSettings settings) {
onRunConfigurationAddedOrChanged(settings);
}
@Override
public void runConfigurationChanged(@NotNull RunnerAndConfigurationSettings settings) {
onRunConfigurationAddedOrChanged(settings);
}
});
}
use of com.intellij.execution.RunnerAndConfigurationSettings in project intellij-community by JetBrains.
the class PluginProjectWizardTest method testPluginProject.
public void testPluginProject() throws Exception {
createSdk("devkit", IdeaJdk.getInstance());
Project project = createProjectFromTemplate(PluginModuleType.getInstance().getName(), null, null);
VirtualFile virtualFile = project.getBaseDir().findFileByRelativePath("resources/META-INF/plugin.xml");
assertNotNull(virtualFile);
RunnerAndConfigurationSettings configuration = RunManager.getInstance(project).getSelectedConfiguration();
assertNotNull(configuration);
ConfigurationType type = configuration.getType();
assertNotNull(type);
assertEquals(DevKitBundle.message("run.configuration.title"), type.getDisplayName());
VirtualFile[] files = FileEditorManager.getInstance(project).getOpenFiles();
assertEquals(1, files.length);
}
Aggregations