Exemple #1
0
 @Override
 public <T> T updateReferencedNodeCell(Computable<T> update, SNode node, String role) {
   ReferencedNodeContext currentContext = myContextStack.peek();
   myContextStack.push(
       currentContext.contextWithOneMoreReference(node, currentContext.getNode(), role));
   try {
     return update.compute();
   } finally {
     myContextStack.pop();
   }
 }
Exemple #2
0
 public EditorCell performUpdate() {
   ReferencedNodeContext currentContext = ReferencedNodeContext.createNodeContext(getNode());
   myContextStack.push(currentContext);
   EditorContext editorContext = getUpdater().getEditorContext();
   editorContext.getCellFactory().pushCellContext();
   try {
     editorContext.getCellFactory().addCellContextHints(getInitialEditorHints(editorContext));
     String[] explicitHintsForNode = getExplicitHintsForNode(getNode());
     if (explicitHintsForNode != null) {
       editorContext.getCellFactory().addCellContextHints(explicitHintsForNode);
     }
     return EditorManager.getInstanceFromContext(editorContext)
         .createRootCell(
             getNode(), getModelModifications(), currentContext, editorContext.isInspector());
   } finally {
     editorContext.getCellFactory().popCellContext();
     myContextStack.pop();
   }
 }