
| Key: |
XMLBEANS-289
|
| Type: |
Improvement
|
| Status: |
Open
|
| Priority: |
Trivial
|
| Assignee: |
Unassigned
|
| Reporter: |
mirko quarg
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
|
File Attachments:
|
| |
Size |
|
patch.txt |
2006-09-20 06:13 PM |
mirko quarg |
3 kB |
|
|
|
i did a change the diff as follows
Index: D:/development/workspaces/ivm/xmlbeans/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeCodePrinter.java
===================================================================
--- D:/development/workspaces/ivm/xmlbeans/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeCodePrinter.java (revision 448257)
+++ D:/development/workspaces/ivm/xmlbeans/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeCodePrinter.java (working copy)
@@ -15,32 +15,29 @@
package org.apache.xmlbeans.impl.schema;
+import java.io.IOException;
import java.io.Writer;
-import java.io.IOException;
import java.nio.charset.CharacterCodingException;
import java.nio.charset.Charset;
import java.nio.charset.CharsetEncoder;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Map;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Iterator;
+import java.util.Map;
import javax.xml.namespace.QName;
-import org.apache.xmlbeans.impl.common.NameUtil;
+
+import org.apache.xmlbeans.InterfaceExtension;
import org.apache.xmlbeans.PrePostExtension;
-import org.apache.xmlbeans.InterfaceExtension;
+import org.apache.xmlbeans.SchemaCodePrinter;
+import org.apache.xmlbeans.SchemaProperty;
+import org.apache.xmlbeans.SchemaStringEnumEntry;
import org.apache.xmlbeans.SchemaType;
import org.apache.xmlbeans.SchemaTypeSystem;
-import org.apache.xmlbeans.SchemaProperty;
-import org.apache.xmlbeans.SchemaStringEnumEntry;
import org.apache.xmlbeans.SystemProperties;
import org.apache.xmlbeans.XmlObject;
import org.apache.xmlbeans.XmlOptions;
-import org.apache.xmlbeans.SchemaCodePrinter;
+import org.apache.xmlbeans.impl.common.NameUtil;
/**
* Prints the java code for a single schema type
@@ -929,16 +926,19 @@
emit("new Enum[]");
emit("{");
indent();
+ StringBuffer _buff = new StringBuffer();
for (int i = 0; i < entries.length; i++)
{
String enumValue = entries[i].getString();
String constName = "INT_" + entries[i].getEnumName();
emit("new Enum(\"" + javaStringEscape(enumValue) + "\", " + constName + "),");
+ _buff.append(enumValue).append("\",\"");
}
outdent();
emit("}");
outdent();
emit(");");
+ emit("public static final String[] VALUES = new String[] {\"" + _buff.toString().substring(0,_buff.length()-2) + "};");
emit("private static final long serialVersionUID = 1L;");
emit("private java.lang.Object readResolve() { return forInt(intValue()); } ");
outdent();
|
|
Description
|
i did a change the diff as follows
Index: D:/development/workspaces/ivm/xmlbeans/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeCodePrinter.java
===================================================================
--- D:/development/workspaces/ivm/xmlbeans/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeCodePrinter.java (revision 448257)
+++ D:/development/workspaces/ivm/xmlbeans/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeCodePrinter.java (working copy)
@@ -15,32 +15,29 @@
package org.apache.xmlbeans.impl.schema;
+import java.io.IOException;
import java.io.Writer;
-import java.io.IOException;
import java.nio.charset.CharacterCodingException;
import java.nio.charset.Charset;
import java.nio.charset.CharsetEncoder;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Map;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Iterator;
+import java.util.Map;
import javax.xml.namespace.QName;
-import org.apache.xmlbeans.impl.common.NameUtil;
+
+import org.apache.xmlbeans.InterfaceExtension;
import org.apache.xmlbeans.PrePostExtension;
-import org.apache.xmlbeans.InterfaceExtension;
+import org.apache.xmlbeans.SchemaCodePrinter;
+import org.apache.xmlbeans.SchemaProperty;
+import org.apache.xmlbeans.SchemaStringEnumEntry;
import org.apache.xmlbeans.SchemaType;
import org.apache.xmlbeans.SchemaTypeSystem;
-import org.apache.xmlbeans.SchemaProperty;
-import org.apache.xmlbeans.SchemaStringEnumEntry;
import org.apache.xmlbeans.SystemProperties;
import org.apache.xmlbeans.XmlObject;
import org.apache.xmlbeans.XmlOptions;
-import org.apache.xmlbeans.SchemaCodePrinter;
+import org.apache.xmlbeans.impl.common.NameUtil;
/**
* Prints the java code for a single schema type
@@ -929,16 +926,19 @@
emit("new Enum[]");
emit("{");
indent();
+ StringBuffer _buff = new StringBuffer();
for (int i = 0; i < entries.length; i++)
{
String enumValue = entries[i].getString();
String constName = "INT_" + entries[i].getEnumName();
emit("new Enum(\"" + javaStringEscape(enumValue) + "\", " + constName + "),");
+ _buff.append(enumValue).append("\",\"");
}
outdent();
emit("}");
outdent();
emit(");");
+ emit("public static final String[] VALUES = new String[] {\"" + _buff.toString().substring(0,_buff.length()-2) + "};");
emit("private static final long serialVersionUID = 1L;");
emit("private java.lang.Object readResolve() { return forInt(intValue()); } ");
outdent(); |
Show » |
made changes - 20/Sep/06 06:12 PM
| Field |
Original Value |
New Value |
|
Priority
|
Major
[ 3
]
|
Trivial
[ 5
]
|
made changes - 20/Sep/06 06:13 PM
|
Attachment
|
|
patch.txt
[ 12341229
]
|
|