Exemplo n.º 1
0
 @Override
 protected EditorCell createEmptyCell() {
   EditorCell editorCell = super.createEmptyCell();
   editorCell.setCellId("empty_foreignMessageSource");
   installCellInfo(null, editorCell);
   return editorCell;
 }
 @Override
 protected EditorCell createEmptyCell() {
   EditorCell editorCell = super.createEmptyCell();
   editorCell.setCellId("empty_isMethodCurrent");
   installCellInfo(null, editorCell);
   return editorCell;
 }
Exemplo n.º 3
0
 @Override
 protected void addReferenceCell(final SReferenceLink referenceLink) {
   SReference reference = getNode().getReference(referenceLink);
   if (reference == null) {
     addLabel("<no target>");
     return;
   }
   final SNode referentNode = reference.getTargetNode();
   if (referentNode == null) {
     String resolveInfo = ((jetbrains.mps.smodel.SReference) reference).getResolveInfo();
     String myErrorText = resolveInfo != null ? resolveInfo : "?" + referenceLink.getName() + "?";
     EditorCell_Error errorCell = new EditorCell_Error(getEditorContext(), getNode(), myErrorText);
     errorCell.setCellId("error_" + referenceLink.getName());
     addCell(errorCell);
     return;
   }
   if (referentNode.getModel() == null) {
     LOG.error("Reference to node which is not inside model. Node: " + referentNode, referentNode);
   }
   EditorCell cell =
       getUpdateSession()
           .updateReferencedNodeCell(
               new Computable<EditorCell>() {
                 @Override
                 public EditorCell compute() {
                   return createReferentEditorCell(
                       getEditorContext(), referenceLink, referentNode);
                 }
               },
               referentNode,
               referenceLink.getName());
   setSemanticNodeToCells(cell, getNode());
   cell.setCellId("reference_" + referenceLink.getName());
   addCell(cell);
 }
 protected EditorCell createChildCell(SNode child) {
   getCellFactory().pushCellContext();
   getCellFactory().setNodeLocation(new SNodeLocation.FromNode(child));
   try {
     EditorCell editorCell = super.createChildCell(child);
     editorCell.setAction(
         CellActionType.DELETE,
         new CellAction_DeleteSmart(
             getNode(),
             MetaAdapterFactory.getContainmentLink(
                 0x698a8d22a10447a0L,
                 0xba8d10e3ec237f13L,
                 0x5c3f3e2c1cede077L,
                 0x6e014d63c0847621L,
                 "classpath"),
             child));
     editorCell.setAction(
         CellActionType.BACKSPACE,
         new CellAction_DeleteSmart(
             getNode(),
             MetaAdapterFactory.getContainmentLink(
                 0x698a8d22a10447a0L,
                 0xba8d10e3ec237f13L,
                 0x5c3f3e2c1cede077L,
                 0x6e014d63c0847621L,
                 "classpath"),
             child));
     installCellInfo(child, editorCell);
     return editorCell;
   } finally {
     getCellFactory().popCellContext();
   }
 }
 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;
 }
 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());
 }
 protected EditorCell createChildCell(SNode child) {
   getCellFactory().pushCellContext();
   getCellFactory().setNodeLocation(new SNodeLocation.FromNode(child));
   try {
     EditorCell editorCell = super.createChildCell(child);
     editorCell.setAction(
         CellActionType.DELETE,
         new CellAction_DeleteSmart(
             getNode(),
             MetaAdapterFactory.getContainmentLink(
                 0x86ef829012bb4ca7L,
                 0x947f093788f263a9L,
                 0x5869770da61dfe28L,
                 0x19bfb4173fb5241eL,
                 "moduleRef"),
             child));
     editorCell.setAction(
         CellActionType.BACKSPACE,
         new CellAction_DeleteSmart(
             getNode(),
             MetaAdapterFactory.getContainmentLink(
                 0x86ef829012bb4ca7L,
                 0x947f093788f263a9L,
                 0x5869770da61dfe28L,
                 0x19bfb4173fb5241eL,
                 "moduleRef"),
             child));
     installCellInfo(child, editorCell);
     return editorCell;
   } finally {
     getCellFactory().popCellContext();
   }
 }
 protected EditorCell createChildCell(SNode child) {
   getCellFactory().pushCellContext();
   getCellFactory().setNodeLocation(new SNodeLocation.FromNode(child));
   try {
     EditorCell editorCell = super.createChildCell(child);
     editorCell.setAction(
         CellActionType.DELETE,
         new CellAction_DeleteSmart(
             getNode(),
             MetaAdapterFactory.getContainmentLink(
                 0x7866978ea0f04cc7L,
                 0x81bc4d213d9375e1L,
                 0x10a2e210544L,
                 0x23c00a5f2f61f63L,
                 "nodeId"),
             child));
     editorCell.setAction(
         CellActionType.BACKSPACE,
         new CellAction_DeleteSmart(
             getNode(),
             MetaAdapterFactory.getContainmentLink(
                 0x7866978ea0f04cc7L,
                 0x81bc4d213d9375e1L,
                 0x10a2e210544L,
                 0x23c00a5f2f61f63L,
                 "nodeId"),
             child));
     installCellInfo(child, editorCell);
     return editorCell;
   } finally {
     getCellFactory().popCellContext();
   }
 }
 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;
 }
 protected EditorCell createChildCell(SNode child) {
   getCellFactory().pushCellContext();
   getCellFactory().setNodeLocation(new SNodeLocation.FromNode(child));
   try {
     EditorCell editorCell = super.createChildCell(child);
     editorCell.setAction(
         CellActionType.DELETE,
         new CellAction_DeleteSmart(
             getNode(),
             MetaAdapterFactory.getContainmentLink(
                 0x8388864671ce4f1cL,
                 0x9c53c54016f6ad4fL,
                 0x120c4c1050eL,
                 0x120c4c1332bL,
                 "fromElement"),
             child));
     editorCell.setAction(
         CellActionType.BACKSPACE,
         new CellAction_DeleteSmart(
             getNode(),
             MetaAdapterFactory.getContainmentLink(
                 0x8388864671ce4f1cL,
                 0x9c53c54016f6ad4fL,
                 0x120c4c1050eL,
                 0x120c4c1332bL,
                 "fromElement"),
             child));
     installCellInfo(child, editorCell);
     return editorCell;
   } finally {
     getCellFactory().popCellContext();
   }
 }
 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;
 }
Exemplo n.º 12
0
 private EditorCell createProperty_1qbsjw_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");
   Style style = new StyleImpl();
   style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD_ITALIC);
   style.set(
       StyleAttributes.TEXT_COLOR,
       StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_BLUE));
   style.set(StyleAttributes.AUTO_DELETABLE, true);
   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;
 }
 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"));
     }
   }
 }
 @Override
 protected EditorCell createEmptyCell() {
   EditorCell editorCell = super.createEmptyCell();
   editorCell.setCellId("empty_updateChannel");
   installCellInfo(null, editorCell);
   return editorCell;
 }
 private EditorCell createProperty_cv1jro_b1a0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("comment");
   provider.setNoTargetText("<no comment>");
   provider.setAllowsEmptyTarget(true);
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_comment");
   Style style = new StyleImpl();
   style.set(
       StyleAttributes.TEXT_COLOR,
       StyleRegistry.getInstance().getSimpleColor(MPSColors.DARK_GREEN));
   style.set(StyleAttributes.PADDING_LEFT, new Padding(0.0, Measure.SPACES));
   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;
 }
 private EditorCell createProperty_689p1d_c0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("flag");
   provider.setNoTargetText("<no flag>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_flag");
   Style style = new StyleImpl();
   style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true);
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(
       new CompositeSubstituteInfo(
           editorContext,
           provider.getCellContext(),
           new SubstituteInfoPartExt[] {
             new BooleanStyleSheetItem_Editor.BooleanStyleSheetItem_flag_cellMenu_689p1d_a0c0(),
             new BooleanStyleSheetItem_Editor.BooleanStyleSheetItem_generic_cellMenu_689p1d_b0c0()
           }));
   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;
 }
 protected EditorCell createChildCell(SNode child) {
   getCellFactory().pushCellContext();
   getCellFactory().setNodeLocation(new SNodeLocation.FromNode(child));
   try {
     EditorCell editorCell = super.createChildCell(child);
     editorCell.setAction(
         CellActionType.DELETE,
         new CellAction_DeleteSmart(
             getNode(),
             MetaAdapterFactory.getContainmentLink(
                 0x7866978ea0f04cc7L,
                 0x81bc4d213d9375e1L,
                 0x2143399c0554e687L,
                 0x3636a984eed504f9L,
                 "conceptArgument"),
             child));
     editorCell.setAction(
         CellActionType.BACKSPACE,
         new CellAction_DeleteSmart(
             getNode(),
             MetaAdapterFactory.getContainmentLink(
                 0x7866978ea0f04cc7L,
                 0x81bc4d213d9375e1L,
                 0x2143399c0554e687L,
                 0x3636a984eed504f9L,
                 "conceptArgument"),
             child));
     installCellInfo(child, editorCell);
     return editorCell;
   } finally {
     getCellFactory().popCellContext();
   }
 }
Exemplo n.º 18
0
 public static void setCellActions(EditorCell editorCell, SNode node, EditorContext context) {
   editorCell.setAction(
       CellActionType.DELETE, new delete_javaDepReexport.delete_javaDepReexport_DELETE(node));
   editorCell.setAction(
       CellActionType.BACKSPACE,
       new delete_javaDepReexport.delete_javaDepReexport_BACKSPACE(node));
 }
 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;
 }
Exemplo n.º 20
0
 @Override
 public boolean acceptCell(EditorCell cell, EditorComponent editor) {
   if (cell == null) {
     return false;
   }
   return cell.isBig() && editor.isValid(cell) && cell.getSNode() == getNode();
 }
Exemplo n.º 21
0
 @Override
 protected EditorCell createEmptyCell() {
   EditorCell editorCell = super.createEmptyCell();
   editorCell.setCellId("empty_applicableBlock");
   installCellInfo(null, editorCell);
   return editorCell;
 }
Exemplo n.º 22
0
 /** @deprecated Since MPS 3.5 use generated StyleClass */
 @Deprecated
 public static void apply_InequationsGroupsLabel(Style style, EditorCell editorCell) {
   SNode node = (editorCell == null ? null : editorCell.getSNode());
   EditorContext editorContext = (editorCell == null ? null : editorCell.getContext());
   new TypesystemStyles_StyleSheet.InequationsGroupsLabelStyleClass(editorContext, node)
       .apply(style, editorCell);
 }
 protected EditorCell createChildCell(SNode child) {
   getCellFactory().pushCellContext();
   getCellFactory().setNodeLocation(new SNodeLocation.FromNode(child));
   try {
     EditorCell editorCell = super.createChildCell(child);
     editorCell.setAction(
         CellActionType.DELETE,
         new CellAction_DeleteSmart(
             getNode(),
             MetaAdapterFactory.getContainmentLink(
                 0xb401a68083254110L,
                 0x8fd384331ff25befL,
                 0x1231e32ff7a958ceL,
                 0x1231e32ff7a9efcdL,
                 "createNodeQuery"),
             child));
     editorCell.setAction(
         CellActionType.BACKSPACE,
         new CellAction_DeleteSmart(
             getNode(),
             MetaAdapterFactory.getContainmentLink(
                 0xb401a68083254110L,
                 0x8fd384331ff25befL,
                 0x1231e32ff7a958ceL,
                 0x1231e32ff7a9efcdL,
                 "createNodeQuery"),
             child));
     installCellInfo(child, editorCell);
     return editorCell;
   } finally {
     getCellFactory().popCellContext();
   }
 }
Exemplo n.º 24
0
 private EditorCell createProperty_y27sly_n0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("javaLevelTarget");
   provider.setNoTargetText("<default>");
   provider.setAllowsEmptyTarget(true);
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_javaLevelTarget");
   Style style = new StyleImpl();
   style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, 0, true);
   editorCell.getStyle().putAll(style);
   editorCell.setSubstituteInfo(
       new CompositeSubstituteInfo(
           editorContext,
           provider.getCellContext(),
           new SubstituteInfoPartExt[] {
             new BwfJavaModule_Editor.BwfJavaModule_javaLevelTarget_cellMenu_y27sly_a0n0()
           }));
   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;
 }
 @Override
 protected EditorCell createEmptyCell() {
   EditorCell editorCell = super.createEmptyCell();
   editorCell.setCellId("empty_presentation");
   installCellInfo(null, editorCell);
   return editorCell;
 }
 private EditorCell createProperty_j36akn_a(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("name");
   provider.setNoTargetText("<no name>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("VDNCC_property_name");
   Style style = new StyleImpl();
   BaseLanguageStyle_StyleSheet.applyVariableName(style, editorCell);
   style.set(StyleAttributes.RT_ANCHOR_TAG, "default_RTransform");
   editorCell.getStyle().putAll(style);
   if (renderingCondition_j36akn_a0(node, editorContext, editorContext.getScope())) {
     editorCell.getStyle().set(StyleAttributes.FOCUS_POLICY, FocusPolicy.FIRST_EDITABLE_CELL);
   }
   editorCell.setSubstituteInfo(
       new CompositeSubstituteInfo(
           editorContext,
           provider.getCellContext(),
           new SubstituteInfoPartExt[] {
             new VariableDeclaration_NameCellComponent
                 .VariableDeclaration_name_postfixCellMenu_j36akn_a0a()
           }));
   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;
 }
Exemplo n.º 27
0
 private EditorCell createProperty_poez2y_b0(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("entityName");
   provider.setNoTargetText("<no entityName>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_entityName");
   Style style = new StyleImpl();
   XmlSS_StyleSheet.applyXmlAttrEntityRefValue(style, editorCell);
   editorCell.getStyle().putAll(style);
   delete_XmlEntityRefValueDelete.setCellActions(editorCell, node, editorContext);
   editorCell.setSubstituteInfo(
       new CompositeSubstituteInfo(
           editorContext,
           provider.getCellContext(),
           new SubstituteInfoPartExt[] {
             new XmlEntityRefValue_Editor.XmlEntityRefValue_entityName_cellMenu_poez2y_a0b0()
           }));
   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;
 }
Exemplo n.º 28
0
 private EditorCell createCustom_bjjsvn_a(final EditorContext editorContext, final SNode node) {
   AbstractCellProvider provider =
       new _FunctionTypes._return_P0_E0<AbstractCellProvider>() {
         public AbstractCellProvider invoke() {
           return new AbstractCellProvider() {
             @Override
             public EditorCell createEditorCell(EditorContext context) {
               EditorCell_Error result = new EditorCell_Error(context, node, "<no classpath>");
               result.getStyle().set(StyleAttributes.PADDING_LEFT, new Padding(0.0));
               result.getStyle().set(StyleAttributes.PADDING_RIGHT, new Padding(0.0));
               return result;
             }
           };
         }
       }.invoke();
   EditorCell editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("Custom_bjjsvn_a");
   EditorCell bigCell = BigCellUtil.findBigCell(editorCell, node);
   if (bigCell != null) {
     bigCell.setBig(true);
   } else {
     throw new RuntimeException("No big cell found!");
   }
   return editorCell;
 }
Exemplo n.º 29
0
 private EditorCell createProperty_vgxjtu_a1a(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new PropertyCellProvider(node, editorContext);
   provider.setRole("label");
   provider.setNoTargetText("<no label>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   editorCell.setCellId("property_label");
   Style style = new StyleImpl();
   BaseLanguageStyle_StyleSheet.apply_Label(style, editorCell);
   style.set(StyleAttributes.SELECTABLE, true);
   style.set(StyleAttributes.EDITABLE, true);
   editorCell.getStyle().putAll(style);
   ContinueStatement_Actions.setCellActions(editorCell, node, editorContext);
   editorCell.setSubstituteInfo(
       new CompositeSubstituteInfo(
           editorContext,
           provider.getCellContext(),
           new SubstituteInfoPartExt[] {
             new ContinueStatement_Editor.ContinueStatement_generic_cellMenu_vgxjtu_a0a1a()
           }));
   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;
 }
Exemplo n.º 30
0
 @Override
 protected EditorCell createEmptyCell() {
   EditorCell editorCell = super.createEmptyCell();
   editorCell.setCellId("empty_messageTarget");
   installCellInfo(null, editorCell);
   return editorCell;
 }