KickJava   Java API By Example, From Geeks To Geeks.

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


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.IStatusContextViewer;
17
18 public class StatusContextViewerDescriptor extends AbstractDescriptor {
19     
20     private static final String JavaDoc EXT_ID= "statusContextViewers"; //$NON-NLS-1$
21

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