1 11 package org.eclipse.jdt.internal.debug.ui.threadgroups; 12 13 import com.ibm.icu.text.MessageFormat; 14 15 import org.eclipse.core.runtime.CoreException; 16 import org.eclipse.debug.internal.ui.viewers.provisional.AsynchronousLabelAdapter; 17 import org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext; 18 import org.eclipse.jdt.debug.core.IJavaThreadGroup; 19 import org.eclipse.jdt.internal.debug.ui.JavaDebugImages; 20 import org.eclipse.jface.resource.ImageDescriptor; 21 import org.eclipse.swt.graphics.FontData; 22 import org.eclipse.swt.graphics.RGB; 23 24 29 public class JavaThreadGroupLabelAdapter extends AsynchronousLabelAdapter { 30 31 private static ImageDescriptor[] image = new ImageDescriptor[]{JavaDebugImages.getImageDescriptor(JavaDebugImages.IMG_OBJS_THREAD_GROUP)}; 32 33 36 protected String [] getLabels(Object element, IPresentationContext context) throws CoreException { 37 if (element instanceof IJavaThreadGroup) { 38 IJavaThreadGroup group = (IJavaThreadGroup) element; 39 return new String []{MessageFormat.format(ThreadGroupMessages.AsyncThreadGroupLabelAdapter_0, new String []{group.getName()})}; 40 } 41 return new String []{""}; } 43 44 47 protected ImageDescriptor[] getImageDescriptors(Object element, IPresentationContext context) throws CoreException { 48 return image; 49 } 50 51 54 protected FontData[] getFontDatas(Object element, IPresentationContext context) throws CoreException { 55 return null; 56 } 57 58 61 protected RGB[] getForegrounds(Object element, IPresentationContext context) throws CoreException { 62 return null; 63 } 64 65 68 protected RGB[] getBackgrounds(Object element, IPresentationContext context) throws CoreException { 69 return null; 70 } 71 72 } 73 | Popular Tags |