private static final Logger LOGGER = LoggerFactory.getLogger(SCLScripts.class);
- private static final String SCL_CONSOLE_ID = "org.simantics.scl.ui.console";
+ private static final String SCL_SCRIPT_CONSOLE_ID = "org.simantics.scl.ui.scriptConsole";
/**
* @param processor database handle
public static Pair<CommandSession, SCLReportingHandler> getSCLConsoleCommandSession(boolean createIfNecessary) {
IWorkbenchPart part;
+ SCLReportingHandler handler = SCLReportingHandler.DEFAULT_WITHOUT_ECHO;
try {
part = createIfNecessary
- ? WorkbenchUtils.showView(SCL_CONSOLE_ID, IWorkbenchPage.VIEW_VISIBLE)
- : WorkbenchUtils.findView(SCL_CONSOLE_ID);
+ ? WorkbenchUtils.showView(SCL_SCRIPT_CONSOLE_ID, IWorkbenchPage.VIEW_VISIBLE)
+ : WorkbenchUtils.findView(SCL_SCRIPT_CONSOLE_ID);
if (part != null)
- return Pair.make(part.getAdapter(CommandSession.class), part.getAdapter(SCLReportingHandler.class));
+ return Pair.make(new CommandSession(SCLOsgi.MODULE_REPOSITORY, handler), part.getAdapter(SCLReportingHandler.class));
} catch (PartInitException e) {
LOGGER.error("Failed to open SCL Console view. Using new CommandSession, reporting to stdout via Logger.", e);
}
- SCLReportingHandler handler = SCLReportingHandler.DEFAULT_WITHOUT_ECHO;
return Pair.make(new CommandSession(SCLOsgi.MODULE_REPOSITORY, handler), SCLReportingHandler.DEFAULT);
}