01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui;
11:
12: import org.eclipse.core.resources.IFile;
13:
14: /**
15: * This interface defines a file-oriented input to an editor.
16: * <p>
17: * Clients implementing this editor input interface should override
18: * <code>Object.equals(Object)</code> to answer true for two inputs
19: * that are the same. The <code>IWorbenchPage.openEditor</code> APIs
20: * are dependent on this to find an editor with the same input.
21: * </p><p>
22: * File-oriented editors should support this as a valid input type, and allow
23: * full read-write editing of its content.
24: * </p><p>
25: * A default implementation of this interface is provided by
26: * org.eclipse.ui.part.FileEditorInput.
27: * </p><p>
28: * All editor inputs must implement the <code>IAdaptable</code> interface;
29: * extensions are managed by the platform's adapter manager.
30: * </p>
31: *
32: * @see org.eclipse.core.resources.IFile
33: */
34: public interface IFileEditorInput extends IStorageEditorInput {
35: /**
36: * Returns the file resource underlying this editor input.
37: * <p>
38: * The <code>IFile</code> returned can be a handle to a resource
39: * that does not exist in the workspace. As such, an editor should
40: * provide appropriate feedback to the user instead of simply failing
41: * during input validation. For example, a text editor could open
42: * in read-only mode with a message in the text area to inform the
43: * user that the file does not exist.
44: * </p>
45: *
46: * @return the underlying file
47: */
48: public IFile getFile();
49: }
|