Esempio n. 1
0
  /**
   * This method is called upon plug-in activation
   *
   * @param context The context
   * @throws Exception if a problem occurs
   */
  @Override
  public void start(final BundleContext context) throws Exception {
    ErlLogger.debug("Starting UI " + Thread.currentThread());
    super.start(context);

    if (SystemConfiguration.getInstance().isDeveloper()) {
      BackendManagerPopup.init();
    }

    loadDefaultEditorColors();

    ErlLogger.debug("Started UI");

    erlConsoleManager = new ErlConsoleManager();
    if (SystemConfiguration.getInstance().isDeveloper()) {
      try {
        final IBackend ideBackend = BackendCore.getBackendManager().getIdeBackend();
        if (!ideBackend.getData().hasConsole()) {
          erlConsoleManager.runtimeAdded(ideBackend);
        }
      } catch (final Exception e) {
        ErlLogger.warn(e);
      }
    }

    erlangDebuggerBackendListener = new ErlangDebuggerBackendListener();
    BackendCore.getBackendManager().addBackendListener(erlangDebuggerBackendListener);

    startPeriodicCacheCleaner();
  }
Esempio n. 2
0
  /**
   * This method is called when the plug-in is stopped
   *
   * @param context the context
   * @throws Exception if a problem occurs
   */
  @Override
  public void stop(final BundleContext context) throws Exception {
    erlConsoleManager.dispose();
    super.stop(context);
    BackendCore.getBackendManager().removeBackendListener(erlangDebuggerBackendListener);
    BackendCore.getBackendManager().dispose();

    if (ErlideImage.isInstalled()) {
      ErlideImage.dispose();
    }
    SWTResourceManager.dispose();
    plugin = null;
  }