@Nullable @Override public String getMatchingText(@NotNull String pattern) { if (myParameterObject instanceof SNode) { return NodePresentationUtil.matchingText((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); }