Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 271773 Details for
Bug 528134
Concurrent changes can lead to data loss in the text widget
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
A patch for Sirius's debugging view which adds buttons to simulate background model changes
background-actions.patch (text/plain), 4.04 KB, created by
Pierre-Charles David
on 2017-12-05 03:51:39 EST
(
hide
)
Description:
A patch for Sirius's debugging view which adds buttons to simulate background model changes
Filename:
MIME Type:
Creator:
Pierre-Charles David
Created:
2017-12-05 03:51:39 EST
Size:
4.04 KB
patch
obsolete
>diff --git a/plugins/org.eclipse.sirius.ui.debug/src/org/eclipse/sirius/ui/debug/SiriusDebugView.java b/plugins/org.eclipse.sirius.ui.debug/src/org/eclipse/sirius/ui/debug/SiriusDebugView.java >index d5f1801d5..bf877ce2f 100644 >--- a/plugins/org.eclipse.sirius.ui.debug/src/org/eclipse/sirius/ui/debug/SiriusDebugView.java >+++ b/plugins/org.eclipse.sirius.ui.debug/src/org/eclipse/sirius/ui/debug/SiriusDebugView.java >@@ -41,6 +41,7 @@ import org.eclipse.emf.common.util.EList; > import org.eclipse.emf.common.util.URI; > import org.eclipse.emf.ecore.EAttribute; > import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.ENamedElement; > import org.eclipse.emf.ecore.EObject; > import org.eclipse.emf.ecore.EStructuralFeature; > import org.eclipse.emf.ecore.InternalEObject; >@@ -84,6 +85,7 @@ import org.eclipse.sirius.diagram.AbsoluteBoundsFilter; > import org.eclipse.sirius.diagram.DDiagramElement; > import org.eclipse.sirius.diagram.DEdge; > import org.eclipse.sirius.diagram.EdgeTarget; >+import org.eclipse.sirius.diagram.business.api.query.EObjectQuery; > import org.eclipse.sirius.diagram.sequence.SequenceDDiagram; > import org.eclipse.sirius.diagram.sequence.business.internal.VerticalPositionFunction; > import org.eclipse.sirius.diagram.sequence.business.internal.elements.ISequenceElement; >@@ -447,12 +465,79 @@ public class SiriusDebugView extends AbstractDebugView { > // addSiriusSelectionAction(); > // addExtractExpressionsAction(); > // addLoadResourceWithProgressAction(); >- addShowPayloadAccessLogAction(); >- addClearPayloadAccessLogAction(); >- addShowResourceSetTopologyAction(); >- addShowAdaptersAction(); >- addShowSessionStructureAction(); >+// addShowPayloadAccessLogAction(); >+// addClearPayloadAccessLogAction(); >+// addShowResourceSetTopologyAction(); >+// addShowAdaptersAction(); >+// addShowSessionStructureAction(); > // addShowCrossReferencerMap(); >+ addDeferredChangeAction(); >+ addDeferredUnrelatedChangeAction(); >+ } >+ >+ private void addDeferredChangeAction() { >+ addAction("Deffered Change", new Runnable() { >+ @Override >+ public void run() { >+ EObject current = getCurrentEObject(); >+ if (current instanceof DSemanticDecorator >+ && ((DSemanticDecorator) current).getTarget() instanceof ENamedElement) { >+ final EClass target = (EClass) ((DSemanticDecorator) current).getTarget(); >+ new Thread(new Runnable() { >+ public void run() { >+ try { >+ Thread.sleep(6000); >+ } catch (InterruptedException e) { >+ e.printStackTrace(); >+ } >+ Session s = new EObjectQuery(target).getSession(); >+ if (s != null) { >+ TransactionalEditingDomain ted = s.getTransactionalEditingDomain(); >+ ted.getCommandStack().execute(new RecordingCommand(ted) { >+ @Override >+ protected void doExecute() { >+ //target.setName(target.getName() + "X"); >+ target.setInstanceClassName(target.getInstanceClassName() + "X"); >+ } >+ }); >+ } >+ } >+ }).start(); >+ } >+ } >+ }); >+ } >+ >+ private void addDeferredUnrelatedChangeAction() { >+ addAction("Deffered Change (Unrelated)", new Runnable() { >+ @Override >+ public void run() { >+ EObject current = getCurrentEObject(); >+ if (current instanceof DSemanticDecorator >+ && ((DSemanticDecorator) current).getTarget() instanceof ENamedElement) { >+ final EClass target = (EClass) ((DSemanticDecorator) current).getTarget(); >+ new Thread(new Runnable() { >+ public void run() { >+ try { >+ Thread.sleep(6000); >+ } catch (InterruptedException e) { >+ e.printStackTrace(); >+ } >+ Session s = new EObjectQuery(target).getSession(); >+ if (s != null) { >+ TransactionalEditingDomain ted = s.getTransactionalEditingDomain(); >+ ted.getCommandStack().execute(new RecordingCommand(ted) { >+ @Override >+ protected void doExecute() { >+ target.setAbstract(!target.isAbstract()); >+ } >+ }); >+ } >+ } >+ }).start(); >+ } >+ } >+ }); > } > > private void addShowSessionStructureAction() {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 528134
: 271773