Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Constant2016-09-12 15:15:21 +0000
committerOlivier Constant2016-09-12 15:15:21 +0000
commitb497384ac6d3c32982c4f1382f7b79a93b41afa1 (patch)
tree312376b0387cb19f36256f3ca7faacc2e62a3855 /plugins/org.eclipse.emf.diffmerge.ui
parent522d9d6121310afa3e1770440e5455fb58ee824a (diff)
downloadorg.eclipse.emf.diffmerge.core-b497384ac6d3c32982c4f1382f7b79a93b41afa1.tar.gz
org.eclipse.emf.diffmerge.core-b497384ac6d3c32982c4f1382f7b79a93b41afa1.tar.xz
org.eclipse.emf.diffmerge.core-b497384ac6d3c32982c4f1382f7b79a93b41afa1.zip
Bug 501105 - Organize categories as customizable trees
Added proper display of unmodifiable categories Change-Id: I75620144d636ef69dc025d5b79ba414088cde193 Signed-off-by: Olivier Constant <olivier.constant@thalesgroup.com>
Diffstat (limited to 'plugins/org.eclipse.emf.diffmerge.ui')
-rw-r--r--plugins/org.eclipse.emf.diffmerge.ui/icons/full/checked_disabled.gifbin0 -> 924 bytes
-rw-r--r--plugins/org.eclipse.emf.diffmerge.ui/icons/full/unchecked_disabled.gifbin0 -> 907 bytes
-rw-r--r--plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/EMFDiffMergeUIPlugin.java7
-rw-r--r--plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/CategoryViewer.java7
4 files changed, 10 insertions, 4 deletions
diff --git a/plugins/org.eclipse.emf.diffmerge.ui/icons/full/checked_disabled.gif b/plugins/org.eclipse.emf.diffmerge.ui/icons/full/checked_disabled.gif
new file mode 100644
index 00000000..36546f13
--- /dev/null
+++ b/plugins/org.eclipse.emf.diffmerge.ui/icons/full/checked_disabled.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.diffmerge.ui/icons/full/unchecked_disabled.gif b/plugins/org.eclipse.emf.diffmerge.ui/icons/full/unchecked_disabled.gif
new file mode 100644
index 00000000..b6cffcb6
--- /dev/null
+++ b/plugins/org.eclipse.emf.diffmerge.ui/icons/full/unchecked_disabled.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/EMFDiffMergeUIPlugin.java b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/EMFDiffMergeUIPlugin.java
index e18c89ab..9aa7bdb5 100644
--- a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/EMFDiffMergeUIPlugin.java
+++ b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/EMFDiffMergeUIPlugin.java
@@ -55,10 +55,11 @@ public class EMFDiffMergeUIPlugin extends AbstractUIPlugin {
/** Identifiers for UI images */
@SuppressWarnings("javadoc")
public static enum ImageID {
- CHECKED, CHECKIN_ACTION, CHECKOUT_ACTION, COLLAPSEALL, CONFLICT_STAT, DELETE, DOWN,
- EMPTY, EXPANDALL, FILTER, INC_STAT, INC_ADD_STAT, INC_REM_STAT, LEFT, LOCK, MODIFIED_STAT,
+ CHECKED, CHECKED_DISABLED, CHECKIN_ACTION, CHECKOUT_ACTION, COLLAPSEALL, CONFLICT_STAT, DELETE,
+ DOWN, EMPTY, EXPANDALL, FILTER, INC_STAT, INC_ADD_STAT, INC_REM_STAT, LEFT, LOCK, MODIFIED_STAT,
NEXT_CHANGE_NAV, NEXT_DIFF_NAV, OUT_STAT, OUT_ADD_STAT, OUT_REM_STAT, PLUS, PREV_CHANGE_NAV,
- PREV_DIFF_NAV, REDO, RIGHT, SHOW, SORT, SWAP, SYNCED, TREE, UNCHECKED, UNDO, UP, VIEW_MENU, WARNING }
+ PREV_DIFF_NAV, REDO, RIGHT, SHOW, SORT, SWAP, SYNCED, TREE, UNCHECKED, UNCHECKED_DISABLED, UNDO,
+ UP, VIEW_MENU, WARNING }
/** Identifiers for colors according to the side to which a difference presence is relative */
@SuppressWarnings("javadoc")
diff --git a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/CategoryViewer.java b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/CategoryViewer.java
index 515ebdff..92ff8a62 100644
--- a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/CategoryViewer.java
+++ b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/CategoryViewer.java
@@ -475,7 +475,12 @@ public class CategoryViewer extends Viewer {
Image result = null;
if (element_p instanceof IDifferenceCategory) {
IDifferenceCategory cat = (IDifferenceCategory)element_p;
- ImageID imageId = (isSelected(cat))? ImageID.CHECKED: ImageID.UNCHECKED;
+ boolean selected = isSelected(cat);
+ ImageID imageId;
+ if (cat.isModifiable())
+ imageId = selected? ImageID.CHECKED: ImageID.UNCHECKED;
+ else
+ imageId = selected? ImageID.CHECKED_DISABLED: ImageID.UNCHECKED_DISABLED;
result = EMFDiffMergeUIPlugin.getDefault().getImage(imageId);
}
return result;

Back to the top