package jetbrains.mps.migration.workbench.plugin;

/*Generated by MPS */

import jetbrains.mps.plugins.part.ProjectPluginPart;
import jetbrains.mps.ide.migration.IStartupMigrationExecutor;
import jetbrains.mps.project.MPSProject;
import jetbrains.mps.migration.workbench.components.WorkbenchMigrationProblemHandler;

public class MigrationIssueHandler_ProjectPluginPart extends ProjectPluginPart {
  private IStartupMigrationExecutor migrationTrigger;
  public MigrationIssueHandler_ProjectPluginPart() {
  }
  @Override
  public void init(MPSProject project) {
    MigrationIssueHandler_ProjectPluginPart.this.migrationTrigger = IStartupMigrationExecutor.getInstance(project);
    if (MigrationIssueHandler_ProjectPluginPart.this.migrationTrigger == null) {
      return;
    }
    MigrationIssueHandler_ProjectPluginPart.this.migrationTrigger.setProblemHandler(new WorkbenchMigrationProblemHandler(project));
  }
  @Override
  public void dispose(MPSProject project) {
    if (MigrationIssueHandler_ProjectPluginPart.this.migrationTrigger == null) {
      return;
    }
    MigrationIssueHandler_ProjectPluginPart.this.migrationTrigger.setRebuildHandler(null);
    MigrationIssueHandler_ProjectPluginPart.this.migrationTrigger = null;
  }
}
