Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » delete not working
delete not working [message #243623] Sat, 14 June 2008 09:41 Go to next message
Eclipse UserFriend
Originally posted by: shady_86.sify.com

hello,

i have made a class extending action bar contributer. this class will handle all the commands for undo, redo , delete etc...

i have set the class with the editor's contributorClass in the plugin file. When i try to use it with simple editor it works fine, but when i try to use it with the multi tab editor the delete action stops working but other actions work..,
Re: delete not working [message #243630 is a reply to message #243623] Sat, 14 June 2008 12:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Sharad,

You asked this on the RCP newsgroup as well, which seems a more
appropriate target than the GEF newsgroup. Please avoid cross posting
your questions.


sharad wrote:
> hello,
>
> i have made a class extending action bar contributer. this class will handle all the commands for undo, redo , delete etc...
>
> i have set the class with the editor's contributorClass in the plugin file. When i try to use it with simple editor it works fine, but when i try to use it with the multi tab editor the delete action stops working but other actions work..,
>
Re: delete not working [message #243659 is a reply to message #243623] Sun, 15 June 2008 09:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: shady_86.sify.com

well i think the reason is that the GEF editor is not designed to work with multitab editors.

the editor was not able to update the selectionActions list.

but one can do this by making some changes.
1. implement ISelectionListener in your Multitab editor
2. override the init of multitabeditor and add it in the selection listeners list
getSite().getWorkbenchWindow().getSelectionService().addSele ctionListener(this)

3. then override the selectionChanged method of your graphical editor and put the following code
updateActions(getSelectionActions())

4. then implement the following code in your Multitab editor selectionChanged method
if (this.equals(getSite().getPage().getActiveEditor())) {
graphicalEditor.selectionChanged(part, selection);
}

the if condition is for, when the editor will be the current editor then only the updation will take place, similar to the graphical editor style.

this will help all the selectionActions to work with multitab editor, but i am not sure will it work nicely in all conditions.
Re: delete not working [message #243664 is a reply to message #243623] Sun, 15 June 2008 09:22 Go to previous message
Eclipse UserFriend
Originally posted by: shady_86.sify.com

the multitab editor uses the MultiPageSelectionProvider as its selectionProvider.

it manages the current selection in a multi-page editor by tracking the active nested editor within the multi-page editor. When the selection changes, notifications are sent to all registered listeners.

but GEF graphical editor cannot be added to the listeners list until we do the above changes.

i think the GEF editor should also be made compatible with the multitab editor and if it is then please do tell what is the correct procedure?..,
Previous Topic:[Zest] Setting border on graph node not working.
Next Topic:Overlapping figures show also labels from figure below
Goto Forum:
  


Current Time: Tue Mar 19 09:06:24 GMT 2024

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

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

Back to the top