diff options
3 files changed, 16 insertions, 7 deletions
diff --git a/org.eclipse.emf.compare-parent/pom.xml b/org.eclipse.emf.compare-parent/pom.xml index b344279ba..0b2fe136c 100644 --- a/org.eclipse.emf.compare-parent/pom.xml +++ b/org.eclipse.emf.compare-parent/pom.xml @@ -137,6 +137,7 @@ <plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>target-platform-configuration</artifactId> + <version>${tycho-version}</version> <configuration> <includePackedArtifacts>true</includePackedArtifacts> <resolver>p2</resolver> diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/property/PropertyItem.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/property/PropertyItem.java index 49f99b553..bed8e34d4 100644 --- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/property/PropertyItem.java +++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/property/PropertyItem.java @@ -107,11 +107,20 @@ abstract class PropertyItem extends ItemProvider implements ITableItemLabelProvi */ public static PropertyItem createPropertyItem(final EMFCompareConfiguration configuration, final Object object, final MergeViewerSide side) { - final AdapterFactoryItemDelegator itemDelegator = new AdapterFactoryItemDelegator( - configuration.getAdapterFactory()); + PropertyItem rootItem; + List<IItemPropertyDescriptor> propertyDescriptors; + if (configuration.getAdapterFactory() != null) { + final AdapterFactoryItemDelegator itemDelegator = new AdapterFactoryItemDelegator( + configuration.getAdapterFactory()); - PropertyItem rootItem = new RootPropertyItem(configuration, itemDelegator, object, side); - List<IItemPropertyDescriptor> propertyDescriptors = getPropertyDescriptors(object, itemDelegator); + rootItem = new RootPropertyItem(configuration, itemDelegator.getImage(object), + itemDelegator.getText(object), object, side); + propertyDescriptors = getPropertyDescriptors(object, itemDelegator); + } else { + // We're currently disposing of the property content merge viewer + rootItem = new RootPropertyItem(configuration, null, "", object, side); //$NON-NLS-1$ + propertyDescriptors = null; + } populateRootPropertyItem(rootItem, propertyDescriptors, object, configuration, side); return rootItem; diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/property/RootPropertyItem.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/property/RootPropertyItem.java index fc30618b3..ebd078044 100644 --- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/property/RootPropertyItem.java +++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/property/RootPropertyItem.java @@ -12,15 +12,14 @@ 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; -import org.eclipse.emf.edit.provider.IItemLabelProvider; class RootPropertyItem extends PropertyItem { private Object object; - RootPropertyItem(EMFCompareConfiguration configuration, IItemLabelProvider itemLabelProvider, + RootPropertyItem(EMFCompareConfiguration configuration, Object objectImage, String objectText, Object object, MergeViewerSide side) { - super(configuration, itemLabelProvider.getImage(object), itemLabelProvider.getText(object), side); + super(configuration, objectImage, objectText, side); this.object = object; } |