Ejemplo n.º 1
0
 public static void refreshCustomizations() {
   if (!MPSCore.getInstance().isTestMode()) return;
   SwingUtilities.invokeLater(
       new Runnable() {
         @Override
         public void run() {
           CustomActionsSchema schema = CustomActionsSchema.getInstance();
           schema.resetMainActionGroups();
           setCustomizationSchemaForCurrentProjects();
         }
       });
 }
Ejemplo n.º 2
0
  @Override
  public void disposeComponent() {
    // dispose BaseLanguage
    myMPSBaseLanguage.dispose();
    myMPSBaseLanguage = null;

    // dispose Core
    myMPSFindUsages.dispose();
    myMPSGenerator.dispose();
    myMPSTypesystem.dispose();
    myMPSPersistence.dispose();
    myMPSCore.dispose();
    myMPSFindUsages = null;
    myMPSGenerator = null;
    myMPSTypesystem = null;
    myMPSPersistence = null;
    myMPSCore = null;

    // cleanup
    ModelAccess.instance().dispose();
  }
Ejemplo n.º 3
0
  @Override
  public void initComponent() {
    // setup undo
    UndoHelper.getInstance().setUndoHandler(new WorkbenchUndoHandler());

    // setup model access
    ModelAccess.setInstance(new WorkbenchModelAccess());

    // setup MPS.Core
    myMPSCore = new MPSCore();
    myMPSPersistence = new MPSPersistence();
    myMPSTypesystem = new MPSTypesystem();
    myMPSGenerator = new MPSGenerator();
    myMPSFindUsages = new MPSFindUsages();
    myMPSCore.init();
    myMPSPersistence.init();
    myMPSTypesystem.init();
    myMPSGenerator.init();
    myMPSFindUsages.init();

    // setup BaseLanguage
    myMPSBaseLanguage = new MPSBaseLanguage();
    myMPSBaseLanguage.init();
  }