package jetbrains.mps.editor.spellcheck;

/*Generated by MPS */

import jetbrains.mps.plugins.part.ProjectPluginPart;
import jetbrains.mps.nodeEditor.checking.EditorChecker;
import jetbrains.mps.project.MPSProject;
import jetbrains.mps.nodeEditor.Highlighter;

public class SpellCheck_ProjectPluginPart extends ProjectPluginPart {
  private EditorChecker mySpellChecker;
  public SpellCheck_ProjectPluginPart() {
  }
  @Override
  public void init(MPSProject project) {
    SpellCheck_ProjectPluginPart.this.mySpellChecker = new CommentSpellChecker(project);
    Highlighter highlighter = project.getComponent(Highlighter.class);
    highlighter.addChecker(SpellCheck_ProjectPluginPart.this.mySpellChecker);
  }
  @Override
  public void dispose(MPSProject project) {
    Highlighter highlighter = project.getComponent(Highlighter.class);
    highlighter.removeChecker(SpellCheck_ProjectPluginPart.this.mySpellChecker);
    SpellCheck_ProjectPluginPart.this.mySpellChecker = null;
  }
}
