|
|
|
|
Re: Undo/Redo Actions Disabled [message #1216645 is a reply to message #1216298] |
Thu, 28 November 2013 15:19 |
Evica Ilieva Messages: 4 Registered: November 2013 |
Junior Member |
|
|
Hi Cedric,
No undo/redo is not working when I trigger it with the keyboard. I do not have an ApplicationActionBarAdvisor. As I am working on only customizing the default editor generated for an EMF model (a did not create the EMF model nor I can change it in any way) this is what I did:
I generated the default editor for the model that was already created.
I copied the the editor class and ActionBarContributor from the generated default editor in my own eclipse plugin project.
I removed from the default editor class the default viewer panes and viewers.
I created new custom classes that extend EditorPart, each of them being one page in my MultiPageEditor.
In each of these EditorParts I have few Jface Viewers (Tree or Table). In order to show my model objects in the Viewers, or customize the default behavior of the viewers, I mostly follow the book EMF Eclipse Modeling 2nd Edition. To change the default behavior of the modeled classes I extend the default ItemProviders and add custom behavior there. To edit the objects I use cell editors. I only use EMF commands to change my model. For example:
editor.getEditingDomain().getCommandStack().execute(SetCommand.create(editor.getEditingDomain(),item.getData(), feature, value));
This is the first eclipse plugin that I am developing, and the first time I am working with EMF, so my knowledge is quite basic.
Thanks,
Evica
[Updated on: Thu, 28 November 2013 15:20] Report message to a moderator
|
|
|
Re: Undo/Redo Actions Disabled [message #1216878 is a reply to message #1216645] |
Thu, 28 November 2013 17:22 |
Ed Merks Messages: 33216 Registered: July 2009 |
Senior Member |
|
|
Evica,
Sorry, but these things work in the generated editor, so if they don't
work for you, you've done something that's not helping, and I can't
guess what it might be. All I can suggest is you look at that things
I've suggested you look at, i.e., when are the global action handlers
informed that they need to handle actions for the view that you've given
focus?
On 28/11/2013 4:19 PM, Evica Ilieva wrote:
> Hi Cedric,
>
> No undo/redo is not working when I trigger it with the keyboard. I do
> not have an ApplicationActionBarAdvisor. As I am working on only
> customizing the default editor generated for an EMF model (a did not
> create the EMF model nor I can change it in any way) this is what I did:
>
> I generated the default editor for the model that was already created.
> I copied the the editor class and ActionBarContributor from the
> generated default editor in my own eclipse plugin project.
> I removed from the default editor class the default viewer panes and
> viewers. I created new custom classes that extend EditorPart, each of
> the being one page in my MultiPageEditor.
> In each of these EditorParts I have few Jface Viewers (Tree or Table).
> In order to show my model objects in the Viewers, or customize the
> default behavior of the viewers, I mostly follow the book EMF Eclipse
> Modeling 2nd Edition. To change the default behavior of the modeled
> classes I extend the default ItemProviders and add custom behavior
> there. To edit the objects I use cell editors. I only use EMF commands
> to change my model. For example:
>
>
> editor.getEditingDomain().getCommandStack().execute(SetCommand.create(editor.getEditingDomain(),item.getData(),
> feature, value));
>
>
> This is the first eclipse plugin that I am developing, and the first
> time I am working with EMF, so my knowledge is quite basic.
>
> Thanks,
> Evica
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.05004 seconds