1 11 package org.eclipse.pde.internal.core.schema; 12 13 import java.io.PrintWriter ; 14 15 import org.eclipse.pde.internal.core.ischema.ISchemaEnumeration; 16 import org.eclipse.pde.internal.core.ischema.ISchemaObject; 17 18 public class SchemaEnumeration extends SchemaObject implements ISchemaEnumeration { 19 20 private static final long serialVersionUID = 1L; 21 22 public SchemaEnumeration(ISchemaObject parent, String name) { 23 super(parent, name); 24 } 25 26 public void write(String indent, PrintWriter writer) { 27 writer.println(indent + "<enumeration value=\"" + getName() + "\">"); String description = getDescription(); 29 if (description != null) 30 description.trim(); 31 if (description != null && description.length() > 0) { 32 String indent2 = indent + Schema.INDENT; 33 String indent3 = indent2 + Schema.INDENT; 34 writer.println(indent2 + "<annotation>"); writer.println(indent3 + "<documentation>"); writer.println(indent3 + description); 37 writer.println(indent3 + "</documentation>"); writer.println(indent2 + "</annotation>"); } 40 writer.println(indent + "</enumeration>"); } 42 } 43 | Popular Tags |