Update of /cvsroot/jcommander/plugins/org.jcommander.eclipsepatch.compare/compare/org/eclipse/compare In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5127/compare/org/eclipse/compare Added Files: ResourceNode.java CompareUI.java IPropertyChangeNotifier.java CompareViewerSwitchingPane.java ICompareNavigator.java IEncodedStreamContentAccessor.java CompareViewerPane.java IEditableContent.java CompareConfiguration.java IViewerCreator.java CompareEditorInput.java IContentChangeNotifier.java IModificationDate.java Splitter.java IStreamContentAccessor.java BufferedContent.java ITypedElement.java package.html ZipFileStructureCreator.java EditionSelectionDialog.java NavigationAction.java IContentChangeListener.java IStreamMerger.java HistoryItem.java IResourceProvider.java Log Message: org.eclipse.compare, extracted from the Eclipse CVS. Now independent of org.eclipse.ui.ide etc. --- NEW FILE: IContentChangeListener.java --- /******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.compare; /** * An <code>IContentChangeListener</code> is informed about content changes of a * <code>IContentChangeNotifier</code>. * <p> * Clients may implement this interface. * </p> * * @see IContentChangeNotifier */ public interface IContentChangeListener { /** * Called whenever the content of the given source has changed. * * @param source the source whose contents has changed */ void contentChanged(IContentChangeNotifier source); } --- NEW FILE: Splitter.java --- /******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.compare; import org.eclipse.swt.widgets.*; import org.eclipse.swt.custom.SashForm; /** * The Splitter adds support for nesting to a SashForm. * <P> * If Splitters are nested directly: * <UL> * <LI>changing the visibility of a child may propagate upward to the parent Splitter if the child * is the last child to become invisible or the first to become visible.</LI> * <LI>maximizing a child makes it as large as the topmost enclosing Splitter</LI> * </UL> * * @since 2.1 */ public class Splitter extends SashForm { private static final String VISIBILITY= "org.eclipse.compare.internal.visibility"; //$NON-NLS-1$ /** * Constructs a new instance of this class given its parent * and a style value describing its behavior and appearance. * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. * Style bits are also inherited from superclasses. * </p> * * @param parent a widget which will be the parent of the new instance (cannot be null) * @param style the style of widget to construct * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the parent is null</li> * </ul> * @exception org.eclipse.swt.SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> * </ul> */ public Splitter(Composite parent, int style) { super(parent, style); } /** * Sets the visibility of the given child in this Splitter. If this change * affects the visibility state of the whole Splitter, and if the Splitter * is directly nested in one or more Splitters, this method recursively * propagates the new state upward. * * @param child the child control for which the visibility is changed * @param visible the new visibility state */ public void setVisible(Control child, boolean visible) { boolean wasEmpty= isEmpty(); child.setVisible(visible); child.setData(VISIBILITY, new Boolean(visible)); if (wasEmpty != isEmpty()) { // recursively walk up Composite parent= getParent(); if (parent instanceof Splitter) { Splitter sp= (Splitter) parent; sp.setVisible(this, visible); sp.layout(); } } else { layout(); } } /* (non-Javadoc) * Recursively calls setMaximizedControl for all direct parents that are * itself Splitters. */ public void setMaximizedControl(Control control) { if (control == null || control == getMaximizedControl()) super.setMaximizedControl(null); else super.setMaximizedControl(control); // recursively walk upward Composite parent= getParent(); if (parent instanceof Splitter) ((Splitter) parent).setMaximizedControl(this); else layout(true); } /* (non-Javadoc) * Returns true if Splitter has no children or if all children are invisible. */ private boolean isEmpty() { Control[] controls= getChildren(); for (int i= 0; i < controls.length; i++) if (isVisible(controls[i])) return false; return true; } /* (non-Javadoc) * Returns the visibility state of the given child control. If the * control is a Sash, this method always returns false. */ private boolean isVisible(Control child) { if (child instanceof Sash) return false; Object data= child.getData(VISIBILITY); if (data instanceof Boolean) return ((Boolean)data).booleanValue(); return true; } } --- NEW FILE: ITypedElement.java --- /******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.compare; import org.eclipse.swt.graphics.Image; /** * Interface for getting the name, image, and type for an object. * <p> * These methods are typically used to present an input object in the compare UI * (<code>getName</code> and <code>getImage</code>) * and for finding a viewer for a given input type (<code>getType</code>). * <p> * Clients may implement this interface. */ public interface ITypedElement { /** * Type for a folder input (value <code>"FOLDER"</code>). * Folders are comparison elements that have no contents, only a name and children. */ public static final String FOLDER_TYPE= "FOLDER"; //$NON-NLS-1$ /** * Type for an element whose actual type is text (value <code>"txt"</code>). */ public static final String TEXT_TYPE= "txt"; //$NON-NLS-1$ /** * Type for an element whose actual type could not * be determined. (value <code>"???"</code>). */ public static final String UNKNOWN_TYPE= "???"; //$NON-NLS-1$ /** * Returns the name of this object. * The name is used when displaying this object in the UI. * * @return the name of this object */ String getName(); /** * Returns an image for this object. * This image is used when displaying this object in the UI. * * @return the image of this object or <code>null</code> if this type of input has no image */ Image getImage(); /** * Returns the type of this object. For objects with a file name * this is typically the file extension. For folders its the constant * <code>FOLDER_TYPE</code>. * The type is used for determining a suitable viewer for this object. * * @return the type of this object */ String getType(); } --- NEW FILE: IModificationDate.java --- /******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.compare; /** * Common interface for objects with a modification date. The modification date * can be used in the UI to give the user a general idea of how old an object is. * <p> * Clients may implement this interface. * </p> */ public interface IModificationDate { /** * Returns the modification time of this object. * <p> * Note that this value should only be used to give the user a general idea of how * old the object is. * * @return the time of last modification, in milliseconds since January 1, 1970, 00:00:00 GMT */ long getModificationDate(); } --- NEW FILE: CompareViewerPane.java --- /******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.compare; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.*; import org.eclipse.swt.events.*; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.*; import org.eclipse.jface.action.ToolBarManager; /** * A <code>CompareViewerPane</code> is a convenience class which installs a * <code>CLabel</code> and a <code>Toolbar</code> in a <code>ViewForm</code>. * <P> * Double clicking onto the <code>CompareViewerPane</code>'s title bar maximizes * the <code>CompareViewerPane</code> to the size of an enclosing <code>Splitter</code> * (if there is one). * If more <code>Splitters</code> are nested maximizing walks up and * maximizes to the outermost <code>Splitter</code>. * * @since 2.0 */ public class CompareViewerPane extends ViewForm { private ToolBarManager fToolBarManager; /** * Constructs a new instance of this class given its parent * and a style value describing its behavior and appearance. * * @param container a widget which will be the container of the new instance (cannot be null) * @param style the style of widget to construct * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the parent is null</li> * </ul> * @exception org.eclipse.swt.SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> * </ul> */ public CompareViewerPane(Composite container, int style) { super(container, style); marginWidth= 0; marginHeight= 0; CLabel label= new CLabel(this, SWT.NONE) { public Point computeSize(int wHint, int hHint, boolean changed) { return super.computeSize(wHint, Math.max(24, hHint), changed); } }; setTopLeft(label); MouseAdapter ml= new MouseAdapter() { public void mouseDoubleClick(MouseEvent e) { Control content= getContent(); if (content != null && content.getBounds().contains(e.x, e.y)) return; Control parent= getParent(); if (parent instanceof Splitter) ((Splitter)parent).setMaximizedControl(CompareViewerPane.this); } }; addMouseListener(ml); label.addMouseListener(ml); addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent e) { if (fToolBarManager != null) { fToolBarManager.removeAll(); fToolBarManager.dispose(); fToolBarManager= null; } } }); } /** * Set the pane's title text. * The value <code>null</code> clears it. * * @param label the text to be displayed in the pane or null */ public void setText(String label) { CLabel cl= (CLabel) getTopLeft(); if (cl != null) cl.setText(label); } /** * Set the pane's title Image. * The value <code>null</code> clears it. * * @param image the image to be displayed in the pane or null */ public void setImage(Image image) { CLabel cl= (CLabel) getTopLeft(); if (cl != null) cl.setImage(image); } /** * Returns a <code>ToolBarManager</code> if the given parent is a * <code>CompareViewerPane</code> or <code>null</code> otherwise. * * @param parent a <code>Composite</code> or <code>null</code> * @return a <code>ToolBarManager</code> if the given parent is a <code>CompareViewerPane</code> otherwise <code>null</code> */ public static ToolBarManager getToolBarManager(Composite parent) { if (parent instanceof CompareViewerPane) { CompareViewerPane pane= (CompareViewerPane) parent; return pane.getToolBarManager(); } return null; } /** * Clears tool items in the <code>CompareViewerPane</code>'s control bar. * * @param parent a <code>Composite</code> or <code>null</code> */ public static void clearToolBar(Composite parent) { ToolBarManager tbm= getToolBarManager(parent); if (tbm != null) { tbm.removeAll(); tbm.update(true); } } //---- private stuff private ToolBarManager getToolBarManager() { if (fToolBarManager == null) { ToolBar tb= new ToolBar(this, SWT.FLAT); setTopCenter(tb); fToolBarManager= new ToolBarManager(tb); } return fToolBarManager; } } --- NEW FILE: HistoryItem.java --- /******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.compare; import java.io.InputStream; import java.io.BufferedInputStream; import org.eclipse.swt.graphics.Image; import org.eclipse.compare.IResourceProvider; import org.eclipse.core.resources.IEncodedStorage; import org.eclipse.core.resources.IFileState; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; /** * A combination <code>IFileState</code> and <code>ITypedElement</code> that can be used as * an input to a compare viewer or other places where an <code>IStreamContentAccessor</code> * is needed. * <p> * <p> * Clients may instantiate this class; it is not intended to be subclassed. * </p> */ public class HistoryItem implements IEncodedStreamContentAccessor, ITypedElement, IModificationDate, IResourceProvider { private ITypedElement fBase; private IFileState fFileState; /** * Creates a <code>HistoryItem</code> object which combines the given <code>IFileState</code> * and <code>ITypedElement</code> into an object * which is suitable as input for a compare viewer or <code>ReplaceWithEditionDialog</code>. * * @param base the implementation of the <code>ITypedElement</code> interface delegates to this base <code>ITypedElement</code> * @param fileState the <code>IFileState</code> from which the streamable contents and the modification time is derived from */ public HistoryItem(ITypedElement base, IFileState fileState) { fBase= base; fFileState= fileState; } /* (non-Javadoc) * see ITypedElement.getName */ public String getName() { return fBase.getName(); } /* (non-Javadoc) * see ITypedElement.getImage */ public Image getImage() { return fBase.getImage(); } /* (non-Javadoc) * see ITypedElement.getType */ public String getType() { return fBase.getType(); } /* (non-Javadoc) * see IModificationDate.getModificationDate */ public long getModificationDate() { return fFileState.getModificationTime(); } /* (non-Javadoc) * see IStreamContentAccessor.getContents */ public InputStream getContents() throws CoreException { return new BufferedInputStream(fFileState.getContents()); } /* (non-Javadoc) * @see org.eclipse.compare.IEncodedStreamContentAccessor#getCharset() */ public String getCharset() throws CoreException { String charset= fFileState.getCharset(); if (charset == null) { IResource resource= getResource(); if (resource instanceof IEncodedStorage) charset= ((IEncodedStorage)resource).getCharset(); } return charset; } /* (non-Javadoc) * @see org.eclipse.compare.internal.IResourceProvider#getResource() */ public IResource getResource() { IPath fullPath= fFileState.getFullPath(); return ResourcesPlugin.getWorkspace().getRoot().findMember(fullPath); } } --- NEW FILE: IContentChangeNotifier.java --- /******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.compare; /** * Interface common to all objects that provide a means for registering * for content change notification. * <p> * Clients may implement this interface. * </p> * * @see IContentChangeListener */ public interface IContentChangeNotifier { /** * Adds a content change listener to this notifier. * Has no effect if an identical listener is already registered. * * @param listener a content changed listener */ void addContentChangeListener(IContentChangeListener listener); /** * Removes the given content changed listener from this notifier. * Has no effect if the listener is not registered. * * @param listener a content changed listener */ void removeContentChangeListener(IContentChangeListener listener); } --- NEW FILE: CompareUI.java --- /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.compare; import java.util.ResourceBundle; import org.eclipse.compare.internal.CompareUIPlugin; import org.eclipse.compare.internal.DocumentManager; import org.eclipse.compare.structuremergeviewer.ICompareInput; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.content.IContentType; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.viewers.Viewer; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.IReusableEditor; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.plugin.AbstractUIPlugin; /** * The class <code>CompareUI</code> defines the entry point to initiate a configurable * compare operation on arbitrary resources. The result of the compare * is opened into a compare editor where the details can be browsed and * edited in dynamically selected structure and content viewers. * <p> * The Compare UI provides a registry for content and structure compare viewers, * which is initialized from extensions contributed to extension points * declared by this plug-in. */ public final class CompareUI { /** * Compare Plug-in ID (value <code>"org.eclipse.compare"</code>). * @since 2.0 */ public static final String PLUGIN_ID= "org.eclipse.compare"; //$NON-NLS-1$ /** * The id of the Compare Preference Page * (value <code>"org.eclipse.compare.internal.ComparePreferencePage"</code>). * * @since 3.1 */ public static final String PREFERENCE_PAGE_ID= "org.eclipse.compare.internal.ComparePreferencePage"; //$NON-NLS-1$ /** * Image descriptor for the disabled icon of the 'Next' tool bar button. * @since 2.0 */ public static final ImageDescriptor DESC_DTOOL_NEXT= CompareUIPlugin.getImageDescriptor(CompareUIPlugin.DTOOL_NEXT); /** * Image descriptor for the normal icon of the 'Next' tool bar button. * @since 2.0 */ public static final ImageDescriptor DESC_CTOOL_NEXT= CompareUIPlugin.getImageDescriptor(CompareUIPlugin.CTOOL_NEXT); /** * Image descriptor for the roll-over icon of the 'Next' tool bar button. * @since 2.0 */ public static final ImageDescriptor DESC_ETOOL_NEXT= CompareUIPlugin.getImageDescriptor(CompareUIPlugin.ETOOL_NEXT); /** * Image descriptor for the disabled icon of the 'Previous' tool bar button. * @since 2.0 */ public static final ImageDescriptor DESC_DTOOL_PREV= CompareUIPlugin.getImageDescriptor(CompareUIPlugin.DTOOL_PREV); /** * Image descriptor for the normal icon of the 'Previous' tool bar button. * @since 2.0 */ public static final ImageDescriptor DESC_CTOOL_PREV= CompareUIPlugin.getImageDescriptor(CompareUIPlugin.CTOOL_PREV); /** * Image descriptor for the roll-over icon of the 'Previous' tool bar button. * @since 2.0 */ public static final ImageDescriptor DESC_ETOOL_PREV= CompareUIPlugin.getImageDescriptor(CompareUIPlugin.ETOOL_PREV); /** * Name of the title property of a compare viewer. * If a property with this name is set * on the top level SWT control of a viewer, it is used as a title in the pane's * title bar. */ public static final String COMPARE_VIEWER_TITLE= "org.eclipse.compare.CompareUI.CompareViewerTitle"; //$NON-NLS-1$ private CompareUI() { // empty implementation } public static AbstractUIPlugin getPlugin() { return CompareUIPlugin.getDefault(); } /** * Returns this plug-in's resource bundle. * * @return the plugin's resource bundle */ public static ResourceBundle getResourceBundle() { return CompareUIPlugin.getDefault().getResourceBundle(); } /** * Performs the comparison described by the given input and opens a * compare editor on the result in the currently active workbench page. * * @param input the input on which to open the compare editor */ public static void openCompareEditor(CompareEditorInput input) { openCompareEditorOnPage(input, null); } /** * Performs the comparison described by the given input and opens a * compare editor on the result in the given workbench page. * * @param input the input on which to open the compare editor * @param page the workbench page in which to open the compare editor * @since 2.1 */ public static void openCompareEditorOnPage(CompareEditorInput input, IWorkbenchPage page) { CompareUIPlugin plugin= CompareUIPlugin.getDefault(); if (plugin != null) plugin.openCompareEditor(input, page, null); } /** * Performs the comparison described by the given input and * shows the result in the given editor. * * @param input the input on which to open the compare editor * @param editor the compare editor to reuse or null to create a new one * @since 3.0 */ public static void reuseCompareEditor(CompareEditorInput input, IReusableEditor editor) { CompareUIPlugin plugin= CompareUIPlugin.getDefault(); if (plugin != null) plugin.openCompareEditor(input, null, editor); } /** * Performs the comparison described by the given input and opens a * modal compare dialog on the result. * * @param input the input on which to open the compare dialog */ public static void openCompareDialog(CompareEditorInput input) { CompareUIPlugin plugin= CompareUIPlugin.getDefault(); if (plugin != null) plugin.openCompareDialog(input); } /** * Registers an image descriptor for the given type. * * @param type the type * @param descriptor the image descriptor */ public static void registerImageDescriptor(String type, ImageDescriptor descriptor) { CompareUIPlugin.registerImageDescriptor(type, descriptor); } /** * Returns a shared image for the given type, or a generic image if none * has been registered for the given type. * <p> * Note: Images returned from this method will be automatically disposed * of when this plug-in shuts down. Callers must not dispose of these * images themselves. * </p> * * @param type the type * @return the image */ public static Image getImage(String type) { return CompareUIPlugin.getImage(type); } /** * Registers the given image for being disposed when this plug-in is shutdown. * * @param image the image to register for disposal */ public static void disposeOnShutdown(Image image) { CompareUIPlugin.disposeOnShutdown(image); } /** * Returns a shared image for the given adaptable. * This convenience method queries the given adaptable * for its <code>IWorkbenchAdapter.getImageDescriptor</code>, which it * uses to create an image if it does not already have one. * <p> * Note: Images returned from this method will be automatically disposed * of when this plug-in shuts down. Callers must not dispose of these * images themselves. * </p> * * @param adaptable the adaptable for which to find an image * @return an image */ public static Image getImage(IAdaptable adaptable) { 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.getDefault().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.getDefault().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 * is returned. Otherwise, the input's type is used to find a viewer descriptor in the registry * which in turn is used to create a structure compare viewer under the given parent composite. * If no viewer descriptor can be found <code>null</code> is returned. * * @param oldViewer a new viewer is only created if this old viewer cannot show the given input * @param input the input object for which to find a structure viewer * @param parent the SWT parent composite under which the new viewer is created * @param configuration a configuration which is passed to a newly created viewer * @return the compare viewer which is suitable for the given input object or <code>null</code> */ public static Viewer findStructureViewer(Viewer oldViewer, ICompareInput input, Composite parent, CompareConfiguration configuration) { return CompareUIPlugin.getDefault().findStructureViewer(oldViewer, input, parent, configuration); } /** * Returns a content compare viewer based on an old viewer and an input object. * If the old viewer is suitable for showing the input the old viewer * is returned. Otherwise the input's type is used to find a viewer descriptor in the registry * which in turn is used to create a content compare viewer under the given parent composite. * If no viewer descriptor can be found <code>null</code> is returned. * * @param oldViewer a new viewer is only created if this old viewer cannot show the given input * @param input the input object for which to find a content viewer * @param parent the SWT parent composite under which the new viewer is created * @param configuration a configuration which is passed to a newly created viewer * @return the compare viewer which is suitable for the given input object or <code>null</code> */ public static Viewer findContentViewer(Viewer oldViewer, ICompareInput input, Composite parent, CompareConfiguration configuration) { return CompareUIPlugin.getDefault().findContentViewer(oldViewer, input, parent, configuration); } /** * Returns a content compare viewer based on an old viewer and an input * object. If the old viewer is suitable for showing the input the old * viewer is returned. Otherwise the input's type is used to find a viewer * descriptor in the registry which in turn is used to create a content * compare viewer under the given parent composite. In order to determine * th... [truncated message content] |