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

Examples of org.eclipse.wb.internal.core.xml.model.XmlObjectInfo


        lines,
        new String[]{"}"});
  }

  private static void openListener(final Property property) throws Exception {
    XmlObjectInfo object = ((XmlProperty) property).getObject();
    ExecutionUtils.run(object, new RunnableEx() {
      public void run() throws Exception {
        ReflectionUtils.invokeMethod(property, "openListener()");
      }
    });
View Full Code Here


  /**
   * Checks that GWT component has <code>"simpleContainer"</code> parameter.
   */
  private void check_is_simpleContainer(String className) throws Exception {
    XmlObjectInfo model = createObject(className);
    assertHasWidgetSimpleContainer(model, true);
    assertHasWidgetSimpleContainer(model, false);
  }
View Full Code Here

    @Override
    protected boolean setEditorText(Property property, String text) throws Exception {
      String name = text.trim();
      // validate name
      {
        XmlObjectInfo object = ((NameProperty) property).getObject();
        String errorMessage = NameSupport.validateName(object, name);
        if (errorMessage != null) {
          UiUtils.openWarning(DesignerPlugin.getShell(), property.getTitle(), errorMessage);
          return false;
        }
View Full Code Here

            "<ui:UiBinder>",
            "  <g:FlowPanel/>",
            "</ui:UiBinder>");
    refresh();
    // use artificial "testObject" to ask properties, just to get coverage of not Widget case
    XmlObjectInfo testObject =
        new XmlObjectInfo(m_lastContext, panel.getDescription(), panel.getCreationSupport());
    // no "UiChild" property
    {
      Property uiChildProperty = PropertyUtils.getByPath(testObject, "UiChild");
      assertNull(uiChildProperty);
    }
View Full Code Here

  //
  // Resize
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_resize_EAST() throws Exception {
    XmlObjectInfo panel =
        openEditor(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <g:FlowPanel>",
View Full Code Here

        "  </g:FlowPanel>",
        "</ui:UiBinder>");
  }

  public void test_resize_SOUTH() throws Exception {
    XmlObjectInfo panel =
        openEditor(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <g:FlowPanel>",
View Full Code Here

        "  </g:FlowPanel>",
        "</ui:UiBinder>");
  }

  public void test_resize_SOUTH_EAST() throws Exception {
    XmlObjectInfo panel =
        openEditor(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <g:FlowPanel>",
View Full Code Here

  private void fillMap_pathToModel() {
    m_rootModel.accept(new ObjectInfoVisitor() {
      @Override
      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();
View Full Code Here

        Proxy.newProxyInstance(classLoader, new Class[]{handlerClass}, new InvocationHandler() {
          public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
            if (method.getName().equals("handle")) {
              String path = (String) args[0];
              Object object = args[1];
              XmlObjectInfo objectInfo = m_pathToModelMap.get(path);
              objectInfo.setObject(object);
            }
            if (method.getName().equals("provideFactory")) {
              Class<?> factoryType = (Class<?>) args[0];
              String methodName = (String) args[1];
              Object[] factoryArgs = (Object[]) args[2];
View Full Code Here

        String key = entry.getKey();
        String[] keyParts = StringUtils.split(key);
        path = keyParts[0];
        attribute = keyParts[1];
      }
      XmlObjectInfo objectInfo = m_pathToModelMap.get(path);
      if (objectInfo != null) {
        Object value = entry.getValue();
        objectInfo.registerAttributeValue(attribute, value);
      }
    }
    // attributes for all elements
    m_context.setAttributeValues(attributes);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.wb.internal.core.xml.model.XmlObjectInfo

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.