Project

General

Profile

Download (3.17 KB) Statistics
| Branch: | Tag: | Revision:
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2009 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.navigator;
12

    
13
import org.eclipse.core.runtime.IAdaptable;
14
import org.eclipse.jface.viewers.ILabelProvider;
15
import org.eclipse.jface.viewers.ITreeContentProvider;
16

    
17
/**
18
 * The content extension represents the components of a <b>navigatorContent</b>
19
 * extension. These handles are managed by a content service
20
 * {@link INavigatorContentService}.  An extension is formed from the
21
 * {@link INavigatorContentDescriptor}. 
22
 * 
23
 * <p>
24
 * There is a one-to-many correspondence between the {@link INavigatorContentDescriptor} and
25
 * {@link INavigatorContentExtension}.  An instance of the {@link INavigatorContentExtension} is
26
 * created for each {@link INavigatorContentDescriptor} used by a 
27
 * {@link INavigatorContentService}.
28
 * </p>
29
 * 
30
 * @noimplement This interface is not intended to be implemented by clients.
31
 * @noextend This interface is not intended to be extended by clients.
32
 * @since 3.2
33
 * 
34
 */
35
public interface INavigatorContentExtension extends IAdaptable {
36

    
37
	/**
38
	 * 
39
	 * @return The id attribute of the navigatorContent extension.
40
	 */
41
	String getId();
42

    
43
	/**
44
	 * There is one descriptor for all instances of a
45
	 * INavigatorContentExtension.
46
	 * 
47
	 * 
48
	 * @return A handle to the descriptor used to manage this extension.
49
	 */
50
	INavigatorContentDescriptor getDescriptor();
51

    
52
	/**
53
	 * Clients may choose to implement {@link ICommonContentProvider}, but are
54
	 * only required to supply an implementation of {@link ITreeContentProvider}.
55
	 * 
56
	 * @return The content provider defined by the <b>navigatorContent</b>
57
	 *         extension.
58
	 * @see ICommonContentProvider
59
	 * @see ITreeContentProvider
60
	 */
61
	ITreeContentProvider getContentProvider();
62

    
63
	/**
64
	 * The real underlying implementation may only support the
65
	 * {@link ILabelProvider} interface, but a simple delegate is used when this
66
	 * is the case to ensure that clients may anticpate an
67
	 * {@link ICommonLabelProvider} interface.
68
	 * 
69
	 * <p>Since 3.4, the returned label provider may also implement
70
	 * {@link org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider}
71
	 * to provide styled text labels. Note that the empty styled string signals
72
	 * that the label provider does not wish to render the label.
73
	 * </p>
74
	 * 
75
	 * @return The content provider defined by the <b>navigatorContent</b>
76
	 *         extension.
77
	 * @see ICommonLabelProvider
78
	 * @see ILabelProvider
79
	 */
80
	ICommonLabelProvider getLabelProvider(); 
81

    
82
	/**
83
	 * 
84
	 * @return True if any class has been instantiated by this extension.
85
	 */
86
	boolean isLoaded();
87

    
88
	/**
89
	 * 
90
	 * @return The state model associated with this content extension.
91
	 * @see IExtensionStateModel
92
	 */
93
	IExtensionStateModel getStateModel();
94

    
95
}
(28-28/49)