Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » how to set "multi line" property for EString
how to set "multi line" property for EString [message #1715314] Sat, 21 November 2015 20:55 Go to next message
Yariv Amar is currently offline Yariv AmarFriend
Messages: 29
Registered: October 2015
Junior Member
Hi
is it possible to override\control some of the *.genmodel properties?
I need to set the property "Multi-line=true in my genmodel for a String object. how can i do this?

thanks!
Re: how to set "multi line" property for EString [message #1715344 is a reply to message #1715314] Sun, 22 November 2015 14:53 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
you may have a look at ixtext2ecorepostprocessor, but i dont understand your initial requirement. xtext strings are multiline by default

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: how to set "multi line" property for EString [message #1715361 is a reply to message #1715344] Sun, 22 November 2015 20:46 Go to previous messageGo to next message
Yariv Amar is currently offline Yariv AmarFriend
Messages: 29
Registered: October 2015
Junior Member
Thanks for the reply.
I'd like to explain my problem again.
I'm using Xtext for my DSL and then I use Sirius to generate GUI (diagram & tables) in Eclipse.
The Sirius framework uses the generated Ecore model that is generated by xText.
For the most parts, the generated Ecore model is working fine, but there are some cases where Ecore classes should be modified for better UX.
In EString, for example, Sirius "render" it as simple text field (single line). But if the *.genmodel had the property "multi-line=true", then Sirius would have rendered a text-area input that allows the user to write...many lines Smile.
index.php/fa/24047/0/
So, I need a way to control the genmodel for some attributes.
How can I do that?
Is it still relevant to use ixtext2ecorepostprocessor?

Thanks.

  • Attachment: multiline.png
    (Size: 30.81KB, Downloaded 468 times)
Re: how to set "multi line" property for EString [message #1715376 is a reply to message #1715361] Mon, 23 November 2015 05:39 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
In this case you have to switch to a manually maintained metamodel or hack (subclass) EMFGeneratorFragment and patch the genmodel on a method that has access to it. Feel free to request a genmodelpostprocessor

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:understanding Xtext
Next Topic:jvnmodelinferrer create a class with superclass
Goto Forum:
  


Current Time: Fri Apr 26 08:51:28 GMT 2024

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

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

Back to the top