I'm doing an XText Editor as an Eclipse Plugin. Till now I've created XText plugin but its not loaded in the eclipse wizard… but the functionality is live, i.e, I’m able to create a mydsl file and make use of its grammar.

Secondly… if i place the generated plugin file in the plugins folder of Eclipse still it is not loaded in the choose wizard. How do I make it available in the list of plugins?

有帮助吗?

解决方案

Xtext doesn't generate a project wizard by default. If you want this wizard, you have to add a fragment to your DSL generation workflow and relaunch the workflow.

fragment = projectWizard.SimpleProjectWizardFragment {
    generatorProjectName = "${projectName}.generator"
    modelFileExtension = file.extensions
} 

Then, you have to merge plugin.xml with plugin_gen.xml from ui plugin. A new extension point has been added:

<extension point="org.eclipse.ui.newWizards">
  <wizard category="org.eclipse.xtext.projectwiz"
    class="org.eclipse.xtext.example.domainmodel.ui.DomainmodelExecutableExtensionFactory:org.eclipse.xtext.example.domainmodel.ui.wizard.DomainmodelNewProjectWizard"
        id="org.eclipse.xtext.example.domainmodel.ui.wizard.DomainmodelNewProjectWizard"
        name="Domainmodel Project"
        project="true">
  </wizard>
</extension>

More informations here.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top