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 SynchronizeParticipantRegistry extends RegistryReader { 21 22 public static final String PT_SYNCPARTICIPANTS = "synchronizeParticipants"; private static final String TAG_SYNCPARTICIPANT = "participant"; private Map participants = new HashMap (); 25 26 public SynchronizeParticipantRegistry() { 27 super(); 28 } 29 30 33 protected boolean readElement(IConfigurationElement element) { 34 if (element.getName().equals(TAG_SYNCPARTICIPANT)) { 35 String descText = getDescription(element); 36 SynchronizeParticipantDescriptor desc; 37 try { 38 desc = new SynchronizeParticipantDescriptor(element, descText); 39 participants.put(desc.getId(), desc); 40 } catch (CoreException e) { 41 TeamUIPlugin.log(e); 42 } 43 return true; 44 } 45 return false; 46 } 47 48 public SynchronizeParticipantDescriptor find(String id) { 49 return (SynchronizeParticipantDescriptor)participants.get(id); 50 } 51 } 52 | Popular Tags |