Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.compare/compare')
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java
index fab93628a..6b8f0ee35 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java
@@ -19,6 +19,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.ui.IReusableEditor;
import org.eclipse.ui.IWorkbenchPage;
@@ -205,6 +206,31 @@ public final class CompareUI {
return CompareUIPlugin.getImage(adaptable);
}
+
+ /**
+ * Creates a stream merger for the given content type.
+ * If no stream merger is registered for the given content type <code>null</code> is returned.
+ *
+ * @param type the type for which to find a stream merger
+ * @return a stream merger for the given type, or <code>null</code> if no
+ * stream merger has been registered
+ */
+ public static IStreamMerger createStreamMerger(IContentType type) {
+ return CompareUIPlugin.createStreamMerger(type);
+ }
+
+ /**
+ * Creates a stream merger for the given file extension.
+ * If no stream merger is registered for the file extension <code>null</code> is returned.
+ *
+ * @param type the type for which to find a stream merger
+ * @return a stream merger for the given type, or <code>null</code> if no
+ * stream merger has been registered
+ */
+ public static IStreamMerger createStreamMerger(String type) {
+ return CompareUIPlugin.createStreamMerger(type);
+ }
+
/**
* Returns a structure compare viewer based on an old viewer and an input object.
* If the old viewer is suitable for showing the input, the old viewer

Back to the top