[EMF Forms] Different labels for nodes of the same type [message #1711352] |
Thu, 15 October 2015 09:08 |
Teohari Simona Messages: 40 Registered: September 2015 |
Member |
|
|
Hello guys,
I succeeded in making a functional ecore model from my XSD file, but now I have a problem related to control labels.
I have the following situation:
XSD:
<xs:complexType name="bool_string_valueType">
<xs:attribute name="type" type="xs:string" fixed="EUTILstringValue"/>
<xs:attribute name="value" type="boolStringEnum" default="FALSE"/>
</xs:complexType>
<xs:complexType name="auto_commitType">
<xs:sequence>
<xs:element type="bool_string_valueType" name="bool_string_value"/>
</xs:sequence>
<xs:attribute type="xs:string" name="type" fixed="EUTILparameter"/>
<xs:attribute type="xs:string" name="name" fixed="auto_commit"/>
<xs:attribute type="xs:string" name="valueType" fixed="str"/>
</xs:complexType>
<xs:complexType name="use_degradedType">
<xs:sequence>
<xs:element type="bool_string_valueType" name="bool_string_value"/>
</xs:sequence>
<xs:attribute type="xs:string" name="type" fixed="EUTILparameter"/>
<xs:attribute type="xs:string" name="name" fixed="use_degraded_mode"/>
<xs:attribute type="xs:string" name="valueType" fixed="str"/>
</xs:complexType>
XMI:
<autoCommit
name="auto_commit"
type="EUTILparameter"
valueType="str">
<boolStringValue
value="TRUE"
type="EUTILstringValue"/>
</autoCommit>
<useDegraded
name="use_degraded_mode"
type="EUTILparameter"
valueType="str">
<boolStringValue
value="TRUE"
type="EUTILstringValue"/>
</useDegraded>
In a new view model I want to add both values of the boolStringValue (the auto_commit and use_degraded ones), but then it will display two drop-downs having the same label called "Value". How can I change this depending on the parent somehow, without making another bool string value type?
Thank you very much,
Simona T.
[Updated on: Thu, 15 October 2015 12:54] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Re: Different labels for nodes of the same type [message #1711725 is a reply to message #1711470] |
Mon, 19 October 2015 12:52 |
Jonas Helming Messages: 699 Registered: July 2009 |
Senior Member |
|
|
Hi,
have you tried to set the Label Alihment to "none" in the view model for
these controls?
Best regards
Jonas
Am 16.10.2015 um 12:45 schrieb Teohari Simona:
> Hello Jonas,
>
> Sorry for not being able to explain (I am an EMF beginner), it is more simpler than it looks maybe.
>
> The first photo attached (Part_of_ecore.png) shows how the three complex types from the XSD (autoCommit, useDegraded, boolStringValue) + 1 enum (BoolStringEnum) are generated in the ecore. The AutoCommitType and UseDegradedType both have the same EAttribute boolStringValue of type BoolStringValueType. The BoolStringValueType has also an EAttribute called "Value".
>
> Now, I want to be able to create a view with both boolean values (that means both the AutoCommit->boolStringValue->value and the UseDegraded->boolStringValue->value), but not with the default label "Value".
> I attached a second photo in which you can see how the controls are generated in the view and how I want them to be.
>
> Please tell me if it is clear now, if not, I will try to explain better. Any help is appreciated.
>
> Thank you very much for your time!
> Simona
>
--
--
Jonas Helming
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04417 seconds