Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » How to set opposite in association properties
How to set opposite in association properties [message #666666] Thu, 21 April 2011 13:50 Go to next message
ueli.brawand is currently offline ueli.brawandFriend
Messages: 27
Registered: July 2009
Location: Berne, Switzerland
Junior Member
Hi all

How can I set the opposite (setOpposite()) of a Property programmaticaly?

When I try call prop.setOpposite(p2) then I get an IllegalStateException.

Any hints?

Thank you.
Ueli
Re: How to set opposite in association properties [message #666680 is a reply to message #666666] Thu, 21 April 2011 14:36 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The debugger is always strongly recommended for debugging exceptions.

You will find that

public static void setOpposite(Property property, Property
newOpposite) {

if (property.getOwningAssociation() != null) {
throw new IllegalStateException();
}

indicating that opposites can only be set in the context of a valid
association.

Regards

Ed Willink


On 21/04/2011 14:50, Ueli Brawand wrote:
> Hi all
>
> How can I set the opposite (setOpposite()) of a Property programmaticaly?
>
> When I try call prop.setOpposite(p2) then I get an IllegalStateException.
>
> Any hints?
>
> Thank you.
> Ueli
Previous Topic:Diagram Question
Next Topic:Installing Eclipse & UML2 software
Goto Forum:
  


Current Time: Thu Mar 28 23:41:02 GMT 2024

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

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

Back to the top