Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » How retrieve DefaultValue of a Property
How retrieve DefaultValue of a Property [message #632584] Wed, 13 October 2010 13:56 Go to next message
Tom Brandenburg is currently offline Tom BrandenburgFriend
Messages: 58
Registered: October 2010
Location: Abstatt, Germany
Member
Hello,

currently I convert XMI files, to be processed in Eclipse. Following extract of the XMI:
<ownedAttribute xmi:type="uml:Property" name="testAttr2" xmi:id="BOUML_0x27617_1" visibility="public">
	<defaultValue xmi:type="uml:LiteralString" xmi:id="BOUML_VALUE_0x27617_1" value="56"/>
</ownedAttribute>

evaluates to the following tree structure of the LiteralString:
obj (LiteralStringImpl)
	|
	+- ...
	+- eContainer (PropertyImpl)
		|
		+- ...
		+- defaultValue (LiteralStringImpl)
			|
			+- ...
			+- value ("56")

But with what method of "obj" I get the value "56" of the defaultValue?

Thanks in advance and best regards
Tom
Re: How retrieve DefaultValue of a Property [message #632600 is a reply to message #632584] Wed, 13 October 2010 14:13 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30541
Registered: July 2009
Senior Member
Tom,

This sounds like a UML2 question that's best asked on the UML2
newsgroup, which I've added to the "to" list of the reply, so no need to
repost. I bet if you used the debugger (your best friend) to look at
the instance you'd know which field stores the value and then you could
look at the source code to see which method returns that field...


Tom Brandenburg wrote:
> Hello,
>
> currently I convert XMI files, to be processed in Eclipse. Following
> extract of the XMI:
>
> <ownedAttribute xmi:type="uml:Property" name="testAttr2"
> xmi:id="BOUML_0x27617_1" visibility="public">
> <defaultValue xmi:type="uml:LiteralString"
> xmi:id="BOUML_VALUE_0x27617_1" value="56"/>
> </ownedAttribute>
>
> evaluates to the following tree structure of the LiteralString:
>
> obj (LiteralStringImpl)
> |
> +- ...
> +- eContainer (PropertyImpl)
> |
> +- ...
> +- defaultValue (LiteralStringImpl)
> |
> +- ...
> +- value ("56")
>
> But with what method of "obj" I get the value "56" of the defaultValue?
>
> Thanks in advance and best regards
> Tom
Re: How retrieve DefaultValue of a Property [message #632721 is a reply to message #632600] Thu, 14 October 2010 04:37 Go to previous messageGo to next message
Tom Brandenburg is currently offline Tom BrandenburgFriend
Messages: 58
Registered: October 2010
Location: Abstatt, Germany
Member
Hello Ed,

thanks for your reply and adding the topic to the UML2 newsgroup!

Quote:
I bet if you used the debugger (your best friend) to look at
the instance you'd know which field stores the value and then you could
look at the source code to see which method returns that field...


That is what have done, but I wasn't really succesful - that's why I've posted the question Smile
Re: How retrieve DefaultValue of a Property [message #632727 is a reply to message #632721] Thu, 14 October 2010 05:37 Go to previous message
Tom Brandenburg is currently offline Tom BrandenburgFriend
Messages: 58
Registered: October 2010
Location: Abstatt, Germany
Member
Hello all,

ok I found it Smile Unfortunetely my previous search started at "LiteralStringImpl". Now I saw that already "Property" has a method called getDefaultValue Smile

Thanks and bye
Tom
Previous Topic:Problems with serialization/deserialization
Next Topic:MWE2 workflow components for EMF
Goto Forum:
  


Current Time: Mon Oct 14 23:51:08 GMT 2019

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

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

Back to the top