author | Claus Gittinger <cg@exept.de> |
Thu, 27 Jun 2019 15:21:18 +0200 | |
changeset 24377 | 2fbcb2fa6c43 |
parent 18716 | b34a563006e9 |
child 18717 | f89688907327 |
permissions | -rw-r--r-- |
9571 | 1 |
" |
2 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
10230 | 12 |
"{ Package: 'stx:libbasic' }" |
9571 | 13 |
|
18504 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
9571 | 16 |
Object subclass:#PackageId |
17 |
instanceVariableNames:'packageIdString' |
|
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'System-Support-Projects' |
|
21 |
! |
|
22 |
||
23 |
!PackageId class methodsFor:'documentation'! |
|
24 |
||
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
28 |
All Rights Reserved |
|
29 |
||
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
38 |
||
39 |
documentation |
|
40 |
" |
|
41 |
Represents packageID's. |
|
42 |
Knows the relationship between modules and directories in the package-organization. |
|
43 |
" |
|
44 |
! ! |
|
45 |
||
46 |
!PackageId class methodsFor:'instance creation'! |
|
47 |
||
48 |
from: aStringOrSymbol |
|
49 |
^ self new packageIdString:aStringOrSymbol |
|
50 |
||
9840 | 51 |
" |
17235
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
52 |
(self from:'stx:libbasic') module |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
53 |
(self from:'stx:libbasic') directory |
9840 | 54 |
" |
55 |
||
9571 | 56 |
"Created: / 18-08-2006 / 12:11:58 / cg" |
9840 | 57 |
"Modified: / 12-09-2006 / 15:27:42 / cg" |
58 |
! |
|
59 |
||
60 |
module:moduleString directory:directoryString |
|
61 |
^ self new module:moduleString directory:directoryString |
|
62 |
||
63 |
" |
|
17235
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
64 |
(PackageId module:'stx' directory:'libbasic') module |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
65 |
(PackageId module:'stx' directory:'libbasic') directory |
9840 | 66 |
" |
67 |
||
68 |
"Created: / 12-09-2006 / 15:26:24 / cg" |
|
10190 | 69 |
"Modified: / 18-11-2006 / 17:09:12 / cg" |
9571 | 70 |
! ! |
71 |
||
12212 | 72 |
!PackageId class methodsFor:'defaults'! |
73 |
||
74 |
noProjectID |
|
75 |
"return the symbol used to tag classes and methods which are loose. |
|
76 |
This means: not yet assigned to a particular project." |
|
77 |
||
78 |
^ #'__NoProject__'. |
|
79 |
! ! |
|
80 |
||
9571 | 81 |
!PackageId methodsFor:'accessing'! |
82 |
||
14570 | 83 |
directory |
84 |
"return the directory component. That's the rest after the colon. |
|
85 |
The module is typically used to define the project-path or project-id within its |
|
86 |
sourcecode repository (which is selected via the module)." |
|
87 |
||
88 |
|idx| |
|
89 |
||
90 |
idx := packageIdString indexOf:$:. |
|
91 |
idx == 0 ifTrue:[ |
|
92 |
^ ''. |
|
93 |
]. |
|
94 |
^ packageIdString copyFrom:idx+1 |
|
95 |
||
96 |
" |
|
17235
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
97 |
(PackageId from:'stx:libbasic') module |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
98 |
(PackageId from:'stx:libbasic') directory |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
99 |
(PackageId from:'stx') module |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
100 |
(PackageId from:'stx') directory |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
101 |
(PackageId from:'stx:goodies/xml/stx') module |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
102 |
(PackageId from:'stx:goodies/xml/stx') directory |
14570 | 103 |
" |
104 |
||
105 |
"Created: / 18-08-2006 / 12:15:33 / cg" |
|
106 |
"Modified: / 28-11-2006 / 11:39:14 / cg" |
|
107 |
"Modified (comment): / 19-09-2011 / 11:01:08 / cg" |
|
108 |
! |
|
109 |
||
110 |
module |
|
111 |
"return the module component. That's the first component up to the colon. |
|
112 |
The module is typically used to select a corresponding sourcecode repository." |
|
113 |
||
114 |
|idx| |
|
115 |
||
116 |
idx := packageIdString indexOf:$:. |
|
117 |
idx == 0 ifTrue:[ |
|
118 |
^ packageIdString. |
|
119 |
]. |
|
120 |
^ packageIdString copyTo:idx-1 |
|
121 |
||
122 |
" |
|
17235
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
123 |
(PackageId from:'stx:libbasic') module |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
124 |
(PackageId from:'stx:libbasic') directory |
14570 | 125 |
" |
126 |
||
127 |
"Created: / 18-08-2006 / 12:13:53 / cg" |
|
128 |
"Modified: / 27-12-2006 / 11:51:25 / cg" |
|
129 |
"Modified (comment): / 19-09-2011 / 11:01:15 / cg" |
|
130 |
! |
|
131 |
||
9840 | 132 |
module:moduleString directory:directoryString |
14570 | 133 |
|ds| |
134 |
||
135 |
(directoryString includes:$\) ifTrue:[ |
|
136 |
ds := directoryString asFilename components asStringWith:$/. |
|
137 |
] ifFalse:[ |
|
138 |
ds := directoryString |
|
139 |
]. |
|
140 |
packageIdString := (moduleString,':',ds) asSymbol. |
|
141 |
||
142 |
" |
|
17235
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
143 |
(self new module:'stx' directory:'libbasic') module |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
144 |
(self new module:'stx' directory:'libbasic') directory |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
145 |
(self new module:'stx' directory:'goodies/net') module |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
146 |
(self new module:'stx' directory:'goodies/net') directory |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
147 |
(self new module:'stx' directory:'goodies\net') module |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
148 |
(self new module:'stx' directory:'goodies\net') directory |
14570 | 149 |
" |
9840 | 150 |
|
151 |
"Created: / 12-09-2006 / 15:26:48 / cg" |
|
152 |
! |
|
153 |
||
14570 | 154 |
packageIdString:aString |
155 |
"the required format is: |
|
17235
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
156 |
module:path |
14570 | 157 |
where path is a unix-like path (i.e. containing slashes). |
158 |
However, for our convenience, also allow for |
|
159 |
module/path |
|
160 |
and even: |
|
161 |
module\ms-dos-path |
|
162 |
and convert them as required. |
|
163 |
This makes it easier on a doit, by copy-pasting port of a path into a loadPackage |
|
164 |
expression" |
|
165 |
||
166 |
|components| |
|
167 |
||
18716 | 168 |
(aString notEmptyOrNil and:[(aString includes:$:) not]) ifTrue:[ |
14570 | 169 |
"/ assume its a path |
170 |
components := aString asFilename components. |
|
171 |
self module:components first directory:((components copyFrom:2) asStringWith:$/). |
|
18716 | 172 |
] ifFalse:[ |
14570 | 173 |
packageIdString := aString asSymbol. |
174 |
] |
|
175 |
||
176 |
" |
|
17235
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
177 |
'stx:libbasic' asPackageId module |
14570 | 178 |
'stx:libbasic' asPackageId directory |
17235
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
179 |
'stx/goodies/net' asPackageId module |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
180 |
'stx/goodies/net' asPackageId directory |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
181 |
'stx\goodies\net' asPackageId module |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
182 |
'stx\goodies\net' asPackageId directory |
14570 | 183 |
" |
9571 | 184 |
|
185 |
"Created: / 18-08-2006 / 12:14:45 / cg" |
|
186 |
! |
|
187 |
||
188 |
string |
|
189 |
^ packageIdString |
|
190 |
||
191 |
"Created: / 18-08-2006 / 12:20:54 / cg" |
|
192 |
! ! |
|
193 |
||
194 |
!PackageId methodsFor:'comparing'! |
|
195 |
||
196 |
= aPackageId |
|
9841 | 197 |
"compares equal to a corresponding string" |
198 |
||
9571 | 199 |
^ packageIdString = aPackageId asPackageId string |
200 |
||
201 |
" |
|
17235
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
202 |
'stx:libbasic' asPackageId = 'stx:libbasic' |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
203 |
'stx:libbasic' asPackageId = 'stx:libbasic' asSymbol asPackageId |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
204 |
'stx:libbasic' asPackageId = 'stx:libbasic' asPackageId |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
205 |
'stx:libbasic2' asPackageId = 'stx:libbasic3' asPackageId |
9571 | 206 |
" |
207 |
||
208 |
"Created: / 18-08-2006 / 12:20:47 / cg" |
|
9841 | 209 |
"Modified: / 12-09-2006 / 15:33:00 / cg" |
9571 | 210 |
! |
211 |
||
212 |
hash |
|
213 |
^ packageIdString hash |
|
214 |
||
215 |
"Created: / 18-08-2006 / 12:21:19 / cg" |
|
216 |
! ! |
|
217 |
||
218 |
!PackageId methodsFor:'converting'! |
|
219 |
||
220 |
asPackageId |
|
221 |
^ self |
|
222 |
||
223 |
"Created: / 18-08-2006 / 12:22:10 / cg" |
|
224 |
! |
|
225 |
||
226 |
asString |
|
12185 | 227 |
^ packageIdString asString |
9571 | 228 |
|
229 |
"Created: / 18-08-2006 / 12:12:22 / cg" |
|
230 |
! |
|
231 |
||
232 |
asSymbol |
|
233 |
^ packageIdString asSymbol |
|
234 |
||
235 |
"Created: / 18-08-2006 / 12:12:29 / cg" |
|
236 |
! ! |
|
237 |
||
10075 | 238 |
!PackageId methodsFor:'printing'! |
239 |
||
240 |
printOn:aStream |
|
17235
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
241 |
aStream |
10075 | 242 |
nextPutAll:'PackageId('; nextPutAll:packageIdString; nextPutAll:')' |
243 |
||
244 |
"Created: / 12-10-2006 / 10:30:10 / cg" |
|
245 |
! ! |
|
246 |
||
9577 | 247 |
!PackageId methodsFor:'queries'! |
248 |
||
12329 | 249 |
isModuleId |
250 |
"true if this is a module-id only (i.e. no directory component present). |
|
251 |
These are not allowed to be used as real projects, but only for organization. |
|
252 |
The reason is that this is used as selector to select the sourceCodeManager and |
|
14570 | 253 |
also the manager's repository" |
12329 | 254 |
|
255 |
^ self directory isEmptyOrNil |
|
256 |
! |
|
257 |
||
9577 | 258 |
libraryName |
259 |
"return the name of the library, when compiled to a binary (i.e. dll/so). |
|
17235
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
260 |
To avoid conflicts with the projectDefinition class |
9577 | 261 |
(which is named <module>_<directory_components>), we prefix the library name |
262 |
with 'lib'. This has the added advantage, that under unix, linking can be done with |
|
263 |
'-l'shortName." |
|
264 |
||
18504 | 265 |
^ 'lib' , (ProjectDefinition projectDefinitionClassNameForDefinitionOf:packageIdString) |
9577 | 266 |
|
267 |
" |
|
17235
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
268 |
(PackageId from:'stx:libbasic') libraryName |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
269 |
(PackageId from:'stx:goodies/xml/stx') libraryName |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
270 |
(PackageId from:'bosch:dapasx') libraryName |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
271 |
(PackageId from:'exept:expecco') libraryName |
9577 | 272 |
" |
273 |
||
274 |
"Created: / 18-08-2006 / 12:35:04 / cg" |
|
275 |
! |
|
276 |
||
16497 | 277 |
packageDirectory |
17234 | 278 |
"return the pathName of the directory for this package in the file system" |
279 |
||
16497 | 280 |
^ Smalltalk packageDirectoryForPackageId:packageIdString. |
281 |
||
282 |
" |
|
17235
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
283 |
'stx:libbasic2' asPackageId packageDirectory |
16497 | 284 |
" |
285 |
! |
|
286 |
||
9668 | 287 |
parentPackage |
17235
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
288 |
|dir idx| |
9668 | 289 |
|
290 |
dir := self directory. |
|
10211
6516bfb2ae56
changed #parentPackage - handle nil
Stefan Vogel <sv@exept.de>
parents:
10208
diff
changeset
|
291 |
dir isNil ifTrue:[ |
6516bfb2ae56
changed #parentPackage - handle nil
Stefan Vogel <sv@exept.de>
parents:
10208
diff
changeset
|
292 |
^ nil. |
6516bfb2ae56
changed #parentPackage - handle nil
Stefan Vogel <sv@exept.de>
parents:
10208
diff
changeset
|
293 |
]. |
9668 | 294 |
idx := dir lastIndexOf:$/. |
295 |
idx == 0 ifTrue:[ |
|
17235
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
296 |
^ nil |
9668 | 297 |
]. |
17235
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
298 |
^ self class from:(self module , ':' , (dir copyTo:idx-1)) |
9668 | 299 |
|
300 |
" |
|
17235
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
301 |
(PackageId from:'stx:libbasic') parentPackage |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
302 |
(PackageId from:'stx:goodies/xml/stx') parentPackage |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
303 |
(PackageId from:'stx:goodies/xml/stx') parentPackage parentPackage |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
304 |
(PackageId from:'stx:goodies/xml/stx') parentPackage parentPackage parentPackage |
9668 | 305 |
" |
306 |
||
307 |
"Created: / 23-08-2006 / 15:10:13 / cg" |
|
12185 | 308 |
! |
309 |
||
310 |
pathRelativeToTopDirectory |
|
14249
e071c4ff23ae
changed: #pathRelativeToTopDirectory
Claus Gittinger <cg@exept.de>
parents:
13714
diff
changeset
|
311 |
^ (self module asFilename construct:(self directory)) name. |
12185 | 312 |
|
313 |
" |
|
17235
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
314 |
'stx:libbasic' asPackageId pathRelativeToTopDirectory |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
315 |
'stx:goodies/net/ssl' asPackageId pathRelativeToTopDirectory |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
316 |
'bosch:dapasx' asPackageId pathRelativeToTopDirectory |
12185 | 317 |
" |
14249
e071c4ff23ae
changed: #pathRelativeToTopDirectory
Claus Gittinger <cg@exept.de>
parents:
13714
diff
changeset
|
318 |
|
e071c4ff23ae
changed: #pathRelativeToTopDirectory
Claus Gittinger <cg@exept.de>
parents:
13714
diff
changeset
|
319 |
"Modified: / 25-07-2012 / 23:02:40 / cg" |
12185 | 320 |
! |
321 |
||
322 |
pathRelativeToTopDirectory:aDirectory |
|
323 |
^ aDirectory asFilename construct:(self pathRelativeToTopDirectory) |
|
324 |
||
325 |
" |
|
326 |
|top| |
|
327 |
||
328 |
top := Smalltalk packagePath first. |
|
17235
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
329 |
'stx:goodies/net/ssl' asPackageId pathRelativeToTopDirectory:top |
12185 | 330 |
" |
12199 | 331 |
! |
332 |
||
333 |
projectDefinitionClass |
|
18558 | 334 |
"return the project definition for this package. |
335 |
Eg. for 'stx:libbasic', this would return the stx_libbasic project definition class." |
|
336 |
||
12199 | 337 |
^ ProjectDefinition definitionClassForPackage:self |
338 |
||
339 |
" |
|
340 |
'stx:libbasic' asPackageId projectDefinitionClass |
|
17235
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
341 |
'exept/expecco/foo' asPackageId projectDefinitionClass |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
342 |
'exept/expecco/plugin/manualTest' asPackageId projectDefinitionClass |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
343 |
'exept:expecco/plugin/manualTest' asPackageId projectDefinitionClass |
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
344 |
'exept_expecco_plugin_manualTest' asPackageId projectDefinitionClass |
18505 | 345 |
'exept/expecco/plugin/edi-edifact' asPackageId projectDefinitionClass |
346 |
" |
|
347 |
! |
|
348 |
||
349 |
projectDefinitionClassName |
|
350 |
^ ProjectDefinition projectDefinitionClassNameForDefinitionOf:self |
|
351 |
||
352 |
" |
|
353 |
'stx:libbasic' asPackageId projectDefinitionClassName |
|
354 |
'exept/expecco/foo' asPackageId projectDefinitionClassName |
|
355 |
'exept/expecco/plugin/manualTest' asPackageId projectDefinitionClassName |
|
356 |
'exept:expecco/plugin/manualTest' asPackageId projectDefinitionClassName |
|
357 |
'exept_expecco_plugin_manualTest' asPackageId projectDefinitionClassName |
|
358 |
'exept/expecco/plugin/edi-edifact' asPackageId projectDefinitionClassName |
|
12199 | 359 |
" |
13714 | 360 |
! |
361 |
||
362 |
projectDirectory |
|
18573 | 363 |
<resource: #obsolete> |
16497 | 364 |
"/ replace by: |
365 |
^ self packageDirectory. |
|
14594 | 366 |
|
16497 | 367 |
"/ which works always. |
368 |
"/ the one below only works if a projDefClss is present... |
|
369 |
"/ |pdClass| |
|
370 |
"/ |
|
371 |
"/ (pdClass := self projectDefinitionClass) isNil ifTrue:[^ nil]. |
|
372 |
"/ ^ pdClass projectDirectory |
|
13714 | 373 |
|
374 |
" |
|
17235
6b5be0a1dcb9
Reverted PackageId>>parentPackage to it's 1.23 version to avoid endless loops in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17234
diff
changeset
|
375 |
'stx:libbasic2' asPackageId projectDirectory |
13714 | 376 |
" |
377 |
||
378 |
"Created: / 21-09-2011 / 18:21:32 / cg" |
|
9577 | 379 |
! ! |
380 |
||
9571 | 381 |
!PackageId class methodsFor:'documentation'! |
382 |
||
383 |
version |
|
18504 | 384 |
^ '$Header$' |
12185 | 385 |
! |
386 |
||
387 |
version_CVS |
|
18504 | 388 |
^ '$Header$' |
9571 | 389 |
! ! |
15373 | 390 |