Index: /home/ekuns/workspace/castor-4/codegen/src/main/java/org/exolab/castor/builder/SourceGenerator.java
===================================================================
--- /home/ekuns/workspace/castor-4/codegen/src/main/java/org/exolab/castor/builder/SourceGenerator.java	(revision 6766)
+++ /home/ekuns/workspace/castor-4/codegen/src/main/java/org/exolab/castor/builder/SourceGenerator.java	(working copy)
@@ -676,7 +676,7 @@
     private void generateAllClassFiles(final Schema schema, final SGStateInfo sInfo)
                                                                  throws IOException {
         // Before processing the current schema, process its imported schemas
-        if (!_suppressNonFatalWarnings || _generateImported) {
+        if (_generateImported) {
             processImportedSchemas(schema, sInfo);
         }
 
Index: /home/ekuns/workspace/castor-4/src/doc/release-notes.xml
===================================================================
--- /home/ekuns/workspace/castor-4/src/doc/release-notes.xml	(revision 6766)
+++ /home/ekuns/workspace/castor-4/src/doc/release-notes.xml	(working copy)
@@ -61,12 +61,46 @@
                 a JDBC 4.0 compatible connector with this new JDK.
               </p>
 
+              <h3>Codegen</h3>
+
+              <p>
+                If you are using the Castor code generator to generate code
+                from schemas that use <tt>xsd:import<tt>, whether or not code
+                was generated from the imported schemas was controlled by a
+                combination of switches.  Now it is controlled only by the
+                "-generateImportedSchemas" option of SourceGeneratorMain, the
+                Ant task option of the same name, or if you are calling codegen
+                programmatically, the method
+                <tt>sgen.setGenerateImportedSchemas(true);</tt>.
+              </p>
+
             </summary>
             <bugs>
+                <bug id="1851" tool="jira">
+                    <description>
+                        Add to CTF the ability to control whether or not
+                        code is generated from imported schema
+                    </description>
+                    <contributor>
+                        <name>Edward Kuns</name>
+                        <email>edward.kuns@aspect.com</email>
+                    </contributor>
+                    <submitter>
+                        <name>Edward Kuns</name>
+                        <email>edward.kuns@aspect.com</email>
+                    </submitter>
+                    <reporter>
+                        <name>Edward Kuns</name>
+                        <email>edward.kuns@aspect.com</email>
+                    </reporter>
+                    <type>Enh.</type>
+                    <module>CTF</module>
+                    <date>20070118</date>
+                </bug>
                 <bug id="1839" tool="jira">
                     <description>
-					       Re-generated classes for binding files, in preparation for adding support for
-					       new &lt;componentBinding&gt;
+                           Re-generated classes for binding files, in preparation for adding support for
+                           new &lt;componentBinding&gt;
                     </description>
                     <contributor>
                         <name>Werner Guttmann</name>
Index: /home/ekuns/workspace/castor-4/src/etc/CHANGELOG
===================================================================
--- /home/ekuns/workspace/castor-4/src/etc/CHANGELOG	(revision 6766)
+++ /home/ekuns/workspace/castor-4/src/etc/CHANGELOG	(working copy)
@@ -1,6 +1,11 @@
 SVN
 -------------------------------
 
+XML:   Resolved issue CASTOR-1851 using contribution from Edward Kuns [edward.kuns@aspect.com]
+       Add to CTF ability to control whether imported schemas are generated or not
+       Details: http://jira.codehaus.org/browse/CASTOR-1851
+       (Edward - 20070118)
+
 Gen:   Resolved issue CASTOR-1843 using contribution from Werner Guttmann [werner.guttmann@gmx.net]
        Re-generated classes for binding files, in preparation for adding support for
        new <componentBinding>
Index: /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/.castor.cdr
===================================================================
--- /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/.castor.cdr	(revision 6766)
+++ /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/.castor.cdr	(working copy)
@@ -1,4 +1,4 @@
-#Sat Jan 13 17:51:42 CST 2007
+#Thu Jan 18 00:10:42 CST 2007
 org.exolab.castor.tests.framework.testDescriptor.FailureType=org.exolab.castor.tests.framework.testDescriptor.descriptors.FailureTypeDescriptor
 org.exolab.castor.tests.framework.testDescriptor.Unmarshal=org.exolab.castor.tests.framework.testDescriptor.descriptors.UnmarshalDescriptor
 org.exolab.castor.tests.framework.testDescriptor.CustomTestType=org.exolab.castor.tests.framework.testDescriptor.descriptors.CustomTestTypeDescriptor
@@ -16,8 +16,8 @@
 org.exolab.castor.tests.framework.testDescriptor.TestDescriptorChoice=org.exolab.castor.tests.framework.testDescriptor.descriptors.TestDescriptorChoiceDescriptor
 org.exolab.castor.tests.framework.testDescriptor.OnlySourceGenerationTest=org.exolab.castor.tests.framework.testDescriptor.descriptors.OnlySourceGenerationTestDescriptor
 org.exolab.castor.tests.framework.testDescriptor.SourceGeneratorTest=org.exolab.castor.tests.framework.testDescriptor.descriptors.SourceGeneratorTestDescriptor
+org.exolab.castor.tests.framework.testDescriptor.Marshal=org.exolab.castor.tests.framework.testDescriptor.descriptors.MarshalDescriptor
 org.exolab.castor.tests.framework.testDescriptor.CustomTest=org.exolab.castor.tests.framework.testDescriptor.descriptors.CustomTestDescriptor
-org.exolab.castor.tests.framework.testDescriptor.Marshal=org.exolab.castor.tests.framework.testDescriptor.descriptors.MarshalDescriptor
 org.exolab.castor.tests.framework.testDescriptor.BugFix=org.exolab.castor.tests.framework.testDescriptor.descriptors.BugFixDescriptor
 org.exolab.castor.tests.framework.testDescriptor.ConfigurationType=org.exolab.castor.tests.framework.testDescriptor.descriptors.ConfigurationTypeDescriptor
 org.exolab.castor.tests.framework.testDescriptor.Listener=org.exolab.castor.tests.framework.testDescriptor.descriptors.ListenerDescriptor
Index: /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/BugFix.java
===================================================================
--- /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/BugFix.java	(revision 6766)
+++ /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/BugFix.java	(working copy)
@@ -251,7 +251,7 @@
      */
     public java.lang.String removeCommentAt(
             final int index) {
-        Object obj = this._commentList.remove(index);
+        java.lang.Object obj = this._commentList.remove(index);
         return (java.lang.String) obj;
     }
 
Index: /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/CallMethod.java
===================================================================
--- /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/CallMethod.java	(revision 6766)
+++ /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/CallMethod.java	(working copy)
@@ -223,7 +223,7 @@
      */
     public org.exolab.castor.tests.framework.testDescriptor.Value removeValueAt(
             final int index) {
-        Object obj = this._valueList.remove(index);
+        java.lang.Object obj = this._valueList.remove(index);
         return (org.exolab.castor.tests.framework.testDescriptor.Value) obj;
     }
 
Index: /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/ConfigurationType.java
===================================================================
--- /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/ConfigurationType.java	(revision 6766)
+++ /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/ConfigurationType.java	(working copy)
@@ -212,7 +212,7 @@
      */
     public org.exolab.castor.tests.framework.testDescriptor.CallMethod removeCallMethodAt(
             final int index) {
-        Object obj = this._callMethodList.remove(index);
+        java.lang.Object obj = this._callMethodList.remove(index);
         return (org.exolab.castor.tests.framework.testDescriptor.CallMethod) obj;
     }
 
Index: /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/descriptors/UnitTestCaseDescriptor.java
===================================================================
--- /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/descriptors/UnitTestCaseDescriptor.java	(revision 6766)
+++ /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/descriptors/UnitTestCaseDescriptor.java	(working copy)
@@ -565,6 +565,48 @@
             typeValidator.setMaxInclusive((float) 3.4028235E38);
         }
         desc.setValidator(fieldValidator);
+        //-- _generateImported
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_generateImported", "GenerateImported", org.exolab.castor.xml.NodeType.Element);
+        handler = new org.exolab.castor.xml.XMLFieldHandler() {
+            public java.lang.Object getValue( java.lang.Object object ) 
+                throws IllegalStateException
+            {
+                UnitTestCase target = (UnitTestCase) object;
+                if (!target.hasGenerateImported()) { return null; }
+                return (target.getGenerateImported() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+            }
+            public void setValue( java.lang.Object object, java.lang.Object value) 
+                throws IllegalStateException, IllegalArgumentException
+            {
+                try {
+                    UnitTestCase target = (UnitTestCase) object;
+                    // if null, use delete method for optional primitives 
+                    if (value == null) {
+                        target.deleteGenerateImported();
+                        return;
+                    }
+                    target.setGenerateImported( ((java.lang.Boolean) value).booleanValue());
+                } catch (java.lang.Exception ex) {
+                    throw new IllegalStateException(ex.toString());
+                }
+            }
+            public java.lang.Object newInstance(java.lang.Object parent) {
+                return null;
+            }
+        };
+        desc.setHandler(handler);
+        desc.setNameSpaceURI("http://castor.exolab.org/Test");
+        desc.setMultivalued(false);
+        addFieldDescriptor(desc);
+        
+        //-- validation code for: _generateImported
+        fieldValidator = new org.exolab.castor.xml.FieldValidator();
+        { //-- local scope
+            org.exolab.castor.xml.validators.BooleanValidator typeValidator;
+            typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
+            fieldValidator.setValidator(typeValidator);
+        }
+        desc.setValidator(fieldValidator);
     }
 
 
Index: /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/MarshallingTest.java
===================================================================
--- /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/MarshallingTest.java	(revision 6766)
+++ /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/MarshallingTest.java	(working copy)
@@ -244,7 +244,7 @@
      */
     public org.exolab.castor.tests.framework.testDescriptor.UnitTestCase removeUnitTestCaseAt(
             final int index) {
-        Object obj = this._unitTestCaseList.remove(index);
+        java.lang.Object obj = this._unitTestCaseList.remove(index);
         return (org.exolab.castor.tests.framework.testDescriptor.UnitTestCase) obj;
     }
 
Index: /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/OnlySourceGenerationTest.java
===================================================================
--- /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/OnlySourceGenerationTest.java	(revision 6766)
+++ /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/OnlySourceGenerationTest.java	(working copy)
@@ -373,7 +373,7 @@
      */
     public java.lang.String removeSchemaAt(
             final int index) {
-        Object obj = this._schemaList.remove(index);
+        java.lang.Object obj = this._schemaList.remove(index);
         return (java.lang.String) obj;
     }
 
@@ -397,7 +397,7 @@
      */
     public org.exolab.castor.tests.framework.testDescriptor.UnitTestCase removeUnitTestCaseAt(
             final int index) {
-        Object obj = this._unitTestCaseList.remove(index);
+        java.lang.Object obj = this._unitTestCaseList.remove(index);
         return (org.exolab.castor.tests.framework.testDescriptor.UnitTestCase) obj;
     }
 
Index: /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/SchemaTest.java
===================================================================
--- /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/SchemaTest.java	(revision 6766)
+++ /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/SchemaTest.java	(working copy)
@@ -209,7 +209,7 @@
      */
     public org.exolab.castor.tests.framework.testDescriptor.UnitTestCase removeUnitTestCaseAt(
             final int index) {
-        Object obj = this._unitTestCaseList.remove(index);
+        java.lang.Object obj = this._unitTestCaseList.remove(index);
         return (org.exolab.castor.tests.framework.testDescriptor.UnitTestCase) obj;
     }
 
Index: /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/SourceGeneratorTest.java
===================================================================
--- /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/SourceGeneratorTest.java	(revision 6766)
+++ /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/SourceGeneratorTest.java	(working copy)
@@ -392,7 +392,7 @@
      */
     public java.lang.String removeSchemaAt(
             final int index) {
-        Object obj = this._schemaList.remove(index);
+        java.lang.Object obj = this._schemaList.remove(index);
         return (java.lang.String) obj;
     }
 
@@ -416,7 +416,7 @@
      */
     public org.exolab.castor.tests.framework.testDescriptor.UnitTestCase removeUnitTestCaseAt(
             final int index) {
-        Object obj = this._unitTestCaseList.remove(index);
+        java.lang.Object obj = this._unitTestCaseList.remove(index);
         return (org.exolab.castor.tests.framework.testDescriptor.UnitTestCase) obj;
     }
 
Index: /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/TestDescriptor.java
===================================================================
--- /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/TestDescriptor.java	(revision 6766)
+++ /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/TestDescriptor.java	(working copy)
@@ -333,7 +333,7 @@
      */
     public java.lang.String removeCommentAt(
             final int index) {
-        Object obj = this._commentList.remove(index);
+        java.lang.Object obj = this._commentList.remove(index);
         return (java.lang.String) obj;
     }
 
Index: /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/types/.castor.cdr
===================================================================
--- /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/types/.castor.cdr	(revision 6766)
+++ /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/types/.castor.cdr	(working copy)
@@ -1,7 +1,7 @@
-#Sat Jan 13 17:51:42 CST 2007
+#Thu Jan 18 00:10:42 CST 2007
 org.exolab.castor.tests.framework.testDescriptor.types.FailureType=org.exolab.castor.tests.framework.testDescriptor.types.FailureTypeDescriptor
+org.exolab.castor.tests.framework.testDescriptor.types.FailureStep=org.exolab.castor.tests.framework.testDescriptor.types.FailureStepDescriptor
 org.exolab.castor.tests.framework.testDescriptor.types.CategoryType=org.exolab.castor.tests.framework.testDescriptor.types.descriptors.CategoryTypeDescriptor
-org.exolab.castor.tests.framework.testDescriptor.types.FailureStep=org.exolab.castor.tests.framework.testDescriptor.types.FailureStepDescriptor
 org.exolab.castor.tests.framework.testDescriptor.types.CollectionType=org.exolab.castor.tests.framework.testDescriptor.types.descriptors.CollectionTypeDescriptor
+org.exolab.castor.tests.framework.testDescriptor.types.FailureStepType=org.exolab.castor.tests.framework.testDescriptor.types.descriptors.FailureStepTypeDescriptor
 org.exolab.castor.tests.framework.testDescriptor.types.TypeType=org.exolab.castor.tests.framework.testDescriptor.types.descriptors.TypeTypeDescriptor
-org.exolab.castor.tests.framework.testDescriptor.types.FailureStepType=org.exolab.castor.tests.framework.testDescriptor.types.descriptors.FailureStepTypeDescriptor
Index: /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/UnitTestCase.java
===================================================================
--- /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/UnitTestCase.java	(revision 6766)
+++ /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/testDescriptor/UnitTestCase.java	(working copy)
@@ -101,6 +101,16 @@
      */
     private boolean _has_javaSourceVersion;
 
+    /**
+     * Field _generateImported.
+     */
+    private boolean _generateImported;
+
+    /**
+     * keeps track of state for field: _generateImported
+     */
+    private boolean _has_generateImported;
+
 
       //----------------/
      //- Constructors -/
@@ -185,6 +195,13 @@
 
     /**
      */
+    public void deleteGenerateImported(
+    ) {
+        this._has_generateImported= false;
+    }
+
+    /**
+     */
     public void deleteJavaSourceVersion(
     ) {
         this._has_javaSourceVersion= false;
@@ -294,6 +311,16 @@
     }
 
     /**
+     * Returns the value of field 'generateImported'.
+     * 
+     * @return the value of field 'GenerateImported'.
+     */
+    public boolean getGenerateImported(
+    ) {
+        return this._generateImported;
+    }
+
+    /**
      * Returns the value of field 'goldFile'.
      * 
      * @return the value of field 'GoldFile'.
@@ -421,6 +448,16 @@
     }
 
     /**
+     * Method hasGenerateImported.
+     * 
+     * @return true if at least one GenerateImported has been added
+     */
+    public boolean hasGenerateImported(
+    ) {
+        return this._has_generateImported;
+    }
+
+    /**
      * Method hasJavaSourceVersion.
      * 
      * @return true if at least one JavaSourceVersion has been added
@@ -441,6 +478,16 @@
     }
 
     /**
+     * Returns the value of field 'generateImported'.
+     * 
+     * @return the value of field 'GenerateImported'.
+     */
+    public boolean isGenerateImported(
+    ) {
+        return this._generateImported;
+    }
+
+    /**
      * Returns the value of field 'skip'.
      * 
      * @return the value of field 'Skip'.
@@ -531,7 +578,7 @@
      */
     public java.lang.String removeCommentAt(
             final int index) {
-        Object obj = this._commentList.remove(index);
+        java.lang.Object obj = this._commentList.remove(index);
         return (java.lang.String) obj;
     }
 
@@ -555,7 +602,7 @@
      */
     public org.exolab.castor.tests.framework.testDescriptor.SchemaDifferences removeSchemaDifferencesAt(
             final int index) {
-        Object obj = this._schemaDifferencesList.remove(index);
+        java.lang.Object obj = this._schemaDifferencesList.remove(index);
         return (org.exolab.castor.tests.framework.testDescriptor.SchemaDifferences) obj;
     }
 
@@ -625,6 +672,17 @@
     }
 
     /**
+     * Sets the value of field 'generateImported'.
+     * 
+     * @param generateImported the value of field 'generateImported'
+     */
+    public void setGenerateImported(
+            final boolean generateImported) {
+        this._generateImported = generateImported;
+        this._has_generateImported = true;
+    }
+
+    /**
      * Sets the value of field 'goldFile'.
      * 
      * @param goldFile the value of field 'goldFile'.
Index: /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/TestDescriptor.xsd
===================================================================
--- /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/TestDescriptor.xsd	(revision 6766)
+++ /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/TestDescriptor.xsd	(working copy)
@@ -247,6 +247,8 @@
                 <xsd:element name="Comment" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
                 <!-- Java source version for this test -->
                 <xsd:element name="JavaSourceVersion" type="xsd:float" minOccurs="0" maxOccurs="1"/>
+                <!-- For a source generator type of test case, should code be generated for imported schemas? -->
+                <xsd:element name="GenerateImported" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
             </xsd:sequence>
         </xsd:complexType>
     </xsd:element>
Index: /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/TestSourceGenerator.java
===================================================================
--- /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/TestSourceGenerator.java	(revision 6766)
+++ /home/ekuns/workspace/castor-4/src/tests/main/org/exolab/castor/tests/framework/TestSourceGenerator.java	(working copy)
@@ -53,6 +53,8 @@
     private final String[] _schemas;
     /** Package name for generated source. */
     private final String   _package;
+    /** Should we generate source from imported schemas? */
+    private final boolean  _genFromImported;
 
     public TestSourceGenerator(final CastorTestCase test, final UnitTestCase unit, final OnlySourceGenerationTest sourceGen) {
         super(test, unit);
@@ -61,6 +63,7 @@
         _bindingFileName      = sourceGen.getBindingFile();
         _schemas              = sourceGen.getSchema();
         _package              = sourceGen.getPackage();
+        _genFromImported      = unit.hasGenerateImported() && unit.getGenerateImported();
     }
 
     public TestSourceGenerator(final CastorTestCase test, final UnitTestCase unit, final SourceGeneratorTest sourceGen) {
@@ -70,6 +73,7 @@
         _bindingFileName      = sourceGen.getBindingFile();
         _schemas              = sourceGen.getSchema();
         _package              = sourceGen.getPackage();
+        _genFromImported      = unit.hasGenerateImported() && unit.getGenerateImported();
     }
 
     /**
@@ -220,7 +224,7 @@
         sourceGen.setTestable(true);
         sourceGen.setSuppressNonFatalWarnings(true);
         sourceGen.setFailOnFirstError(true);
-//      sourceGen.setGenerateImportedSchemas(true);
+        sourceGen.setGenerateImportedSchemas(_genFromImported);
         sourceGen.setDestDir(_outputRootFile.getAbsolutePath());
         return sourceGen;
     }
Index: /home/ekuns/workspace/castor-4/src/tests/xml/MasterTestSuite/mapping/constructor/Foo.java
===================================================================
--- /home/ekuns/workspace/castor-4/src/tests/xml/MasterTestSuite/mapping/constructor/Foo.java	(revision 6766)
+++ /home/ekuns/workspace/castor-4/src/tests/xml/MasterTestSuite/mapping/constructor/Foo.java	(working copy)
@@ -1,24 +1,22 @@
 
+public class Foo {
 
-public class Foo {
-    
     private int size = 20;
-    
+
     public Foo() {
-        
+        // Nothing to do
     }
-    
+
     public Foo(int size) {
-        System.out.println("Foo("  + size + ")"); 
         this.size = size;
     }
-    
+
     public int getSize() {
         return size;
     }
-    
+
     public void setSize(int size) {
         this.size = size;
     }
-    
+
 }
Index: /home/ekuns/workspace/castor-4/src/tests/xml/MasterTestSuite/sourcegenerator/JavaTypeBindingForComplexTypes/base/MyHandler.java
===================================================================
--- /home/ekuns/workspace/castor-4/src/tests/xml/MasterTestSuite/sourcegenerator/JavaTypeBindingForComplexTypes/base/MyHandler.java	(revision 6766)
+++ /home/ekuns/workspace/castor-4/src/tests/xml/MasterTestSuite/sourcegenerator/JavaTypeBindingForComplexTypes/base/MyHandler.java	(working copy)
@@ -1,7 +1,6 @@
 package base;
 
 import org.exolab.castor.mapping.GeneralizedFieldHandler;
-
 import generated.Item;
 
 public class MyHandler extends GeneralizedFieldHandler {
@@ -6,22 +5,22 @@
 
 public class MyHandler extends GeneralizedFieldHandler {
 
+    public Object convertUponGet(Object arg0) {
+        Item i = new Item();
+        MyItem mi = (MyItem) arg0;
+        i.setName(mi.getName());
+        return i;
+    }
 
-	public Object convertUponGet(Object arg0) {
-		Item i = new Item();
-		MyItem mi = (MyItem) arg0;
-		i.setName(mi.getName());
-		return i;
-	}
+    public Object convertUponSet(Object arg0) {
+        Item i = (Item) arg0;
+        MyItem mi = new MyItem();
+        mi.setName(i.getName());
+        return mi;
+    }
 
-	public Object convertUponSet(Object arg0) {
-		Item i = (Item) arg0;
-		MyItem mi = new MyItem();
-		mi.setName(i.getName());
-		return mi;
-	}
+    public Class getFieldType() {
+        return MyItem.class;
+    }
 
-	public Class getFieldType() {
-		return MyItem.class;
-	}
 }
Index: /home/ekuns/workspace/castor-4/src/tests/xml/MasterTestSuite/sourcegenerator/JavaTypeBindingForComplexTypes/base/MyItem.java
===================================================================
--- /home/ekuns/workspace/castor-4/src/tests/xml/MasterTestSuite/sourcegenerator/JavaTypeBindingForComplexTypes/base/MyItem.java	(revision 6766)
+++ /home/ekuns/workspace/castor-4/src/tests/xml/MasterTestSuite/sourcegenerator/JavaTypeBindingForComplexTypes/base/MyItem.java	(working copy)
@@ -2,11 +2,10 @@
 
 import generated.Item;
 
+public class MyItem extends Item {
 
-public class MyItem extends Item {
+    public void hello() {
+//      System.out.println("name = " + getName());
+    }
 
-	public void hello(){
-		System.out.println("name = " + getName());
-	}
-	
 }
Index: /home/ekuns/workspace/castor-4/src/tests/xml/MasterTestSuite/sourcegenerator/JavaTypeBindingForComplexTypes/base/MySimpleHandler.java
===================================================================
--- /home/ekuns/workspace/castor-4/src/tests/xml/MasterTestSuite/sourcegenerator/JavaTypeBindingForComplexTypes/base/MySimpleHandler.java	(revision 6766)
+++ /home/ekuns/workspace/castor-4/src/tests/xml/MasterTestSuite/sourcegenerator/JavaTypeBindingForComplexTypes/base/MySimpleHandler.java	(working copy)
@@ -1,7 +1,6 @@
 package base;
 
 import java.awt.Color;
-
 import org.exolab.castor.mapping.GeneralizedFieldHandler;
 
 public class MySimpleHandler extends GeneralizedFieldHandler {
@@ -6,32 +5,30 @@
 
 public class MySimpleHandler extends GeneralizedFieldHandler {
 
+    public Object convertUponGet(Object value) {
+        if (value == null) {
+            return null;
+        }
+        Color c = (Color) value;
+        return c.toString();
+    }
 
-	public Object convertUponGet(Object value) {
-		if (value == null)
-			return null;
-		Color c = (Color) value;
-		return c.toString();
-	}
+    public Object convertUponSet(Object value) {
+        String s = (String) value;
+        Color c = Color.getColor(s);
+        return c;
+    }
 
-	public Object convertUponSet(Object value) {
-		System.out.println("Creating color");
-		String s = (String) value;
-		Color c = Color.getColor(s);
-		return c;
-	}
+    public Class getFieldType() {
+        return java.awt.Color.class;
+    }
 
-	public Class getFieldType() {
-		return java.awt.Color.class;
-		//return null;
-	}
-	
-	public Object newInstance(Object parent) throws IllegalStateException {
-		return null;
-	}
-	
-	public Object newInstance(Object parent, Object[] args) throws IllegalStateException {
-		return null;
-	}
-	
+    public Object newInstance(Object parent) throws IllegalStateException {
+        return null;
+    }
+
+    public Object newInstance(Object parent, Object[] args) throws IllegalStateException {
+        return null;
+    }
+
 }

