Example #1
0
 public void installElementCellActions(
     SNode listOwner, SNode elementNode, EditorCell elementCell, EditorContext editorContext) {
   if (elementCell.getUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET) == null) {
     elementCell.putUserObject(
         AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET,
         AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET);
     if (elementNode != null) {
       elementCell.setAction(
           CellActionType.DELETE,
           new CellAction_DeleteNode(
               elementNode, CellAction_DeleteNode.DeleteDirection.FORWARD));
       elementCell.setAction(
           CellActionType.BACKSPACE,
           new CellAction_DeleteNode(
               elementNode, CellAction_DeleteNode.DeleteDirection.BACKWARD));
       elementCell.addKeyMap(new RefNodeListHandlerElementKeyMap(this, ","));
     }
     if (elementCell.getSubstituteInfo() == null
         || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
       elementCell.setSubstituteInfo(
           new DefaultChildSubstituteInfo(
               listOwner, elementNode, super.getLinkDeclaration(), editorContext));
     }
   }
 }
 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());
 }
 private EditorCell createRefNode_cth9w3_b2b2a(EditorContext editorContext, SNode node) {
   CellProviderWithRole provider = new RefNodeCellProvider(node, editorContext);
   provider.setRole("inspectedCellModel");
   provider.setNoTargetText("<choose cell model>");
   EditorCell editorCell;
   editorCell = provider.createEditorCell(editorContext);
   if (editorCell.getRole() == null) {
     editorCell.setRole("inspectedCellModel");
   }
   editorCell.addKeyMap(new EditorCellModel_KeyMap());
   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;
 }
 public void installElementCellActions(SNode elementNode, EditorCell elementCell) {
   if (elementCell.getUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET) == null) {
     elementCell.putUserObject(
         AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET,
         AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET);
     if (elementNode != null) {
       elementCell.setAction(
           CellActionType.DELETE,
           new CellAction_DeleteNode(
               elementNode, CellAction_DeleteNode.DeleteDirection.FORWARD));
       elementCell.setAction(
           CellActionType.BACKSPACE,
           new CellAction_DeleteNode(
               elementNode, CellAction_DeleteNode.DeleteDirection.BACKWARD));
       elementCell.addKeyMap(new RefNodeListHandlerElementKeyMap(this, ","));
     }
     if (elementCell.getSubstituteInfo() == null
         || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
       elementCell.setSubstituteInfo(
           new OldNewCompositeSubstituteInfo(
               getEditorContext(),
               new SChildSubstituteInfo(
                   elementCell,
                   getNode(),
                   MetaAdapterFactory.getContainmentLink(
                       0xf3061a5392264cc5L,
                       0xa443f952ceaf5816L,
                       0x114a6b4ccabL,
                       0x114a71c697fL,
                       "value"),
                   elementNode),
               new DefaultChildSubstituteInfo(
                   getNode(), elementNode, super.getLinkDeclaration(), getEditorContext())));
     }
   }
 }