コード例 #1
0
 @Nullable
 @Override
 public String getMatchingText(@NotNull String pattern) {
   if (myParameterObject instanceof SNode) {
     return NodePresentationUtil.matchingText((SNode) myParameterObject);
   }
   return "" + myParameterObject;
 }
コード例 #2
0
 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;
 }
コード例 #3
0
ファイル: CreateRootNodeGroup.java プロジェクト: sprig/MPS
 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);
 }