### Eclipse Workspace Patch 1.0 #P compare Index: CompareUI.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java,v retrieving revision 1.34 diff -u -r1.34 CompareUI.java --- CompareUI.java 22 Sep 2008 15:24:05 -0000 1.34 +++ CompareUI.java 26 Jan 2009 19:05:32 -0000 @@ -10,8 +10,11 @@ *******************************************************************************/ package org.eclipse.compare; +import java.util.HashSet; import java.util.ResourceBundle; +import java.util.Set; +import org.eclipse.compare.CompareEditorInput; import org.eclipse.compare.internal.*; import org.eclipse.compare.structuremergeviewer.ICompareInput; import org.eclipse.compare.structuremergeviewer.IStructureCreator; @@ -169,6 +172,21 @@ } /** + * Performs the comparison described by the given input while bypassing all registered viewers + * and comparators for textual comparison only. + * + * @param input the input on which to open the compare dialog + */ + public static void openTextCompareEditor(CompareEditorInput input) { + Set set = new HashSet(); + input.getCompareConfiguration().setProperty( + ICompareAsText.PROP_TEXT_INPUTS, set); + set.add(input); + set.add(input.getCompareResult()); + openCompareEditorOnPage(input, null); + } + + /** * Performs the comparison described by the given input and * shows the result in the given editor. *