|
Re: Opening Java Editor from Double Click [message #53979 is a reply to message #53556] |
Thu, 29 May 2003 15:15 |
Eclipse User |
|
|
|
Originally posted by: knut_radloff.oti.com
"Matthew P Hawkins" <hawkini_uk@uk.ibm.com> wrote in message news:bb4ofo$ojn$1@rogue.oti.com...
> Hi, I have created a new view with a list of java classes that have errors
> specific
> to my plugin (not the Task View!) - I want to be able to double click on an
> item
> in my table list and it will open the relevant class in a Java editor. At
See the org.eclipse.ui.actions.OpenFileAction and ResourceNavigator.handleOpen for an example of how to use it.
> Also on an aside - how can I underline text like the java editor does with
> a red or green line underneath specific text?
The Java editor draws the squiggly lines on top of the text widget. It uses the AnnotationPainter to render annotations (search
results, errors). See also PaintManager and IPainter. You should be able to use an annotation painter.
Perhaps someone else can give a brief overview of how annotations work?
Knut
|
|
|
|
Re: Opening Java Editor from Double Click [message #66051 is a reply to message #58750] |
Fri, 06 June 2003 23:09 |
Eclipse User |
|
|
|
Originally posted by: knut_radloff.oti.com
"Matthew P Hawkins" <hawkini_uk@uk.ibm.com> wrote in message news:bbf7th$a5i$1@rogue.oti.com...
> I've looked but I still do not understand what ResourceNavigator.handleOpen
> does - it basically gets an ActionGroup (ResourceNavigator) and then
> runs the defaultAction - which in ResourceNavigatorActionGroup is absolutely
> nothing - and as for OpenFileAction that is completely wierd!
defaultAction is first invoked on MainActionGroup from ResourceNavigator.handleOpen.
It ends up in OpenActionGroup.runDefaultAction which passes the current selection (your IFile that has errors) to the
OpenFileAction.
Look at the super and subclasses.
Knut
|
|
|
Powered by
FUDForum. Page generated in 0.25900 seconds