KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > ui > DebugElementWorkbenchAdapter


1 /*******************************************************************************
2  * Copyright (c) 2000, 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.debug.ui;
12
13 import org.eclipse.debug.internal.ui.views.launch.DebugElementHelper;
14 import org.eclipse.jface.resource.ImageDescriptor;
15 import org.eclipse.swt.graphics.FontData;
16 import org.eclipse.swt.graphics.RGB;
17 import org.eclipse.ui.model.IWorkbenchAdapter;
18 import org.eclipse.ui.model.IWorkbenchAdapter2;
19
20 /**
21  * Common function for debug element workbench adapters.
22  * <p>
23  * Clients may subclass this class to provide custom adapters for elements in a debug
24  * model. The debug platform provides <code>IWorkbenchAdapters</code> for the standard debug
25  * elements. Clients may override the default content in the debug view by providing an
26  * <code>IWorkbenchAdapter</code> or <code>IDeferredWorkbenchAdapter</code> for a debug
27  * element.
28  * </p>
29  * @since 3.1
30  */

31 public abstract class DebugElementWorkbenchAdapter implements IWorkbenchAdapter, IWorkbenchAdapter2 {
32     
33     /* (non-Javadoc)
34      * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
35      */

36     public ImageDescriptor getImageDescriptor(Object JavaDoc object) {
37         return DebugElementHelper.getImageDescriptor(object);
38     }
39
40     /* (non-Javadoc)
41      * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
42      */

43     public String JavaDoc getLabel(Object JavaDoc o) {
44         return DebugElementHelper.getLabel(o);
45     }
46
47     /* (non-Javadoc)
48      * @see org.eclipse.ui.model.IWorkbenchAdapter2#getForeground(java.lang.Object)
49      */

50     public RGB getForeground(Object JavaDoc element) {
51         return DebugElementHelper.getForeground(element);
52     }
53
54     /* (non-Javadoc)
55      * @see org.eclipse.ui.model.IWorkbenchAdapter2#getBackground(java.lang.Object)
56      */

57     public RGB getBackground(Object JavaDoc element) {
58         return DebugElementHelper.getBackground(element);
59     }
60
61     /* (non-Javadoc)
62      * @see org.eclipse.ui.model.IWorkbenchAdapter2#getFont(java.lang.Object)
63      */

64     public FontData getFont(Object JavaDoc element) {
65         return DebugElementHelper.getFont(element);
66     }
67
68 }
69
Popular Tags