Hi,
I am learning how to do an ASTVisitor for a project, so I started using Eclipse, which has a comprehensive API for that.
I have downloaded the Packed Example Project from this website: http://www.eclipse.org/articles/article.php?file=Article-JavaCodeManipulation%5FAST/index.html
But I realised that the codes do not have a main() method, yet I am able to run the program! Anyone knows why? [qn 1]
However the codes seems too compilated to work with, and the instructions for doing sth basic are not very clear.
So I also went on to look at this: http://www.vogella.de/articles/EclipsePreferences/article.html
Anyone knows how can I write a main method to invoke execute(ExecutionEvent event)? -- provide a sample code snippet? [qn 2] I don't know how do use ExecutionEvent...
I kept getting "Exception in thread "main" java.lang.IllegalStateException: Workspace is closed." even if I remove the parameter for Execution Event (also need to remove the extends part) or use part of the code in my main. It seems that it has to do with "ResourcesPlugin" in "IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();". Anyone knows why? [qn 3]
Thank you!