KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > ui > wizards > tools > ExtensionPointMappings


1 /*******************************************************************************
2  * Copyright (c) 2003, 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.pde.internal.ui.wizards.tools;
12
13 import java.util.HashMap JavaDoc;
14
15 public class ExtensionPointMappings {
16     
17     private static HashMap JavaDoc fMap = new HashMap JavaDoc();
18     
19     private static void initialize() {
20         fMap.put("org.eclipse.ui.markerImageProvider", "org.eclipse.ui.ide.markerImageProvider"); //$NON-NLS-1$ //$NON-NLS-2$
21
fMap.put("org.eclipse.ui.markerHelp", "org.eclipse.ui.ide.markerHelp"); //$NON-NLS-1$ //$NON-NLS-2$
22
fMap.put("org.eclipse.ui.markerImageProviders", "org.eclipse.ui.ide.markerImageProviders"); //$NON-NLS-1$ //$NON-NLS-2$
23
fMap.put("org.eclipse.ui.markerResolution", "org.eclipse.ui.ide.markerResolution"); //$NON-NLS-1$ //$NON-NLS-2$
24
fMap.put("org.eclipse.ui.projectNatureImages", "org.eclipse.ui.ide.projectNatureImages"); //$NON-NLS-1$ //$NON-NLS-2$
25
fMap.put("org.eclipse.ui.resourceFilters", "org.eclipse.ui.ide.resourceFilters"); //$NON-NLS-1$ //$NON-NLS-2$
26
fMap.put("org.eclipse.ui.markerUpdaters", "org.eclipse.ui.editors.markerUpdaters"); //$NON-NLS-1$ //$NON-NLS-2$
27
fMap.put("org.eclipse.ui.documentProviders", "org.eclipse.ui.editors.documentProviders"); //$NON-NLS-1$ //$NON-NLS-2$
28
fMap.put("org.eclipse.ui.workbench.texteditor.markerAnnotationSpecification", "org.eclipse.ui.editors.markerAnnotationSpecification"); //$NON-NLS-1$ //$NON-NLS-2$
29
fMap.put("org.eclipse.help.browser", "org.eclipse.help.base.browser"); //$NON-NLS-1$ //$NON-NLS-2$
30
fMap.put("org.eclipse.help.luceneAnalyzer", "org.eclipse.help.base.luceneAnalyzer"); //$NON-NLS-1$ //$NON-NLS-2$
31
fMap.put("org.eclipse.help.webapp", "org.eclipse.help.base.webapp"); //$NON-NLS-1$ //$NON-NLS-2$
32
fMap.put("org.eclipse.help.support", "org.eclipse.ui.helpSupport"); //$NON-NLS-1$ //$NON-NLS-2$
33
}
34     
35     public static boolean isDeprecated(String JavaDoc id) {
36         if (fMap.isEmpty())
37             initialize();
38         return fMap.containsKey(id);
39     }
40     
41     public static boolean hasMovedFromHelpToBase(String JavaDoc key) {
42         return key.equals("org.eclipse.help.browser") //$NON-NLS-1$
43
|| key.equals("org.eclipse.help.luceneAnalyzer") //$NON-NLS-1$
44
|| key.equals("org.eclipse.help.webapp"); //$NON-NLS-1$
45
}
46     
47     public static boolean hasMovedFromHelpToUI(String JavaDoc key) {
48         return key.equals("org.eclipse.help.support"); //$NON-NLS-1$
49
}
50     
51     public static String JavaDoc getNewId(String JavaDoc oldId) {
52         if (fMap.isEmpty())
53             initialize();
54         return fMap.containsKey(oldId) ? fMap.get(oldId).toString() : null;
55     }
56
57 }
58
Popular Tags