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: /**
13: * Implements a reference to a editor.
14: * The IEditorPart will not be instanciated until
15: * the editor becomes visible or the API getEditor
16: * is sent with true;
17: * <p>
18: * This interface is not intended to be implemented by clients.
19: * </p>
20: */
21: public interface IEditorReference extends IWorkbenchPartReference {
22: /**
23: * Returns the factory id of the factory used to
24: * restore this editor. Returns null if the editor
25: * is not persistable.
26: */
27: public String getFactoryId();
28:
29: /**
30: * Returns the editor input name. May return null is the
31: * name is not available or if the editor failed to be
32: * restored.
33: */
34: public String getName();
35:
36: /**
37: * Returns the editor referenced by this object.
38: * Returns <code>null</code> if the editor was not instantiated or
39: * it failed to be restored. Tries to restore the editor
40: * if <code>restore</code> is true.
41: */
42: public IEditorPart getEditor(boolean restore);
43:
44: /**
45: * Returns true if the editor is pinned otherwise returns false.
46: */
47: public boolean isPinned();
48:
49: /**
50: * Returns the editor input for the editor referenced by this object.
51: * <p>
52: * Unlike most of the other methods on this type, this method
53: * can trigger plug-in activation.
54: * </p>
55: *
56: * @return the editor input for the editor referenced by this object
57: * @throws PartInitException if there was an error restoring the editor input
58: * @since 3.1
59: */
60: public IEditorInput getEditorInput() throws PartInitException;
61: }
|