|
Class: PackageId
Object
|
+--PackageId
- Package:
- stx:libbasic
- Category:
- System-Support-Projects
- Version:
- rev:
1.33
date: 2022/02/23 08:02:26
- user: cg
- file: PackageId.st directory: libbasic
- module: stx stc-classLibrary: libbasic
Represents packageID's.
Knows the relationship between modules and directories in the package-organization.
copyrightCOPYRIGHT (c) 2006 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
defaults
-
noProjectID
-
return the symbol used to tag classes and methods which are loose.
This means: not yet assigned to a particular project.
instance creation
-
from: aStringOrSymbol
-
(self from:'stx:libbasic') module
(self from:'stx:libbasic') directory
-
module: moduleString directory: directoryString
-
(PackageId module:'stx' directory:'libbasic') module
(PackageId module:'stx' directory:'libbasic') directory
accessing
-
directory
-
return the directory component. That's the rest after the colon.
The module is typically used to define the project-path or project-id within its
sourcecode repository (which is selected via the module).
Usage example(s):
(PackageId from:'stx:libbasic') module
(PackageId from:'stx:libbasic') directory
(PackageId from:'stx') module
(PackageId from:'stx') directory
(PackageId from:'stx:goodies/xml/stx') module
(PackageId from:'stx:goodies/xml/stx') directory
|
-
module
-
return the module component. That's the first component up to the colon.
The module is typically used to select a corresponding sourcecode repository.
Usage example(s):
(PackageId from:'stx:libbasic') module
(PackageId from:'stx:libbasic') directory
|
-
module: moduleString directory: directoryString
-
(self new module:'stx' directory:'libbasic') module
(self new module:'stx' directory:'libbasic') directory
(self new module:'stx' directory:'goodies/net') module
(self new module:'stx' directory:'goodies/net') directory
(self new module:'stx' directory:'goodies\net') module
(self new module:'stx' directory:'goodies\net') directory
-
packageIdString: aString
-
the required format is:
module:path
where path is a unix-like path (i.e. containing slashes).
However, for our convenience, also allow for
module/path
and even:
module\ms-dos-path
and convert them as required.
This makes it easier on a doit, by copy-pasting port of a path into a loadPackage
expression
-
string
-
comparing
-
= aPackageId
-
compares equal to a corresponding string
Usage example(s):
'stx:libbasic' asPackageId = 'stx:libbasic'
'stx:libbasic' asPackageId = 'stx:libbasic' asSymbol asPackageId
'stx:libbasic' asPackageId = 'stx:libbasic' asPackageId
'stx:libbasic2' asPackageId = 'stx:libbasic3' asPackageId
|
-
hash
-
(comment from inherited method)
return an Integer useful as a hash key for the receiver.
This hash should return same values for objects with same
contents (i.e. use this to hash on structure)
converting
-
asPackageId
-
-
asString
-
-
asSymbol
-
printing
-
printOn: aStream
-
(comment from inherited method)
append a user printed representation of the receiver to aStream.
The format is suitable for a human - not meant to be read back.
The default here is to output the receiver's class name.
BUT: this method is heavily redefined for objects which
can print prettier.
queries
-
isModuleId
-
true if this is a module-id only (i.e. no directory component present).
These are not allowed to be used as real projects, but only for organization.
The reason is that this is used as selector to select the sourceCodeManager and
also the manager's repository
-
libraryName
-
return the name of the library, when compiled to a binary (i.e. dll/so).
To avoid conflicts with the projectDefinition class
(which is named <module>_<directory_components>), we prefix the library name
with 'lib'. This has the added advantage, that under unix, linking can be done with
'-l'shortName.
Usage example(s):
(PackageId from:'stx:libbasic') libraryName
(PackageId from:'stx:goodies/xml/stx') libraryName
(PackageId from:'bosch:dapasx') libraryName
(PackageId from:'exept:expecco') libraryName
|
-
packageDirectory
-
return the pathName of the directory for this package in the file system.
For standalone apps, nil might be returned if the package's folder is not part
of the deployed package.
Usage example(s):
'stx:libbasic2' asPackageId packageDirectory
|
-
parentPackage
-
(PackageId from:'stx:libbasic') parentPackage
(PackageId from:'stx:goodies/xml/stx') parentPackage
(PackageId from:'stx:goodies/xml/stx') parentPackage parentPackage
(PackageId from:'stx:goodies/xml/stx') parentPackage parentPackage parentPackage
-
pathRelativeToTopDirectory
-
'stx:libbasic' asPackageId pathRelativeToTopDirectory
'stx:goodies/net/ssl' asPackageId pathRelativeToTopDirectory
'bosch:dapasx' asPackageId pathRelativeToTopDirectory
-
pathRelativeToTopDirectory: aDirectory
-
|top|
top := Smalltalk packagePath first.
'stx:goodies/net/ssl' asPackageId pathRelativeToTopDirectory:top
-
projectDefinitionClass
-
return the project definition for this package.
Eg. for 'stx:libbasic', this would return the stx_libbasic project definition class.
Usage example(s):
'stx:libbasic' asPackageId projectDefinitionClass
'exept/expecco/foo' asPackageId projectDefinitionClass
'exept/expecco/plugin/manualTest' asPackageId projectDefinitionClass
'exept:expecco/plugin/manualTest' asPackageId projectDefinitionClass
'exept_expecco_plugin_manualTest' asPackageId projectDefinitionClass
'exept/expecco/plugin/edi-edifact' asPackageId projectDefinitionClass
|
-
projectDefinitionClassName
-
'stx:libbasic' asPackageId projectDefinitionClassName
'exept/expecco/foo' asPackageId projectDefinitionClassName
'exept/expecco/plugin/manualTest' asPackageId projectDefinitionClassName
'exept:expecco/plugin/manualTest' asPackageId projectDefinitionClassName
'exept_expecco_plugin_manualTest' asPackageId projectDefinitionClassName
'exept/expecco/plugin/edi-edifact' asPackageId projectDefinitionClassName
-
projectDirectory
-
replace by:
** This is an obsolete interface - do not use it (it may vanish in future versions) **
|