Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348751 - Diagram connection labels should check for derived and readonly properties
Summary: Diagram connection labels should check for derived and readonly properties
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Sapphire (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Konstantin Komissarchik CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-08 10:23 EDT by Greg Amerson CLA
Modified: 2021-11-19 09:21 EST (History)
2 users (show)

See Also:


Attachments
Patch v1 (2.92 KB, patch)
2011-06-08 11:19 EDT, Konstantin Komissarchik CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Amerson CLA 2011-06-08 10:23:01 EDT
Suppose that you specify a property for a diagram connection label that is @DerivedValue or @ReadOnly.  In the diagram editor, the connection label always allows editing however, in the case of DerivedValue or ReadOnly this operation will fail with an exception like below:

!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)
Comment 1 Konstantin Komissarchik CLA 2011-06-08 11:19:45 EDT
Created attachment 197615 [details]
Patch v1
Comment 2 Konstantin Komissarchik CLA 2011-06-08 11:20:57 EDT
Issue fixed. Greg, please verify. Shenxue, please code review.
Comment 3 Shenxue Zhou CLA 2011-06-08 11:27:32 EDT
The patch looks good. Thanks!
Comment 4 Greg Amerson CLA 2011-06-08 11:38:25 EDT
Pulled this update via CVS and verified in my dev environment.
Comment 5 Konstantin Komissarchik CLA 2011-06-08 11:42:50 EDT
Closing.