Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » EditPart won't get triggered
EditPart won't get triggered [message #236857] Thu, 05 July 2007 13:16 Go to next message
Eclipse UserFriend
Originally posted by: marc.stoerzel.bhtc.com

Hello all,

I experimented with the ShapeEditor example and added a new propperty to
RectangularShape.Java. I also added a property descriptor to the property
descriptors array. The new property shows up fine in the property view.

In ShapeEditPart.refreshVisuals i update the figure according to changes
in the shape, but it seems as if ShapeEditPart.propertyChange does not get
triggered. Can anyone help me, thanx,

Marc
Re: EditPart won't get triggered [message #236858 is a reply to message #236857] Thu, 05 July 2007 14:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alexandre.magillem.com

Hi,
Make sure that your property change fires a Property to its
PropertChangeListeners, something like :
propertyListeners.firePropertyChange("PROPERTY", oldValue, newValue);

Make sure that oldValue and newValue are not equal.

Make sure also that your property modification correctly modifies your
model.

Regards.
Christophe


in debug mode, you should verify :
1) that ShapeEditPart has been properly added in PropertyChangeListeners of

Marc Störzel a écrit :
> Hello all,
>
> I experimented with the ShapeEditor example and added a new propperty to
> RectangularShape.Java. I also added a property descriptor to the
> property descriptors array. The new property shows up fine in the
> property view.
>
> In ShapeEditPart.refreshVisuals i update the figure according to changes
> in the shape, but it seems as if ShapeEditPart.propertyChange does not
> get triggered. Can anyone help me, thanx,
>
> Marc
>
Re: EditPart won't get triggered [message #236863 is a reply to message #236858] Fri, 06 July 2007 06:50 Go to previous message
Eclipse UserFriend
Originally posted by: marc.stoerzel.bhtc.com

Hello Christophe,

with your hint I cracked the nut, thanks a lot! My mistake was:
- in xxxShape (the model part of MVC) I correctly listened to the
propertyChange notification of my EditPart (the controller, which also
handles the editing in the properties view)
- in xxxShape.setyyyProperty I also correctly fired a propertyChange event
to inform my controller about changes in the model
- but in xxxShape.propertyChange I changed the property directly (because
it was a simple boolean value) and did not call this.setyyyProperty

So did I get it right, that
1) Shape gets notified by the xxxCellEditor
2) Shape notifies the EditPart
3) EditPart.refreshVisuals updates the Figure

Bye,

Marc

Christophe Alexandre wrote:

> Hi,
> Make sure that your property change fires a Property to its
> PropertChangeListeners, something like :
> propertyListeners.firePropertyChange("PROPERTY", oldValue, newValue);

> Make sure that oldValue and newValue are not equal.

> Make sure also that your property modification correctly modifies your
> model.

> Regards.
> Christophe


> in debug mode, you should verify :
> 1) that ShapeEditPart has been properly added in PropertyChangeListeners of

> Marc Störzel a écrit :
>> Hello all,
>>
>> I experimented with the ShapeEditor example and added a new propperty to
>> RectangularShape.Java. I also added a property descriptor to the
>> property descriptors array. The new property shows up fine in the
>> property view.
>>
>> In ShapeEditPart.refreshVisuals i update the figure according to changes
>> in the shape, but it seems as if ShapeEditPart.propertyChange does not
>> get triggered. Can anyone help me, thanx,
>>
>> Marc
>>
Previous Topic:Connections outside containers
Next Topic:Animations in Draw2D
Goto Forum:
  


Current Time: Fri Sep 30 17:22:13 GMT 2022

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

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

Back to the top