1 /******************************************************************************* 2 * Copyright (c) 2005, 2006 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}. 21 * 22 * <p> 23 * There is one {@link INavigatorContentExtension} for each content service. 24 * There is only one {@link INavigatorContentDescriptor} for each extension. 25 * </p> 26 * 27 * 28 *<p> 29 * This interface is not intended to be implemented by clients. 30 *</p> 31 * @since 3.2 32 * 33 */ 34 public interface INavigatorContentExtension extends IAdaptable { 35 36 /** 37 * 38 * @return The id attribute of the navigatorContent extension. 39 */ 40 String getId(); 41 42 /** 43 * There is one descriptor for all instances of a 44 * INavigatorContentExtension. 45 * 46 * 47 * @return A handle to the descriptor used to manage this extension. 48 */ 49 INavigatorContentDescriptor getDescriptor(); 50 51 /** 52 * Clients may choose to implement {@link ICommonContentProvider}, but are 53 * only required to supply an implementation of {@link ITreeContentProvider}. 54 * 55 * @return The content provider defined by the <b>navigatorContent</b> 56 * extension. 57 * @see ICommonContentProvider 58 * @see ITreeContentProvider 59 */ 60 ITreeContentProvider getContentProvider(); 61 62 /** 63 * The real underlying implementation may only support the 64 * {@link ILabelProvider} interface, but a simple delegate is used when this 65 * is the case to ensure that clients may anticpate an 66 * {@link ICommonLabelProvider} interface. 67 * 68 * @return The content provider defined by the <b>navigatorContent</b> 69 * extension. 70 * @see ICommonLabelProvider 71 * @see ILabelProvider 72 */ 73 ICommonLabelProvider getLabelProvider(); 74 75 /** 76 * 77 * @return True if any class has been instantiated by this extension. 78 */ 79 boolean isLoaded(); 80 81 /** 82 * 83 * @return The state model associated with this content extension. 84 * @see IExtensionStateModel 85 */ 86 IExtensionStateModel getStateModel(); 87 88 }