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: Fri Aug 12 22:17:28 GMT 2022

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

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

Back to the top