Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Plug-in dependencies of new project created with wizard(Generation fails because of missing dependency)
Plug-in dependencies of new project created with wizard [message #542243] Thu, 24 June 2010 06:40 Go to next message
Tobias Kniep is currently offline Tobias Kniep
Messages: 13
Registered: June 2010
Junior Member
Hello,

I've created a new DSL including some Check validation in Eclipse 3.6RC4.
Therefore, I've added the validation.CheckFragment to the Xtext generator. Since I'd like to use the New Project Wizard I've also uncommented the reference to the projectWizard.SimpleProjectWizardFragment.

When I start the runtime workbench I can create a new project for my DSL and the editor works fine. However, when starting code generation by running the Generator.mwe2 workflow, which was also created by the wizard, I get a lot of exceptions.
The only one which I could understand was this one:

Caused by: java.lang.ClassNotFoundException: org.eclipse.xtext.check.AbstractCheckValidator


Therefore, I've added the org.eclipse.xtext.xtend plugin (which contains this class) to the required plug-ins list of the manifest file of the newly created project. Now the code generation works as expected.

As it would be quite inconvenient for the users of the DSL to have to add this dependency each time they create a new project, I'd like to generate the dependency with the wizard.

The method getRequiredBundles() which seems to be responsible for generating the required plug-ins however is in MyDslProjectCreator.java which lies in the 'src-gen' folder of the generator project and would be overwritten after changing my grammar and regenerating. Is there any clean way for extending the dependencies?

Best regards,
Tobias
Re: Plug-in dependencies of new project created with wizard [message #542273 is a reply to message #542243] Thu, 24 June 2010 08:07 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian Zarnekow
Messages: 2809
Registered: July 2009
Senior Member
Hi Tobias,

you are free to extend the MyDslProjectCreator and override
getRequiredBundles(). All you have to do is to add a binding in your
ui-module to map the MyDslProjectCreator to your MySpecialProjectCreator.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 24.06.10 12:40, schrieb Tobias:
> Hello,
>
> I've created a new DSL including some Check validation in Eclipse 3.6RC4.
> Therefore, I've added the validation.CheckFragment to the Xtext
> generator. Since I'd like to use the New Project Wizard I've also
> uncommented the reference to the projectWizard.SimpleProjectWizardFragment.
>
> When I start the runtime workbench I can create a new project for my DSL
> and the editor works fine. However, when starting code generation by
> running the Generator.mwe2 workflow, which was also created by the
> wizard, I get a lot of exceptions.
> The only one which I could understand was this one:
>
> Caused by: java.lang.ClassNotFoundException:
> org.eclipse.xtext.check.AbstractCheckValidator
>
> Therefore, I've added the org.eclipse.xtext.xtend plugin (which contains
> this class) to the required plug-ins list of the manifest file of the
> newly created project. Now the code generation works as expected.
>
> As it would be quite inconvenient for the users of the DSL to have to
> add this dependency each time they create a new project, I'd like to
> generate the dependency with the wizard.
> The method getRequiredBundles() which seems to be responsible for
> generating the required plug-ins however is in MyDslProjectCreator.java
> which lies in the 'src-gen' folder of the generator project and would be
> overwritten after changing my grammar and regenerating. Is there any
> clean way for extending the dependencies?
>
> Best regards,
> Tobias
Re: Plug-in dependencies of new project created with wizard [message #542336 is a reply to message #542273] Thu, 24 June 2010 10:46 Go to previous message
Tobias Kniep is currently offline Tobias Kniep
Messages: 13
Registered: June 2010
Junior Member
Hi Sebastian,

thanks a lot for the quick reply. That was exactly what I was looking for. New projects work out-of-the-box now.

Tobias
Previous Topic:Importing .XMI-serialized model
Next Topic:JvmType and type parameters
Goto Forum:
  


Current Time: Tue Jul 29 16:55:16 EDT 2014

Powered by FUDForum. Page generated in 0.01718 seconds