01: /*******************************************************************************
02: * Copyright (c) 2003, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.ui.wizards.tools;
11:
12: import java.util.HashMap;
13:
14: public class ExtensionPointMappings {
15:
16: private static HashMap fMap = new HashMap();
17:
18: private static void initialize() {
19: fMap
20: .put(
21: "org.eclipse.ui.markerImageProvider", "org.eclipse.ui.ide.markerImageProvider"); //$NON-NLS-1$ //$NON-NLS-2$
22: fMap
23: .put(
24: "org.eclipse.ui.markerHelp", "org.eclipse.ui.ide.markerHelp"); //$NON-NLS-1$ //$NON-NLS-2$
25: fMap
26: .put(
27: "org.eclipse.ui.markerImageProviders", "org.eclipse.ui.ide.markerImageProviders"); //$NON-NLS-1$ //$NON-NLS-2$
28: fMap
29: .put(
30: "org.eclipse.ui.markerResolution", "org.eclipse.ui.ide.markerResolution"); //$NON-NLS-1$ //$NON-NLS-2$
31: fMap
32: .put(
33: "org.eclipse.ui.projectNatureImages", "org.eclipse.ui.ide.projectNatureImages"); //$NON-NLS-1$ //$NON-NLS-2$
34: fMap
35: .put(
36: "org.eclipse.ui.resourceFilters", "org.eclipse.ui.ide.resourceFilters"); //$NON-NLS-1$ //$NON-NLS-2$
37: fMap
38: .put(
39: "org.eclipse.ui.markerUpdaters", "org.eclipse.ui.editors.markerUpdaters"); //$NON-NLS-1$ //$NON-NLS-2$
40: fMap
41: .put(
42: "org.eclipse.ui.documentProviders", "org.eclipse.ui.editors.documentProviders"); //$NON-NLS-1$ //$NON-NLS-2$
43: fMap
44: .put(
45: "org.eclipse.ui.workbench.texteditor.markerAnnotationSpecification", "org.eclipse.ui.editors.markerAnnotationSpecification"); //$NON-NLS-1$ //$NON-NLS-2$
46: fMap
47: .put(
48: "org.eclipse.help.browser", "org.eclipse.help.base.browser"); //$NON-NLS-1$ //$NON-NLS-2$
49: fMap
50: .put(
51: "org.eclipse.help.luceneAnalyzer", "org.eclipse.help.base.luceneAnalyzer"); //$NON-NLS-1$ //$NON-NLS-2$
52: fMap
53: .put(
54: "org.eclipse.help.webapp", "org.eclipse.help.base.webapp"); //$NON-NLS-1$ //$NON-NLS-2$
55: fMap
56: .put(
57: "org.eclipse.help.support", "org.eclipse.ui.helpSupport"); //$NON-NLS-1$ //$NON-NLS-2$
58: }
59:
60: public static boolean isDeprecated(String id) {
61: if (fMap.isEmpty())
62: initialize();
63: return fMap.containsKey(id);
64: }
65:
66: public static boolean hasMovedFromHelpToBase(String key) {
67: return key.equals("org.eclipse.help.browser") //$NON-NLS-1$
68: || key.equals("org.eclipse.help.luceneAnalyzer") //$NON-NLS-1$
69: || key.equals("org.eclipse.help.webapp"); //$NON-NLS-1$
70: }
71:
72: public static boolean hasMovedFromHelpToUI(String key) {
73: return key.equals("org.eclipse.help.support"); //$NON-NLS-1$
74: }
75:
76: public static String getNewId(String oldId) {
77: if (fMap.isEmpty())
78: initialize();
79: return fMap.containsKey(oldId) ? fMap.get(oldId).toString()
80: : null;
81: }
82:
83: }
|