Editing of invisible labels when edit part is added bug or expected behaviour? [message #648314] |
Wed, 12 January 2011 11:44 |
Ralph Gerbig Messages: 702 Registered: November 2009 |
Senior Member |
|
|
Hi all,
I have the following scenario in my gmfmap:
Node
|
|- Feature Label Mapping: invisibleLabel (readOnly = false)
|- Feature Label Mapping: visibleLabel (readOnly = false)
In my addNotify method of NodeEditPart I have the following code:
invisibleLabelFigure.setVsisible(false);
The label gets visible as it moves into edit mode after adding the edipart. this can be corrected by changing the order of visibleLabel and invisibleLabel in my gmfgen to:
Node
|
|- Feature Label Mapping: visibleLabel (readOnly = false)
|- Feature Label Mapping: invisibleLabel (readOnly = false)
Is this expected behaviour or a bug in GMF? in my opinion the runtime should not make a invisible label visible for editing after a edit part is added to a diagram.
Ralph
[Updated on: Wed, 12 January 2011 11:45] Report message to a moderator
|
|
|
|
Re: Editing of invisible labels when edit part is added bug or expected behaviour? [message #648913 is a reply to message #648554] |
Sat, 15 January 2011 11:30 |
Ralph Gerbig Messages: 702 Registered: November 2009 |
Senior Member |
|
|
Hi Romain,
When I use
((xxxEditPart)children.get(1)).setStructuralFeatureValue(NotationPackage.eINSTANCE.getView_Visible(), false);
I get the following exception
Caused by: java.lang.IllegalArgumentException: Figure must be a child
at org.eclipse.draw2d.Figure.setConstraint(Figure.java:1581)
at org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart.setLayoutConstraint(AbstractBorderedShapeEditPart.java:68)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.reorderChild(AbstractGraphicalEditPart.java:856)
at org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart.reorderChild(AbstractBorderedShapeEditPart.java:123)
at org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:766)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.handleNotificationEvent(GraphicalEditPart.java:1464)
at org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart.handleNotificationEvent(ShapeEditPart.java:183)
at org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart.handleNotificationEvent(ShapeNodeEditPart.java:236)
... 37 more
When using setVisible on my figure everything works fine..
Do you have an explanation for this behaviour?
Ralph
[Updated on: Sat, 15 January 2011 15:22] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.02916 seconds