Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.CompilationUnit.accept()


    */

    List<MarkerData> generateAddedMethodMarker(IJavaProject javaProject, String className, final String methodName, final Delta requiresDelta) throws JavaModelException {
        final List<MarkerData> markers = new LinkedList<MarkerData>();
        final CompilationUnit ast = createAST(javaProject, className);
        ast.accept(new ASTVisitor() {
            @Override
            public boolean visit(MethodDeclaration methodDecl) {
                String signature = ASTUtil.buildMethodSignature(methodDecl);
                if (signature.equals(methodName)) {
                    // Create the marker attribs here
View Full Code Here


    }

    List<MarkerData> generateRemovedMethodMarker(IJavaProject javaProject, final String className, final String methodName, final Delta requiresDelta) throws JavaModelException {
        final List<MarkerData> markers = new LinkedList<MarkerData>();
        final CompilationUnit ast = createAST(javaProject, className);
        ast.accept(new ASTVisitor() {
            @Override
            public boolean visit(TypeDeclaration typeDecl) {
                ITypeBinding typeBinding = typeDecl.resolveBinding();
                if (typeBinding != null) {
                    if (typeBinding.getBinaryName().equals(className)) {
View Full Code Here

    }

    List<MarkerData> generateAddedMethodMarker(IJavaProject javaProject, String className, final String methodName, final Delta requiresDelta) throws JavaModelException {
        final List<MarkerData> markers = new LinkedList<MarkerData>();
        final CompilationUnit ast = createAST(javaProject, className);
        ast.accept(new ASTVisitor() {
            @Override
            public boolean visit(MethodDeclaration methodDecl) {
                String signature = ASTUtil.buildMethodSignature(methodDecl);
                if (signature.equals(methodName)) {
                    // Create the marker attribs here
View Full Code Here

    }

    List<MarkerData> generateRemovedMethodMarker(IJavaProject javaProject, final String className, final String methodName, final Delta requiresDelta) throws JavaModelException {
        final List<MarkerData> markers = new LinkedList<MarkerData>();
        final CompilationUnit ast = createAST(javaProject, className);
        ast.accept(new ASTVisitor() {
            @Override
            public boolean visit(TypeDeclaration typeDecl) {
                ITypeBinding typeBinding = typeDecl.resolveBinding();
                if (typeBinding != null) {
                    if (typeBinding.getBinaryName().equals(className)) {
View Full Code Here

      if ( cunit != null && cunit.exists() && cunit.isStructureKnown() )
      {
        CompilationUnit cu = ASTUtil.getAstOrParse(cunit, mon);

        MockASTVisitor visitor = new MockASTVisitor(cunit);
        cu.accept(visitor);

        CategorizedProblem[] probs = visitor.getProblems();
        file.deleteMarkers(MARKER, true, IResource.DEPTH_INFINITE);

        for (CategorizedProblem prob : probs) //f.recordNewProblems(probs);
View Full Code Here

      store.extendStore(eval.getHeap().getModule("lang::java::m3::AST").getStore());
      SourceConverter converter = new SourceConverter(store);

      converter.set(cu);
      converter.set(loc);
      cu.accept(converter);
      for (Iterator it = cu.getCommentList().iterator(); it.hasNext();) {
        Comment comment = (Comment) it.next();
        if (comment.isDocComment())
          continue;
        comment.accept(converter);
View Full Code Here

        store.extendStore(eval.getHeap().getModule("lang::java::m3::AST").getStore());
        SourceConverter converter = new SourceConverter(store);

        converter.set(cu);
        converter.set(loc);
        cu.accept(converter);
        for (Iterator it = cu.getCommentList().iterator(); it.hasNext();) {
          Comment comment = (Comment) it.next();
          if (comment.isDocComment())
            continue;
          comment.accept(converter);
View Full Code Here

      store.extendStore(eval.getHeap().getModule("lang::java::m3::AST").getStore());
      ASTConverter converter = new ASTConverter(store, collectBindings.getValue());

      converter.set(cu);
      converter.set(loc);
      cu.accept(converter);
     
      converter.insertCompilationUnitMessages(true, null);
      return converter.getValue();
    } catch (IOException e) {
      throw RuntimeExceptionFactory.io(VF.string(e.getMessage()), null, null);
View Full Code Here

        store.extendStore(eval.getHeap().getModule("lang::java::m3::AST").getStore());
        ASTConverter converter = new ASTConverter(store, collectBindings.getValue());

        converter.set(cu);
        converter.set(loc);
        cu.accept(converter);
       
        converter.insertCompilationUnitMessages(true, null);
        return converter.getValue();
      } catch (IOException e) {
        throw RuntimeExceptionFactory.io(VF.string(e.getMessage()), null, null);
View Full Code Here

  private void goThroughClass(ICompilationUnit ClassContent, final String contextTypeId) {
    ASTParser parser = ASTParser.newParser(AST.JLS3);
    parser.setSource(ClassContent);
    parser.setKind(ASTParser.K_COMPILATION_UNIT);
    final CompilationUnit cu = (CompilationUnit) parser.createAST(null);
    cu.accept(new ASTVisitor() {
      private boolean parameter = false;
      private String paramName = "";
      public void endVisit(FieldDeclaration node) {
        paramName = "";
        parameter = false;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.