Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-11-05 13:30:06 +0000
committerCamille Letavernier2014-11-05 15:38:08 +0000
commita902576de5078c100dd7900392cc97bb96391dab (patch)
treeaa40fd3347293ef92f6949b2b1a22c1eb9d10b3f /plugins
parent0553a2c159d2d810c6f29ab3e6e10075464c81bc (diff)
downloadorg.eclipse.papyrus-a902576de5078c100dd7900392cc97bb96391dab.tar.gz
org.eclipse.papyrus-a902576de5078c100dd7900392cc97bb96391dab.tar.xz
org.eclipse.papyrus-a902576de5078c100dd7900392cc97bb96391dab.zip
450151: [Properties View] Improve the Properties View model, editor and
generation tool https://bugs.eclipse.org/bugs/show_bug.cgi?id=450151 Stop listening to resource changes while saving
Diffstat (limited to 'plugins')
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/UIEditor.java28
1 files changed, 27 insertions, 1 deletions
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/UIEditor.java b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/UIEditor.java
index 3e0903fba4a..8edf2aba116 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/UIEditor.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/UIEditor.java
@@ -261,6 +261,16 @@ public class UIEditor extends EcoreEditor implements ITabbedPropertySheetPageCon
// }
}
+ private boolean isSaving = false;
+
+ protected synchronized boolean isSaving() {
+ return isSaving;
+ }
+
+ protected synchronized void setSaving(boolean saving) {
+ this.isSaving = saving;
+ }
+
@Override
public void doSave(IProgressMonitor progressMonitor) {
if (editingDomain.getResourceToReadOnlyMap() == null) {
@@ -294,10 +304,26 @@ public class UIEditor extends EcoreEditor implements ITabbedPropertySheetPageCon
}
}
- super.doSave(progressMonitor);
+ setSaving(true);
+ try {
+ super.doSave(progressMonitor);
+ } finally {
+ setSaving(false);
+ }
refreshContext();
}
+ /**
+ * @see org.eclipse.emf.ecore.presentation.EcoreEditor#handleChangedResources()
+ *
+ */
+ @Override
+ protected void handleChangedResources() {
+ if (!isSaving()) {
+ super.handleChangedResources();
+ }
+ }
+
@Override
public void doSaveAs() {
SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());

Back to the top