gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject cvs commit: jakarta-gump/python/gump/gui view.py
Date Wed, 26 Nov 2003 20:01:16 GMT
ajack       2003/11/26 12:01:16

  Modified:    python/gump engine.py
               python   .cvsignore
               template/forrest/src/documentation/content/xdocs site.xml
                        tabs.xml
               python/gump/model object.py
               .        .cvsignore
               python/gump/test xdoc_tests.py
               python/gump/document xdoc.py forrest.py
               python/gump/gui view.py
  Added:       python/test .cvsignore
  Log:
  1) Some GUI (view.py) work -- more to do
  2) Added information for make/delete dir/file to "annotations"
  3) Some extra .cvs_ignore entries.
  
  Revision  Changes    Path
  1.28      +3 -0      jakarta-gump/python/gump/engine.py
  
  Index: engine.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/engine.py,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- engine.py	26 Nov 2003 18:16:32 -0000	1.27
  +++ engine.py	26 Nov 2003 20:01:15 -0000	1.28
  @@ -337,6 +337,7 @@
               dir=os.path.abspath(os.path.join(basedir,delete.dir))
               try:
                   os.rmdir(dir)
  +                project.addInfo('Deleted directory ['+dir+']')
               except:
                   project.addError('Failed to delete directory ['+dir+']')
                   raise
  @@ -344,6 +345,7 @@
               file=os.path.abspath(os.path.join(basedir,delete.file))
               try:
                   os.remove(file)
  +                project.addInfo('Deleted file ['+file+']')
               except:
                   project.addError('Failed to delete file ['+file+']')
                   raise           
  @@ -375,6 +377,7 @@
              
                   try:
                       os.makedirs(dirToMake)
  +                    project.addInfo('Made directory ['+dirToMake+']')
                   except:
                       project.addError('Failed to make directory ['+dirToMake+']')
                       raise           
  
  
  
  1.4       +1 -0      jakarta-gump/python/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/.cvsignore,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- .cvsignore	17 Nov 2003 22:10:53 -0000	1.3
  +++ .cvsignore	26 Nov 2003 20:01:15 -0000	1.4
  @@ -4,5 +4,6 @@
   cache
   forrest
   work
  +test
   tmp
   x.txt
  
  
  
  1.10      +15 -5     jakarta-gump/template/forrest/src/documentation/content/xdocs/site.xml
  
  Index: site.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/template/forrest/src/documentation/content/xdocs/site.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- site.xml	21 Nov 2003 00:27:58 -0000	1.9
  +++ site.xml	26 Nov 2003 20:01:16 -0000	1.10
  @@ -4,21 +4,31 @@
   	Forrest site.xml
   -->
   
  -<site label="Gump" href="" xmlns="http://apache.org/forrest/linkmap/1.0">
  +<site label="Gump" href="" xmlns="http://apache.org/forrest/linkmap/1.0" tab="home">
   
     <work label="Gump">
       <index label="Workspace" href="index.html"/>
  +  </work>
  +
  +  <work label="Projects">
       <index label="Build Log" href="buildLog.html"/>
  +    <index label="Projects" href="projects.html"/>
  +    <index label="Project TODOs" href="project_todos.html"/>
  +  </work>
  +  
  +  <work label="Modules">
       <index label="Modules" href="modules.html"/>
       <index label="Module TODOs" href="module_todos.html"/>
  -    <index label="Projects" href="projects.html"/>
  +  </work>
  +  
  +  <work label="Misc">
       <index label="Project TODOs" href="project_todos.html"/>
       <index label="Repositories" href="repositories.html"/>
       <index label="Packages" href="packages.html"/>
       <index label="XML" href="workspace.html"/>
     </work>
  -
  -  <stats label="Statistics">
  +  
  +  <stats label="Statistics" tab="statistics">
       <index label="Index" href="gump_stats/index.html"/>
       <index label="by FOG Factor" href="gump_stats/fogfactor.html"/>
       <index label="by Elapsed" href="gump_stats/elapsed.html"/>
  @@ -27,7 +37,7 @@
       <index label="by Dependees #" href="gump_stats/dependees.html"/>
     </stats>
   
  -  <stats label="XRef">
  +  <stats label="XRef" tab="xref">
       <index label="Index" href="gump_xref/index.html"/>
       <index label="by Repository" href="gump_xref/repo_module.html"/>
     </stats>
  
  
  
  1.5       +1 -1      jakarta-gump/template/forrest/src/documentation/content/xdocs/tabs.xml
  
  Index: tabs.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/template/forrest/src/documentation/content/xdocs/tabs.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- tabs.xml	18 Nov 2003 17:29:18 -0000	1.4
  +++ tabs.xml	26 Nov 2003 20:01:16 -0000	1.5
  @@ -14,7 +14,7 @@
     -->
   
     <tab id="home" label="Home" dir=""/>
  -  <tab id="stats" label="Statistics" dir="gump_stats"/>
  +  <tab id="statistics" label="Statistics" dir="gump_stats"/>
     <tab id="xref" label="XRef" dir="gump_xref"/>
   
   </tabs>
  
  
  
  1.9       +15 -2     jakarta-gump/python/gump/model/object.py
  
  Index: object.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/model/object.py,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- object.py	20 Nov 2003 20:51:48 -0000	1.8
  +++ object.py	26 Nov 2003 20:01:16 -0000	1.9
  @@ -68,6 +68,7 @@
   from gump.utils.note import *
   from gump.utils.work import *
   from gump.utils.owner import *
  +from gump.utils.xmlutils import xmlize
   
   from gump.model.state import *
   
  @@ -180,8 +181,20 @@
       def dump(self, indent=0, output=sys.stdout):
           """ Display the contents of this object """
           Annotatable.dump(self,indent,output)
  -                
  -                
  +    
  +    def hasViewData(self):
  +        return hasattr(self,'viewdata')
  +        
  +    def getViewData(self):
  +        if not self.hasViewData():
  +            stream=StringIO.StringIO() 
  +            xmlize(self.xml.getTagName(),self.xml,stream)
  +            stream.seek(0)
  +            self.viewdata=stream.read()
  +            stream.close()
  +    
  +        return self.viewdata
  +        
       # Somewhat bogus...
       
       def elapsedSecs(self):
  
  
  
  1.18      +2 -1      jakarta-gump/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/.cvsignore,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- .cvsignore	24 Nov 2003 18:32:20 -0000	1.17
  +++ .cvsignore	26 Nov 2003 20:01:16 -0000	1.18
  @@ -16,4 +16,5 @@
   LOCAL-ENV.bat
   local-env.sh
   local-eny-py.sh
  -tsws1.xml
  \ No newline at end of file
  +tsws1.xml
  +x.txt
  \ No newline at end of file
  
  
  
  1.2       +1 -1      jakarta-gump/python/gump/test/xdoc_tests.py
  
  Index: xdoc_tests.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/test/xdoc_tests.py,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- xdoc_tests.py	17 Nov 2003 22:10:53 -0000	1.1
  +++ xdoc_tests.py	26 Nov 2003 20:01:16 -0000	1.2
  @@ -93,7 +93,7 @@
       list1.createItem('Item2').createLink('http://somewhere','Link')
       list1.createItem('Item3').createLink('http://somewhere').createIcon('http://somewhere','Alt')
       list1.createItem('Item4').createIcon('http://somewhere','Alt')
  -    list1.createEntry('Title1:','Item1')    
  +    list1.createEntry('Title1:','Item1').createBreak()
       list1.createEntry('Item5').createLink('http://somewhere','Link')
       
       table1=section1.createTable(['H1','H2'])
  
  
  
  1.1                  jakarta-gump/python/test/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  forrest
  gump
  
  
  1.3       +39 -5     jakarta-gump/python/gump/document/xdoc.py
  
  Index: xdoc.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/document/xdoc.py,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- xdoc.py	20 Nov 2003 20:51:50 -0000	1.2
  +++ xdoc.py	26 Nov 2003 20:01:16 -0000	1.3
  @@ -290,6 +290,9 @@
       def createText(self,text=None,transient=0):
           return self.storePiece(XDocText(self.createSubContext(transient),text))
           
  +    def createBreak(self):
  +        return self.storePiece(XDocBreak(self.createSubContext()))
  +        
       def createStrong(self,text=None,transient=0):
           return self.storePiece(XDocStrong(self.createSubContext(transient),text))
   
  @@ -312,6 +315,16 @@
       def createText(self,text=None,transient=0):
           return self.storePiece(XDocText(self.createSubContext(transient),text))
                                   
  +class XDocBreak(XDocPiece):
  +    def __init__(self,context):
  +        XDocPiece.__init__(self,context)
  +        
  +    def start(self):
  +        self.context.writeIndented('<br/>')
  +        
  +    def end(self):   pass
  +    def middle(self): pass      
  +                                
   class XDocStrong(XDocPiece):
       def __init__(self,context,text):
           XDocPiece.__init__(self,context)
  @@ -363,7 +376,10 @@
           return self.storePiece(XDocStrong(self.createSubContext(),text))
           
       def createText(self,text=None):
  -        return self.storePiece(XDocText(self.createSubContext(),text))          
  +        return self.storePiece(XDocText(self.createSubContext(),text))  
  +        
  +    def createBreak(self):
  +        return self.storePiece(XDocBreak(self.createSubContext()))        
           
       def createLink(self,href,text=None):
           return self.storePiece(XDocLink(self.createSubContext(),href,text))           
  
  @@ -442,6 +458,9 @@
           
       def createText(self,text=None):
           return self.storePiece(XDocText(self.createSubContext(),text))
  +        
  +    def createBreak(self):
  +        return self.storePiece(XDocBreak(self.createSubContext()))
                             
   class XDocTableData(XDocPiece):
       def __init__(self,context,text):
  @@ -461,6 +480,9 @@
       def createText(self,text=None):
           return self.storePiece(XDocText(self.createSubContext(),text))    
           
  +    def createBreak(self):
  +        return self.storePiece(XDocBreak(self.createSubContext()))
  +        
       def createLink(self,href,text=None):
           return self.storePiece(XDocLink(self.createSubContext(),href,text))           
  
           
  @@ -483,7 +505,10 @@
           self.context.writeLine('</note>')
           
       def createText(self,text=None):
  -        return self.storePiece(XDocText(self.createSubContext(),text))              
  +        return self.storePiece(XDocText(self.createSubContext(),text))          
  +        
  +    def createBreak(self):
  +        return self.storePiece(XDocBreak(self.createSubContext()))    
           
   class XDocSource(XDocPiece):
       def __init__(self,context,text=None):
  @@ -498,7 +523,10 @@
           self.context.writeLine('</source>')
           
       def createText(self,text=None):
  -        return self.storePiece(XDocText(self.createSubContext(),text))              
  +        return self.storePiece(XDocText(self.createSubContext(),text))     
  +        
  +    def createBreak(self):
  +        return self.storePiece(XDocBreak(self.createSubContext()))         
           
   class XDocLink(XDocPiece):
       def __init__(self,context,href,text=None):
  @@ -514,7 +542,10 @@
           self.context.write('</link>')
           
       def createText(self,text):
  -        return self.storePiece(XDocText(self.createSubContext(),text))         
  +        return self.storePiece(XDocText(self.createSubContext(),text))     
  +        
  +    def createBreak(self):
  +        return self.storePiece(XDocBreak(self.createSubContext()))    
           
       def createIcon(self,href,alt=None):
           return self.storePiece(XDocIcon(self.createSubContext(),href,alt))            
 
  @@ -533,7 +564,10 @@
           self.context.write('</fork>')
           
       def createText(self,text=None):
  -        return self.storePiece(XDocText(self.createSubContext(),text))              
  +        return self.storePiece(XDocText(self.createSubContext(),text))    
  +        
  +    def createBreak(self):
  +        return self.storePiece(XDocBreak(self.createSubContext()))          
           
   class XDocIcon(XDocPiece):
       def __init__(self,context,href,alt):
  
  
  
  1.19      +11 -7     jakarta-gump/python/gump/document/forrest.py
  
  Index: forrest.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/document/forrest.py,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- forrest.py	26 Nov 2003 17:03:51 -0000	1.18
  +++ forrest.py	26 Nov 2003 20:01:16 -0000	1.19
  @@ -275,16 +275,20 @@
           syndRow.createData().createLink('workspace.html','XML')
                   
           if not gumpSet.isFull():
  -            note="""This output does not represent the a complete workspace,
  -            but a partial one.         
  -            Only projects, and their dependents, matching this regular expression """ +
\
  -                "<strong>[" + gumpSet.projectexpression + "]</strong>."
  +            note=definitionSection.createNote()
               
  -            note+="\n\nRequested Projects:\n"
  +            note.createText("""This output does not represent the a complete workspace,
  +            but a partial one.         
  +            Only projects, and their dependents, matching this regular expression """)
  +            note.createStrong(gumpSet.projectexpression)
  +            note.createBreak()
  +            note.createBreak()            
  +            note.createText('Requested Projects:')
  +            note.createBreak()
               for project in gumpSet.projects:
  -                note += project.name + " "
  +                note.createText(project.name)
  +                note.createText(' ')
                               
  -            definitionSection.createNote(note)
           
           self.documentSummary(document,workspace.getProjectSummary())        
           self.documentAnnotations(document,workspace)
  
  
  
  1.3       +27 -30    jakarta-gump/python/gump/gui/view.py
  
  Index: view.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/gui/view.py,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- view.py	24 Nov 2003 01:45:16 -0000	1.2
  +++ view.py	26 Nov 2003 20:01:16 -0000	1.3
  @@ -83,6 +83,7 @@
   from gump.model.workspace import Workspace
   from gump.model.loader import WorkspaceLoader
   from gump.engine import GumpEngine
  +from gump.gumprun import GumpSet
   
   ###############################################################################
   # Initialize
  @@ -367,36 +368,32 @@
   
       # display the project definition
       self.data.Clear()
  -    if project.viewdata:
  -      self.data.AppendText(project.viewdata)
  -    else:
  -      self.data.AppendText(xmlize('project',project))
  -      self.data.ShowPosition(0)
  +    #if project.viewdata:
  +    #  self.data.AppendText(project.viewdata)
  +    #else:
  +    #  self.data.AppendText(xmlize('project',project))
  +    #  self.data.ShowPosition(0)
  +    
  +    self.data.AppendText(project.getViewData())
  +    self.data.ShowPosition(0)
   
       # gather a list of project dependencies unrolled to build
  -    self.build_sequence = []
  -    try:
  -      todo=[]
  -      project.addToTodoList(todo)
  -      todo.sort()
  -      self.build_sequence = getBuildSequenceForProjects(todo)
  -    except:
  -      message=str(sys.exc_type)
  -      if sys.exc_value: message+= ": " + str(sys.exc_value)
  -      self.msgbox(message, "Error")
  -
  +    run=GumpSet(self.workspace,project.getName())
  +    self.build_sequence = run.getSequence()
  +    
       # display the project dependencies
       self.dependencies.DeleteAllItems()
       if not self.dependencies.GetColumn(0):
         self.dependencies.InsertColumn(0, 'Build sequence')
   
  -    for i in range(0,len(self.build_sequence)):
  -      build=Project.list[self.build_sequence[i].name]
  -      row=self.dependencies.InsertStringItem(i,build.name)
  +    i=0
  +    for build in self.build_sequence:
  +      row=self.dependencies.InsertStringItem(i,build.getName())
         self.dependencies.SetItemData(row,i)
  -      for jar in build.jar:
  -        if jar.path and not os.path.exists(jar.path):
  +      for jar in build.getJars():
  +        if jar.path and not os.path.exists(jar.getPath()):
             self.dependencies.SetItemBackgroundColour(row,wxRED)
  +      i+=1
   
       self.dependencies.SetColumnWidth(0,wxLIST_AUTOSIZE_USEHEADER)
   
  @@ -406,14 +403,14 @@
         self.prereqs.InsertColumn(0, 'Prerequisites')
   
       i=0
  -    for depend in project.depend+project.option:
  -      prereq=Project.list[depend.project]
  -      if prereq.ant or prereq.script: continue
  -      row=self.prereqs.InsertStringItem(i,prereq.name)
  -      for jar in prereq.jar:
  -        if not os.path.exists(jar.path):
  +    for dependency in project.getDependencies():
  +      prereq=dependency.getProject()
  +      #if prereq.ant or prereq.script: continue
  +      row=self.prereqs.InsertStringItem(i,prereq.getName())
  +      for jar in prereq.getJars():
  +        if not os.path.exists(jar.getPath()):
             self.prereqs.SetItemBackgroundColour(row,wxRED)
  -      i=i+1
  +      i+=1
   
       self.prereqs.SetColumnWidth(0,wxLIST_AUTOSIZE_USEHEADER)
   
  @@ -422,7 +419,7 @@
       if not self.classpath.GetColumn(0):
         self.classpath.InsertColumn(0, 'Path')
   
  -    classpath=getClasspathList(project,self.workspace)
  +    (classpath, bootclasspath)=project.getClasspathLists()
       for i in range(0,len(classpath)):
         self.classpath.InsertStringItem(i,classpath[i])
   
  @@ -463,7 +460,7 @@
     # show the xml description for a single item
     def selectProject(self, event):
       projname=event.GetEventObject().GetItem(event.GetIndex(),0).GetText()
  -    project=Project.list[projname]
  +    project=self.workspace.getProject(projname)
       self.showProject(project)
       self.history.append(project)
   
  
  
  

Mime
View raw message