@Override protected void addReferenceCell(final SReferenceLink referenceLink) { SReference reference = getNode().getReference(referenceLink); if (reference == null) { addLabel("<no target>"); return; } final SNode referentNode = reference.getTargetNode(); if (referentNode == null) { String resolveInfo = ((jetbrains.mps.smodel.SReference) reference).getResolveInfo(); String myErrorText = resolveInfo != null ? resolveInfo : "?" + referenceLink.getName() + "?"; EditorCell_Error errorCell = new EditorCell_Error(getEditorContext(), getNode(), myErrorText); errorCell.setCellId("error_" + referenceLink.getName()); addCell(errorCell); return; } if (referentNode.getModel() == null) { LOG.error("Reference to node which is not inside model. Node: " + referentNode, referentNode); } EditorCell cell = getUpdateSession() .updateReferencedNodeCell( new Computable<EditorCell>() { @Override public EditorCell compute() { return createReferentEditorCell( getEditorContext(), referenceLink, referentNode); } }, referentNode, referenceLink.getName()); setSemanticNodeToCells(cell, getNode()); cell.setCellId("reference_" + referenceLink.getName()); addCell(cell); }
private EditorCell createError_58elew_a(EditorContext editorContext, SNode node) { EditorCell_Error editorCell = new EditorCell_Error(editorContext, node, "no argument"); editorCell.setCellId("Error_58elew_a"); return editorCell; }
private EditorCell createError_rnh2be_a(EditorContext editorContext, SNode node) { EditorCell_Error editorCell = new EditorCell_Error(editorContext, node, "<choose link type>"); editorCell.setCellId("Error_rnh2be_a"); editorCell.setBig(true); return editorCell; }
private EditorCell createError_90hbgw_a(EditorContext editorContext, SNode node) { EditorCell_Error editorCell = new EditorCell_Error(editorContext, node, "<abstract expression>"); editorCell.setCellId("Error_90hbgw_a"); return editorCell; }
private EditorCell createError_5f70dk_a(EditorContext editorContext, SNode node) { EditorCell_Error editorCell = new EditorCell_Error(editorContext, node, "<abstract statement>"); editorCell.setCellId("Error_5f70dk_a"); return editorCell; }
private EditorCell createError_8th4ak_a(EditorContext editorContext, SNode node) { EditorCell_Error editorCell = new EditorCell_Error(editorContext, node, "attributeExpression"); editorCell.setCellId("Error_8th4ak_a"); return editorCell; }