Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] How does one add to the File->New menu?

Jeff,

to add an entry in the File > New menu, you need to add a
"newWizardShortcut" to the C/C++ perspective
(via a "perspectiveExtension").

HTH,
Toni


> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx 
> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Jeff Johnston
> Sent: Monday, November 02, 2009 6:29 PM
> To: CDT General developers list.
> Subject: [cdt-dev] How does one add to the File->New menu?
> 
> I have a project conversion wizard that I wish to put in the 
> File -> New
> list.  I looked at the Managedbuilder UI plugin and found 
> some code that 
> appeared to be used to add the Convert to C/C++ wizard but I 
> can't get 
> it to work for my wizard.  I have the following:
> 
> <extension
>        point="org.eclipse.ui.newWizards">
>        <wizard
>              category="org.eclipse.cdt.ui.newCWizards"
>  
> class="org.eclipse.linuxtools.internal.cdt.autotools.ui.wizard
> s.ConvertToAutotoolsProjectWizard"
>              finalPerspective="org.eclipse.cdt.ui.CPerspective"
>              hasPages="true"
>              icon="icons/ac16/convert_normal.gif"
>  
> id="org.eclipse.linuxtools.cdt.autotools.ui.wizards.conversionWizard"
>              name="%ConvertWizard.name">
>           <description>
>              %ConvertWizard.description
>           </description>
>           <selection class="org.eclipse.core.resources.IProject"/>
>        </wizard>
>    <extension
>          point="org.eclipse.ui.navigator.navigatorContent">
>       <commonWizard
>             
> associatedExtensionId="org.eclipse.cdt.ui.navigator.content"
>             menuGroupId="org.eclipse.cdt.ui.newProject"
>             type="new"
>  
> wizardId="org.eclipse.linuxtools.cdt.autotools.ui.wizards.conv
> ersionWizard">
> 		 <enablement>
> 		 	<and>
> 	            <adapt type="org.eclipse.core.resources.IProject" />
> 				<not>
> 		            <adapt 
> type="org.eclipse.core.resources.IProject" >
> 		               <test
> 		                     
> property="org.eclipse.core.resources.projectNature"
> 		 
> value="org.eclipse.linuxtools.cdt.autotools.core.autotoolsNatureV2"/>
> 		            </adapt>
> 				</not>
> 		 	</and>
>           </enablement>
>        </commonWizard>
>    </extension>
>    <extension
>          point="org.eclipse.ui.navigator.viewer">
>       <viewerContentBinding 
> viewerId="org.eclipse.ui.navigator.ProjectExplorer">
>          <includes>
>             <contentExtension 
> pattern="org.eclipse.linuxtools.cdt.autotools.ui.wizards.*"/>
>          </includes>
>       </viewerContentBinding>
>    </extension>
> 
> I'm not sure what the contentExtension should be for the 
> navigator.viewer extension but I have tried a class pattern 
> as well as a 
> Wizard id pattern and neither worked.  The wizard shows up 
> fine under C/C++.
> 
> Is there some other piece I am missing or is what I am trying to do 
> simply not supported?
> 
> -- Jeff J.
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
> 


Back to the top