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 |