summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Richard2013-02-28 05:12:13 (EST)
committerGerrit Code Review @ Eclipse.org2013-03-06 05:12:25 (EST)
commit9be62b5a954dbd9c4c87472034e61b712ffdcb5e (patch)
treecda79b67457762f0e221210376d97da36616e442
parent72e07492c467d96b6db1bea5c451df4be44ad8af (diff)
downloadorg.eclipse.emf.compare-9be62b5a954dbd9c4c87472034e61b712ffdcb5e.zip
org.eclipse.emf.compare-9be62b5a954dbd9c4c87472034e61b712ffdcb5e.tar.gz
org.eclipse.emf.compare-9be62b5a954dbd9c4c87472034e61b712ffdcb5e.tar.bz2
[399270] Disable save comparison model buttonrefs/changes/29/10729/3
When comparing with the local history or the SCM history the UI allows one to save an EMFDiff model. The UI should disable this functionnality. Bug: 399270 Change-Id: If6b8a20355fb14d49b1b974934cdaa2517639972
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewer.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewer.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewer.java
index ce01d30..fb09612 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewer.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewer.java
@@ -122,6 +122,8 @@ public class EMFCompareStructureMergeViewer extends DiffTreeViewer implements Co
private FilterActionMenu filterActionMenu;
+ private SaveComparisonModelAction saveAction;
+
private EventBus eventBus;
/**
@@ -262,9 +264,11 @@ public class EMFCompareStructureMergeViewer extends DiffTreeViewer implements Co
final CompareConfiguration config = getCompareConfiguration();
if (!syncModel.isLeftEditable()) {
config.setLeftEditable(false);
+ saveAction.setEnabled(false);
}
if (!syncModel.isRightEditable()) {
config.setRightEditable(false);
+ saveAction.setEnabled(false);
}
final IComparisonScope scope = syncModel.createMinimizedScope();
@@ -441,7 +445,8 @@ public class EMFCompareStructureMergeViewer extends DiffTreeViewer implements Co
groupActionMenu = new GroupActionMenu(getStructureMergeViewerGrouper(), getGroupsMenuManager(),
getDefaultGroupProvider());
filterActionMenu = new FilterActionMenu(getStructureMergeViewerFilter(), getFiltersMenuManager());
- toolbarManager.add(new SaveComparisonModelAction(getCompareConfiguration()));
+ saveAction = new SaveComparisonModelAction(getCompareConfiguration());
+ toolbarManager.add(saveAction);
toolbarManager.add(groupActionMenu);
toolbarManager.add(filterActionMenu);
}