|
|
|
|
Re: Problem in set property value [message #643083 is a reply to message #643043] |
Sat, 04 December 2010 01:31 |
Rafael Chaves Messages: 161 Registered: July 2009 |
Senior Member |
|
|
Quote: | Why I can't add the element directly to the list that I get with getValue?
|
First, because the collection you get is not the actual collection used internally. Second, because it may not be modifiable. Third, UML2 API aside, unless a method documentation states it returns a modifiable collection and that you should modify it at will, that is the sensible thing to do.
Quote: | I tried to create a new list ( by the way, what kind of list I can use? i tried arraylist with no success ), add the element to it and then set the list with setValue, but an IllegalArgumentException is thrown for doing this.
|
There can be many reasons for an IAE in setValue (for instance, is the type of "theComment" variable compatible with the stereotype property type?). Your best bet is to ensure you have the source for UML2 (for instance, you have the UML2 Extender SDK, not only the binary libraries), and step through the call to setValue and see exactly where it is failing.
Good luck,
Rafael
http://alphasimple.com
|
|
|
Powered by
FUDForum. Page generated in 0.02486 seconds