Examples of AddNodeCommand


Examples of net.sf.myway.edit.ui.editors.commands.AddNodeCommand

          if (sel.isEmpty())
            return null;
          final MapObject mo = getFirstMapObject(sel);
          if (mo == null)
            return null;
          final AddNodeCommand cmd = new AddNodeCommand();
          cmd.setTarget(mo);
          cmd.setNode((MapNode) no);
          final FigureCanvas control = (FigureCanvas) EditMapEditPart.this.getViewer()
            .getControl();
          final Point loc = request.getLocation();
          if (control.getVerticalBar() != null)
            loc.y += control.getVerticalBar().getSelection();
          if (control.getHorizontalBar() != null)
            loc.x += control.getHorizontalBar().getSelection();
          cmd.setLocation(loc);
          cmd.setCoordSys(_coordinateSystem);
          return cmd;
        }
        return null;
      }
View Full Code Here

Examples of org.exoplatform.frameworks.jcr.cli.AddNodeCommand

   }

   public void testAddNode1() throws Exception
   {
      params.clear();
      AddNodeCommand addNodeCommand = (AddNodeCommand)cservice.getCatalog("CLI").getCommand("addnode");
      params.add("childOftestJCRClientCommands1");
      ctx.put(PARAMETERS_KEY, params);
      addNodeCommand.execute(ctx);
      System.out.println("[out]:" + ctx.getOutput());
      assertEquals(ctx.getCurrentItem().getName(), "childOftestJCRClientCommands1");
   }
View Full Code Here

Examples of org.exoplatform.frameworks.jcr.cli.AddNodeCommand

   }

   public void testAddNode2() throws Exception
   {
      params.clear();
      AddNodeCommand addNodeCommand = (AddNodeCommand)cservice.getCatalog("CLI").getCommand("addnode");
      params.add("childOftestJCRClientCommands2");
      params.add("nt:unstructured");
      ctx.put(PARAMETERS_KEY, params);
      addNodeCommand.execute(ctx);
      System.out.println("[out]:" + ctx.getOutput());
      assertEquals(((Node)ctx.getCurrentItem()).getPrimaryNodeType().getName(), "nt:unstructured");
   }
View Full Code Here

Examples of org.exoplatform.frameworks.jcr.cli.AddNodeCommand

   }

   public void testAddNode1() throws Exception
   {
      params.clear();
      AddNodeCommand addNodeCommand = (AddNodeCommand)cservice.getCatalog("CLI").getCommand("addnode");
      params.add("childOftestJCRClientCommands1");
      ctx.put(PARAMETERS_KEY, params);
      addNodeCommand.execute(ctx);

      assertEquals(ctx.getCurrentItem().getName(), "childOftestJCRClientCommands1");
   }
View Full Code Here

Examples of org.exoplatform.frameworks.jcr.cli.AddNodeCommand

   }

   public void testAddNode2() throws Exception
   {
      params.clear();
      AddNodeCommand addNodeCommand = (AddNodeCommand)cservice.getCatalog("CLI").getCommand("addnode");
      params.add("childOftestJCRClientCommands2");
      params.add("nt:unstructured");
      ctx.put(PARAMETERS_KEY, params);
      addNodeCommand.execute(ctx);

      assertEquals(((Node)ctx.getCurrentItem()).getPrimaryNodeType().getName(), "nt:unstructured");
   }
View Full Code Here

Examples of org.exoplatform.frameworks.jcr.cli.AddNodeCommand

   }

   public void testAddNode1() throws Exception
   {
      params.clear();
      AddNodeCommand addNodeCommand = (AddNodeCommand)cservice.getCatalog("CLI").getCommand("addnode");
      params.add("childOftestJCRClientCommands1");
      ctx.put(PARAMETERS_KEY, params);
      addNodeCommand.execute(ctx);

      assertEquals(ctx.getCurrentItem().getName(), "childOftestJCRClientCommands1");
   }
View Full Code Here

Examples of org.exoplatform.frameworks.jcr.cli.AddNodeCommand

   }

   public void testAddNode2() throws Exception
   {
      params.clear();
      AddNodeCommand addNodeCommand = (AddNodeCommand)cservice.getCatalog("CLI").getCommand("addnode");
      params.add("childOftestJCRClientCommands2");
      params.add("nt:unstructured");
      ctx.put(PARAMETERS_KEY, params);
      addNodeCommand.execute(ctx);

      assertEquals(((Node)ctx.getCurrentItem()).getPrimaryNodeType().getName(), "nt:unstructured");
   }
View Full Code Here

Examples of org.exoplatform.frameworks.jcr.command.core.AddNodeCommand

   }

   public void testAddNode() throws Exception
   {

      AddNodeCommand addNode = (AddNodeCommand)cservice.getCatalog().getCommand("addNode");
      System.out.println(" " + addNode);
      ctx.put("currentNode", "/");
      ctx.put(addNode.getPathKey(), "test");
      addNode.execute(ctx);

      System.out.println(">>> " + ctx.get(addNode.getResultKey()));

      SaveCommand save = (SaveCommand)cservice.getCatalog().getCommand("save");
      // ctx.remove(save.getPathKey());
      ctx.put(addNode.getPathKey(), "/");
      save.execute(ctx);

      System.out.println(">>> SAVE >>> ");
   }
View Full Code Here

Examples of org.exoplatform.frameworks.jcr.command.core.AddNodeCommand

   }

   public void testAddNode() throws Exception
   {

      AddNodeCommand addNode = (AddNodeCommand)cservice.getCatalog().getCommand("addNode");

      ctx.put("currentNode", "/");
      ctx.put(addNode.getPathKey(), "test");
      addNode.execute(ctx);

      SaveCommand save = (SaveCommand)cservice.getCatalog().getCommand("save");
      // ctx.remove(save.getPathKey());
      ctx.put(addNode.getPathKey(), "/");
      save.execute(ctx);
   }
View Full Code Here

Examples of org.exoplatform.frameworks.jcr.command.core.AddNodeCommand

   }

   public void testAddNode() throws Exception
   {

      AddNodeCommand addNode = (AddNodeCommand)cservice.getCatalog().getCommand("addNode");

      ctx.put("currentNode", "/");
      ctx.put(addNode.getPathKey(), "test");
      addNode.execute(ctx);

      SaveCommand save = (SaveCommand)cservice.getCatalog().getCommand("save");
      // ctx.remove(save.getPathKey());
      ctx.put(addNode.getPathKey(), "/");
      save.execute(ctx);
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.