|
|
|
Re: Using EditingDomainActionBarContributor in a view [message #424439 is a reply to message #424438] |
Sun, 26 October 2008 13:10 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Yigal.
Comments below.
Yigal wrote:
> Ed,
> How do you implement the EMF Command stack in a view?
Methods like AdapterFactoryEditingDomain.getEditingDomainFor can find
the editing domain associated with the resource set.
> I want to create a simple view that allows adding and deleting EOjects
> from the model (I wrote it by using wizards that fill the data).
Is that a view associated with an editor?
> I wanted to use the automated command stack of EditingDomain, but
> looking at the editor code, I see it uses the
> EditingDomainActionBarContributor to switch the UNDO/REDO actions and
> stack.
Yes.
>
> Did anyone implemented it not in an Editor?
I wonder about that too. I haven't. I imagine that folks working on
common navigator stuff might have.
> How do you use the EMF command stack on a view?
Well, an AdapterFactoryEditing you can just create, it's how to hook it
up to the context menu you're wanting to know about, and I have no
experience with how to do that in a view. Hopefully someone does.
>
> Thanks
> Yigal
>
> Ed Merks wrote:
>> Yigal,
>>
>> Comments below.
>>
>> Yigal wrote:
>>> I want to create a TreeView that will use the EditingDomain and
>>> EditingDomainActionBarContributor. The issue I can not figure out
>>> is how to initialize the EditingDomainActionBarContributor.
>>> The init(IAationBars, IWorkbenchPage) requiers that the IActionBars
>>> will be the Main menu and I do not know how to get it from inside a
>>> view.
>> It expects to be used with an IEditorPart.
>>>
>>> Can some one help me?
>> I've never tried to get editing working in a view that isn't
>> associated with an editor like the outline view.
>>> Or is there a better way to get the EditingDomain to work in a view?
>> I think you need something like EditingDomainActionBarContributor but
>> one that doesn't assume it's for an editor but only for a view. I
>> don't see anything like IViewActionBarContributor though, so I'm not
>> sure what to suggest.
>>
>> Maybe someone else has ideas...
>>>
>>>
>>> Thanks
>>> Yigal
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03134 seconds