Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/property/PropertyCategoryItem.java')
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/property/PropertyCategoryItem.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/property/PropertyCategoryItem.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/property/PropertyCategoryItem.java
new file mode 100644
index 000000000..146247239
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/property/PropertyCategoryItem.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2018 EclipseSource Services GmbH and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Philip Langer - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.property;
+
+import org.eclipse.emf.compare.ide.ui.internal.configuration.EMFCompareConfiguration;
+import org.eclipse.emf.compare.rcp.ui.mergeviewer.IMergeViewer.MergeViewerSide;
+
+class PropertyCategoryItem extends PropertyItem {
+
+ private String categoryName;
+
+ PropertyCategoryItem(EMFCompareConfiguration configuration, String categoryName, MergeViewerSide side) {
+ super(configuration, null, categoryName, side);
+ this.categoryName = categoryName;
+ }
+
+ @Override
+ protected Object getObject() {
+ return categoryName;
+ }
+
+ @Override
+ protected boolean isMatchingItem(PropertyItem propertyItem) {
+ // They match if the other property item is also a category with the same category name.
+ return getClass().isInstance(propertyItem) && categoryName.equals(propertyItem.getText());
+ }
+
+}

Back to the top