KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ltk > internal > ui > refactoring > ChangePreviewViewerDescriptor


1 /*******************************************************************************
2  * Copyright (c) 2000, 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.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 JavaDoc EXT_ID= "changePreviewViewers"; //$NON-NLS-1$
21

22     private static DescriptorManager fgDescriptions= new DescriptorManager(EXT_ID, "change") { //$NON-NLS-1$
23
protected AbstractDescriptor createDescriptor(IConfigurationElement element) {
24             return new ChangePreviewViewerDescriptor(element);
25         }
26     };
27     
28     public static ChangePreviewViewerDescriptor get(Object JavaDoc 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