1 11 package org.eclipse.pde.internal.runtime.registry; 12 13 import java.util.Vector ; 14 15 import org.eclipse.core.runtime.IExtensionPoint; 16 import org.eclipse.pde.internal.runtime.PDERuntimeMessages; 17 import org.eclipse.ui.views.properties.*; 18 19 public class ExtensionPointPropertySource extends RegistryPropertySource { 20 private IExtensionPoint extensionPoint; 21 public static final String P_NAME = "name"; public static final String P_ID = "id"; 24 public ExtensionPointPropertySource(IExtensionPoint extensionPoint) { 25 this.extensionPoint = extensionPoint; 26 } 27 public IPropertyDescriptor[] getPropertyDescriptors() { 28 Vector result = new Vector (); 29 30 result.addElement(new PropertyDescriptor(P_NAME, PDERuntimeMessages.RegistryView_extensionPointPR_name)); 31 result.addElement(new PropertyDescriptor(P_ID, PDERuntimeMessages.RegistryView_extensionPointPR_id)); 32 return toDescriptorArray(result); 33 } 34 public Object getPropertyValue(Object name) { 35 if (name.equals(P_NAME)) 36 return extensionPoint.getLabel(); 37 if (name.equals(P_ID)) 38 return extensionPoint.getUniqueIdentifier(); 39 return null; 40 } 41 } 42 | Popular Tags |