1 11 package org.eclipse.jdt.internal.debug.ui.threadgroups; 12 13 import org.eclipse.core.runtime.CoreException; 14 import org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider; 15 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext; 16 import org.eclipse.jdt.debug.core.IJavaThreadGroup; 17 import org.eclipse.jdt.internal.debug.ui.JavaDebugImages; 18 import org.eclipse.jface.resource.ImageDescriptor; 19 import org.eclipse.jface.viewers.TreePath; 20 21 import com.ibm.icu.text.MessageFormat; 22 23 26 public class JavaThreadGroupLabelProvider extends ElementLabelProvider { 27 28 private static ImageDescriptor fgImage = JavaDebugImages.getImageDescriptor(JavaDebugImages.IMG_OBJS_THREAD_GROUP); 29 30 33 protected String getLabel(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException { 34 IJavaThreadGroup group = (IJavaThreadGroup) elementPath.getLastSegment(); 35 return MessageFormat.format(ThreadGroupMessages.AsyncThreadGroupLabelAdapter_0, new String []{group.getName()}); 36 } 37 38 41 protected ImageDescriptor getImageDescriptor(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException { 42 return fgImage; 43 } 44 45 } 46 | Popular Tags |