KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > debug > ui > jres > ExecutionEnvironmentsLabelProvider


1 /*******************************************************************************
2  * Copyright (c) 2005 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.jdt.internal.debug.ui.jres;
12
13 import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
14 import org.eclipse.jdt.ui.ISharedImages;
15 import org.eclipse.jdt.ui.JavaUI;
16 import org.eclipse.jface.viewers.LabelProvider;
17 import org.eclipse.swt.graphics.Image;
18
19 /**
20  * Label provider for JREs.
21  * @since 3.2
22  */

23 public class ExecutionEnvironmentsLabelProvider extends LabelProvider {
24     
25     /**
26      * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
27      */

28     public Image getImage(Object JavaDoc element) {
29         return JavaUI.getSharedImages().getImage(ISharedImages.IMG_OBJS_LIBRARY);
30     }
31
32     /**
33      * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
34      */

35     public String JavaDoc getText(Object JavaDoc element) {
36         return ((IExecutionEnvironment)element).getId();
37     }
38 }
39
Popular Tags