Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Add part in StructuredClassifier throw an exception
Add part in StructuredClassifier throw an exception [message #625776] Mon, 24 December 2007 07:16
Eclipse UserFriend
Originally posted by: xiaoyvr.hotmail.com

hi,

Here is my testcase:

@Test
public void testAddPart() {

Class cl = UMLFactory.eINSTANCE.createClass();
Property p = cl.createOwnedAttribute("pp", null,
UMLPackage.eINSTANCE.getProperty() );
cl.getParts().add(p);

}

An UnsupportedOperationException is thrown at the last line.

I debuged the code, found the container of the Part is PartEList, which
cannot add new element into it. Someone please tell me why we use this
kind of mechanism.
Previous Topic:using UML metaclasses within the extended metamodel
Next Topic:Generate UML - class diagram
Goto Forum:
  


Current Time: Thu Sep 19 11:03:25 GMT 2024

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

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

Back to the top