Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Weinand2004-04-19 18:15:04 -0400
committerAndre Weinand2004-04-19 18:15:04 -0400
commit95cd07d46fccf6b9a1b6832f3d94596573c7b7f7 (patch)
treeb78450404e56f5b5c2aa88622b667ffc7205e7d2 /bundles/org.eclipse.compare/compare
parent2141070ef9dbb4189144d86ab857f70c91ec42dd (diff)
downloadeclipse.platform.team-95cd07d46fccf6b9a1b6832f3d94596573c7b7f7.tar.gz
eclipse.platform.team-95cd07d46fccf6b9a1b6832f3d94596573c7b7f7.tar.xz
eclipse.platform.team-95cd07d46fccf6b9a1b6832f3d94596573c7b7f7.zip
more work on #54091
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