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/proposal/myrmidon/src/java/org/apache/myrmidon/frontends CLIMain.java
Date Fri, 29 Jun 2001 08:08:30 GMT
donaldp     01/06/29 01:08:30

  Modified:    proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor
                        DefaultEmbeddor.java Embeddor.java
               proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace
                        DefaultWorkspace.java
               proposal/myrmidon/src/java/org/apache/myrmidon/frontends
                        CLIMain.java
  Log:
  Workspace doesn't need to know about root Project anymore. Thus interface by embeddor and
Workspace can be adapted to pass less parameters.
  
  Revision  Changes    Path
  1.9       +10 -14    jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor/DefaultEmbeddor.java
  
  Index: DefaultEmbeddor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor/DefaultEmbeddor.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DefaultEmbeddor.java	2001/06/29 08:01:33	1.8
  +++ DefaultEmbeddor.java	2001/06/29 08:08:26	1.9
  @@ -122,36 +122,32 @@
           return builder;
       }
   
  -    public Workspace createWorkspace( final Project project, 
  -                                      final Parameters parameters )
  +    public Workspace createWorkspace( final Parameters parameters )
           throws Exception
       {
           final String component = getParameter( Workspace.ROLE );
  -        final Workspace projectManager = 
  +        final Workspace workspace = 
               (Workspace)createComponent( component, Workspace.class );
   
  -        setupLogger( projectManager );
  +        setupLogger( workspace );
   
   
  -        if( projectManager instanceof Composable )
  +        if( workspace instanceof Composable )
           {
  -            final DefaultComponentManager componentManager =
  -                new DefaultComponentManager( m_componentManager );
  -            componentManager.put( Project.ROLE, project );
  -            ((Composable)projectManager).compose( componentManager );
  +            ((Composable)workspace).compose( m_componentManager );
           }
   
  -        if( projectManager instanceof Parameterizable )
  +        if( workspace instanceof Parameterizable )
           {
  -            ((Parameterizable)projectManager).parameterize( parameters );
  +            ((Parameterizable)workspace).parameterize( parameters );
           }        
   
  -        if( projectManager instanceof Initializable )
  +        if( workspace instanceof Initializable )
           {
  -            ((Initializable)projectManager).initialize();
  +            ((Initializable)workspace).initialize();
           }        
   
  -        return projectManager;
  +        return workspace;
       }
   
       /**
  
  
  
  1.8       +2 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor/Embeddor.java
  
  Index: Embeddor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor/Embeddor.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Embeddor.java	2001/06/29 08:01:33	1.7
  +++ Embeddor.java	2001/06/29 08:08:27	1.8
  @@ -38,10 +38,9 @@
       /**
        * Create a Workspace for a particular project.
        *
  -     * @param project the root project
  -     * @param defines the defines in project
  +     * @param defines the defines in workspace
        * @return the Workspace
        */
  -    Workspace createWorkspace( Project project, Parameters parameters )
  +    Workspace createWorkspace( Parameters parameters )
           throws Exception;
   }
  
  
  
  1.2       +0 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java
  
  Index: DefaultWorkspace.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultWorkspace.java	2001/06/29 07:57:31	1.1
  +++ DefaultWorkspace.java	2001/06/29 08:08:28	1.2
  @@ -53,7 +53,6 @@
       private ProjectListenerSupport   m_listenerSupport   = new ProjectListenerSupport();
       private ComponentManager         m_componentManager;
       private Parameters               m_parameters;
  -    private Project                  m_project;
       private TaskContext              m_baseContext;
       private HashMap                  m_entrys            = new HashMap();
       private TypeManager              m_typeManager;
  @@ -88,10 +87,8 @@
           throws ComponentException
       {
           m_componentManager = componentManager;
  -
           m_typeManager = (TypeManager)componentManager.lookup( TypeManager.ROLE );
           m_executor = (Executor)componentManager.lookup( Executor.ROLE );
  -        m_project = (Project)componentManager.lookup( Project.ROLE );
       }
   
       public void parameterize( final Parameters parameters )
  
  
  
  1.7       +1 -1      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/frontends/CLIMain.java
  
  Index: CLIMain.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/frontends/CLIMain.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- CLIMain.java	2001/06/29 08:01:38	1.6
  +++ CLIMain.java	2001/06/29 08:08:30	1.7
  @@ -353,7 +353,7 @@
           while( true )
           {
               //actually do the build ...
  -            final Workspace workspace = embeddor.createWorkspace( project, m_defines );
  +            final Workspace workspace = embeddor.createWorkspace( m_defines );
               workspace.addProjectListener( listener );
   
               doBuild( workspace, project, m_targets );
  
  
  

Mime
View raw message