Package org.eclipse.wb.internal.core.utils.xml

Examples of org.eclipse.wb.internal.core.utils.xml.DocumentElement


          WidgetInfo widget = (WidgetInfo) object;
          // reorder, use same "position" element
          {
            Position position = getPosition(m_widget, widget);
            if (position == Position.this) {
              DocumentElement targetElement = target.getElement();
              int targetIndex = target.getIndex();
              targetElement.moveChild(object.getElement().getParent(), targetIndex);
              return;
            }
          }
          // create new "position" element
          target = prepareTarget(target);
          super.move(object, target, oldParent, newParent);
        }

        private ElementTarget prepareTarget(ElementTarget target) {
          // prepare "position" element
          String tag = m_widget.getElement().getTagNS() + m_description.getTag();
          DocumentElement positionElement = new DocumentElement(tag);
          // add "position" element
          DocumentElement targetElement = target.getElement();
          int targetIndex = target.getIndex();
          targetElement.addChild(positionElement, targetIndex);
          // prepare new target
          return new ElementTarget(positionElement, 0);
        }
      };
    }
View Full Code Here


      public void endVisit(ObjectInfo objectInfo) throws Exception {
        if (objectInfo instanceof XmlObjectInfo) {
          XmlObjectInfo xmlObjectInfo = (XmlObjectInfo) objectInfo;
          CreationSupport creationSupport = xmlObjectInfo.getCreationSupport();
          if (!XmlObjectUtils.isImplicit(xmlObjectInfo)) {
            DocumentElement element = creationSupport.getElement();
            String path = UiBinderParser.getPath(element);
            if (xmlObjectInfo instanceof IsWidgetWrappedInfo) {
              xmlObjectInfo = ((IsWidgetWrappedInfo) xmlObjectInfo).getWrapper();
            }
            m_pathToModelMap.put(path, xmlObjectInfo);
View Full Code Here

TOP

Related Classes of org.eclipse.wb.internal.core.utils.xml.DocumentElement

Copyright © 2018 www.massapicom. 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.