Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[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.wizards.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.conversionWizard">
		 <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.


Back to the top