|
From: Matthias K <mat...@us...> - 2006-03-21 22:19:41
|
Update of /cvsroot/jcommander/incubator/matthias_kue/org.jcommander.eclipsepatch.compare/compare/org/eclipse/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8063/compare/org/eclipse/ui Added Files: IFileEditorInput.java IStorageEditorInput.java Log Message: Patched version of org.eclipse.compare --- NEW FILE: IStorageEditorInput.java --- package org.eclipse.ui; import org.eclipse.core.resources.IStorage; import org.eclipse.core.runtime.CoreException; /** * Interface for a <code>IStorage</code> input to an editor. * <p> * Clients implementing this editor input interface should override * <code>Object.equals(Object)</code> to answer true for two inputs * that are the same. The <code>IWorbenchPage.openEditor</code> APIs * are dependent on this to find an editor with the same input. * </p><p> * Clients should implement this interface to declare new types of * <code>IStorage</code> editor inputs. * </p><p> * File-oriented editors should support this as a valid input type, and display * its content for viewing (but not allow modification). * Within the editor, the "save" and "save as" operations should create a new * file resource within the workspace. * </p><p> * All editor inputs must implement the <code>IAdaptable</code> interface; * extensions are managed by the platform's adapter manager. * </p> */ public interface IStorageEditorInput extends IEditorInput { /** * Returns the underlying IStorage object. * * @return an IStorage object. * @exception CoreException if this method fails */ public IStorage getStorage() throws CoreException; } --- NEW FILE: IFileEditorInput.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.ui; import org.eclipse.core.resources.IFile; /** * This interface defines a file-oriented input to an editor. * <p> * Clients implementing this editor input interface should override * <code>Object.equals(Object)</code> to answer true for two inputs * that are the same. The <code>IWorbenchPage.openEditor</code> APIs * are dependent on this to find an editor with the same input. * </p><p> * File-oriented editors should support this as a valid input type, and allow * full read-write editing of its content. * </p><p> * A default implementation of this interface is provided by * org.eclipse.ui.part.FileEditorInput. * </p><p> * All editor inputs must implement the <code>IAdaptable</code> interface; * extensions are managed by the platform's adapter manager. * </p> * * @see org.eclipse.core.resources.IFile */ public interface IFileEditorInput extends IStorageEditorInput { /** * Returns the file resource underlying this editor input. * <p> * The <code>IFile</code> returned can be a handle to a resource * that does not exist in the workspace. As such, an editor should * provide appropriate feedback to the user instead of simply failing * during input validation. For example, a text editor could open * in read-only mode with a message in the text area to inform the * user that the file does not exist. * </p> * * @return the underlying file */ public IFile getFile(); } |