Skip to main content


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] Sat, 02 July 2011 01:01
yongjiezheng is currently offline yongjiezhengFriend
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: Sat Apr 20 15:33:09 GMT 2024

Powered by FUDForum. Page generated in 0.03181 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top