Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Forms] constraints for unsettable=true and lowerBound=1
[EMF Forms] constraints for unsettable=true and lowerBound=1 [message #1711532] Fri, 16 October 2015 17:25 Go to next message
Klim Tow is currently offline Klim TowFriend
Messages: 49
Registered: September 2015
Member
Hi

EMF Forms treats the features with unsettable=true and lowerBound=1 as "required fields", i.e. they are highlighted (exclamation mark etc.)

That is "unsettable" is ignored. Is this an intended behavior?

I need to generate Ecore model from XSD which contains references with cardinality=1..* and nillable=true. I tought it would be enough to intersperse ecore:unsettable into XSD. That would produce Ecore model with unsettable=true (I have not tested if it does). But as I see it would be no use because only cardinality is taken into account. There is information lost when generating EMF Forms from XSD backed Ecore model.

[Updated on: Fri, 16 October 2015 17:27]

Report message to a moderator

Re: [EMF Forms] constraints for unsettable=true and lowerBound=1 [message #1711686 is a reply to message #1711532] Mon, 19 October 2015 09:41 Go to previous messageGo to next message
Klim Tow is currently offline Klim TowFriend
Messages: 49
Registered: September 2015
Member
..no big deal, I will transform the XSD before generating Ecore model so it fits the current EMF Forms way
Re: [EMF Forms] constraints for unsettable=true and lowerBound=1 [message #1711730 is a reply to message #1711532] Mon, 19 October 2015 13:02 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

what do you exspect to happen for a "unsettable" attribute?

Best regards

Jonas

Am 16.10.2015 um 19:25 schrieb Klim Tow:
> Hi
>
> EMF Forms treats the features with unsettable=true and lowerBound=1 as
> "required fields", i.e. they are highlighted (exclamation mark etc.)
> That is "unsettable" is ignored. Is this an intended behavior?
> I need to generate Ecore model from XSD which contains references with
> cardinality=1..* and nillable=true. I tought it would be enough to
> intersperse ecore:unsettable into XSD. That would produce Ecore model
> with unsettable=true (I have not tested if it does). But as I see it
> would be no use because only cardinality is taken into account. There is
> information lost when generating Ecore models from XSD.
>


--
--

Jonas Helming

Get professional Eclipse developer support:

http://eclipsesource.com/en/services/developer-support/
Re: [EMF Forms] constraints for unsettable=true and lowerBound=1 [message #1711737 is a reply to message #1711730] Mon, 19 October 2015 13:24 Go to previous messageGo to next message
Klim Tow is currently offline Klim TowFriend
Messages: 49
Registered: September 2015
Member
in this case I would expect that "unsettable" has more priority than "lowBound", so the affected fields are not treated as "required"
Re: [EMF Forms] constraints for unsettable=true and lowerBound=1 [message #1711824 is a reply to message #1711737] Tue, 20 October 2015 05:15 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Just to avoid misunderstandings: "Unsettable" means that an attribute
can be unset, not that it is not settable, right?


Am 19.10.2015 um 15:24 schrieb Klim Tow:
> in this case I would expect that "unsettable" has more priority than
> "lowBound", so the affected fields are not treated as "required"
>


--
--

Jonas Helming

Get professional Eclipse developer support:

http://eclipsesource.com/en/services/developer-support/
Re: [EMF Forms] constraints for unsettable=true and lowerBound=1 [message #1711902 is a reply to message #1711824] Tue, 20 October 2015 09:31 Go to previous messageGo to next message
Klim Tow is currently offline Klim TowFriend
Messages: 49
Registered: September 2015
Member
yes it means it can be set to null in the object model
I think such fields should not be treated as mandatory, "lowBound" should be ignored
Re: [EMF Forms] constraints for unsettable=true and lowerBound=1 [message #1712015 is a reply to message #1711902] Tue, 20 October 2015 18:13 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

every attribute can be set to "null". Unsettable means, the attribut can
be "unset" which is conceptionally different to setting it to null, as
it adds another state. However, I am indifferent if the combination
"unsettable" and manditory makes sense in a model. I think you should
adapt it in the mode if you think this is inconsistent.

Best regards

Jonas

Am 20.10.2015 um 11:32 schrieb Klim Tow:
> yes it means it can be set to null in the object model
> I think such fields should not be treated as mandatory, "lowBound"
> should be ignored


--
--

Jonas Helming

Get professional Eclipse developer support:

http://eclipsesource.com/en/services/developer-support/
Re: [EMF Forms] constraints for unsettable=true and lowerBound=1 [message #1712022 is a reply to message #1712015] Tue, 20 October 2015 18:59 Go to previous message
Klim Tow is currently offline Klim TowFriend
Messages: 49
Registered: September 2015
Member
I'd avoid this combination too, but XSD is not in my hand

therefore I want to add XSD transformation as build step - it would be most stable solution
Previous Topic:[ECP] Custom Editor Form
Next Topic:[EMF Forms] validation processing
Goto Forum:
  


Current Time: Mon Feb 17 01:20:01 GMT 2020

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

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

Back to the top