コード例 #1
0
 private EditorCell createProperty_r244s6_a0a0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("name");
   provider.setNoTargetText("<no name>");
   provider.setReadOnly(true);
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_name");
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("conceptPropertyDeclaration");
   }
   Style style = new StyleImpl();
   style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD);
   style.set(
       StyleAttributes.TEXT_COLOR,
       StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_MAGENTA));
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     IOperationContext opContext = editorContext.getOperationContext();
     EditorManager manager = EditorManager.getInstanceFromContext(opContext);
     return manager.createRoleAttributeCell(
         editorContext, attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
コード例 #2
0
 private void installCellInfo(SNode child, EditorCell editorCell) {
   if (editorCell.getSubstituteInfo() == null
       || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
     editorCell.setSubstituteInfo(
         new OldNewCompositeSubstituteInfo(
             getEditorContext(),
             new SChildSubstituteInfo(
                 editorCell,
                 myNode,
                 MetaAdapterFactory.getContainmentLink(
                     0x798100da4f0a421aL,
                     0xb99171f8c50ce5d2L,
                     0x63a87b9320d31b36L,
                     0x63a87b9320d31b94L,
                     "fileName"),
                 child),
             new DefaultChildSubstituteInfo(
                 myNode, myContainmentLink.getDeclarationNode(), getEditorContext())));
   }
   if (editorCell.getRole() == null) {
     editorCell.setRole("fileName");
   }
   if (true) {
     editorCell.getStyle().set(StyleAttributes.FOCUS_POLICY, FocusPolicy.ATTRACTS_FOCUS);
   }
 }
コード例 #3
0
 private EditorCell createRefCell_xuo9b2_c0() {
   CellProviderWithRole provider =
       new RefCellCellProvider(myNode, getEditorContext()) {
         @Override
         protected InlineCellProvider createInlineCellProvider(SNode innerCellNode) {
           return new IOutputConcept_Component_ComponentBuilder_a._Inline_xuo9b2_a2a(
               innerCellNode, myNode);
         }
       };
   provider.setRole("outputConcept");
   provider.setNoTargetText("default");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(getEditorContext());
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("outputConcept");
   }
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   if (attributeConcept != null) {
     EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
     return manager.createNodeRoleAttributeCell(
         attributeConcept, provider.getRoleAttributeKind(), editorCell);
   } else return editorCell;
 }
コード例 #4
0
 private EditorCell createProperty_7qnrl2_a0a0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("name");
   provider.setNoTargetText("<no name>");
   provider.setReadOnly(true);
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_name");
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("member");
   }
   Style style = new StyleImpl();
   BaseLanguageStyle_StyleSheet.applyField(style, editorCell);
   style.set(StyleAttributes.PADDING_RIGHT, new Padding(0.0, Measure.SPACES));
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     IOperationContext opContext = editorContext.getOperationContext();
     EditorManager manager = EditorManager.getInstanceFromContext(opContext);
     return manager.createRoleAttributeCell(
         editorContext, attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
コード例 #5
0
 private EditorCell createRefCell_1x8nz9_a0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new RefCellCellProvider(node, editorContext);
   provider.setRole("declaration");
   provider.setNoTargetText("<no declaration>");
   EditorCell editorCell;
   provider.setAuxiliaryCellProvider(new NodePatternVariableReference_Editor._Inline_1x8nz9_a0a());
   editorCell = provider.createEditorCell(editorContext);
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("declaration");
   }
   Style style = new StyleImpl();
   style.set(StyleAttributes.FONT_STYLE, 0, MPSFonts.BOLD);
   style.set(
       StyleAttributes.TEXT_COLOR,
       0,
       StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_GREEN));
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     EditorManager manager = EditorManager.getInstanceFromContext(editorContext);
     return manager.createNodeRoleAttributeCell(attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
 private EditorCell createRefCell_4clv4k_b0() {
   CellProviderWithRole provider =
       new RefCellCellProvider(myNode, getEditorContext()) {
         @Override
         protected InlineCellProvider createInlineCellProvider(SNode innerCellNode) {
           return new GeneratorInternal_IWorkfowParticipants_EditorBuilder_a._Inline_4clv4k_a1a(
               innerCellNode, myNode);
         }
       };
   provider.setRole("for");
   provider.setNoTargetText("<no for>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(getEditorContext());
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("for");
   }
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   if (attributeConcept != null) {
     EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
     return manager.createNodeRoleAttributeCell(
         attributeConcept, provider.getRoleAttributeKind(), editorCell);
   } else return editorCell;
 }
 private EditorCell createProperty_1clvom_a0b0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("name");
   provider.setNoTargetText("<no name>");
   provider.setReadOnly(true);
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_name_1");
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("persistentConfiguration");
   }
   Style style = new StyleImpl();
   ExecutionSettings_StyleSheet.apply_persistentConfigurationRefDeprecated(style, editorCell);
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     IOperationContext opContext = editorContext.getOperationContext();
     EditorManager manager = EditorManager.getInstanceFromContext(opContext);
     return manager.createRoleAttributeCell(
         editorContext, attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
コード例 #8
0
 private EditorCell createRefCell_dfgzix_a0() {
   CellProviderWithRole provider =
       new RefCellCellProvider(myNode, getEditorContext()) {
         @Override
         protected InlineCellProvider createInlineCellProvider(SNode innerCellNode) {
           return new DirectMethodSpecification_EditorBuilder_a._Inline_dfgzix_a0a(
               innerCellNode, myNode);
         }
       };
   provider.setRole("methodDeclaration");
   provider.setNoTargetText("<no methodDeclaration>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(getEditorContext());
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("methodDeclaration");
   }
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   if (attributeConcept != null) {
     EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
     return manager.createNodeRoleAttributeCell(
         attributeConcept, provider.getRoleAttributeKind(), editorCell);
   } else return editorCell;
 }
コード例 #9
0
 private EditorCell createProperty_ed1xw0_a0d0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("pluralForm");
   provider.setNoTargetText("<no pluralForm>");
   provider.setReadOnly(true);
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_pluralForm");
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("property");
   }
   Style style = new StyleImpl();
   Dates_StyleSheet.applyDateFormat(style, editorCell);
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     IOperationContext opContext = editorContext.getOperationContext();
     EditorManager manager = EditorManager.getInstanceFromContext(opContext);
     return manager.createRoleAttributeCell(
         editorContext, attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
コード例 #10
0
 private EditorCell createRefCell_kasd0f_b1a0() {
   CellProviderWithRole provider =
       new RefCellCellProvider(myNode, getEditorContext()) {
         @Override
         protected InlineCellProvider createInlineCellProvider(SNode innerCellNode) {
           return new MigrateManuallyAnnotation_EditorBuilder_a._Inline_kasd0f_a1b0a(
               innerCellNode, myNode);
         }
       };
   provider.setRole("migrateTo");
   provider.setNoTargetText("<no migrateTo>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(getEditorContext());
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("migrateTo");
   }
   Style style = new StyleImpl();
   style.set(StyleAttributes.NAVIGATABLE_REFERENCE, "migrateTo");
   style.set(
       StyleAttributes.TEXT_COLOR,
       StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_BLUE));
   style.set(StyleAttributes.FONT_STYLE, MPSFonts.ITALIC);
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   if (attributeConcept != null) {
     EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
     return manager.createNodeRoleAttributeCell(
         attributeConcept, provider.getRoleAttributeKind(), editorCell);
   } else return editorCell;
 }
コード例 #11
0
 private EditorCell createRefCell_h88a5f_b0() {
   CellProviderWithRole provider =
       new RefCellCellProvider(myNode, getEditorContext()) {
         @Override
         protected InlineCellProvider createInlineCellProvider(SNode innerCellNode) {
           return new HighLevelWatchableCreator_EditorBuilder_a._Inline_h88a5f_a1a(
               innerCellNode, myNode);
         }
       };
   provider.setRole("watchable");
   provider.setNoTargetText("<no watchable>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(getEditorContext());
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("watchable");
   }
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   if (attributeConcept != null) {
     EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
     return manager.createNodeRoleAttributeCell(
         attributeConcept, provider.getRoleAttributeKind(), editorCell);
   } else return editorCell;
 }
コード例 #12
0
 private EditorCell createRefCell_tjtxbf_a0() {
   CellProviderWithRole provider =
       new RefCellCellProvider(myNode, getEditorContext()) {
         @Override
         protected InlineCellProvider createInlineCellProvider(SNode innerCellNode) {
           return new DataDependencyReference_EditorBuilder_a._Inline_tjtxbf_a0a(
               innerCellNode, myNode);
         }
       };
   provider.setRole("dataDependency");
   provider.setNoTargetText("<no dataDependency>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(getEditorContext());
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("dataDependency");
   }
   Style style = new StyleImpl();
   new VariableNameStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   if (attributeConcept != null) {
     EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
     return manager.createNodeRoleAttributeCell(
         attributeConcept, provider.getRoleAttributeKind(), editorCell);
   } else return editorCell;
 }
コード例 #13
0
 private EditorCell createProperty_3mrn5h_a0a0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("name");
   provider.setNoTargetText("<no name>");
   provider.setReadOnly(true);
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_name");
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("target");
   }
   Style style = new StyleImpl();
   style.set(StyleAttributes.AUTO_DELETABLE, false);
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     IOperationContext opContext = editorContext.getOperationContext();
     EditorManager manager = EditorManager.getInstanceFromContext(opContext);
     return manager.createRoleAttributeCell(
         editorContext, attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
コード例 #14
0
 private void installCellInfo(SNode child, EditorCell editorCell) {
   if (editorCell.getSubstituteInfo() == null
       || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
     editorCell.setSubstituteInfo(
         new OldNewCompositeSubstituteInfo(
             getEditorContext(),
             new SChildSubstituteInfo(
                 editorCell,
                 myNode,
                 MetaAdapterFactory.getContainmentLink(
                     0x86ef829012bb4ca7L,
                     0x947f093788f263a9L,
                     0x5869770da61dfe28L,
                     0x19bfb4173fb5241eL,
                     "moduleRef"),
                 child),
             new DefaultChildSubstituteInfo(
                 myNode, myContainmentLink.getDeclarationNode(), getEditorContext())));
   }
   if (editorCell.getRole() == null) {
     editorCell.setRole("moduleRef");
   }
   Style style = new StyleImpl();
   style.set(StyleAttributes.PUNCTUATION_RIGHT, true);
   editorCell.getStyle().putAll(style);
 }
コード例 #15
0
 private void installCellInfo(SNode child, EditorCell editorCell) {
   if (editorCell.getSubstituteInfo() == null
       || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
     editorCell.setSubstituteInfo(
         new OldNewCompositeSubstituteInfo(
             getEditorContext(),
             new SChildSubstituteInfo(
                 editorCell,
                 myNode,
                 MetaAdapterFactory.getContainmentLink(
                     0xb401a68083254110L,
                     0x8fd384331ff25befL,
                     0x1231e32ff7a958ceL,
                     0x1231e32ff7a9efcdL,
                     "createNodeQuery"),
                 child),
             new DefaultChildSubstituteInfo(
                 myNode, myContainmentLink.getDeclarationNode(), getEditorContext())));
   }
   if (editorCell.getRole() == null) {
     editorCell.setRole("createNodeQuery");
   }
   if (true) {
     editorCell.getStyle().set(StyleAttributes.FOCUS_POLICY, FocusPolicy.FIRST_EDITABLE_CELL);
   }
 }
コード例 #16
0
 private EditorCell createRefCell_a7pinn_d3a() {
   CellProviderWithRole provider =
       new RefCellCellProvider(myNode, getEditorContext()) {
         @Override
         protected InlineCellProvider createInlineCellProvider(SNode innerCellNode) {
           return new SConceptTypeCastExpression_EditorBuilder_a._Inline_a7pinn_a3d0(
               innerCellNode, myNode);
         }
       };
   provider.setRole("concept");
   provider.setNoTargetText("<no concept>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(getEditorContext());
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("concept");
   }
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   if (attributeConcept != null) {
     EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
     return manager.createNodeRoleAttributeCell(
         attributeConcept, provider.getRoleAttributeKind(), editorCell);
   } else return editorCell;
 }
コード例 #17
0
 private EditorCell createRefCell_d5p1uc_b0() {
   CellProviderWithRole provider =
       new RefCellCellProvider(myNode, getEditorContext()) {
         @Override
         protected InlineCellProvider createInlineCellProvider(SNode innerCellNode) {
           return new AnnotationInstance_EditorBuilder_a._Inline_d5p1uc_a1a(innerCellNode, myNode);
         }
       };
   provider.setRole("annotation");
   provider.setNoTargetText("<no annotation>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(getEditorContext());
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("annotation");
   }
   Style style = new StyleImpl();
   style.set(StyleAttributes.LAYOUT_CONSTRAINT, "punctuation");
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   if (attributeConcept != null) {
     EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
     return manager.createNodeRoleAttributeCell(
         attributeConcept, provider.getRoleAttributeKind(), editorCell);
   } else return editorCell;
 }
コード例 #18
0
 public void execute(final SNode node, final EditorContext editorContext) {
   EditorCell selectedCell = editorContext.getSelectedCell();
   if (!(selectedCell.isReferenceCell())) {
     return;
   }
   SNode contextNode =
       SNodeOperations.cast(
           selectedCell.getSNode(), "jetbrains.mps.lang.core.structure.BaseConcept");
   if (contextNode == null) {
     return;
   }
   String role = selectedCell.getRole();
   if (SNodeOperations.isInstanceOf(
       contextNode, "jetbrains.mps.lang.quotation.structure.ReferenceAntiquotation")) {
     SNode attributedNode =
         SNodeOperations.cast(
             SNodeOperations.getParent(contextNode),
             "jetbrains.mps.lang.core.structure.BaseConcept");
     assert attributedNode != null;
     AttributeOperations.setAttribute(
         attributedNode,
         new IAttributeDescriptor.LinkAttribute(
             SConceptOperations.findConceptDeclaration(
                 "jetbrains.mps.lang.quotation.structure.ReferenceAntiquotation"),
             role),
         null);
     return;
   }
   if (AttributeOperations.getAttribute(
           contextNode,
           new IAttributeDescriptor.LinkAttribute(
               SConceptOperations.findConceptDeclaration(
                   "jetbrains.mps.lang.quotation.structure.ReferenceAntiquotation"),
               role))
       != null) {
     AttributeOperations.setAttribute(
         contextNode,
         new IAttributeDescriptor.LinkAttribute(
             SConceptOperations.findConceptDeclaration(
                 "jetbrains.mps.lang.quotation.structure.ReferenceAntiquotation"),
             role),
         null);
   } else {
     SNode referenceAntiquotation =
         SNodeFactoryOperations.setNewAttribute(
             contextNode,
             new IAttributeDescriptor.LinkAttribute(
                 SConceptOperations.findConceptDeclaration(
                     "jetbrains.mps.lang.quotation.structure.ReferenceAntiquotation"),
                 role),
             "jetbrains.mps.lang.quotation.structure.ReferenceAntiquotation");
     if (selectedCell.isSingleNodeCell()) {
       SPropertyOperations.set(
           referenceAntiquotation,
           "label",
           SPropertyOperations.getString(
               SNodeOperations.getConceptDeclaration(contextNode), "name"));
     }
   }
 }
コード例 #19
0
 private void installCellInfo(SNode child, EditorCell editorCell) {
   if (editorCell.getSubstituteInfo() == null
       || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
     editorCell.setSubstituteInfo(
         new OldNewCompositeSubstituteInfo(
             getEditorContext(),
             new SChildSubstituteInfo(
                 editorCell,
                 myNode,
                 MetaAdapterFactory.getContainmentLink(
                     0x7866978ea0f04cc7L,
                     0x81bc4d213d9375e1L,
                     0x2143399c0554e687L,
                     0x3636a984eed504f9L,
                     "conceptArgument"),
                 child),
             new DefaultChildSubstituteInfo(
                 myNode, myContainmentLink.getDeclarationNode(), getEditorContext())));
   }
   if (editorCell.getRole() == null) {
     editorCell.setRole("conceptArgument");
   }
   AbstractTypeCastExpression_Concept_Actions.setCellActions(
       editorCell, getNode(), getEditorContext());
 }
 private EditorCell createRefCell_m29bq_b0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new RefCellCellProvider(node, editorContext);
   provider.setRole("label");
   provider.setNoTargetText("<choose mapping label>");
   EditorCell editorCell;
   provider.setAuxiliaryCellProvider(
       new GenerationContextOp_GetOutputByLabelAndInputAndReferenceScope_Editor
           ._Inline_m29bq_a1a());
   editorCell = provider.createEditorCell(editorContext);
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("label");
   }
   Style style = new StyleImpl();
   jetbrains.mps.lang.generator.editor.Styles_StyleSheet.apply_mappingLabelReference(
       style, editorCell);
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     EditorManager manager = EditorManager.getInstanceFromContext(editorContext);
     return manager.createNodeRoleAttributeCell(attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
コード例 #21
0
 private EditorCell createRefCell_ez8int_a0() {
   CellProviderWithRole provider =
       new RefCellCellProvider(myNode, getEditorContext()) {
         @Override
         protected InlineCellProvider createInlineCellProvider(SNode innerCellNode) {
           return new MathSymbolIndexReference_EditorBuilder_a._Inline_ez8int_a0a(
               innerCellNode, myNode);
         }
       };
   provider.setRole("indexRef");
   provider.setNoTargetText("<no indexRef>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(getEditorContext());
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("indexRef");
   }
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   if (attributeConcept != null) {
     EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
     return manager.createNodeRoleAttributeCell(
         attributeConcept, provider.getRoleAttributeKind(), editorCell);
   } else return editorCell;
 }
コード例 #22
0
 private EditorCell createRefCell_uze3jf_c0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new RefCellCellProvider(node, editorContext);
   provider.setRole("concept");
   provider.setNoTargetText("<no concept>");
   EditorCell editorCell;
   provider.setAuxiliaryCellProvider(
       new Model_CreateNewRootNodeOperation_Editor._Inline_uze3jf_a2a());
   editorCell = provider.createEditorCell(editorContext);
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("concept");
   }
   Style style = new StyleImpl();
   style.set(StyleAttributes.PADDING_RIGHT, new Padding(0.0, Measure.SPACES));
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     IOperationContext opContext = editorContext.getOperationContext();
     EditorManager manager = EditorManager.getInstanceFromContext(opContext);
     return manager.createNodeRoleAttributeCell(
         editorContext, attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
コード例 #23
0
 private EditorCell createProperty_26flog_a0a0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("name");
   provider.setNoTargetText("<no name>");
   provider.setReadOnly(true);
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_name");
   if (editorCell.getRole() == null) {
     editorCell.setReferenceCell(true);
     editorCell.setRole("function");
   }
   Style style = new StyleImpl();
   BaseLanguageStyle_StyleSheet.applyMethodName(style, editorCell);
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
   SNode attributeConcept = provider.getRoleAttribute();
   Class attributeKind = provider.getRoleAttributeClass();
   if (attributeConcept != null) {
     IOperationContext opContext = editorContext.getOperationContext();
     EditorManager manager = EditorManager.getInstanceFromContext(opContext);
     return manager.createRoleAttributeCell(
         editorContext, attributeConcept, attributeKind, editorCell);
   } else return editorCell;
 }
コード例 #24
0
 public void installCellInfo(SNode child, EditorCell editorCell) {
   editorCell.setSubstituteInfo(
       new DefaultChildSubstituteInfo(
           myOwnerNode, myContainmentLink.getDeclarationNode(), myEditorContext));
   if (editorCell.getRole() == null) {
     editorCell.setRole("left");
   }
 }
コード例 #25
0
 public void installCellInfo(SNode child, EditorCell editorCell) {
   editorCell.setSubstituteInfo(
       new DefaultChildSubstituteInfo(
           myOwnerNode, myContainmentLink.getDeclarationNode(), myEditorContext));
   if (editorCell.getRole() == null) {
     editorCell.setRole("right");
   }
   DeleteLogicalOperatorFromBehind.setCellActions(editorCell, myOwnerNode, myEditorContext);
 }
コード例 #26
0
 private void installCellInfo(SNode child, EditorCell editorCell) {
   editorCell.setSubstituteInfo(
       new DefaultChildSubstituteInfo(
           myOwnerNode, myContainmentLink.getDeclarationNode(), myEditorContext));
   if (editorCell.getRole() == null) {
     editorCell.setRole("name");
   }
   editorCell.addKeyMap(new create_JarManifestName());
 }
コード例 #27
0
 public void installCellInfo(SNode child, EditorCell editorCell) {
   editorCell.setSubstituteInfo(
       new DefaultChildSubstituteInfo(
           myOwnerNode, myContainmentLink.getDeclarationNode(), myEditorContext));
   if (editorCell.getRole() == null) {
     editorCell.setRole("cellSelector");
   }
   CellSelectorReference_Actions.setCellActions(editorCell, myOwnerNode, myEditorContext);
 }
コード例 #28
0
ファイル: APICellAdapter.java プロジェクト: yan96in/MPS
 public static SNode getSNodeWRTReference(EditorCell cell) {
   SNode target = cell.getStyle().get(StyleAttributes.NAVIGATABLE_NODE);
   if (target != null) {
     return target;
   }
   SNode node = cell.getSNode();
   String role = cell.getRole();
   SNode referentNode = role == null ? null : node.getReferenceTarget(role);
   return referentNode != null ? referentNode : node;
 }
コード例 #29
0
 public void installCellInfo(SNode child, EditorCell editorCell) {
   editorCell.setSubstituteInfo(
       new DefaultChildSubstituteInfo(
           myOwnerNode, myContainmentLink.getDeclarationNode(), myEditorContext));
   if (editorCell.getRole() == null) {
     editorCell.setRole("isMethodCurrent");
   }
   Style style = new StyleImpl();
   style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, 0, true);
   editorCell.getStyle().putAll(style);
 }
コード例 #30
0
 public void installCellInfo(SNode child, EditorCell editorCell) {
   editorCell.setSubstituteInfo(
       new DefaultChildSubstituteInfo(
           myOwnerNode, myContainmentLink.getDeclarationNode(), myEditorContext));
   if (editorCell.getRole() == null) {
     editorCell.setRole("query");
   }
   if (true) {
     editorCell.getStyle().set(StyleAttributes.FOCUS_POLICY, FocusPolicy.ATTRACTS_RECURSIVELY);
   }
 }