KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > model > elements > RegisterGroupLabelProvider


1 /*******************************************************************************
2  * Copyright (c) 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.debug.internal.ui.model.elements;
12
13 import org.eclipse.core.runtime.CoreException;
14 import org.eclipse.debug.internal.ui.elements.adapters.VariableColumnPresentation;
15 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
16 import org.eclipse.jface.resource.ImageDescriptor;
17 import org.eclipse.jface.viewers.TreePath;
18
19 /**
20  * @since 3.3
21  */

22 public class RegisterGroupLabelProvider extends DebugElementLabelProvider {
23
24     /* (non-Javadoc)
25      * @see org.eclipse.debug.internal.ui.model.elements.DebugElementLabelProvider#getImageDescriptor(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String)
26      */

27     protected ImageDescriptor getImageDescriptor(TreePath elementPath, IPresentationContext presentationContext, String JavaDoc columnId) throws CoreException {
28         if (columnId == null || VariableColumnPresentation.COLUMN_VARIABLE_NAME.equals(columnId)) {
29             return super.getImageDescriptor(elementPath, presentationContext, columnId);
30         }
31         return null;
32     }
33
34     /* (non-Javadoc)
35      * @see org.eclipse.debug.internal.ui.model.elements.DebugElementLabelProvider#getLabel(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String)
36      */

37     protected String JavaDoc getLabel(TreePath elementPath, IPresentationContext context, String JavaDoc columnId) throws CoreException {
38         if (columnId == null || VariableColumnPresentation.COLUMN_VARIABLE_NAME.equals(columnId)) {
39             return super.getLabel(elementPath, context, columnId);
40         } else {
41             return ""; //$NON-NLS-1$
42
}
43     }
44     
45 }
46
Popular Tags