Example #1
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();
  }
Example #2
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();
  }