package jetbrains.mps.java.platform.highlighters;

/*Generated by MPS */

import jetbrains.mps.annotations.GeneratedClass;
import jetbrains.mps.ide.editor.popup.AbstractOverrideEditorMessage;
import jetbrains.mps.nodeEditor.EditorMessageIconRenderer;
import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.openapi.editor.message.EditorMessageOwner;
import javax.swing.Icon;
import jetbrains.mps.ide.editor.popup.OverrideImplementsIcons;
import com.intellij.openapi.actionSystem.AnAction;
import jetbrains.mps.workbench.action.BaseAction;
import com.intellij.openapi.actionSystem.ActionManager;

@GeneratedClass(node = "r:fa4569a3-1bd4-4159-97bc-db03b3aeff88(jetbrains.mps.java.platform.highlighters)/8432634623182579833", model = "r:fa4569a3-1bd4-4159-97bc-db03b3aeff88(jetbrains.mps.java.platform.highlighters)")
public class OverriddenMethodEditorMessage extends AbstractOverrideEditorMessage {
  private static final EditorMessageIconRenderer.IconRendererType TYPE = new EditorMessageIconRenderer.IconRendererType(2);

  private final boolean myOverridenFlag;

  public OverriddenMethodEditorMessage(SNode node, EditorMessageOwner owner, String tooltip, boolean overriden) {
    super(node, owner, tooltip);
    myOverridenFlag = overriden;
  }

  @Override
  public Icon getIcon() {
    return (myOverridenFlag ? OverrideImplementsIcons.OVERRIDDEN : OverrideImplementsIcons.IMPLEMENTED);
  }

  @Override
  public EditorMessageIconRenderer.IconRendererType getType() {
    return TYPE;
  }

  @Override
  public AnAction getClickAction() {
    return ((BaseAction) ActionManager.getInstance().getAction("jetbrains.mps.java.platform.actions.GoToImplementationClassMethod_Action"));
  }
}
