I like to
retrieve the text on the location where the context menu popup.
Example:
In Eclipse's Java editor I have following text,
public FindReferencesAction(IWorkbenchSite site) {
super(site);
}
public FindReferencesAction(JavaEditor editor) {
super(editor);
}
1. I move the cursor to 'IWorkbenchSite' and push left mouse.
Carret is now at IWorkbenchSite and that word is grayed.
2. Right click and select Declaration/Project -> works fine
I get the declaration for IWorkbenchSite
3. Now I move the cursor down over 'JavaEditor' and right click
and select Declaration/Project -> I'm now getting the
result for IWorkbenchSite and NOT the JavaEditor.
In all movement the hover text of the underlying text is right
but the context menues refer to the carret.
I think this should be fixed and some new functionality/API added
for retrieving the offset into the text where the context
menu is activated by the right mouse button.
/Pelle