1 11 package org.eclipse.team.internal.ui.registry; 12 13 import java.util.HashMap ; 14 import java.util.Map ; 15 16 import org.eclipse.core.runtime.CoreException; 17 import org.eclipse.core.runtime.IConfigurationElement; 18 import org.eclipse.team.internal.ui.TeamUIPlugin; 19 20 public class SynchronizeWizardRegistry extends RegistryReader { 21 22 public static final String PT_SYNCHRONIZE_WIZARDS = "synchronizeWizards"; private static final String TAG_SYNCHRONIZE_WIZARD = "wizard"; private Map wizards = new HashMap (); 25 26 29 protected boolean readElement(IConfigurationElement element) { 30 if (element.getName().equals(TAG_SYNCHRONIZE_WIZARD)) { 31 String descText = getDescription(element); 32 SynchronizeWizardDescription desc; 33 try { 34 desc = new SynchronizeWizardDescription(element, descText); 35 wizards.put(desc.getId(), desc); 36 } catch (CoreException e) { 37 TeamUIPlugin.log(e); 38 } 39 return true; 40 } 41 return false; 42 } 43 44 public SynchronizeWizardDescription[] getSynchronizeWizards() { 45 return (SynchronizeWizardDescription[])wizards.values().toArray(new SynchronizeWizardDescription[wizards.size()]); 46 } 47 48 } 49 | Popular Tags |