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

Examples of org.eclipse.wb.internal.core.model.ObjectInfoVisitor


      }
    });
  }

  private static void destroyComponents0(JavaInfo root) throws Exception {
    root.accept(new ObjectInfoVisitor() {
      @Override
      public void endVisit(ObjectInfo objectInfo) throws Exception {
        if (objectInfo instanceof ComponentInfo) {
          ComponentInfo componentInfo = (ComponentInfo) objectInfo;
          Object componentObject = componentInfo.getObject();
View Full Code Here


        });
  }

  private static JavaInfo getJavaInfoRepresentedBy(JavaInfo rootJavaInfo, final String variable) {
    final JavaInfo result[] = new JavaInfo[1];
    rootJavaInfo.accept(new ObjectInfoVisitor() {
      @Override
      public boolean visit(ObjectInfo objectInfo) throws Exception {
        if (result[0] == null && objectInfo instanceof JavaInfo) {
          JavaInfo javaInfo = (JavaInfo) objectInfo;
          if (variable.equals(JavaInfoReferenceProvider.getReference(javaInfo))) {
View Full Code Here

  private static Map<IFile, Long> getReferencedTemplates(final ObjectInfo rootObject) {
    final IJavaProject javaProject = (IJavaProject) GlobalState.getOtherHelper().getJavaProject();
    final Map<IFile, Long> templateStamps = Maps.newHashMap();
    final Set<Object> visitedWidgets = Sets.newHashSet();
    final Set<Class<?>> checkedTypes = Sets.newHashSet();
    rootObject.accept(new ObjectInfoVisitor() {
      @Override
      public void endVisit(ObjectInfo model) throws Exception {
        Object object = GlobalState.getOtherHelper().getObject(model);
        if (object != null) {
          visitWidgets(object);
View Full Code Here

    return "protected void initDataBindings()";
  }

  private MethodDeclaration getLastInfoDeclaration(JavaInfo rootJavaInfo) throws Exception {
    final JavaInfo[] result = {rootJavaInfo};
    rootJavaInfo.accept0(new ObjectInfoVisitor() {
      @Override
      public void endVisit(ObjectInfo objectInfo) throws Exception {
        if (objectInfo instanceof UIObjectInfo) {
          JavaInfo info = (JavaInfo) objectInfo;
          if (JavaInfoUtils.getMethodDeclaration(info) != m_initDataBindings) {
View Full Code Here

  /**
   * @return the {@link XmlObjectInfo} with the given name, may be <code>null</code>.
   */
  public static XmlObjectInfo getObject(XmlObjectInfo root, final String name) {
    final XmlObjectInfo result[] = {null};
    root.accept(new ObjectInfoVisitor() {
      @Override
      public void endVisit(ObjectInfo object) throws Exception {
        if (object instanceof XmlObjectInfo) {
          XmlObjectInfo xmlObject = (XmlObjectInfo) object;
          if (ObjectUtils.equals(getName(xmlObject), name)) {
View Full Code Here

   * Traverses the entire hierarchy and gathers set of existing names.
   */
  private Set<String> getExistingNames() throws Exception {
    final Set<String> resultSet = Sets.newTreeSet();
    // add ui:field
    m_object.getRootXML().accept(new ObjectInfoVisitor() {
      @Override
      public void endVisit(ObjectInfo object) throws Exception {
        if (object instanceof XmlObjectInfo) {
          XmlObjectInfo xmlObject = (XmlObjectInfo) object;
          if (!XmlObjectUtils.isImplicit(xmlObject)) {
View Full Code Here

  /**
   * Visits all {@link XmlObjectInfo} and remembers all of them with path.
   */
  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();
View Full Code Here

TOP

Related Classes of org.eclipse.wb.internal.core.model.ObjectInfoVisitor

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.