I am working on code refactoring techniques for which i have to used AstParser an Eclipse plugin for the identification of methods and classes my Java file but it is giving an exception in thread AWT-EventQueue-0: java.lang.NoClassDefFoundError: org/eclipse/core/resources/IResource error

private CompilationUnit parse(String fileName) {        
    ASTParser parser = ASTParser.newParser(AST.JLS3);
    parser.setSource(getChars(fileName));
    CompilationUnit cu = (CompilationUnit) parser.createAST(null);
    return cu;
}

I want to parse the Java files but the following code snippet continuously giving me the error I am in very trouble because it is my final year project.

0 Answers