Class.st
changeset 4742 59256069f8f0
parent 4740 fda50b1e4fa5
child 4743 11f9e45976cb
equal deleted inserted replaced
4741:c4bf20b435e1 4742:59256069f8f0
   658      to which this class belongs - especially, things like pathes to
   658      to which this class belongs - especially, things like pathes to
   659      resources, additional files etc. can be optioned this way.
   659      resources, additional files etc. can be optioned this way.
   660      A packageInfo loosely relates to ehat a classLoader is in Java.
   660      A packageInfo loosely relates to ehat a classLoader is in Java.
   661      Experimental."
   661      Experimental."
   662 
   662 
   663     |packageId|
   663     |packageId prj handle t|
   664 
   664 
   665     packageId := self package.
   665     packageId := self package.
   666     packageId notNil ifTrue:[
   666     packageId notNil ifTrue:[
   667         ^ Project projectWithId:packageId
   667         prj := Project projectWithId:packageId.
       
   668         prj notNil ifTrue:[self halt. ^ prj].
       
   669 
       
   670         "/
       
   671         "/ intermediate kludge (will be removed)
       
   672         "/ search for a loaded class library and extract
       
   673         "/ information from it ...
       
   674         "/
       
   675         handle := ObjectFileLoader loadedObjectHandles 
       
   676                     detect:[:h | |cls|
       
   677                         cls := h classes firstIfEmpty:nil.
       
   678                         cls notNil and:[cls package = packageId]
       
   679                     ]
       
   680                     ifNone:nil.
       
   681 
       
   682         handle notNil ifTrue:[
       
   683             prj := Project new.
       
   684 self halt.
       
   685             prj name:packageId.
       
   686             prj directory:(handle pathName asFilename directory pathName).
       
   687             prj package:packageId.
       
   688             t := packageId asCollectionOfSubstringsSeparatedByAny:'/\:'.
       
   689             prj repositoryModule:(t first).
       
   690             prj repositoryDirectory:(packageId copyFrom:t first size + 2).
       
   691             prj isLoaded:true.
       
   692             ^ prj
       
   693         ]
   668     ].
   694     ].
   669     ^ nil
   695     ^ nil
   670 
   696 
   671     "
   697     "
   672      Object packageInfo 
   698      Object packageInfo 
  3954 ! !
  3980 ! !
  3955 
  3981 
  3956 !Class class methodsFor:'documentation'!
  3982 !Class class methodsFor:'documentation'!
  3957 
  3983 
  3958 version
  3984 version
  3959     ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.352 1999-09-17 09:36:37 cg Exp $'
  3985     ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.353 1999-09-17 10:57:58 cg Exp $'
  3960 ! !
  3986 ! !