use of com.intellij.execution.RunManagerListener 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.RunManagerListener 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);
}
});
}
Aggregations