|
Re: Deleting outline tree view elements? [message #192545 is a reply to message #192507] |
Fri, 19 August 2005 15:37 |
Eclipse User |
|
|
|
Originally posted by: none.unknown.com
getActiveTool() returns the tool that is active in the palette, and you
should have something active all the time. It is not dependent on the
selection state.
However, I think you're going about this the wrong way. What you should be
doing is have your outline contribute a delete action handler. Kinda like
how the package explorer and navigator views work. That action can then
look at the selection in the outline (which would also be the workbench
selection) and construct a command to delete those. Of course, you'd only
be able to execute this action when the outline view is the active part.
"Steve Jones" <steve@istech.demon.co.uk> wrote in message
news:de4068$adg$1@news.eclipse.org...
> Hi,
>
> I have elements in my outline tree view that have no corresponding
> editPart/visual in the main diagram.
>
> I'd like to be able to delete these elements but since nothing is selected
> in the main view the key event dispatcher gives up in EditDomain#keyDown()
> when getActiveTool() returns null.
>
> If something was selected then the SelectionTool would have been returned
> and processing of the delete would proceded.
>
> Anyone know how this situation is best handled?
>
> Thanks, Steve.
>
|
|
|
Powered by
FUDForum. Page generated in 0.02733 seconds