ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adammurd...@apache.org
Subject cvs commit: jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/embeddor Embeddor.java
Date Sat, 18 May 2002 04:07:44 GMT
adammurdoch    02/05/17 21:07:44

  Modified:    container/src/test/org/apache/myrmidon/components/embeddor/test
                        DefaultEmbeddorTest.java
               container/src/java/org/apache/myrmidon/components/embeddor
                        DefaultEmbeddor.java
               container/src/java/org/apache/myrmidon/interfaces
                        EmbeddedAnt.java
               container/src/java/org/apache/myrmidon/interfaces/embeddor
                        Embeddor.java
  Log:
  Changed Embeddor.createListener() to return a TaskListener, rather than a ProjectListener.
  
  Revision  Changes    Path
  1.11      +3 -3      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/embeddor/test/DefaultEmbeddorTest.java
  
  Index: DefaultEmbeddorTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/embeddor/test/DefaultEmbeddorTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- DefaultEmbeddorTest.java	12 May 2002 11:18:39 -0000	1.10
  +++ DefaultEmbeddorTest.java	18 May 2002 04:07:44 -0000	1.11
  @@ -13,18 +13,18 @@
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.myrmidon.AbstractContainerTestCase;
   import org.apache.myrmidon.LogMessageTracker;
  +import org.apache.myrmidon.api.event.TaskListener;
   import org.apache.myrmidon.components.embeddor.DefaultEmbeddor;
   import org.apache.myrmidon.interfaces.embeddor.Embeddor;
   import org.apache.myrmidon.interfaces.oldmodel.Project;
   import org.apache.myrmidon.interfaces.oldmodel.Target;
   import org.apache.myrmidon.interfaces.workspace.Workspace;
  -import org.apache.myrmidon.listeners.ProjectListener;
   
   /**
    * Test cases for the default embeddor.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.10 $ $Date: 2002/05/12 11:18:39 $
  + * @version $Revision: 1.11 $ $Date: 2002/05/18 04:07:44 $
    */
   public class DefaultEmbeddorTest
       extends AbstractContainerTestCase
  @@ -103,7 +103,7 @@
        */
       public void testCreateListener() throws Exception
       {
  -        final ProjectListener listener = getEmbeddor().createListener( "default" );
  +        final TaskListener listener = getEmbeddor().createListener( "default" );
           assertNotNull( listener );
       }
   
  
  
  
  1.66      +6 -6      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/embeddor/DefaultEmbeddor.java
  
  Index: DefaultEmbeddor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/embeddor/DefaultEmbeddor.java,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- DefaultEmbeddor.java	12 May 2002 12:57:54 -0000	1.65
  +++ DefaultEmbeddor.java	18 May 2002 04:07:44 -0000	1.66
  @@ -31,6 +31,7 @@
   import org.apache.avalon.framework.service.Serviceable;
   import org.apache.myrmidon.Constants;
   import org.apache.myrmidon.api.TaskContext;
  +import org.apache.myrmidon.api.event.TaskListener;
   import org.apache.myrmidon.components.property.DefaultPropertyStore;
   import org.apache.myrmidon.interfaces.builder.ProjectBuilder;
   import org.apache.myrmidon.interfaces.configurer.Configurer;
  @@ -56,14 +57,13 @@
   import org.apache.myrmidon.interfaces.type.TypeFactory;
   import org.apache.myrmidon.interfaces.type.TypeManager;
   import org.apache.myrmidon.interfaces.workspace.Workspace;
  -import org.apache.myrmidon.listeners.ProjectListener;
   
   /**
    * Default implementation of Embeddor.
    * Instantiate this to embed inside other applications.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.65 $ $Date: 2002/05/12 12:57:54 $
  + * @version $Revision: 1.66 $ $Date: 2002/05/18 04:07:44 $
    */
   public class DefaultEmbeddor
       extends AbstractLogEnabled
  @@ -167,16 +167,16 @@
       }
   
       /**
  -     * Creates a project listener.
  +     * Creates a task listener.
        *
        * @param name The shorthand name of the listener.
        * @return the listener.
        */
  -    public ProjectListener createListener( final String name )
  +    public TaskListener createListener( final String name )
           throws Exception
       {
  -        final TypeFactory factory = m_typeManager.getFactory( ProjectListener.ROLE );
  -        return (ProjectListener)factory.create( name );
  +        final TypeFactory factory = m_typeManager.getFactory( TaskListener.ROLE );
  +        return (TaskListener)factory.create( name );
       }
   
       /**
  
  
  
  1.7       +3 -13     jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/EmbeddedAnt.java
  
  Index: EmbeddedAnt.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/EmbeddedAnt.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- EmbeddedAnt.java	11 May 2002 12:44:00 -0000	1.6
  +++ EmbeddedAnt.java	18 May 2002 04:07:44 -0000	1.7
  @@ -28,8 +28,6 @@
   import org.apache.myrmidon.interfaces.embeddor.Embeddor;
   import org.apache.myrmidon.interfaces.oldmodel.Project;
   import org.apache.myrmidon.interfaces.workspace.Workspace;
  -import org.apache.myrmidon.listeners.ProjectListener;
  -import org.apache.myrmidon.listeners.TaskToProjectListenerAdapter;
   
   /**
    * A utility class, that takes care of launching Myrmidon, and building and
  @@ -42,7 +40,7 @@
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.6 $ $Date: 2002/05/11 12:44:00 $
  + * @version $Revision: 1.7 $ $Date: 2002/05/18 04:07:44 $
    */
   public class EmbeddedAnt
       extends AbstractLogEnabled
  @@ -118,14 +116,6 @@
       }
   
       /**
  -     * Adds a project listener.
  -     */
  -    public void addProjectListener( final ProjectListener listener )
  -    {
  -        m_listeners.add( new TaskToProjectListenerAdapter( listener ) );
  -    }
  -
  -    /**
        * Adds a task listener.
        */
       public void addTaskListener( final TaskListener listener )
  @@ -339,8 +329,8 @@
       {
           if( m_listenerName != null )
           {
  -            final ProjectListener listener = embeddor.createListener( m_listenerName );
  -            workspace.addTaskListener( new TaskToProjectListenerAdapter( listener ) );
  +            final TaskListener listener = embeddor.createListener( m_listenerName );
  +            workspace.addTaskListener( listener );
           }
           final int count = m_listeners.size();
           for( int i = 0; i < count; i++ )
  
  
  
  1.14      +5 -5      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/embeddor/Embeddor.java
  
  Index: Embeddor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/embeddor/Embeddor.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Embeddor.java	28 Apr 2002 05:04:49 -0000	1.13
  +++ Embeddor.java	18 May 2002 04:07:44 -0000	1.14
  @@ -7,17 +7,17 @@
    */
   package org.apache.myrmidon.interfaces.embeddor;
   
  +import java.util.Map;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.myrmidon.api.event.TaskListener;
   import org.apache.myrmidon.interfaces.oldmodel.Project;
   import org.apache.myrmidon.interfaces.workspace.Workspace;
  -import org.apache.myrmidon.listeners.ProjectListener;
  -import java.util.Map;
   
   /**
    * Interface through which you embed Myrmidon into applications.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.13 $ $Date: 2002/04/28 05:04:49 $
  + * @version $Revision: 1.14 $ $Date: 2002/05/18 04:07:44 $
    */
   public interface Embeddor
   {
  @@ -42,13 +42,13 @@
           throws Exception;
   
       /**
  -     * Creates a project listener.
  +     * Creates a task listener.
        *
        * @param name The shorthand name of the listener.
        * @return the listener.
        * @throws Exception If the listener could not be created.
        */
  -    ProjectListener createListener( String name )
  +    TaskListener createListener( String name )
           throws Exception;
   
       /**
  
  
  

--
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