Пример #1
0
  public void closeProject(PluginFailureReason failureReason) {
    boolean previousValue = ModuleClasspathListener.ENABLED;
    ModuleClasspathListener.ENABLED = false;
    try {
      if (TypeSystemStarter.instance(_project).isStarted()) {
        try {
          if (TypeSystem.getCurrentModule() != null) {
            System.out.println("Cleaning type system, but current top module is not null!");
          }
          System.out.println("Stopping Type System " + TypeSystem.getExecutionEnvironment());
          stopTypeSystem();
        } catch (Throwable e) {
          reportStartupError(e);
        }
        try {
          uninitGosuPlugin();
        } catch (Throwable e) {
          reportStartupError(e);
        }

        try {
          for (ITypeSystemStartupContributor pluginListener : getStartupContributors()) {
            pluginListener.afterPluginShutdown(_project);
          }
        } catch (Exception e) {
          ExceptionUtil.showNonFatalError("Exception during Gosu plugin shutdown.", e);
        }
      }
    } finally {
      _failureReason = failureReason;
      ModuleClasspathListener.ENABLED = previousValue;
    }
  }
Пример #2
0
 private void stopTypeSystem() {
   TypeSystemStarter.instance(_project).stop(_project);
 }
Пример #3
0
 public boolean isStarted() {
   return TypeSystemStarter.instance(_project).isStarted();
 }