Adding Menu Items thru Plugin.xml [message #467582] |
Tue, 08 May 2007 11:51 |
Eclipse User |
|
|
|
Originally posted by: arshia.yahoo.co.in
Hi,
Can you please let me know how to add actions to the menubar of our
widget through plugin.xml
Thanks in advance,
Arshia
|
|
|
|
|
|
Re: Adding Menu Items thru Plugin.xml [message #467612 is a reply to message #467610] |
Wed, 09 May 2007 04:26 |
Eclipse User |
|
|
|
Originally posted by: arshia.yahoo.co.in
Hi,
Thanks for reply..
My view is sampleView and I want to add exit action to this view. I have
written the following in plugin.xml to add my action to the menubar of my
view.
<extension point="org.eclipse.ui.viewActions">
<viewContribution
id="SampleView"
targetID="sample.SmapleView">
<action
id="org.eclipse.ui.articles.action.contribution.view.action1 "
label="Exit"
icon="icons/exit.png"
tooltip="Tooltip for View Action 1"
menubarPath="additions"
class="sample.ExitAction"
enablesFor="*">
</action>
</viewContribution>
</extension>
it didn't add any action to the menu bar.. What exactly to give as
manubarpath in the above code..
Thanks in advance,
Arshia Jamal
|
|
|
|
Re: Adding Menu Items thru Plugin.xml [message #467623 is a reply to message #467621] |
Wed, 09 May 2007 08:24 |
Eclipse User |
|
|
|
Originally posted by: arshia.yahoo.co.in
Hi,
here is the code ,
<xml>
<extension point="org.eclipse.ui.viewActions">
<viewContribution
id="com.sequenom.everest.ui.CustomerView"
targetID="com.sequenom.everest.ui.project.CustomerView">
<action
id="org.eclipse.ui.articles.action.contribution.view.action1 "
label="Exit"
icon="icons/exit.png"
tooltip="Tooltip for View Action 1"
menubarPath="additions"
class="com.sequenom.everest.ui.project.ExitAction"
enablesFor="*">
</action>
</viewContribution>
</extension>
</xml>
|
|
|
Re: Adding Menu Items thru Plugin.xml [message #467625 is a reply to message #467623] |
Wed, 09 May 2007 08:28 |
Eclipse User |
|
|
|
Originally posted by: arshia.yahoo.co.in
Hi,
here is the code ,
(xml)
<extension point="org.eclipse.ui.viewActions"> <viewContribution
id="com.sequenom.everest.ui.CustomerView"
targetID="com.sequenom.everest.ui.project.CustomerView">
<action
id="org.eclipse.ui.articles.action.contribution.view.action1 "
label="Exit" icon="icons/exit.png"
tooltip="Tooltip for View Action 1"
menubarPath="additions"
class="com.sequenom.everest.ui.project.ExitAction"
enablesFor="*">
</action> </viewContribution> </extension>
(/xml)
|
|
|
|
Re: Adding Menu Items thru Plugin.xml [message #467691 is a reply to message #467638] |
Thu, 10 May 2007 05:25 |
Eclipse User |
|
|
|
Originally posted by: arshia.yahoo.co.in
Hi,
What is the wrong with this code in plugin.xml to add actions to the view
menubar,
I have just removed '<' tag from the actual code and pasted here
extension point="org.eclipse.ui.viewActions">
viewContribution
id="com.sequenom.everest.ui.CustomerView"
targetID="com.sequenom.everest.ui.project.CustomerView">
action
id="org.eclipse.ui.articles.action.contribution.view.action1 "
label="Exit" icon="icons/exit.png"
tooltip="Tooltip for View Action 1"
menubarPath="additions"
class="com.sequenom.everest.ui.project.ExitAction"
enablesFor="*">
/action>
/viewContribution>
/extension>
Thanks in advance,
Arshia
|
|
|
Re: Adding Menu Items thru Plugin.xml [message #467731 is a reply to message #467691] |
Thu, 10 May 2007 13:29 |
|
Arshia Jamal wrote:
> Hi,
>
>
> What is the wrong with this code in plugin.xml to add actions to the
> view menubar,
> I have just removed '<' tag from the actual code and pasted here
>
>
> extension point="org.eclipse.ui.viewActions">
> viewContribution id="com.sequenom.everest.ui.CustomerView"
> targetID="com.sequenom.everest.ui.project.CustomerView">
> action
>
> id="org.eclipse.ui.articles.action.contribution.view.action1 "
> label="Exit" icon="icons/exit.png"
> tooltip="Tooltip for View Action 1"
> menubarPath="additions"
> class="com.sequenom.everest.ui.project.ExitAction"
> enablesFor="*">
>
> /action>
> /viewContribution>
> /extension>
>
This should, in theory, add the action to your view dropdown menu (the
little triangle in the top right corner of your view title).
Is that not where it went? Or is it you want to add the action to the
main menu bar (like File, Edit, Help, etc).
Later,
PW
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
|
|
|
Re: Adding Menu Items thru Plugin.xml [message #467818 is a reply to message #467731] |
Fri, 11 May 2007 04:12 |
Eclipse User |
|
|
|
Originally posted by: arshia.yahoo.co.in
Hi,
Thanks for the reply.. I want to add the action to the menubar,toolbar
of my view not to the main menubar and main toolbar...
<extension point="org.eclipse.ui.viewActions">
<viewContribution id="com.sequenom.everest.ui.CustomerView"
targetID="sample.CustomerView">
<action
id="org.eclipse.ui.articles.action.contribution.view.action1 "
label="Exit" icon="icons/exit.png"
tooltip="Tooltip for View Action 1"
menubarPath="additions"
class="sample.ExitAction"
enablesFor="*">
</action>
</viewContribution>
</extension>
How to add the action to my view dropdown menu (the little triangle in the
top right corner of your view title). Please help me... Just few dyas back
I stared exploring all these..
Thanks,
Arshia Jamal
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04092 seconds