1 11 12 package org.eclipse.ui.internal.intro.impl.model; 13 14 import java.util.HashMap ; 15 import java.util.Map ; 16 17 22 23 public class ExtensionMap { 24 25 private static ExtensionMap instance; 26 private static String startPage; 27 private Map extensions = new HashMap (); 28 29 private ExtensionMap() { 30 31 } 32 33 37 static public ExtensionMap getInstance() { 38 if (instance == null) { 39 instance = new ExtensionMap(); 40 } 41 return instance; 42 } 43 44 49 public void putPluginId(String anchorId, String pluginId) { 50 if (anchorId != null) { 51 extensions.put(anchorId, pluginId); 52 } 53 } 54 55 60 public String getPluginId(String anchorId) { 61 return (String )extensions.get(anchorId); 62 } 63 64 67 public void clear() { 68 extensions = new HashMap (); 69 startPage = null; 70 } 71 72 76 public String getStartPage() { 77 return startPage; 78 } 79 80 85 public void setStartPage(String contentPage) { 86 startPage = contentPage; 87 } 88 89 } 90 | Popular Tags |