package jetbrains.mps.baseLanguage.lightweightdsl.pluginSolution.plugin; /*Generated by MPS */ import jetbrains.mps.editor.runtime.AbstractLeftEditorHighlighterMessage; 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.openapi.editor.cells.EditorCell; import jetbrains.mps.openapi.editor.cells.EditorCell_Collection; import jetbrains.mps.nodeEditor.cells.CellFinderUtil; import jetbrains.mps.openapi.editor.cells.EditorCell_Label; import com.intellij.openapi.actionSystem.AnAction; import jetbrains.mps.workbench.action.BaseAction; import com.intellij.openapi.actionSystem.ActionManager; import javax.swing.JPopupMenu; public class DSLComponentMessage extends AbstractLeftEditorHighlighterMessage { private static final EditorMessageIconRenderer.IconRendererType TYPE = new EditorMessageIconRenderer.IconRendererType(0); public DSLComponentMessage(final SNode node, EditorMessageOwner owner, String tooltip) { super(node, owner, tooltip); } public Icon getIcon() { return IconContainer.ICON_a0a4; } public EditorMessageIconRenderer.IconRendererType getType() { return DSLComponentMessage.TYPE; } public EditorCell getAnchorCell(EditorCell cell) { if (cell instanceof EditorCell_Collection) { EditorCell_Collection collection = (EditorCell_Collection) cell; return CellFinderUtil.findChildByClass(collection, EditorCell_Label.class, true); } return cell; } public AnAction getClickAction() { return ((BaseAction) ActionManager.getInstance().getAction("jetbrains.mps.baseLanguage.lightweightdsl.pluginSolution.plugin.GoToMemberDeclaration_Action")); } public JPopupMenu getPopupMenu() { return null; } }