blob: 77da3f455d095e22fbf41619a5609581c2e2c2a4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
/*******************************************************************************
* Copyright (c) 2000, 2015 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
* Markus Alexander Kuppe, Versant Corporation - bug #215797
*******************************************************************************/
package org.eclipse.ui.views;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchPartDescriptor;
/**
* This is a view descriptor. It provides a "description" of a given
* given view so that the view can later be constructed.
* <p>
* The view registry provides facilities to map from an extension
* to a IViewDescriptor.
* </p>
* <p>
* This interface is not intended to be implemented by clients.
* </p>
*
* @see org.eclipse.ui.views.IViewRegistry
* @since 3.1
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IViewDescriptor extends IWorkbenchPartDescriptor, IAdaptable {
/**
* Creates an instance of the view defined in the descriptor.
*
* @return the view part
* @throws CoreException thrown if there is a problem creating the part
*/
IViewPart createView() throws CoreException;
/**
* Returns an array of strings that represent
* view's category path. This array will be used
* for hierarchical presentation of the
* view in places like submenus.
* @return array of category tokens or null if not specified.
*/
String[] getCategoryPath();
/**
* Returns the description of this view.
*
* @return the description
*/
String getDescription();
/**
* Returns the id of the view.
*
* @return the id
*/
@Override String getId();
/**
* Returns the descriptor for the icon to show for this view.
*/
@Override ImageDescriptor getImageDescriptor();
/**
* Returns the label to show for this view.
*
* @return the label
*/
@Override String getLabel();
/**
* Returns the default fast view width ratio for this view.
*
* @return the fast view width ratio
*/
float getFastViewWidthRatio();
/**
* Returns whether this view allows multiple instances.
*
* @return whether this view allows multiple instances
*/
boolean getAllowMultiple();
/**
* Returns whether this view can be restored upon workbench restart.
*
* @return whether whether this view can be restored upon workbench restart
* @since 3.4
*/
boolean isRestorable();
}
|