Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Disabling the generation of GUI contributions of a parent language
Disabling the generation of GUI contributions of a parent language [message #798528] Tue, 14 February 2012 20:00 Go to next message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 365
Registered: July 2015
Senior Member
Hi,

we are developing a family of languages where one language acts as a parent language that provides some common language elements, but is incapable of describing any concrete model. Similar to Xbase, it acts as an abstract base language not intended to instantiate directly.

It works well, however, the mwe workflow generates a lot of GUI stuff that is unneeded in our project (e.g. specific editor, preference pages). My question is whether is it possible to disable the generation of such components while being able to provide a reusable basis for the GUI services (e.g. ProposalProvider).

I tried to search for options in the generator fragments, but I did not find such option. Am I missing something?

Thank you for your help,
Zoltán Ujhelyi
Re: Disabling the generation of GUI contributions of a parent language [message #798558 is a reply to message #798528] Tue, 14 February 2012 20:54 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13423
Registered: July 2009
Senior Member
hi,

what about simply removing the stuff from the plugin.xml

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Disabling the generation of GUI contributions of a parent language [message #798559 is a reply to message #798558] Tue, 14 February 2012 20:57 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 365
Registered: July 2015
Senior Member
Hi, Christian,

I know I can remove the unwanted stuff from plugin.xml, but then if I regenerate the language for any reason, it becomes harder to check for changes in plugin.xml_gen, as it is assumed there are changes between the the generated and the used file.

Alltogether, I would prefer if there is an option to configure the code generation workflow, as it reduces maintenance in the long run.

Thank you again,
Zoltán
Re: Disabling the generation of GUI contributions of a parent language [message #798566 is a reply to message #798528] Tue, 14 February 2012 21:09 Go to previous messageGo to next message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
Depends on what you want to be generated.
For Xtend we have three grammars in the same plug-in and generate only
for one.
Otherwise try
- to remove fragments from the workflow
- not setting the pathUiProject in the workflow (don't remember if that
still works)

Am 14.02.12 21:00, schrieb Zoltan Ujhelyi:
> Hi,
>
> we are developing a family of languages where one language acts as a
> parent language that provides some common language elements, but is
> incapable of describing any concrete model. Similar to Xbase, it acts as
> an abstract base language not intended to instantiate directly.
>
> It works well, however, the mwe workflow generates a lot of GUI stuff
> that is unneeded in our project (e.g. specific editor, preference
> pages). My question is whether is it possible to disable the generation
> of such components while being able to provide a reusable basis for the
> GUI services (e.g. ProposalProvider).
>
> I tried to search for options in the generator fragments, but I did not
> find such option. Am I missing something?
>
> Thank you for your help,
> Zoltán Ujhelyi


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


---
Get professional support from the Xtext committers at www.typefox.io
Re: Disabling the generation of GUI contributions of a parent language [message #798590 is a reply to message #798566] Tue, 14 February 2012 21:48 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 365
Registered: July 2015
Senior Member
Hi Jan,

thank you for your answer. I tried removing the pathUiProject variable from the workflow, but it does not help: the files for the ui project are generated into the original project.

I assume, instead of Xtend project you meant the Xbase project as only there are; I checked there the plugin.xml_gen file in the ui project, and there are editors generated that is not copied into the plugin.xml file as Christian suggested before.

I think, this means, this functionality is not supported by the generator currently. Then my question is, if I find the time and try to update the generator workflow to add this settings, are you interested in putting it into core Xtext?

Thank you again for the quick answers,
Zoltán
Re: Disabling the generation of GUI contributions of a parent language [message #799931 is a reply to message #798590] Thu, 16 February 2012 13:26 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3107
Registered: July 2009
Senior Member
Hi Zoltán,

it should help to remove the ui specific generator fragments from the
workflow for your parent language. Did you try that?

If it does not work, help is welcome. You may want to start a discussion
in a new bugzilla before you submit an actual patch. This would allow to
come up with different approaches to tackle the problem.

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

Am 14.02.12 22:48, schrieb Zoltan Ujhelyi:
> Hi Jan,
>
> thank you for your answer. I tried removing the pathUiProject variable
> from the workflow, but it does not help: the files for the ui project
> are generated into the original project.
>
> I assume, instead of Xtend project you meant the Xbase project as only
> there are; I checked there the plugin.xml_gen file in the ui project,
> and there are editors generated that is not copied into the plugin.xml
> file as Christian suggested before.
>
> I think, this means, this functionality is not supported by the
> generator currently. Then my question is, if I find the time and try to
> update the generator workflow to add this settings, are you interested
> in putting it into core Xtext?
>
> Thank you again for the quick answers,
> Zoltán
Re: Disabling the generation of GUI contributions of a parent language [message #813091 is a reply to message #799931] Sun, 04 March 2012 20:39 Go to previous message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 365
Registered: July 2015
Senior Member
Hi,

before opening a new bugzilla entry, I experimented with the generator code (a lot Smile ) to get an understanding what is possible and not, and found that it is possible to remove the generation of the language parser fragments (parser.antlr.XtextAntlrGeneratorFragment and parser.antlr.XtextAntlrUiGeneratorFragment).

According to unit test coverage, these parsers are never run (abstract base language), and removing them prohibited the creation of the various GUI extensions (e.g. preference page). I think, this solution works well, so I thought I would document it here for future reference.

Thank you again for your help,
Zoltán
Previous Topic:Problem with ambiguous grammar
Next Topic:Opening Xbase-using Xtext models programmatically
Goto Forum:
  


Current Time: Sun Apr 05 13:44:56 GMT 2020

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

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

Back to the top