axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bu...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/wsdl Emitter.java SymbolTable.java Wsdl2java.java
Date Thu, 06 Dec 2001 13:47:32 GMT
butek       01/12/06 05:47:32

  Modified:    java/src/org/apache/axis/utils resources.properties
               java/src/org/apache/axis/wsdl Emitter.java SymbolTable.java
                        Wsdl2java.java
  Log:
  Added new Wsdl2java option "--Debug" which prints the symbol table.
  Removed printing of types on "--verbose" since the "--Debug" option does that and
  more for us now.
  
  Revision  Changes    Path
  1.24      +2 -0      xml-axis/java/src/org/apache/axis/utils/resources.properties
  
  Index: resources.properties
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/resources.properties,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- resources.properties	2001/12/05 19:37:35	1.23
  +++ resources.properties	2001/12/06 13:47:31	1.24
  @@ -570,3 +570,5 @@
   deploy09=<!--      after the axis server is running                       -->
   
   alreadyExists00={0} already exists
  +optionDebug00=print debug information
  +symbolTable00=Symbol Table
  
  
  
  1.112     +19 -16    xml-axis/java/src/org/apache/axis/wsdl/Emitter.java
  
  Index: Emitter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/Emitter.java,v
  retrieving revision 1.111
  retrieving revision 1.112
  diff -u -r1.111 -r1.112
  --- Emitter.java	2001/12/06 13:11:53	1.111
  +++ Emitter.java	2001/12/06 13:47:31	1.112
  @@ -93,6 +93,7 @@
   
       protected Document doc = null;
       protected Definition def = null;
  +    protected boolean bDebug = false;
       protected boolean bEmitSkeleton = false;
       protected boolean bEmitTestCase = false;
       protected boolean bVerbose = false;
  @@ -149,6 +150,9 @@
           symbolTable = new SymbolTable(namespaces, bGenerateImports);
           symbolTable.add(def, doc);
           writerFactory.writerPass(def, symbolTable);
  +        if (bDebug) {
  +            symbolTable.dump(System.out);
  +        }
           emit(def, doc);
   
           // Output extra stuff (deployment files and faults) 
  @@ -158,10 +162,6 @@
       } // emit
   
       private void emit(Definition def, Document doc) throws IOException, WSDLException {
  -        if (bVerbose) {
  -            System.out.println(JavaUtils.getMessage("types00"));
  -            dumpTypes();
  -        }
           // Output Java classes for types
           writeTypes();
   
  @@ -212,18 +212,6 @@
       } // emit
   
       /**
  -     * Dump Types for debugging
  -     */
  -    public void dumpTypes() {
  -        Vector types = symbolTable.getTypes();
  -        for (int i = 0; i < types.size(); ++i) {
  -            Type et = (Type) types.elementAt(i);
  -            System.out.println();
  -            System.out.println(et);
  -        }
  -    } // dumpTypes
  -
  -    /**
        * Look for a NStoPkg.properties file in the CLASSPATH.  If it exists,
        * then collect the namespace->package mappings from it.
        */
  @@ -287,6 +275,21 @@
       public void generateImports(boolean generateImports) {
           this.bGenerateImports = generateImports;
       } // generateImports
  +
  +    /**
  +     * Turn on/off debug messages.
  +     * @param boolean value
  +     */
  +    public void debug(boolean value) {
  +        bDebug = value;
  +    } // debug
  +
  +    /**
  +     * Return the status of the debug switch.
  +     */
  +    public boolean getDebug() {
  +        return bDebug;
  +    } // getDebug
   
       /**
        * Turn on/off verbose messages
  
  
  
  1.18      +5 -1      xml-axis/java/src/org/apache/axis/wsdl/SymbolTable.java
  
  Index: SymbolTable.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/SymbolTable.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- SymbolTable.java	2001/12/05 21:45:09	1.17
  +++ SymbolTable.java	2001/12/06 13:47:32	1.18
  @@ -1204,9 +1204,12 @@
       }
   
       /**
  -     * For debugging purposes only.
  +     * Dump the contents of the symbol table.  For debugging purposes only.
        */
       public void dump(java.io.PrintStream out) {
  +        out.println();
  +        out.println(JavaUtils.getMessage("symbolTable00"));
  +        out.println("-----------------------");
           Iterator it = symbolTable.values().iterator();
           while (it.hasNext()) {
               Vector v = (Vector) it.next();
  @@ -1216,6 +1219,7 @@
                   out.println(v.elementAt(i));
               }
           }
  +        out.println("-----------------------");
       } // dump
   
   } // class SymbolTable
  
  
  
  1.23      +10 -1     xml-axis/java/src/org/apache/axis/wsdl/Wsdl2java.java
  
  Index: Wsdl2java.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/Wsdl2java.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- Wsdl2java.java	2001/12/06 13:11:53	1.22
  +++ Wsdl2java.java	2001/12/06 13:47:32	1.23
  @@ -80,6 +80,7 @@
       protected static final int TEST_OPT = 't';
       protected static final int NOIMPORTS_OPT = 'n';
       protected static final int PACKAGE_OPT = 'p';
  +    protected static final int DEBUG_OPT = 'D';
   
       /**
        *  Define the understood options. Each CLOptionDescriptor contains:
  @@ -126,7 +127,11 @@
           new CLOptionDescriptor("noImports",
                   CLOptionDescriptor.ARGUMENT_DISALLOWED,
                   NOIMPORTS_OPT,
  -                JavaUtils.getMessage("optionImport00"))
  +                JavaUtils.getMessage("optionImport00")),
  +        new CLOptionDescriptor("Debug",
  +                CLOptionDescriptor.ARGUMENT_DISALLOWED,
  +                DEBUG_OPT,
  +                JavaUtils.getMessage("optionDebug00"))
       };
   
       /**
  @@ -224,6 +229,10 @@
   
                       case NOIMPORTS_OPT:
                           emitter.generateImports(false);
  +                        break;
  +
  +                    case DEBUG_OPT:
  +                        emitter.debug(true);
                           break;
                   }
               }
  
  
  

Mime
View raw message