EditPart won't get triggered [message #236857] |
Thu, 05 July 2007 13:16  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
>>
|
|
|
Powered by
FUDForum. Page generated in 0.02638 seconds