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.IStorage;
13: import org.eclipse.core.runtime.CoreException;
14:
15: /**
16: * Interface for a <code>IStorage</code> input to an editor.
17: * <p>
18: * Clients implementing this editor input interface should override
19: * <code>Object.equals(Object)</code> to answer true for two inputs
20: * that are the same. The <code>IWorbenchPage.openEditor</code> APIs
21: * are dependent on this to find an editor with the same input.
22: * </p><p>
23: * Clients should implement this interface to declare new types of
24: * <code>IStorage</code> editor inputs.
25: * </p><p>
26: * File-oriented editors should support this as a valid input type, and display
27: * its content for viewing (but not allow modification).
28: * Within the editor, the "save" and "save as" operations should create a new
29: * file resource within the workspace.
30: * </p><p>
31: * All editor inputs must implement the <code>IAdaptable</code> interface;
32: * extensions are managed by the platform's adapter manager.
33: * </p>
34: */
35: public interface IStorageEditorInput extends IEditorInput {
36: /**
37: * Returns the underlying IStorage object.
38: *
39: * @return an IStorage object.
40: * @exception CoreException if this method fails
41: */
42: public IStorage getStorage() throws CoreException;
43: }
|