01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 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.views;
11:
12: import org.eclipse.core.runtime.CoreException;
13: import org.eclipse.core.runtime.IAdaptable;
14: import org.eclipse.jface.resource.ImageDescriptor;
15: import org.eclipse.ui.IViewPart;
16: import org.eclipse.ui.IWorkbenchPartDescriptor;
17:
18: /**
19: * This is a view descriptor. It provides a "description" of a given
20: * given view so that the view can later be constructed.
21: * <p>
22: * The view registry provides facilities to map from an extension
23: * to a IViewDescriptor.
24: * </p>
25: * <p>
26: * This interface is not intended to be implemented by clients.
27: * </p>
28: *
29: * @see org.eclipse.ui.views.IViewRegistry
30: * @since 3.1
31: */
32: public interface IViewDescriptor extends IWorkbenchPartDescriptor,
33: IAdaptable {
34: /**
35: * Creates an instance of the view defined in the descriptor.
36: *
37: * @return the view part
38: * @throws CoreException thrown if there is a problem creating the part
39: */
40: public IViewPart createView() throws CoreException;
41:
42: /**
43: * Returns an array of strings that represent
44: * view's category path. This array will be used
45: * for hierarchical presentation of the
46: * view in places like submenus.
47: * @return array of category tokens or null if not specified.
48: */
49: public String[] getCategoryPath();
50:
51: /**
52: * Returns the description of this view.
53: *
54: * @return the description
55: */
56: public String getDescription();
57:
58: /**
59: * Returns the id of the view.
60: *
61: * @return the id
62: */
63: public String getId();
64:
65: /**
66: * Returns the descriptor for the icon to show for this view.
67: */
68: public ImageDescriptor getImageDescriptor();
69:
70: /**
71: * Returns the label to show for this view.
72: *
73: * @return the label
74: */
75: public String getLabel();
76:
77: /**
78: * Returns the default fast view width ratio for this view.
79: *
80: * @return the fast view width ratio
81: */
82: public float getFastViewWidthRatio();
83:
84: /**
85: * Returns whether this view allows multiple instances.
86: *
87: * @return whether this view allows multiple instances
88: */
89: public boolean getAllowMultiple();
90:
91: }
|