ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant-myrmidon/framework/src/test/org/apache/myrmidon/framework TestCaseProjectBuilder.java
Date Thu, 13 Jun 2002 02:52:50 GMT
donaldp     2002/06/12 19:52:50

  Modified:    container/src/java/org/apache/myrmidon/components/builder
                        DefaultModelBuilder.java
                        TransformingModelBuilder.java
               framework/src/java/org/apache/myrmidon/framework
                        TypeInstanceTask.java
               framework/src/test/org/apache/myrmidon/framework
                        TestCaseProjectBuilder.java
  Added:       container/src/java/org/apache/myrmidon/components/builder
                        ModelElementSaxHandler.java
               framework/src/java/org/apache/myrmidon/framework
                        ModelElementUtil.java
  Removed:     container/src/java/org/apache/myrmidon/interfaces/model
                        ModelElementSaxHandler.java ModelElementUtil.java
                        Resources.properties
  Log:
  Moved ModelElementUtil to framework
  Moved ModelElementSaxHandler to component.builder
  
  Revision  Changes    Path
  1.4       +1 -2      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder/DefaultModelBuilder.java
  
  Index: DefaultModelBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder/DefaultModelBuilder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultModelBuilder.java	27 May 2002 13:39:34 -0000	1.3
  +++ DefaultModelBuilder.java	13 Jun 2002 02:52:50 -0000	1.4
  @@ -12,7 +12,6 @@
   import org.apache.myrmidon.api.metadata.ModelElement;
   import org.apache.myrmidon.api.metadata.ModelException;
   import org.apache.myrmidon.interfaces.builder.ModelBuilder;
  -import org.apache.myrmidon.interfaces.model.ModelElementSaxHandler;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
   import org.xml.sax.XMLReader;
  
  
  
  1.4       +1 -2      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder/TransformingModelBuilder.java
  
  Index: TransformingModelBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder/TransformingModelBuilder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TransformingModelBuilder.java	9 Jun 2002 03:41:16 -0000	1.3
  +++ TransformingModelBuilder.java	13 Jun 2002 02:52:50 -0000	1.4
  @@ -21,7 +21,6 @@
   import org.apache.myrmidon.api.metadata.ModelElement;
   import org.apache.myrmidon.api.metadata.ModelException;
   import org.apache.myrmidon.interfaces.builder.ModelBuilder;
  -import org.apache.myrmidon.interfaces.model.ModelElementSaxHandler;
   
   /**
    * A simple ModelBuilder that will build a {@link ModelElement}
  
  
  
  1.3       +11 -10    jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder/ModelElementSaxHandler.java
  
  
  
  
  1.4       +1 -2      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/TypeInstanceTask.java
  
  Index: TypeInstanceTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/TypeInstanceTask.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TypeInstanceTask.java	18 May 2002 04:15:09 -0000	1.3
  +++ TypeInstanceTask.java	13 Jun 2002 02:52:50 -0000	1.4
  @@ -13,7 +13,6 @@
   import org.apache.myrmidon.api.metadata.ModelElement;
   import org.apache.myrmidon.api.metadata.ModelException;
   import org.apache.myrmidon.api.metadata.Modeller;
  -import org.apache.myrmidon.interfaces.model.ModelElementUtil;
   
   /**
    * This is the property "task" to declare a binding of a datatype to a name.
  
  
  
  1.1                  jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/ModelElementUtil.java
  
  Index: ModelElementUtil.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.myrmidon.framework;
  
  import org.apache.myrmidon.api.metadata.ModelElement;
  
  /**
   * Utility methods for dealing with {@link ModelElement} objects.
   *
   * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
   * @version $Revision: 1.1 $ $Date: 2002/06/13 02:52:50 $
   */
  public class ModelElementUtil
  {
      /**
       * Makes a shallow copy of a model.
       */
      public static ModelElement copyModel( final ModelElement model )
      {
          final ModelElement newModel =
              new ModelElement( model.getName(), model.getLocation() );
          copyModel( model, newModel );
          return newModel;
      }
  
      /**
       * Makes a shallow copy of a model.
       */
      public static void copyModel( final ModelElement srcModel,
                                    final ModelElement destModel )
      {
          final String[] attributes = srcModel.getAttributeNames();
          for( int i = 0; i < attributes.length; i++ )
          {
              final String name = attributes[ i ];
              final String value = srcModel.getAttribute( name );
              destModel.setAttribute( name, value );
          }
  
          final ModelElement[] children = srcModel.getChildren();
          for( int i = 0; i < children.length; i++ )
          {
              destModel.addChild( children[ i ] );
          }
  
          destModel.setContent( srcModel.getContent() );
      }
  }
  
  
  
  1.3       +2 -2      jakarta-ant-myrmidon/framework/src/test/org/apache/myrmidon/framework/TestCaseProjectBuilder.java
  
  Index: TestCaseProjectBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/test/org/apache/myrmidon/framework/TestCaseProjectBuilder.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestCaseProjectBuilder.java	7 Jun 2002 07:07:52 -0000	1.2
  +++ TestCaseProjectBuilder.java	13 Jun 2002 02:52:50 -0000	1.3
  @@ -9,7 +9,7 @@
   
   import org.apache.myrmidon.api.metadata.ModelElement;
   import org.apache.myrmidon.components.builder.DefaultProjectBuilder;
  -import org.apache.myrmidon.interfaces.model.ModelElementUtil;
  +import org.apache.myrmidon.framework.ModelElementUtil;
   
   /**
    * A project builder for unit test projects.  Uses a simplified project file
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message