Package org.eclipse.wb.internal.core.parser

Examples of org.eclipse.wb.internal.core.parser.ParseRootContext


    // check for @wbp.parser.entryPoint
    {
      MethodDeclaration method = ExecutionFlowUtils.getExecutionFlow_entryPoint(typeDeclaration);
      if (method != null) {
        List<MethodDeclaration> rootMethods = Lists.newArrayList(method);
        return new ParseRootContext(null, new ExecutionFlowDescription(rootMethods));
      }
    }
    // support for EntryPoint
    if (AstNodeUtils.isSuccessorOf(typeBinding, "com.google.gwt.core.client.EntryPoint")) {
      MethodDeclaration onModuleLoadMethod =
          AstNodeUtils.getMethodBySignature(typeDeclaration, "onModuleLoad()");
      if (onModuleLoadMethod != null) {
        List<MethodDeclaration> rootMethods = Lists.newArrayList(onModuleLoadMethod);
        return new ParseRootContext(null, new ExecutionFlowDescription(rootMethods));
      }
    }
    // support for com.google.gwt.user.client.ui.UIObject
    if (AstNodeUtils.isSuccessorOf(typeBinding, "com.google.gwt.user.client.ui.UIObject")) {
      ITypeBinding typeBinding_super = typeBinding.getSuperclass();
      // prepare class of component
      Class<?> superClass = getSuperClass(editor, typeBinding_super);
      // prepare creation
      MethodDeclaration constructor = getConstructor(editor, typeDeclaration);
      ThisCreationSupport creationSupport = new ThisCreationSupport(constructor);
      // create JavaInfo
      JavaInfo javaInfo = JavaInfoUtils.createJavaInfo(editor, superClass, creationSupport);
      if (javaInfo != null) {
        javaInfo.setVariableSupport(new ThisVariableSupport(javaInfo, constructor));
        // prepare root context
        List<MethodDeclaration> rootMethods = Lists.newArrayList();
        rootMethods.add(constructor);
        return new ParseRootContext(javaInfo, new ExecutionFlowDescription(rootMethods));
      }
    }
    // no root found
    return null;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.wb.internal.core.parser.ParseRootContext

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.