1 11 package org.eclipse.ltk.internal.ui.refactoring; 12 13 import org.eclipse.core.runtime.CoreException; 14 import org.eclipse.core.runtime.IConfigurationElement; 15 16 import org.eclipse.ltk.ui.refactoring.IStatusContextViewer; 17 18 public class StatusContextViewerDescriptor extends AbstractDescriptor { 19 20 private static final String EXT_ID= "statusContextViewers"; 22 private static DescriptorManager fgDescriptions= new DescriptorManager(EXT_ID, "context") { protected AbstractDescriptor createDescriptor(IConfigurationElement element) { 24 return new StatusContextViewerDescriptor(element); 25 } 26 }; 27 28 public static StatusContextViewerDescriptor get(Object element) throws CoreException { 29 return (StatusContextViewerDescriptor)fgDescriptions.getDescriptor(element); 30 } 31 32 public StatusContextViewerDescriptor(IConfigurationElement element) { 33 super(element); 34 } 35 36 public IStatusContextViewer createViewer() throws CoreException { 37 return (IStatusContextViewer)fConfigurationElement.createExecutableExtension(CLASS); 38 } 39 } 40 | Popular Tags |