use of com.intellij.ui.content.ContentManagerAdapter in project intellij-community by JetBrains.
the class LogConsoleManagerBase method doAddLogConsole.
private void doAddLogConsole(@NotNull final LogConsoleBase log, String id, Icon icon, @Nullable RunProfile runProfile) {
if (runProfile instanceof RunConfigurationBase) {
((RunConfigurationBase) runProfile).customizeLogConsole(log);
}
log.attachStopLogConsoleTrackingListener(getProcessHandler());
addAdditionalTabComponent(log, id, icon);
getUi().addListener(new ContentManagerAdapter() {
@Override
public void selectionChanged(final ContentManagerEvent event) {
log.activate();
}
}, log);
}
use of com.intellij.ui.content.ContentManagerAdapter in project intellij-community by JetBrains.
the class PyDataViewToolWindowFactory method addPythonConsoleListener.
private static void addPythonConsoleListener(@NotNull Project project) {
final ToolWindow pythonConsole = ToolWindowManager.getInstance(project).getToolWindow(PythonConsoleToolWindowFactory.Companion.getID());
if (pythonConsole == null) {
return;
}
pythonConsole.getContentManager().addContentManagerListener(new ContentManagerAdapter() {
@Override
public void contentRemoved(ContentManagerEvent event) {
PyDataView.getInstance(project).closeDisconnectedFromConsoleTabs();
}
});
}
use of com.intellij.ui.content.ContentManagerAdapter in project azure-tools-for-java by Microsoft.
the class StreamingLogsToolWindowManager method getToolWindow.
private ToolWindow getToolWindow(Project project) {
if (toolWindowMap.containsKey(project)) {
return toolWindowMap.get(project);
}
// Add content manager listener when get tool window at the first time
final ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(LOG_TOOL_WINDOW);
toolWindow.getContentManager().addContentManagerListener(new ContentManagerAdapter() {
@Override
public void contentRemoved(ContentManagerEvent contentManagerEvent) {
final String displayName = contentManagerEvent.getContent().getDisplayName();
resourceIdToNameMap.removeValue(displayName);
}
});
toolWindowMap.put(project, toolWindow);
return toolWindow;
}
Aggregations