Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Deleting outline tree view elements?
Deleting outline tree view elements? [message #192507] Fri, 19 August 2005 07:02 Go to next message
Steve Jones is currently offline Steve JonesFriend
Messages: 95
Registered: July 2009
Member
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.
Re: Deleting outline tree view elements? [message #192545 is a reply to message #192507] Fri, 19 August 2005 15:37 Go to previous message
Eclipse UserFriend
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.
>
Previous Topic:heavyweight/lightweight (Randy, please help...)
Next Topic:Preventing figure overlap
Goto Forum:
  


Current Time: Tue Jan 14 07:50:06 GMT 2025

Powered by FUDForum. Page generated in 0.02733 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top