+ this.context = context;
+
+ if (PlatformUI.isWorkbenchRunning())
+ PlatformUI.getWorkbench().getDisplay().asyncExec(this::initConsole);
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ this.context = null;
+ super.stop(context);
+ }
+
+ private void initConsole() {
+ if (PlatformUI.getWorkbench().getDisplay().isDisposed())
+ return;