1 /******************************************************************************* 2 * Copyright (c) 2000, 2005 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 12 package org.eclipse.jdt.ui; 13 14 import org.eclipse.ui.IEditorInput; 15 16 import org.eclipse.jdt.core.ICompilationUnit; 17 18 /** 19 * Extension interface for {@link IWorkingCopyManager}. 20 * <p> 21 * Introduces API to set and remove the working copy for a given editor input.<p> 22 * </p> 23 * 24 * @since 2.1 25 */ 26 public interface IWorkingCopyManagerExtension { 27 28 /** 29 * Sets the given working copy for the given editor input. If the given editor input 30 * is not connected to this working copy manager, this call has no effect. <p> 31 * This working copy manager does not assume the ownership of this working copy, i.e., 32 * the given working copy is not automatically be freed when this manager is shut down. 33 * 34 * @param input the editor input 35 * @param workingCopy the working copy 36 */ 37 void setWorkingCopy(IEditorInput input, ICompilationUnit workingCopy); 38 39 /** 40 * Removes the working copy set for the given editor input. If there is no 41 * working copy set for this input or this input is not connected to this 42 * working copy manager, this call has no effect. 43 * 44 * @param input the editor input 45 */ 46 void removeWorkingCopy(IEditorInput input); 47 } 48