KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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.jface.resource.ImageDescriptor;
14
15 /**
16  * Description of an editor in the workbench editor registry. The
17  * editor descriptor contains the information needed to create editor instances.
18  * <p>
19  * An editor descriptor typically represents one of three types of editors:
20  * <ul>
21  * <li>a file editor extension for a specific file extension.</li>
22  * <li>a file editor added by the user (via the workbench preference page)</li>
23  * <li>a general editor extension which works on objects other than files.</li>
24  * </ul>
25  * </p>
26  * <p>
27  * This interface is not intended to be implemented or extended by clients.
28  * </p>
29  *
30  * @see IEditorRegistry
31  */

32 public interface IEditorDescriptor extends IWorkbenchPartDescriptor {
33     /**
34      * Returns the editor id.
35      * <p>
36      * For internal editors, this is the extension id as defined in the workbench
37      * registry; for external editors, it is path and file name of the external
38      * program.
39      * </p>
40      *
41      * @return the id of the editor
42      */

43     public String JavaDoc getId();
44
45     /**
46      * Returns the descriptor of the image for this editor.
47      *
48      * @return the descriptor of the image to display next to this editor
49      */

50     public ImageDescriptor getImageDescriptor();
51
52     /**
53      * Returns the label to show for this editor.
54      *
55      * @return the editor label
56      */

57     public String JavaDoc getLabel();
58
59     /**
60      * Returns whether this editor descriptor will open a regular editor
61      * part inside the editor area.
62      *
63      * @return <code>true</code> if editor is inside editor area, and
64      * <code>false</code> otherwise
65      * @since 3.0
66      */

67     public boolean isInternal();
68
69     /**
70      * Returns whether this editor descriptor will open an external
71      * editor in-place inside the editor area.
72      *
73      * @return <code>true</code> if editor is in-place, and <code>false</code>
74      * otherwise
75      * @since 3.0
76      */

77     public boolean isOpenInPlace();
78
79     /**
80      * Returns whether this editor descriptor will open an external editor
81      * in a new window outside the workbench.
82      *
83      * @return <code>true</code> if editor is external, and <code>false</code>
84      * otherwise
85      * @since 3.0
86      */

87     public boolean isOpenExternal();
88
89     /**
90      * Returns the editor matching strategy object for editors
91      * represented by this editor descriptor, or <code>null</code>
92      * if there is no explicit matching strategy specified.
93      *
94      * @return the editor matching strategy, or <code>null</code> if none
95      * @since 3.1
96      */

97     public IEditorMatchingStrategy getEditorMatchingStrategy();
98 }
99
Popular Tags