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/container/src/java/org/apache/myrmidon/components/workspace DefaultWorkspace.java
Date Thu, 25 Apr 2002 08:19:41 GMT
donaldp     02/04/25 01:19:41

  Modified:    container/src/java/org/apache/myrmidon/components/workspace
                        DefaultWorkspace.java
  Log:
  Update to use new ProjectListenerSupport interface.
  
  Revision  Changes    Path
  1.47      +10 -4     jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java
  
  Index: DefaultWorkspace.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- DefaultWorkspace.java	25 Apr 2002 03:33:34 -0000	1.46
  +++ DefaultWorkspace.java	25 Apr 2002 08:19:41 -0000	1.47
  @@ -23,6 +23,7 @@
   import org.apache.myrmidon.interfaces.deployer.Deployer;
   import org.apache.myrmidon.interfaces.deployer.DeploymentException;
   import org.apache.myrmidon.interfaces.deployer.TypeLibraryDeployer;
  +import org.apache.myrmidon.interfaces.event.TaskEventManager;
   import org.apache.myrmidon.interfaces.executor.ExecutionContainer;
   import org.apache.myrmidon.interfaces.executor.ExecutionFrame;
   import org.apache.myrmidon.interfaces.executor.Executor;
  @@ -33,12 +34,13 @@
   import org.apache.myrmidon.interfaces.type.TypeManager;
   import org.apache.myrmidon.interfaces.workspace.Workspace;
   import org.apache.myrmidon.listeners.ProjectListener;
  +import org.apache.myrmidon.listeners.TaskToProjectListenerAdapter;
   
   /**
    * This is the default implementation of Workspace.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.46 $ $Date: 2002/04/25 03:33:34 $
  + * @version $Revision: 1.47 $ $Date: 2002/04/25 08:19:41 $
    */
   public class DefaultWorkspace
       extends AbstractLogEnabled
  @@ -56,6 +58,7 @@
       /** A map from Project object -> ProjectEntry for that project. */
       private HashMap m_entries = new HashMap();
       private ExecutionFrame m_frame;
  +    private TaskEventManager m_eventManager;
   
       /**
        * Add a listener to project events.
  @@ -64,7 +67,8 @@
        */
       public void addProjectListener( final ProjectListener listener )
       {
  -        m_listenerSupport.addProjectListener( listener );
  +        final TaskToProjectListenerAdapter adapter = new TaskToProjectListenerAdapter(
listener );
  +        m_eventManager.addTaskListener( adapter );
       }
   
       /**
  @@ -74,7 +78,8 @@
        */
       public void removeProjectListener( final ProjectListener listener )
       {
  -        m_listenerSupport.removeProjectListener( listener );
  +        final TaskToProjectListenerAdapter adapter = new TaskToProjectListenerAdapter(
listener );
  +        m_eventManager.removeTaskListener( adapter );
       }
   
       /**
  @@ -85,6 +90,7 @@
       {
           m_frame = frame;
           final ServiceManager serviceManager = frame.getServiceManager();
  +        m_eventManager = (TaskEventManager)serviceManager.lookup( TaskEventManager.ROLE
);
           m_typeManager = (TypeManager)serviceManager.lookup( TypeManager.ROLE );
           m_executor = (Executor)serviceManager.lookup( Executor.ROLE );
           m_deployer = (Deployer)serviceManager.lookup( Deployer.ROLE );
  @@ -112,7 +118,7 @@
   
           executeTarget( entry, target );
   
  -        m_listenerSupport.projectFinished( project.getProjectName() );
  +        m_listenerSupport.projectFinished();
       }
   
       private File findTypeLib( final String libraryName )
  
  
  

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