Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Add annotation to a method in Eclipse
Add annotation to a method in Eclipse [message #691663] Fri, 01 July 2011 21:01
yongjiezheng is currently offline 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
Previous Topic:Error while applying MARTE Profile
Next Topic:[Acceleo 3] pass arguments in run configuration
Goto Forum:
  


Current Time: Sun May 26 05:02:07 EDT 2013

Powered by FUDForum. Page generated in 0.01506 seconds