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.IChangePreviewViewer; 17 18 public class ChangePreviewViewerDescriptor extends AbstractDescriptor { 19 20 private static final String EXT_ID= "changePreviewViewers"; 22 private static DescriptorManager fgDescriptions= new DescriptorManager(EXT_ID, "change") { protected AbstractDescriptor createDescriptor(IConfigurationElement element) { 24 return new ChangePreviewViewerDescriptor(element); 25 } 26 }; 27 28 public static ChangePreviewViewerDescriptor get(Object element) throws CoreException { 29 return (ChangePreviewViewerDescriptor)fgDescriptions.getDescriptor(element); 30 } 31 32 public ChangePreviewViewerDescriptor(IConfigurationElement element) { 33 super(element); 34 } 35 36 public IChangePreviewViewer createViewer() throws CoreException { 37 return (IChangePreviewViewer)fConfigurationElement.createExecutableExtension(CLASS); 38 } 39 } 40 | Popular Tags |