Skip to main content



      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
Eclipse UserFriend
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 Jul 06 09:11:39 EDT 2025

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

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

Back to the top