Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.ITypeBinding


      return result.get();
    }

    private String getRowTypeName() {
      Expression creationExpression = (Expression) getCreationSupport().getNode();
      ITypeBinding creationBinding = AstNodeUtils.getTypeBinding(creationExpression);
      ITypeBinding rowTypeBinding =
          AstNodeUtils.getTypeBindingArgument(
              creationBinding,
              "com.google.gwt.user.cellview.client.Column",
              0);
      return AstNodeUtils.getFullyQualifiedName(rowTypeBinding, false);
View Full Code Here


        int position = getCreationSupport().getNode().getStartPosition();
        CompilationUnit astUnit = editor.getAstUnit();
        List<VariableDeclaration> variables =
            AstNodeUtils.getVariableDeclarationsVisibleAt(astUnit, position);
        for (VariableDeclaration variable : variables) {
          ITypeBinding typeBinding = AstNodeUtils.getTypeBinding(variable);
          if (AstNodeUtils.isSuccessorOf(
              typeBinding,
              "com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler")) {
            if (isListHandlerForThisTable(variable)) {
              return variable.getName().getIdentifier();
View Full Code Here

  /**
   * @return {@link ITypeBinding} for row data type.
   */
  public ITypeBinding getRowTypeBinding() {
    Expression creationExpression = (Expression) getCreationSupport().getNode();
    ITypeBinding creationBinding = AstNodeUtils.getTypeBinding(creationExpression);
    return AstNodeUtils.getTypeBindingArgument(
        creationBinding,
        "com.google.gwt.user.cellview.client.AbstractHasData",
        0);
  }
View Full Code Here

      typeDeclaration.accept(new ASTVisitor() {
        @Override
        public void postVisit(ASTNode node) {
          if (!isGWT[0] && node instanceof Expression) {
            Expression expression = (Expression) node;
            ITypeBinding expressionBinding = AstNodeUtils.getTypeBinding(expression);
            if (AstNodeUtils.isSuccessorOf(
                expressionBinding,
                "com.google.gwt.user.client.ui.UIObject")) {
              isGWT[0] = true;
            }
          }
        }
      });
      // not a GWT, stop
      if (!isGWT[0]) {
        return null;
      }
    }
    // special unsupported classes
    {
      ITypeBinding superClass = typeBinding.getSuperclass();
      String superClassName = AstNodeUtils.getFullyQualifiedName(superClass, false);
      if (superClassName.equals("com.google.gwt.user.client.ui.Widget")) {
        throw new DesignerException(IExceptionConstants.NO_DESIGN_WIDGET);
      }
    }
    // prepare class loader
    initializeClassLoader(editor);
    // 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);
View Full Code Here

  /**
   * @return the name of <code>getValue()</code> return type.
   */
  private String getColumnValueTypeName(ITypeBinding columnTypeBinding) {
    ITypeBinding cellArgumentTypeBinding =
        AstNodeUtils.getTypeBindingArgument(
            columnTypeBinding,
            "com.google.gwt.user.cellview.client.Column",
            1);
    return AstNodeUtils.getFullyQualifiedName(cellArgumentTypeBinding, false);
View Full Code Here

      Object[] arguments) throws Exception {
    Object valueLabel = actualConstructor.newInstance(arguments);
    // prepare text to show
    String text;
    {
      ITypeBinding creationBinding = AstNodeUtils.getTypeBinding(expression);
      ITypeBinding typeBinding =
          AstNodeUtils.getTypeBindingArgument(
              creationBinding,
              "com.google.gwt.user.client.ui.NumberLabel",
              0);
      String typeName = AstNodeUtils.getFullyQualifiedName(typeBinding, false);
View Full Code Here

      TypeDeclaration serviceType) throws Exception {
    String serviceName = AstNodeUtils.getFullyQualifiedName(serviceType, false);
    AST ast = serviceType.getAST();
    for (Iterator<?> I = serviceType.superInterfaceTypes().iterator(); I.hasNext();) {
      Type type = (Type) I.next();
      ITypeBinding typeBinding = AstNodeUtils.getTypeBinding(type);
      if (AstNodeUtils.isSuccessorOf(typeBinding, Constants.CLASS_REMOTE_SERVICE)) {
        String superServiceName = AstNodeUtils.getFullyQualifiedName(typeBinding, false);
        String superAsyncName = superServiceName + "Async";
        if (javaProject.findType(superAsyncName) != null) {
          if (type instanceof SimpleType) {
View Full Code Here

      //If we don't have a tool for manipulating the supplier,
      if(syntaxTreeNode.getReturnType2() instanceof SimpleType) {
        //Then we try to find it in the model
        SimpleType supplierType =
          (SimpleType)syntaxTreeNode.getReturnType2();
        ITypeBinding binding = supplierType.resolveBinding();
        if(binding!=null) {
          typeName = binding.getQualifiedName();
        }
      }
    }
    // If this operation has a return type,
    else if(javaElement!=null) {
View Full Code Here

    if(syntaxTreeNode!=null) {
      if(syntaxTreeNode.getType() instanceof SimpleType) {
        // Then we try to find it in the model
        SimpleType supplierType =
          (SimpleType)syntaxTreeNode.getType();
        ITypeBinding binding = supplierType.resolveBinding();
        if(binding!=null) {
          typeName = binding.getQualifiedName();
        }
      }
    }
    else if(
        (javaElement!=null)
View Full Code Here

    boolean imported = false;
    if(syntaxTreeNode!=null) {
      if(syntaxTreeNode.getType() instanceof SimpleType) {
        SimpleType supplierType =
          (SimpleType)syntaxTreeNode.getType();
        ITypeBinding binding = supplierType.resolveBinding();
        if(binding!=null) {
          typeName = binding.getQualifiedName();
        }
      }
    }
    else if(javaElement!=null) {
      try {
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.dom.ITypeBinding

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.