Home » Modeling » Papyrus » Editor is dirty at openning(Transient stuff added to stereotyped class at the ditor openning)
|Editor is dirty at openning [message #938956]
||Wed, 10 October 2012 09:53
| Bertrand Poisson
Registered: August 2012
When I open a very simple Class Diagram (only one Class in it), the Papyrus editor is immediatly marked as dirty, while no change occured. Thus, in my plugin, I cannot trust the dirty state to know if there are changes or not. This phenomena appears only when stereotypes are applied on the Class. No stereotype applied, no problem !
I have investigated this issue, by adding a listener to the ResourceSet in order to print notifications when transactions are about to commit, and here is what I have observed.
For each stereotype applied, 2 notifications are repeated (see in annex the detailed print of the notifications) :
- The first is sent by the Shape representing my Class, and says that a AppliedStereotypeCompartement is added to the TRANSIENT children list.
- The second seems to be the set of a boolean in this AppliedStereotypeCompartement.
I have gone further in my investigations, and asked my little listener to throw a RollBack Exception on this event. The result is a "clean" (not dirty) Papyrus Editor that works fine.
So what is the use of this "stereotype transient stuff" added to Shapes on editor openning ? It doesn't seem to be important because they can be RollBacked without any problem. Perhaps it is a remaining part of code or a bug ?
Thanks a lot
Versions : Juno + Papyrus 9.1
org.eclipse.emf.ecore.impl.ENotificationImpl@13709e1 (eventType: ADD, position: 0, notifier: org.eclipse.gmf.runtime.notation.impl.ShapeImpl@1a6fe38 (visible: true, type: 2008, mutable: false) (fontColor: 0, fontName: Tahoma, fontHeight: 8, bold: false, italic: false, underline: false, strikeThrough: false, description: , fillColor: 16777215, transparency: -1, gradient: null, lineColor: 0, lineWidth: -1, roundedBendpointsRadius: 0), feature: org.eclipse.emf.ecore.impl.EReferenceImpl@cb9450 (name: transientChildren) (ordered: true, unique: true, lowerBound: 0, upperBound: -1) (changeable: true, volatile: false, transient: true, defaultValueLiteral: null, unsettable: false, derived: false) (containment: true, resolveProxies: false), oldValue: null, newValue: org.eclipse.gmf.runtime.notation.impl.BasicCompartmentImpl@1d0f2b5 (visible: false, type: AppliedStereotypeCompartement, mutable: true) (collapsed: false), isTouch: false, wasSet: false)
org.eclipse.emf.ecore.impl.ENotificationImpl@69ad0b (eventType: SET, position: -1, notifier: org.eclipse.gmf.runtime.notation.impl.BasicCompartmentImpl@1d0f2b5 (visible: false, type: AppliedStereotypeCompartement, mutable: true) (collapsed: false), feature: org.eclipse.emf.ecore.impl.EAttributeImpl@1941283 (name: mutable) (ordered: true, unique: true, lowerBound: 0, upperBound: 1) (changeable: true, volatile: false, transient: true, defaultValueLiteral: false, unsettable: false, derived: false) (iD: false), oldValue: false, newValue: true, isTouch: false, wasSet: false)
Current Time: Sun Mar 26 05:25:05 GMT 2017
Powered by FUDForum
. Page generated in 0.02836 seconds