Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Weinand2003-03-24 15:38:57 +0000
committerAndre Weinand2003-03-24 15:38:57 +0000
commit8f49559469b644c3f26c8331b96fa805ff34ff7d (patch)
tree1677dba15f54347d728855d64b2d33e9f11f3fae /examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/TextMergeViewerCreator.java
parentaea06383149db74eb28e030bf6dac5bb0c6ae11f (diff)
downloadeclipse.platform.team-8f49559469b644c3f26c8331b96fa805ff34ff7d.tar.gz
eclipse.platform.team-8f49559469b644c3f26c8331b96fa805ff34ff7d.tar.xz
eclipse.platform.team-8f49559469b644c3f26c8331b96fa805ff34ff7d.zip
initial checkin
Diffstat (limited to 'examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/TextMergeViewerCreator.java')
-rw-r--r--examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/TextMergeViewerCreator.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/TextMergeViewerCreator.java b/examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/TextMergeViewerCreator.java
new file mode 100644
index 000000000..2565e4544
--- /dev/null
+++ b/examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/TextMergeViewerCreator.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.compare.examples.structurecreator;
+
+import org.eclipse.swt.widgets.Composite;
+
+import org.eclipse.jface.viewers.Viewer;
+
+import org.eclipse.compare.*;
+import org.eclipse.compare.contentmergeviewer.TextMergeViewer;
+
+/**
+ * A factory object for the <code>TextMergeViewer</code>.
+ * This indirection is necessary because only objects with a default
+ * constructor can be created via an extension point
+ * (this precludes Viewers).
+ */
+public class TextMergeViewerCreator implements IViewerCreator {
+
+ public Viewer createViewer(Composite parent, CompareConfiguration mp) {
+ return new TextMergeViewer(parent, mp);
+ }
+}

Back to the top