KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > IStorageEditorInput


1 /*******************************************************************************
2  * Copyright (c) 2000, 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.ui;
12
13 import org.eclipse.core.resources.IStorage;
14 import org.eclipse.core.runtime.CoreException;
15
16 /**
17  * Interface for a <code>IStorage</code> input to an editor.
18  * <p>
19  * Clients implementing this editor input interface should override
20  * <code>Object.equals(Object)</code> to answer true for two inputs
21  * that are the same. The <code>IWorbenchPage.openEditor</code> APIs
22  * are dependent on this to find an editor with the same input.
23  * </p><p>
24  * Clients should implement this interface to declare new types of
25  * <code>IStorage</code> editor inputs.
26  * </p><p>
27  * File-oriented editors should support this as a valid input type, and display
28  * its content for viewing (but not allow modification).
29  * Within the editor, the "save" and "save as" operations should create a new
30  * file resource within the workspace.
31  * </p><p>
32  * All editor inputs must implement the <code>IAdaptable</code> interface;
33  * extensions are managed by the platform's adapter manager.
34  * </p>
35  */

36 public interface IStorageEditorInput extends IEditorInput {
37     /**
38      * Returns the underlying IStorage object.
39      *
40      * @return an IStorage object.
41      * @exception CoreException if this method fails
42      */

43     public IStorage getStorage() throws CoreException;
44 }
45
Popular Tags