public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
- this.context = context;
+ Activator.context = context;
Bundle bundle = context.getBundle();
public void startedExecution() {
Simantics.getSession().markUndoPoint();
}
-
- @Override
- public void finishedExecution() {
- }
-
- @Override
- public void consoleIsNotEmptyAnymore() {
- }
}, properties);
context.registerService(ImportModulesAction.class, OntologyImportModulesAction.INSTANCE,
package org.simantics.scl.compiler.commands;
public interface SCLConsoleListener {
- void startedExecution();
- void finishedExecution();
- void consoleIsNotEmptyAnymore();
+ default void startedExecution() {}
+ default void finishedExecution() {}
+ default void consoleIsNotEmptyAnymore() {}
}
store.setDefault(REFRESH_AUTOMATICALLY, true);
this.console = new SCLConsole(parent, SWT.NONE);
-
- setRefreshAutomatically(store.getBoolean(REFRESH_AUTOMATICALLY), false);
- setCurrentImports(readImportPreferences());
-
- addScriptDropSupport(console);
IToolBarManager toolBarManager = getViewSite().getActionBars().getToolBarManager();
manageImports();
}
});
-
+
// Show action for running SCL tests if in development mode
if (Platform.inDevelopmentMode()) {
toolBarManager.add(new Action("Run tests",
}
toolBarManager.update(true);
+
+ setRefreshAutomatically(store.getBoolean(REFRESH_AUTOMATICALLY), false);
+ // Do this after the actions and SCLConsoleListener are
+ // registered because it can cause output to the console.
+ setCurrentImports(readImportPreferences());
+ addScriptDropSupport(console);
}
private class ScriptRunningDropTarget extends DropTargetAdapter {
toolBarManager.add(clearAction);
console.addListener(new SCLConsoleListener() {
- @Override
- public void startedExecution() {
- }
- @Override
- public void finishedExecution() {
- }
@Override
public void consoleIsNotEmptyAnymore() {
clearAction.setEnabled(true);