Examples of XmlObjectMemento


Examples of org.eclipse.wb.internal.core.xml.model.clipboard.XmlObjectMemento

        }
      }

      private void addWidgetCommand(List<ClipboardCommand> commands, TreeItemInfo item)
          throws Exception {
        final XmlObjectMemento memento = XmlObjectMemento.createMemento(item);
        commands.add(new ClipboardCommand() {
          private static final long serialVersionUID = 0L;

          @Override
          public void execute(XmlObjectInfo tree) throws Exception {
            TreeItemInfo item = (TreeItemInfo) memento.create(tree);
            XmlObjectUtils.flowContainerCreate(tree, item, null);
            memento.apply();
          }
        });
      }
    });
  }
View Full Code Here

Examples of org.eclipse.wb.internal.core.xml.model.clipboard.XmlObjectMemento

    IMenuPolicy policy = MenuObjectInfoUtils.getMenuInfo(bar).getPolicy();
    // Object can not be pasted (not list of memento at all)
    assertFalse(policy.validatePaste(new Object()));
    // RootPanel can not be pasted (even it memento)
    {
      XmlObjectMemento memento = XmlObjectMemento.createMemento(button);
      List<XmlObjectMemento> mementos = ImmutableList.of(memento);
      assertFalse(policy.validatePaste(mementos));
    }
  }
View Full Code Here

Examples of org.eclipse.wb.internal.core.xml.model.clipboard.XmlObjectMemento

    MenuBarInfo bar = getObjectByName("bar");
    // prepare memento
    List<XmlObjectMemento> mementos;
    {
      MenuItemInfo existingItem = getObjectByName("item");
      XmlObjectMemento memento = XmlObjectMemento.createMemento(existingItem);
      mementos = ImmutableList.of(memento);
    }
    // paste new "Item"
    {
      IMenuPolicy policy = MenuObjectInfoUtils.getMenuInfo(bar).getPolicy();
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.