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 Tue, 23 Apr 2002 07:42:31 GMT
donaldp     02/04/23 00:42:31

  Modified:    container/src/java/org/apache/myrmidon/components/workspace
                        DefaultWorkspace.java
  Log:
  Create new ExecutionFrame implementation as needed. Note we *really* *really* *really* should
be creating a child frame here rather than manually recreating one
  
  Revision  Changes    Path
  1.43      +22 -5     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.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- DefaultWorkspace.java	21 Apr 2002 01:57:45 -0000	1.42
  +++ DefaultWorkspace.java	23 Apr 2002 07:42:31 -0000	1.43
  @@ -34,13 +34,15 @@
   import org.apache.myrmidon.interfaces.property.PropertyStore;
   import org.apache.myrmidon.interfaces.type.TypeManager;
   import org.apache.myrmidon.interfaces.workspace.Workspace;
  +import org.apache.myrmidon.interfaces.event.TaskEventManager;
   import org.apache.myrmidon.listeners.ProjectListener;
  +import org.apache.myrmidon.components.event.DefaultTaskEventManager;
   
   /**
    * This is the default implementation of Workspace.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.42 $ $Date: 2002/04/21 01:57:45 $
  + * @version $Revision: 1.43 $ $Date: 2002/04/23 07:42:31 $
    */
   public class DefaultWorkspace
       extends AbstractLogEnabled
  @@ -59,6 +61,7 @@
   
       /** A map from Project object -> ProjectEntry for that project. */
       private HashMap m_entries = new HashMap();
  +    private ExecutionFrame m_frame;
   
       /**
        * Add a listener to project events.
  @@ -83,9 +86,11 @@
       /**
        * Sets the root execution frame.
        */
  -    public void setRootExecutionFrame( final ExecutionFrame frame ) throws Exception
  +    public void setRootExecutionFrame( final ExecutionFrame frame )
  +        throws Exception
       {
  -        m_baseStore = frame.getProperties();
  +        m_frame = frame;
  +        m_baseStore = frame.getPropertyStore();
           m_serviceManager = frame.getServiceManager();
           m_typeManager = (TypeManager)m_serviceManager.lookup( TypeManager.ROLE );
           m_executor = (Executor)m_serviceManager.lookup( Executor.ROLE );
  @@ -222,8 +227,20 @@
           final PropertyStore store = m_baseStore.createChildStore( "" );
           store.setProperty( TaskContext.BASE_DIRECTORY, project.getBaseDirectory() );
   
  +        /*final ExecutionFrame frame =
  +            m_frame.createChildFrame( project.getProjectName(), true );
  +
  +        frame.getPropertyStore().setProperty( TaskContext.BASE_DIRECTORY,
  +                                              project.getBaseDirectory() );
  +        */
  +
  +        final TaskEventManager eventManager = new DefaultTaskEventManager();
           final DefaultExecutionFrame frame =
  -            new DefaultExecutionFrame( logger, store, serviceManager );
  +            new DefaultExecutionFrame( "/",
  +                                       logger,
  +                                       store,
  +                                       serviceManager,
  +                                       eventManager );
   
           /**
            *  @todo Should no occur but done for the time being to simplify evolution.
  @@ -423,7 +440,7 @@
           }
   
           //is setting name even necessary ???
  -        frame.getProperties().setProperty( TaskContext.NAME, name );
  +        frame.getPropertyStore().setProperty( TaskContext.NAME, name );
   
           //notify listeners
           m_listenerSupport.taskStarted( name );
  
  
  

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