| Author |
Message |
|
|
|
Post subject: Action that operates on Classes
Posted: Jul 14, 2008 - 11:56 PM
|
|
Joined: Jul 14, 2008
Posts: 1
|
|
I'm working on a plugin that adds an action to the right click menu in package navigator.
Ideally I want the action to only be available for classes (not files or folders or projects) and it will need to know which class has been selected so it can interrogate it for members.
So far I've got part way there implementing IObjectActionDelegate, however the selection tells me I've got an instance of IFile as opposed to IJavaElement.
Can anyone point me to some documentation or examples of an Action that works on Java Elements as opposed to files? Or if there's a way of converting/adapting from IFile to IJavaElement?
[EDIT]
Answering my own question
IJavaElement javaElement = (IJavaElement) iFile.getAdapter(IJavaElement.class); |
|
|
| |
|
|
|
 |
|
|
| |