Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » DSL project creation - extention points?
DSL project creation - extention points? [message #53471] Sat, 27 June 2009 17:04 Go to next message
Antony Wilkins is currently offline Antony WilkinsFriend
Messages: 22
Registered: July 2009
Junior Member
When creating a new DSL, I find that there are a few tasks I often:
Sometimes I've been writing helper classes or Xtend files to decorate my
metamodel with behaviour. Sometimes I just do it to shield myself from
changes to the model (helper functions to navigate around the model - if
the model structure changes the helper functions have to, but none of the
users have to).

Another thing would be to be able to have a "Create transformer project"
tickbox on the project creation page - which would do something similar
to "Create generator project", but would give me a new project with an MWE
file and .ext file with an example of the workflow (which I find myself
cut'n'pasting from existing m2m transformations). Actually, I don't even
need the tickbox - if I could have it happen every time, it would be easy
to delete it when I don't want one.


These sorts of thing (and probably others) are specific to me - other
people might not want them, and you wouldn't want to bloat your new
project set with stuff they don't use.


So - I'm wondering if there's a nice easy way to hook into the actual
creation of the project(s) when completing the New XText Project wizard.
I would expect to either be able to create new files in the projects
directly, and perhaps be able to influence the eclipse plugin dependencies.

I suspect with my knowledge of eclipse (mmm - average-ish), I could cobble
something together, reusing and extending your components, to add the
features I want (perhaps by creating a new New Project Wizard at the top
level). But it occurs to me that you've probably already got some nice
extention points I could use to make this easier.
Re: DSL project creation - extention points? [message #53635 is a reply to message #53471] Sat, 27 June 2009 19:16 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Antony,

to make it short: I'm afraid that such an extension mechanism does not
exist.
Some of your use cases are good candidates for generator fragments (e.g.
create stubs for transformations), others are not (e.g. adding new
projects to your workspace). Maybe you want to file a bugzilla for an
extension point for the Xtext project wizard, that will allow clients to
add new pages to the wizard?

Regards,
Sebastian

Am 27.06.2009 19:04 Uhr, schrieb Antony Wilkins:
> When creating a new DSL, I find that there are a few tasks I often:
> Sometimes I've been writing helper classes or Xtend files to decorate my
> metamodel with behaviour. Sometimes I just do it to shield myself from
> changes to the model (helper functions to navigate around the model - if
> the model structure changes the helper functions have to, but none of
> the users have to).
>
> Another thing would be to be able to have a "Create transformer project"
> tickbox on the project creation page - which would do something similar
> to "Create generator project", but would give me a new project with an
> MWE file and .ext file with an example of the workflow (which I find
> myself cut'n'pasting from existing m2m transformations). Actually, I
> don't even need the tickbox - if I could have it happen every time, it
> would be easy to delete it when I don't want one.
>
>
> These sorts of thing (and probably others) are specific to me - other
> people might not want them, and you wouldn't want to bloat your new
> project set with stuff they don't use.
>
>
> So - I'm wondering if there's a nice easy way to hook into the actual
> creation of the project(s) when completing the New XText Project wizard.
> I would expect to either be able to create new files in the projects
> directly, and perhaps be able to influence the eclipse plugin dependencies.
>
> I suspect with my knowledge of eclipse (mmm - average-ish), I could
> cobble something together, reusing and extending your components, to add
> the features I want (perhaps by creating a new New Project Wizard at the
> top level). But it occurs to me that you've probably already got some
> nice extention points I could use to make this easier.
>
Re: DSL project creation - extention points? [message #53686 is a reply to message #53635] Sat, 27 June 2009 21:29 Go to previous messageGo to next message
Antony Wilkins is currently offline Antony WilkinsFriend
Messages: 22
Registered: July 2009
Junior Member
I see - so for the former I would write a GeneratorFragment class and just
paste it in manually? That seems reasonable, because I don't want them
for every new project - I will want to decide on a case by case basis.
Actually I should have realised this one for myself - I've been running
MWE files with GeneratorFragment class names visible in the XML! Doh!

For the latter - I'll raise that bugzilla.

Thanks again for your help :)

Antony

Sebastian Zarnekow wrote:

> Hi Antony,

> to make it short: I'm afraid that such an extension mechanism does not
> exist.
> Some of your use cases are good candidates for generator fragments (e.g.
> create stubs for transformations), others are not (e.g. adding new
> projects to your workspace). Maybe you want to file a bugzilla for an
> extension point for the Xtext project wizard, that will allow clients to
> add new pages to the wizard?

> Regards,
> Sebastian

> Am 27.06.2009 19:04 Uhr, schrieb Antony Wilkins:
>> When creating a new DSL, I find that there are a few tasks I often:
>> Sometimes I've been writing helper classes or Xtend files to decorate my
>> metamodel with behaviour. Sometimes I just do it to shield myself from
>> changes to the model (helper functions to navigate around the model - if
>> the model structure changes the helper functions have to, but none of
>> the users have to).
>>
>> Another thing would be to be able to have a "Create transformer project"
>> tickbox on the project creation page - which would do something similar
>> to "Create generator project", but would give me a new project with an
>> MWE file and .ext file with an example of the workflow (which I find
>> myself cut'n'pasting from existing m2m transformations). Actually, I
>> don't even need the tickbox - if I could have it happen every time, it
>> would be easy to delete it when I don't want one.
>>
>>
>> These sorts of thing (and probably others) are specific to me - other
>> people might not want them, and you wouldn't want to bloat your new
>> project set with stuff they don't use.
>>
>>
>> So - I'm wondering if there's a nice easy way to hook into the actual
>> creation of the project(s) when completing the New XText Project wizard.
>> I would expect to either be able to create new files in the projects
>> directly, and perhaps be able to influence the eclipse plugin dependencies.
>>
>> I suspect with my knowledge of eclipse (mmm - average-ish), I could
>> cobble something together, reusing and extending your components, to add
>> the features I want (perhaps by creating a new New Project Wizard at the
>> top level). But it occurs to me that you've probably already got some
>> nice extention points I could use to make this easier.
>>
Re: DSL project creation - extention points? [message #53735 is a reply to message #53686] Sat, 27 June 2009 21:49 Go to previous message
Antony Wilkins is currently offline Antony WilkinsFriend
Messages: 22
Registered: July 2009
Junior Member
(raised bugzilla 281754)
Previous Topic:Recursive Definitions in xtext
Next Topic:debugging DSL serialisation
Goto Forum:
  


Current Time: Wed Sep 18 18:24:54 GMT 2024

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

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

Back to the top