gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject cvs commit: gump/python/gump/guru xref.py
Date Mon, 19 Jul 2004 19:57:57 GMT
ajack       2004/07/19 12:57:57

  Modified:    python/gump/model project.py
               python/gump/guru xref.py
  Log:
  Found xref was using DOM after it had been closed down. Fixed.
  
  Revision  Changes    Path
  1.89      +18 -1     gump/python/gump/model/project.py
  
  Index: project.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/project.py,v
  retrieving revision 1.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- project.py	19 Jul 2004 16:07:56 -0000	1.88
  +++ project.py	19 Jul 2004 19:57:57 -0000	1.89
  @@ -80,6 +80,7 @@
           self.distributable=False
           self.packageMarker=None
           self.jvmargs=gump.process.command.Parameters()
  +        self.packageNames=None
           
       	#############################################################
       	# Outputs
  @@ -190,6 +191,13 @@
       def getJars(self):
           return self.jars.values()
           
  +    def hasPackageNames(self):
  +        if self.packageNames: return True
  +        return False
  +        
  +    def getPackageNames(self):
  +        return self.packageNames
  +        
       def getJarAt(self,index):
           return self.jars.values()[index]
                   
  @@ -512,7 +520,16 @@
           
           # Existence means 'true'
           self.redistributable=self.hasDomChild('redistributable')       
  -                  
  +        
  +        # Store any 'Java Package names'
  +        for pdom in self.getDomChildIterator('package'):
  +            packageName=getDomTextValue(pdom)
  +            if packageName:
  +                if not self.packageNames:
  +                    self.packageNames=[]
  +                if not packageName in self.packageNames:
  +                    self.packageNames.append(packageName)
  +                    
           # Close down the DOM...
           self.shutdownDom()       
           
  
  
  
  1.4       +11 -16    gump/python/gump/guru/xref.py
  
  Index: xref.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/guru/xref.py,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- xref.py	8 Jul 2004 20:33:10 -0000	1.3
  +++ xref.py	19 Jul 2004 19:57:57 -0000	1.4
  @@ -25,7 +25,6 @@
   from gump.core.config import *
   from gump.model.project import Project
   from gump.model.state import *
  -from gump.utils.domutils import *
               
   class XRefGuru:
       """ Know it all ... """
  @@ -66,26 +65,23 @@
       def mapPackages(self):
           for module in self.workspace.getModules():
               for project in module.getProjects():
  -                if project.isPackaged(): continue
  -                for pdom in project.getDomChildIterator('package'):
  -                    packageName=getDomTextValue(pdom)
  +                if project.hasPackageNames():
  +                    for packageName in project.getPackageNames():
  +                        if not self.packageToModule.has_key(packageName):
  +                                self.packageToModule[packageName]=[]
               
  -                    if not self.packageToModule.has_key(packageName):
  -                            self.packageToModule[packageName]=[]
  -            
  -                    if not self.packageToProject.has_key(packageName):
  -                            self.packageToProject[packageName]=[]
  +                        if not self.packageToProject.has_key(packageName):
  +                                self.packageToProject[packageName]=[]
                   
  -                    # Store
  -                    if not module in self.packageToModule[packageName]:
  -                        self.packageToModule[packageName].append(module)
  +                        # Store
  +                        if not module in self.packageToModule[packageName]:
  +                            self.packageToModule[packageName].append(module)
       
  -                    if not project in self.packageToProject[packageName]:
  -                        self.packageToProject[packageName].append(project)
  +                        if not project in self.packageToProject[packageName]:
  +                            self.packageToProject[packageName].append(project)
       
       def mapDescriptions(self):
           for module in self.workspace.getModules():
  -            if module.isPackaged(): continue
               
               moduleDescription=module.getDescription()
               if moduleDescription:
  @@ -96,7 +92,6 @@
                       self.descriptionToModule[moduleDescription].append(module)
                       
               for project in module.getProjects():
  -                if project.isPackaged(): continue
                   
                   projectDescription=project.getDescription()
                   if projectDescription:
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Mime
View raw message