KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > navigator > resources > workbench > ResourceExtensionLabelProvider


1 /*******************************************************************************
2  * Copyright (c) 2003, 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.internal.navigator.resources.workbench;
12
13 import org.eclipse.core.resources.IResource;
14 import org.eclipse.ui.IMemento;
15 import org.eclipse.ui.model.WorkbenchLabelProvider;
16 import org.eclipse.ui.navigator.ICommonContentExtensionSite;
17 import org.eclipse.ui.navigator.ICommonLabelProvider;
18
19 /**
20  * <p>
21  * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
22  * part of a work in progress. There is a guarantee neither that this API will
23  * work nor that it will remain the same. Please do not use this API without
24  * consulting with the Platform/UI team.
25  * </p>
26  * @since 3.2
27  */

28 public class ResourceExtensionLabelProvider extends WorkbenchLabelProvider implements ICommonLabelProvider {
29  
30  
31     public void init(ICommonContentExtensionSite aConfig) {
32         //init
33
}
34
35  
36     public String JavaDoc getDescription(Object JavaDoc anElement) {
37
38         if (anElement instanceof IResource) {
39             return ((IResource) anElement).getFullPath().makeRelative().toString();
40         }
41         return null;
42     }
43
44     public void restoreState(IMemento aMemento) {
45         
46     }
47
48     public void saveState(IMemento aMemento) {
49     }
50 }
51
Popular Tags