Add annotation to a method in Eclipse [message #691663] |
Sat, 02 July 2011 01:01 |
yongjiezheng Messages: 10 Registered: March 2011 Location: California |
Junior Member |
|
|
I know this should not be too hard, but I just cannot find the appropriate API to use. Any help would be appreciated.
What I am trying to do is to load a java interface file into a list of IMethod. This is easily done. For some specific IMethod, I want to add an annotation message and save the message back to the java interface file. Does anyone know how to do this?
//Code to load IMethod
IProject proj = ResourcesPlugin.getWorkspace().getRoot().getProject(prjName);
IJavaProject jProj = JavaCore.create(proj);
IType t = jProj.findType(className);
IMethod[] methods = t.getMethods();
Thanks a lot,
William
|
|
|
Powered by
FUDForum. Page generated in 0.02144 seconds