1 /******************************************************************************* 2 * Copyright (c) 2006 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.team.ui.mapping; 12 13 import org.eclipse.compare.CompareConfiguration; 14 import org.eclipse.compare.structuremergeviewer.ICompareInput; 15 import org.eclipse.core.runtime.CoreException; 16 import org.eclipse.core.runtime.IProgressMonitor; 17 18 /** 19 * This interface defines extensions to the {@link ICompareInput} 20 * interface that are used for compare inputs that are returned from the 21 * {@link ISynchronizationCompareAdapter#asCompareInput(org.eclipse.team.core.mapping.ISynchronizationContext, Object)} 22 * method. 23 * <p> 24 * Clients may implement this interface. 25 * 26 * @see ISynchronizationCompareAdapter#asCompareInput(org.eclipse.team.core.mapping.ISynchronizationContext, Object) 27 * 28 * @since 3.2 29 */ 30 public interface ISynchronizationCompareInput extends ICompareInput { 31 32 /** 33 * Return the saveable for this compare input or 34 * <code>null</code> if the input is saved directly to disk when the 35 * compare editor input is changed or the compare editor is closed. 36 * @return the saveable for this compare input 37 */ 38 SaveableComparison getSaveable(); 39 40 /** 41 * Prepare the compare input associated with a model element for display using 42 * the compare configuration. 43 * @param configuration the compare configuration for the editor that will display the input 44 * @param monitor a progress monitor 45 * @throws CoreException 46 */ 47 void prepareInput(CompareConfiguration configuration, IProgressMonitor monitor) throws CoreException; 48 49 /** 50 * Return a human readable path for the compare input that can be 51 * used in a tooltip or other displays that can show more detailed information. 52 * @return a human readable path for the compare input 53 */ 54 String getFullPath(); 55 56 /** 57 * Return whether this compare input matches the given object for the 58 * purpose of change navigation. 59 * @param object the object 60 * @return whether 61 */ 62 boolean isCompareInputFor(Object object); 63 64 } 65