Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Contribute to Resource Navigator New Submenu
Contribute to Resource Navigator New Submenu [message #330888] Fri, 15 August 2008 23:16 Go to next message
Eclipse UserFriend
Originally posted by: dave.dave.net

Hi

I am having a hard time trying to add my own newWizard dialogs to the
"new" menu in the resource navigator view.

I am using the popupMenu extension, but I do not know the "objectClass"
to point to or the menubar path. I've tried
"org.eclipse.ui.views.navigator.ResourceNavigator" with the template
popup menu, but that doesn't show the example menu for all the tree
nodes. (The IFile only works for file nodes). Can anyone give me some
pointers on how to do this ?

Thanks, Dave
Re: Contribute to Resource Navigator New Submenu [message #330890 is a reply to message #330888] Fri, 15 August 2008 11:18 Go to previous messageGo to next message
Eclipse UserFriend
This is a multi-part message in MIME format.
--------------080603070707050709080203
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

David,

Shouldn't use be using the newWizards extension point for that?

<extension point="org.eclipse.ui.newWizards">
<category
id="org.eclipse.emf.codegen.ecore.ui.wizardCategory"
name="%_UI_Wizard_category"/>
<wizard
id="org.eclipse.emf.ecore.presentation.EcoreModelWizardID"
name="%_UI_EcoreModelWizard_label"
class="org.eclipse.emf.ecore.presentation.EcoreModelWizard"
category="org.eclipse.emf.codegen.ecore.ui.wizardCategory"
icon="icons/full/ctool16/NewEcore.gif">
<description>%_UI_EcoreModelWizard_description</description >
<selection class="org.eclipse.core.resources.IResource"/>
</wizard>
</extension>


David wrote:
> Hi
>
> I am having a hard time trying to add my own newWizard dialogs to the
> "new" menu in the resource navigator view.
>
> I am using the popupMenu extension, but I do not know the
> "objectClass" to point to or the menubar path. I've tried
> "org.eclipse.ui.views.navigator.ResourceNavigator" with the template
> popup menu, but that doesn't show the example menu for all the tree
> nodes. (The IFile only works for file nodes). Can anyone give me some
> pointers on how to do this ?
>
> Thanks, Dave

--------------080603070707050709080203
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
David,<br>
<br>
Shouldn't use be using the newWizards extension point for that?<br>
<blockquote><small>&nbsp;&nbsp; &lt;extension
point="org.eclipse.ui.newWizards"&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;category<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="org.eclipse.emf.codegen.ecore.ui.wizardCategory"<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name="%_UI_Wizard_category"/&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;wizard<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="org.eclipse.emf.ecore.presentation.EcoreModelWizardID"<br >
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name="%_UI_EcoreModelWizard_label"<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class="org.eclipse.emf.ecore.presentation.EcoreModelWizard" <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; category="org.eclipse.emf.codegen.ecore.ui.wizardCategory"<br >
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; icon="icons/full/ctool16/NewEcore.gif"&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
&lt;description&gt;%_UI_EcoreModelWizard_description &lt;/description&gt; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &lt;selection class="org.eclipse.core.resources.IResource"/&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/wizard&gt;<br>
&nbsp;&nbsp; &lt;/extension&gt;</small><br>
</blockquote>
<br>
David wrote:
<blockquote cite="mid:g836tv$ntn$1@build.eclipse.org" type="cite">Hi
<br>
<br>
I am having a hard time trying to add my own newWizard dialogs to the
"new" menu in the resource navigator view.
<br>
<br>
I am using the popupMenu extension, but I do not know the "objectClass"
to point to or the menubar path. I've tried
"org.eclipse.ui.views.navigator.ResourceNavigator" with the template
popup menu, but that doesn't show the example menu for all the tree
nodes. (The IFile only works for file nodes). Can anyone give me some
pointers on how to do this ?
<br>
<br>
Thanks, Dave
<br>
</blockquote>
</body>
</html>

--------------080603070707050709080203--
Re: Contribute to Resource Navigator New Submenu [message #330896 is a reply to message #330890] Sat, 16 August 2008 09:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: blah.blah.net

Hi

I've already implemented the newWizard dialogs, it shows up under the
appropriate default menus (Select a wizard dialog etc).

What I want to do is in the package explorer context popup menu . I want
to contribute to the entry under new-> myWizard (I.e. when you select a
folder in the resource navigator, the popupmen comes up, you select the
"new" menu, a submenu popups up, where you can select and create
package, java, interface, enum part). I want to attach an action that
calls my own newWizard dialog there.

I know i should be using the org.eclipse.ui.popupMenu extension and
create an action for it that launches my wizard, but i am unsure of the
menuBarPath setting. The most I can find on the net is that is under
"group.new" group but how do I put it under the submenu of "new" ?

Dave

Ed Merks wrote:
> David,
>
> Shouldn't use be using the newWizards extension point for that?
>
> <extension point="org.eclipse.ui.newWizards">
> <category
> id="org.eclipse.emf.codegen.ecore.ui.wizardCategory"
> name="%_UI_Wizard_category"/>
> <wizard
> id="org.eclipse.emf.ecore.presentation.EcoreModelWizardID"
> name="%_UI_EcoreModelWizard_label"
> class="org.eclipse.emf.ecore.presentation.EcoreModelWizard"
> category="org.eclipse.emf.codegen.ecore.ui.wizardCategory"
> icon="icons/full/ctool16/NewEcore.gif">
> <description>%_UI_EcoreModelWizard_description</description >
> <selection class="org.eclipse.core.resources.IResource"/>
> </wizard>
> </extension>
>
>
> David wrote:
>> Hi
>>
>> I am having a hard time trying to add my own newWizard dialogs to the
>> "new" menu in the resource navigator view.
>>
>> I am using the popupMenu extension, but I do not know the
>> "objectClass" to point to or the menubar path. I've tried
>> "org.eclipse.ui.views.navigator.ResourceNavigator" with the template
>> popup menu, but that doesn't show the example menu for all the tree
>> nodes. (The IFile only works for file nodes). Can anyone give me some
>> pointers on how to do this ?
>>
>> Thanks, Dave
Re: Contribute to Resource Navigator New Submenu [message #330897 is a reply to message #330896] Fri, 15 August 2008 16:32 Go to previous messageGo to next message
Eclipse UserFriend
Hi Dave,

You need to call IPageLayout.addNewWizardShortcut(String). This is
usually done when defining a new perspective e.g. see
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmt/eps ilon/plugins/org.eclipse.epsilon.perspective/src/org/eclipse /epsilon/perspective/EpsilonPerspectiveFactory.java?revision =1.1&root=Technology_Project&view=markup

Cheers,
Dimitrios

David wrote:
> Hi
>
> I've already implemented the newWizard dialogs, it shows up under the
> appropriate default menus (Select a wizard dialog etc).
>
> What I want to do is in the package explorer context popup menu . I want
> to contribute to the entry under new-> myWizard (I.e. when you select a
> folder in the resource navigator, the popupmen comes up, you select the
> "new" menu, a submenu popups up, where you can select and create
> package, java, interface, enum part). I want to attach an action that
> calls my own newWizard dialog there.
>
> I know i should be using the org.eclipse.ui.popupMenu extension and
> create an action for it that launches my wizard, but i am unsure of the
> menuBarPath setting. The most I can find on the net is that is under
> "group.new" group but how do I put it under the submenu of "new" ?
>
> Dave
>
> Ed Merks wrote:
>> David,
>>
>> Shouldn't use be using the newWizards extension point for that?
>>
>> <extension point="org.eclipse.ui.newWizards">
>> <category
>> id="org.eclipse.emf.codegen.ecore.ui.wizardCategory"
>> name="%_UI_Wizard_category"/>
>> <wizard
>>
>> id="org.eclipse.emf.ecore.presentation.EcoreModelWizardID"
>> name="%_UI_EcoreModelWizard_label"
>>
>> class="org.eclipse.emf.ecore.presentation.EcoreModelWizard"
>>
>> category="org.eclipse.emf.codegen.ecore.ui.wizardCategory"
>> icon="icons/full/ctool16/NewEcore.gif">
>> <description>%_UI_EcoreModelWizard_description</description >
>> <selection class="org.eclipse.core.resources.IResource"/>
>> </wizard>
>> </extension>
>>
>>
>> David wrote:
>>> Hi
>>>
>>> I am having a hard time trying to add my own newWizard dialogs to the
>>> "new" menu in the resource navigator view.
>>>
>>> I am using the popupMenu extension, but I do not know the
>>> "objectClass" to point to or the menubar path. I've tried
>>> "org.eclipse.ui.views.navigator.ResourceNavigator" with the template
>>> popup menu, but that doesn't show the example menu for all the tree
>>> nodes. (The IFile only works for file nodes). Can anyone give me some
>>> pointers on how to do this ?
>>>
>>> Thanks, Dave
Re: Contribute to Resource Navigator New Submenu [message #331686 is a reply to message #330897] Tue, 16 September 2008 13:36 Go to previous message
Eclipse UserFriend
Originally posted by: blah.blah.net

Hi

Thanks for the suggestion, but that only does half what I wanted. That
method only adds to the File -> New on the toolbar, but not he popup
menus in the project explorer. (Over the folder icon popup menu etc).
Any ideas ??

Thanks, Dave

Dimitrios Kolovos wrote:
> Hi Dave,
>
> You need to call IPageLayout.addNewWizardShortcut(String). This is
> usually done when defining a new perspective e.g. see
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmt/eps ilon/plugins/org.eclipse.epsilon.perspective/src/org/eclipse /epsilon/perspective/EpsilonPerspectiveFactory.java?revision =1.1&root=Technology_Project&view=markup
>
>
> Cheers,
> Dimitrios
>
> David wrote:
>> Hi
>>
>> I've already implemented the newWizard dialogs, it shows up under the
>> appropriate default menus (Select a wizard dialog etc).
>>
>> What I want to do is in the package explorer context popup menu . I
>> want to contribute to the entry under new-> myWizard (I.e. when you
>> select a folder in the resource navigator, the popupmen comes up, you
>> select the "new" menu, a submenu popups up, where you can select and
>> create package, java, interface, enum part). I want to attach an
>> action that calls my own newWizard dialog there.
>>
>> I know i should be using the org.eclipse.ui.popupMenu extension and
>> create an action for it that launches my wizard, but i am unsure of
>> the menuBarPath setting. The most I can find on the net is that is
>> under "group.new" group but how do I put it under the submenu of "new" ?
>>
>> Dave
>>
>> Ed Merks wrote:
>>> David,
>>>
>>> Shouldn't use be using the newWizards extension point for that?
>>>
>>> <extension point="org.eclipse.ui.newWizards">
>>> <category
>>> id="org.eclipse.emf.codegen.ecore.ui.wizardCategory"
>>> name="%_UI_Wizard_category"/>
>>> <wizard
>>>
>>> id="org.eclipse.emf.ecore.presentation.EcoreModelWizardID"
>>> name="%_UI_EcoreModelWizard_label"
>>>
>>> class="org.eclipse.emf.ecore.presentation.EcoreModelWizard"
>>>
>>> category="org.eclipse.emf.codegen.ecore.ui.wizardCategory"
>>> icon="icons/full/ctool16/NewEcore.gif">
>>>
>>> <description>%_UI_EcoreModelWizard_description</description >
>>> <selection class="org.eclipse.core.resources.IResource"/>
>>> </wizard>
>>> </extension>
>>>
>>>
>>> David wrote:
>>>> Hi
>>>>
>>>> I am having a hard time trying to add my own newWizard dialogs to
>>>> the "new" menu in the resource navigator view.
>>>>
>>>> I am using the popupMenu extension, but I do not know the
>>>> "objectClass" to point to or the menubar path. I've tried
>>>> "org.eclipse.ui.views.navigator.ResourceNavigator" with the template
>>>> popup menu, but that doesn't show the example menu for all the tree
>>>> nodes. (The IFile only works for file nodes). Can anyone give me
>>>> some pointers on how to do this ?
>>>>
>>>> Thanks, Dave
Previous Topic:Exportwizard enablement for specific project
Next Topic:instantiate a class from the workspace of the running plugin
Goto Forum:
  


Current Time: Mon Feb 17 18:57:29 GMT 2025

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

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

Back to the top