|
|
Re: Getting the main Menu bar in Eclipse 3.3 [message #332541 is a reply to message #332534] |
Mon, 27 October 2008 20:28 |
Eclipse User |
|
|
|
Originally posted by: yigal.spinner.comcast.net
Paul,
I want to use the basic "Edit" menu and plug in the REDO, UNDO, Cut and
etc actions.
In the EMF world they have EditingDomainActionBarContributor that switch
this values based on the editor. I want to duplicate the functionality
but for views.
In the EditingDomainActionBarContributor it gets initialized with the
top menu bar from the editor. Then each time the editor switches the
class uses the EditingDomian class to get the command stack and use it
in the menu.
I want to use the same command stack from EditingDoain, but in a view.
To implement that I need to top menu ActionBar reference.
I could not find any examples that show how to assign new action to the
Edit menu from a view. It is always using a popup menu or the view
action bar.
Yigal
Paul Webster wrote:
> What are you trying to do, exactly? The view actionbars don't have
> access to the main menu, at least no commonly.
>
> Are you trying to add some view actions to the main menu? You have a
> couple of options, either using actionSets with an
> actionSetPartAssociation or using org.eclipse.ui.menus and placing
> commands that specifically deal with your view.
>
> There is no API available to get the main menu or main coolbar.
>
|
|
|
Re: Getting the main Menu bar in Eclipse 3.3 [message #332543 is a reply to message #332541] |
Mon, 27 October 2008 22:39 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Yigal,
In the EMF newsgroup, there was some advice about how to do this in a
view; unfortunately I have no experience with views, other than views
like the outline which is a satellite to the editor.
Yigal Spinner wrote:
> Paul,
> I want to use the basic "Edit" menu and plug in the REDO, UNDO, Cut
> and etc actions.
> In the EMF world they have EditingDomainActionBarContributor that
> switch this values based on the editor. I want to duplicate the
> functionality but for views.
> In the EditingDomainActionBarContributor it gets initialized with the
> top menu bar from the editor. Then each time the editor switches the
> class uses the EditingDomian class to get the command stack and use it
> in the menu.
> I want to use the same command stack from EditingDoain, but in a view.
> To implement that I need to top menu ActionBar reference.
> I could not find any examples that show how to assign new action to
> the Edit menu from a view. It is always using a popup menu or the
> view action bar.
>
> Yigal
>
> Paul Webster wrote:
>> What are you trying to do, exactly? The view actionbars don't have
>> access to the main menu, at least no commonly.
>>
>> Are you trying to add some view actions to the main menu? You have a
>> couple of options, either using actionSets with an
>> actionSetPartAssociation or using org.eclipse.ui.menus and placing
>> commands that specifically deal with your view.
>>
>> There is no API available to get the main menu or main coolbar.
>>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03216 seconds