Skip to main content



      Home
Home » Modeling » UML2 » How to set opposite in association properties
How to set opposite in association properties [message #666666] Thu, 21 April 2011 09:50 Go to next message
Eclipse UserFriend
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 10:36 Go to previous message
Eclipse UserFriend
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: Fri Jul 04 11:14:19 EDT 2025

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

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

Back to the top