Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-dev] Process Jdk1.5 Annotations

Hi,
I am using Eclipse3.1.0.
In my plugin, I need to find all the annotations in a java file. I am
trying to use reflection to load the class file which is getting
edited and from the Class, we can get all annotations. (Ofcourse for
this the file need to be saved and compiled before invoking the plugin
). But when the plugin runs, I am not able to load the class for the
current file. Is there any way to add classpath for the plugin to the
currently active project?

As an alternative, I tried using ICompilationUnit of
org.eclipse.jdt.core. Here I am able to get method names, package
names, imports etc, but no annotations. Will the future versions of
jdt.core support getting all Annotations?

Regards,
Smitha


Back to the top