use of org.eclipse.ui.console.IConsoleManager in project tmdm-studio-se by Talend.
the class MDMServerConsoleFactory method showMDMServerConsole.
public void showMDMServerConsole(MDMServerDef serverDef) {
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (window == null) {
return;
}
IWorkbenchPage page = window.getActivePage();
if (page == null) {
return;
}
Map<String, MDMServerMessageConsole> serverToConsole = getServerToConsole();
MDMServerMessageConsole mdmServerConsole = serverToConsole.get(serverDef.getName());
if (mdmServerConsole == null) {
mdmServerConsole = createMDMServerMessageConsole(serverDef);
serverToConsole.put(serverDef.getName(), mdmServerConsole);
}
if (!containedMDMServerMessageConsole(mdmServerConsole)) {
IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager();
consoleManager.addConsoles(new IConsole[] { mdmServerConsole });
mdmServerConsole.activate();
} else {
mdmServerConsole.setServerDef(serverDef);
mdmServerConsole.reload();
ConsolePlugin.getDefault().getConsoleManager().showConsoleView(mdmServerConsole);
}
// boolean showed = showConsoleView(serverDef.getName());
// if (showed) {
// }
}
Aggregations