コード例 #1
0
 @Nullable
 @Override
 public String getDescriptionText(@NotNull String pattern) {
   if (myParameterObject instanceof SNode) {
     return NodePresentationUtil.descriptionText((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);
 }
コード例 #4
0
 public String getDescriptionText(String pattern) {
   return "^" + NodePresentationUtil.descriptionText(myReferentNode, true);
 }
コード例 #5
0
 @Override
 public int getSortPriority(String pattern) {
   return NodePresentationUtil.getSortPriority(myParentNode, myReferentNode);
 }
コード例 #6
0
 @Override
 public int getFontStyleFor(String pattern) {
   return NodePresentationUtil.getFontStyle(myParentNode, myReferentNode);
 }