@Nullable @Override public String getDescriptionText(@NotNull String pattern) { if (myParameterObject instanceof SNode) { return NodePresentationUtil.descriptionText((SNode) myParameterObject); } return "" + myParameterObject; }
private static String getSmartMatchingText( SNode referenceNodeConcept, SNode referentNode, boolean visible) { String referentMatchingText = NodePresentationUtil.matchingText(referentNode, true, visible); if (ReferenceConceptUtil.hasSmartAlias(referenceNodeConcept)) { return ReferenceConceptUtil.getPresentationFromSmartAlias( referenceNodeConcept, referentMatchingText); } return referentMatchingText; }
public NewRootNodeAction(final SNodeReference nodeConcept, SModel modelDescriptor) { super( NodePresentationUtil.matchingText( nodeConcept.resolve(MPSModuleRepository.getInstance()))); myNodeConcept = nodeConcept; myModelDescriptor = modelDescriptor; Icon icon = ModelAccess.instance() .runReadAction( new Computable<Icon>() { @Override public Icon compute() { return IconManager.getIconForConceptFQName( NameUtil.nodeFQName( nodeConcept.resolve(MPSModuleRepository.getInstance()))); } }); getTemplatePresentation().setIcon(icon); setExecuteOutsideCommand(true); }
public String getDescriptionText(String pattern) { return "^" + NodePresentationUtil.descriptionText(myReferentNode, true); }
@Override public int getSortPriority(String pattern) { return NodePresentationUtil.getSortPriority(myParentNode, myReferentNode); }
@Override public int getFontStyleFor(String pattern) { return NodePresentationUtil.getFontStyle(myParentNode, myReferentNode); }