1 11 12 package org.eclipse.ui.internal.intro.impl.model.loader; 13 14 import org.eclipse.ui.internal.intro.impl.model.ExtensionMap; 15 import org.eclipse.ui.internal.intro.impl.model.IntroModelRoot; 16 import org.eclipse.ui.internal.intro.impl.util.Log; 17 18 25 26 public class ExtensionPointManager extends BaseExtensionPointManager { 27 28 private static ExtensionPointManager inst = new ExtensionPointManager(); 30 31 private IntroModelRoot currentModel; 37 38 private String introId; 42 43 46 private ExtensionPointManager() { 47 super(); 48 } 49 50 53 public static ExtensionPointManager getInst() { 54 return inst; 55 } 56 57 60 private void loadCurrentModel() { 61 currentModel = loadModel(ATT_CONFIG_INTRO_ID, this.introId); 62 } 63 64 68 public IntroModelRoot getCurrentModel() { 69 if (currentModel == null) 70 loadCurrentModel(); 74 return currentModel; 75 } 76 77 83 public IntroModelRoot getModel(String configId) { 84 IntroModelRoot model = getCachedModel(configId); 85 if (model == null) { 86 model = loadModel(ATT_ID, configId); 90 } 91 return model; 92 } 93 94 98 public void setIntroId(String introId) { 99 this.introId = introId; 100 this.currentModel = null; 103 } 104 105 public void clear() { 106 currentModel = null; 107 sharedConfigExtensionsManager = null; 108 introModels.clear(); 109 ExtensionMap.getInstance().clear(); 110 if (Log.logInfo) 111 Log.info("Cleared Intro model"); } 113 114 115 } 116 | Popular Tags |