Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sapphire-dev] connection label editing on @DerivedValue

Looks like a check for derived and readonly is missing. Please open a bug.

Konstantin Komissarchik
Senior Development Manager
Eclipse Tools Group
Oracle

On Jun 7, 2011, at 10:46 PM, Greg Amerson <gregory.amerson@xxxxxxxxxxx> wrote:

Hey,

I just enabled connection labels on my diagram but in this instance the property that is displayed for the label is a derived value.  So I would like to prevent the user from being able to double-click(F2) the label and perform an edit.  In my case when a user tries to perform the edit it looks like a no-op in the UI but in the error log this exception is printed [1].  Is there a way to tell the diagram editor that a connection label should be made read-only?  Or could it perhaps notice that a referenced property that renders the label is a @DerivedValue or I guess @ReadOnly would be the same scenario and simply disallow the double-click/(F2) editing gesture?


[1]

!ENTRY org.eclipse.graphiti.ui 4 0 2011-06-08 00:42:41.859
!MESSAGE GFCommandStack.execute(Command) java.lang.IllegalArgumentException: Cannot write property Label.
!STACK 0
java.lang.IllegalArgumentException: Cannot write property Label.
at org.eclipse.sapphire.modeling.ModelElement.write(ModelElement.java:408)
at com.liferay.ide.eclipse.service.core.model.internal.Relationship.write(Relationship.java:243)
at org.eclipse.sapphire.ui.diagram.editor.DiagramConnectionPart.setLabel(DiagramConnectionPart.java:230)
at org.eclipse.sapphire.ui.swt.graphiti.features.SapphireDirectEditConnectionFeature.setValue(SapphireDirectEditConnectionFeature.java:71)
at org.eclipse.graphiti.internal.command.DirectEditingFeatureCommandWithContext.execute(DirectEditingFeatureCommandWithContext.java:81)
at org.eclipse.graphiti.ui.internal.command.GefCommandWrapper.execute(GefCommandWrapper.java:51)
at org.eclipse.graphiti.ui.internal.editor.EmfOnGefCommand.execute(EmfOnGefCommand.java:59)
at org.eclipse.graphiti.internal.command.GFPreparableCommand2.doExecute(GFPreparableCommand2.java:37)
at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
at org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFCommandOperation.java:119)


--
Greg Amerson (@greg_amerson)
Liferay, Inc. (#liferay)
_______________________________________________
sapphire-dev mailing list
sapphire-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/sapphire-dev

Back to the top