public void doDispose() {
   PluginId debuggerPlugin =
       PluginManager.getPluginByClassName("jetbrains.mps.debug.api.DebugInfoManager");
   if (debuggerPlugin == null) {
     return;
   }
   final DebugInfoManager manager = DebugInfoManager.getInstance();
   if (manager == null) {
     return;
   }
   manager.removeConceptBreakpointCreator("jetbrains.mps.baseLanguage.structure.Statement");
   manager.removeConceptBreakpointCreator("jetbrains.mps.baseLanguage.structure.FieldDeclaration");
   manager.removeConceptBreakpointCreator(
       "jetbrains.mps.baseLanguage.structure.StaticFieldDeclaration");
   SetSequence.fromSet(DebugInfoProvider_CustomApplicationPlugin.this.myCreators)
       .visitAll(
           new IVisitor<
               Tuples._2<
                   _FunctionTypes._return_P1_E0<? extends Boolean, ? super SNode>,
                   _FunctionTypes._return_P2_E0<
                       ? extends ILocationBreakpoint, ? super SNode, ? super Project>>>() {
             public void visit(
                 Tuples._2<
                         _FunctionTypes._return_P1_E0<? extends Boolean, ? super SNode>,
                         _FunctionTypes._return_P2_E0<
                             ? extends ILocationBreakpoint, ? super SNode, ? super Project>>
                     it) {
               manager.removeBreakpointCreator(it);
             }
           });
   SetSequence.fromSet(DebugInfoProvider_CustomApplicationPlugin.this.myCreators).clear();
 }
 public void doInit() {
   PluginId debuggerPlugin =
       PluginManager.getPluginByClassName("jetbrains.mps.debug.api.DebugInfoManager");
   if (debuggerPlugin == null) {
     return;
   }
   DebugInfoManager manager = DebugInfoManager.getInstance();
   if (manager == null) {
     return;
   }
   {
     Mapper2<SNode, Project, ILocationBreakpoint> creator =
         new Mapper2<SNode, Project, ILocationBreakpoint>() {
           public ILocationBreakpoint value(SNode debuggableNode, Project project) {
             try {
               return Debuggers.getInstance()
                   .getDebuggerByNameSafe("Java")
                   .createBreakpoint(debuggableNode, "JAVA_LINE_BREAKPOINT", project);
             } catch (DebuggerNotPresentException e) {
               if (log.isWarnEnabled()) {
                 log.warn("Exception while creating breakpoint for node" + debuggableNode, e);
               }
               return null;
             }
           }
         };
     manager.addConceptBreakpointCreator(
         "jetbrains.mps.baseLanguage.structure.Statement", creator);
   }
   {
     Mapper2<SNode, Project, ILocationBreakpoint> creator =
         new Mapper2<SNode, Project, ILocationBreakpoint>() {
           public ILocationBreakpoint value(SNode debuggableNode, Project project) {
             try {
               return Debuggers.getInstance()
                   .getDebuggerByNameSafe("Java")
                   .createBreakpoint(debuggableNode, "JAVA_FIELD_BREAKPOINT", project);
             } catch (DebuggerNotPresentException e) {
               if (log.isWarnEnabled()) {
                 log.warn("Exception while creating breakpoint for node" + debuggableNode, e);
               }
               return null;
             }
           }
         };
     manager.addConceptBreakpointCreator(
         "jetbrains.mps.baseLanguage.structure.FieldDeclaration", creator);
     manager.addConceptBreakpointCreator(
         "jetbrains.mps.baseLanguage.structure.StaticFieldDeclaration", creator);
   }
 }
 @Override
 protected void handleInitComponentError(
     final Throwable ex, final boolean fatal, final String componentClassName) {
   if (PluginManager.isPluginClass(componentClassName)) {
     LOG.error(ex);
     PluginId pluginId = PluginManager.getPluginByClassName(componentClassName);
     @NonNls
     final String errorMessage =
         "Plugin "
             + pluginId.getIdString()
             + " failed to initialize and will be disabled:\n"
             + ex.getMessage()
             + "\nPlease restart "
             + ApplicationNamesInfo.getInstance().getFullProductName()
             + ".";
     PluginManager.disablePlugin(pluginId.getIdString());
     if (!myHeadlessMode) {
       JOptionPane.showMessageDialog(null, errorMessage);
     } else {
       //noinspection UseOfSystemOutOrSystemErr
       System.out.println(errorMessage);
       System.exit(1);
     }
     return; // do not call super
   }
   if (fatal) {
     LOG.error(ex);
     @NonNls
     final String errorMessage =
         "Fatal error initializing class "
             + componentClassName
             + ":\n"
             + ex.toString()
             + "\nComplete error stacktrace was written to idea.log";
     if (!myHeadlessMode) {
       JOptionPane.showMessageDialog(null, errorMessage);
     } else {
       //noinspection UseOfSystemOutOrSystemErr
       System.out.println(errorMessage);
     }
   }
   super.handleInitComponentError(ex, fatal, componentClassName);
 }
 /**
  * @deprecated if more settings are needed for this plugin, you should create a {@link
  *     com.intellij.openapi.components.PersistentStateComponent} and store all the settings in a
  *     separate file without the prefix on the property name.
  */
 @Deprecated
 private static String getSettingsPrefix() {
   PluginId pluginId = PluginManager.getPluginByClassName(MTTheme.class.getName());
   return pluginId == null ? "com.chrisrm.idea.MaterialThemeUI" : pluginId.getIdString();
 }