1 11 package org.eclipse.pde.internal.ui.model.plugin; 12 13 import org.eclipse.core.runtime.*; 14 import org.eclipse.pde.core.plugin.*; 15 16 public class PluginExtensionPointNode extends PluginObjectNode 17 implements 18 IPluginExtensionPoint { 19 20 private static final long serialVersionUID = 1L; 21 22 25 public String getFullId() { 26 String pluginID = getPluginBase().getId(); 27 return (pluginID != null) ? pluginID + "." + getId() : getId(); } 29 32 public String getSchema() { 33 return getXMLAttributeValue("schema"); } 35 38 public void setSchema(String schema) throws CoreException { 39 setXMLAttribute(P_SCHEMA, schema); 40 } 41 44 public String getId() { 45 return getXMLAttributeValue(P_ID); 46 } 47 50 public void setId(String id) throws CoreException { 51 setXMLAttribute(P_ID, id); 52 } 53 54 57 public void setName(String name) throws CoreException { 58 setXMLAttribute(P_NAME, name); 59 } 60 61 64 public String getName() { 65 return getXMLAttributeValue(P_NAME); 66 } 67 68 71 public String write(boolean indent) { 72 return indent ? getIndent() + writeShallow(true) : writeShallow(true); 73 } 74 75 78 public String writeShallow(boolean terminate) { 79 StringBuffer buffer = new StringBuffer ("<extension-point"); appendAttribute(buffer, P_ID); 81 appendAttribute(buffer, P_NAME); 82 appendAttribute(buffer, P_SCHEMA); 83 84 if (terminate) 85 buffer.append("/"); buffer.append(">"); return buffer.toString(); 88 } 89 90 91 } 92 | Popular Tags |