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, 11 Jun 2002 03:58:35 GMT
donaldp     2002/06/10 20:58:35

  Modified:    container/src/java/org/apache/myrmidon/components/workspace
                        DefaultWorkspace.java
  Log:
  Put ProjectDescriptors into property store.
  
  You can access this rather than trying to access Projects directly as that should be an
implementation detail.
  
  Revision  Changes    Path
  1.79      +26 -8     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.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- DefaultWorkspace.java	11 Jun 2002 03:07:27 -0000	1.78
  +++ DefaultWorkspace.java	11 Jun 2002 03:58:35 -0000	1.79
  @@ -25,13 +25,15 @@
   import org.apache.myrmidon.interfaces.embeddor.Embeddor;
   import org.apache.myrmidon.interfaces.executor.ExecutionFrame;
   import org.apache.myrmidon.interfaces.executor.Executor;
  -import org.apache.myrmidon.interfaces.model.TargetMetaData;
   import org.apache.myrmidon.interfaces.oldmodel.Project;
  +import org.apache.myrmidon.interfaces.oldmodel.TargetMetaData;
  +import org.apache.myrmidon.interfaces.property.PropertyStore;
   import org.apache.myrmidon.interfaces.service.ScopedService;
   import org.apache.myrmidon.interfaces.type.TypeManager;
   import org.apache.myrmidon.interfaces.type.TypeRegistry;
  -import org.apache.myrmidon.interfaces.workspace.Workspace;
   import org.apache.myrmidon.interfaces.workspace.ProjectDescriptor;
  +import org.apache.myrmidon.interfaces.workspace.ProjectRef;
  +import org.apache.myrmidon.interfaces.workspace.Workspace;
   
   /**
    * This is the default implementation of Workspace.
  @@ -118,10 +120,26 @@
               serviceManager.put( Workspace.ROLE, this );
               serviceManager.put( Project.ROLE, project );
   
  -            return frame.createChildFrame( project.getProjectName(),
  -                                           project.getBaseDirectory(),
  -                                           serviceManager,
  -                                           true );
  +            //TODO: add to
  +            final ExecutionFrame childFrame =
  +                frame.createChildFrame( project.getProjectName(),
  +                                        project.getBaseDirectory(),
  +                                        serviceManager,
  +                                        true );
  +
  +            final PropertyStore propertyStore =
  +                (PropertyStore)childFrame.getServiceManager().lookup( PropertyStore.ROLE
);
  +            propertyStore.setProperty( ProjectDescriptor.KEY,
  +                                       project.getProjectDescriptor() );
  +            final ProjectRef[] refs = project.getProjectRefs();
  +            for( int i = 0; i < refs.length; i++ )
  +            {
  +                ProjectRef ref = refs[ i ];
  +                propertyStore.setProperty( ProjectDescriptor.KEY + "/" + ref.getName(),
  +                                           ref.getProject() );
  +            }
  +
  +            return childFrame;
           }
           catch( final Exception e )
           {
  @@ -196,7 +214,7 @@
           return entry;
       }
   
  -    private Project createProject( final ProjectDescriptor project)
  +    private Project createProject( final ProjectDescriptor project )
           throws TaskException
       {
           try
  
  
  

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