author | Claus Gittinger <cg@exept.de> |
Fri, 15 Dec 2000 17:48:21 +0100 | |
changeset 5751 | ceba525a9c2a |
parent 5734 | c734386ad598 |
child 5819 | b46dd00555c6 |
permissions | -rw-r--r-- |
89 | 1 |
" |
236 | 2 |
COPYRIGHT (c) 1993 by Claus Gittinger |
203 | 3 |
All Rights Reserved |
89 | 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 |
" |
|
1 | 12 |
|
5371
6376d1fcf30f
use #allSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
5338
diff
changeset
|
13 |
"{ Package: 'stx:libbasic' }" |
6376d1fcf30f
use #allSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
5338
diff
changeset
|
14 |
|
1 | 15 |
Object subclass:#Project |
939
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
16 |
instanceVariableNames:'name changeSet views directoryName properties packageName |
4726 | 17 |
repositoryDirectory repositoryModule overwrittenMethods |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
18 |
subProjects prerequisites isLoaded changedClasses' |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
19 |
classVariableNames:'CurrentProject SystemProject NextSequential AllProjects |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
20 |
LoadedProjects' |
939
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
21 |
poolDictionaries:'' |
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
22 |
category:'System-Support' |
1 | 23 |
! |
24 |
||
5734 | 25 |
Object subclass:#ClassInfo |
26 |
instanceVariableNames:'conditionForInclusion className classFileName' |
|
4668 | 27 |
classVariableNames:'' |
28 |
poolDictionaries:'' |
|
29 |
privateIn:Project |
|
30 |
! |
|
31 |
||
5734 | 32 |
Object subclass:#MethodInfo |
33 |
instanceVariableNames:'conditionForInclusion methodName className fileName' |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
34 |
classVariableNames:'' |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
35 |
poolDictionaries:'' |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
36 |
privateIn:Project |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
37 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
38 |
|
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
39 |
!Project class methodsFor:'documentation'! |
89 | 40 |
|
41 |
copyright |
|
42 |
" |
|
43 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
203 | 44 |
All Rights Reserved |
89 | 45 |
|
46 |
This software is furnished under a license and may be used |
|
47 |
only in accordance with the terms of that license and with the |
|
48 |
inclusion of the above copyright notice. This software may not |
|
49 |
be provided or otherwise made available to, or used by, any |
|
50 |
other person. No title to or ownership of the software is |
|
51 |
hereby transferred. |
|
52 |
" |
|
53 |
! |
|
54 |
||
55 |
documentation |
|
56 |
" |
|
338 | 57 |
this class is still under construction (especially the build features are unfinished). |
235 | 58 |
Currently, all it does is keep track of per-project views |
59 |
(to hide or show them), define the directory when filing-out, |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
60 |
and define packageNames for new classes and methods. |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
61 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
62 |
instance variables: |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
63 |
name <String> the name of this project, as shown |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
64 |
in a ProjectView |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
65 |
|
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
66 |
changeSet <ChangeSet> changes done, while this was the active project |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
67 |
|
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
68 |
views <Collection> views opened while this was the active project |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
69 |
|
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
70 |
directoryName <String> directory name, where fileOuts are done |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
71 |
|
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
72 |
properties |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
73 |
|
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
74 |
packageName <String> given to classes/methods which are created while |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
75 |
this is the active project |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
76 |
|
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
77 |
repositoryDirectory (default) name of the repository, when a new source containers are |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
78 |
created. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
79 |
|
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
80 |
repositoryModule (default) name of the module, when new source containers are |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
81 |
created. |
235 | 82 |
|
83 |
Future: |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
84 |
- keep track of per-project changes |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
85 |
- allow speficiation of the type of the project (application or library) |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
86 |
- allow building of whatever the target (as defined by the type) is |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
87 |
(this will allow build of class libs and apps by clicking a button) |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
88 |
- allow removal of project specific classes, methods etc. |
1286 | 89 |
|
90 |
[author:] |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
91 |
Claus Gittinger |
89 | 92 |
" |
93 |
! ! |
|
94 |
||
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
95 |
!Project class methodsFor:'initialization'! |
236 | 96 |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
97 |
initKnownProjects |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
98 |
"this is a temporary experimental kludge - |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
99 |
once the ProjectBrowser is finished, this info is read from |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
100 |
'.prj' files ..." |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
101 |
|
4668 | 102 |
"/ collect project info while scanning all classes |
103 |
"/ and methods ... |
|
104 |
||
105 |
AllProjects isNil ifTrue:[ |
|
5547 | 106 |
AllProjects := IdentitySet new. |
4668 | 107 |
]. |
5547 | 108 |
|
109 |
AllProjects add:SystemProject. |
|
110 |
AllProjects add:CurrentProject. |
|
111 |
||
4912 | 112 |
"/ Smalltalk allClassesDo:[:aClass | |
113 |
"/ |packageID prj classFilename pkgInfo revInfo |
|
114 |
"/ repositoryPath dir module lib nm| |
|
115 |
"/ |
|
116 |
"/ aClass isMeta ifFalse:[ |
|
117 |
"/ (aClass isNamespace not or:[aClass == Smalltalk]) ifTrue:[ |
|
118 |
"/ (Smalltalk at:aClass name) == aClass ifFalse:[ |
|
119 |
"/ Transcript showCR:'skipping obsolete/removed class: ' , aClass name. |
|
120 |
"/ ] ifTrue:[ |
|
121 |
"/ packageID := aClass package asSymbol. |
|
122 |
"/ (packages includesKey:packageID) ifFalse:[ |
|
123 |
"/ |
|
124 |
"/ "/ a new one ... |
|
125 |
"/ |
|
126 |
"/ prj := self new. |
|
127 |
"/ prj package:packageID. |
|
128 |
"/ prj directory:'???'. |
|
129 |
"/ prj repositoryModule:'unknown'. |
|
130 |
"/ prj repositoryDirectory:'unknown'. |
|
131 |
"/ |
|
132 |
"/ nm := 'unknown'. |
|
133 |
"/ |
|
134 |
"/ pkgInfo := aClass packageSourceCodeInfo. |
|
135 |
"/ pkgInfo notNil ifTrue:[ |
|
136 |
"/ module := pkgInfo at:#module ifAbsent:nil. |
|
137 |
"/ module notNil ifTrue:[ |
|
138 |
"/ prj repositoryModule:module |
|
139 |
"/ ]. |
|
140 |
"/ dir := pkgInfo at:#directory ifAbsent:nil. |
|
141 |
"/ dir notNil ifTrue:[ |
|
142 |
"/ prj repositoryDirectory:dir |
|
143 |
"/ ]. |
|
144 |
"/ lib := pkgInfo at:#library ifAbsent:nil. |
|
145 |
"/ lib notNil ifTrue:[ |
|
146 |
"/ prj type:#library. |
|
147 |
"/ ]. |
|
148 |
"/ prj isLoaded:true. |
|
149 |
"/ ]. |
|
150 |
"/ |
|
151 |
"/ nm := (module ? 'unknown') |
|
152 |
"/ , ':' |
|
153 |
"/ , (dir ? (lib ? 'unknown')). |
|
154 |
"/ |
|
155 |
"/ prj name:nm. |
|
156 |
"/ AllProjects add:prj. |
|
157 |
"/ packages at:packageID put:prj. |
|
158 |
"/ ] ifTrue:[ |
|
159 |
"/ prj := packages at:packageID. |
|
160 |
"/ prj addClass:aClass. |
|
161 |
"/ ]. |
|
162 |
"/ ]. |
|
163 |
"/ ]. |
|
164 |
"/ ]. |
|
165 |
"/ ]. |
|
166 |
"/ |
|
167 |
"/ Method allSubInstancesDo:[:aMethod | |
|
168 |
"/ |packageID prj who mthdClass| |
|
169 |
"/ |
|
170 |
"/ who := aMethod who. |
|
171 |
"/ who notNil ifTrue:[ "/ skip unbound methods ... |
|
172 |
"/ packageID := aMethod package asSymbol. |
|
173 |
"/ (packages includesKey:packageID) ifFalse:[ |
|
174 |
"/ "/ a new one ... |
|
175 |
"/ prj := self new. |
|
176 |
"/ "/ prj name:libName. |
|
177 |
"/ prj package:packageID. |
|
178 |
"/ prj type:#library. |
|
179 |
"/ prj directory:'???'. |
|
180 |
"/ prj repositoryModule:'stx'. |
|
181 |
"/ prj repositoryDirectory:'???'. |
|
182 |
"/ prj isLoaded:true. |
|
183 |
"/ AllProjects add:prj. |
|
184 |
"/ packages at:packageID put:prj. |
|
185 |
"/ ] ifTrue:[ |
|
186 |
"/ "/ see if the methods class is in the project; |
|
187 |
"/ "/ if so, remove any patch-entry for this method. |
|
188 |
"/ prj := packages at:packageID. |
|
189 |
"/ ((prj classes includes:who methodClass) |
|
190 |
"/ or:[prj classes includes:who methodClass name]) ifTrue:[ |
|
191 |
"/ prj removeMethod:aMethod. |
|
192 |
"/ ] |
|
193 |
"/ ] |
|
194 |
"/ ] |
|
195 |
"/ ]. |
|
196 |
"/ |
|
197 |
"/ "/ walk over binary modules, to find out directory names ... |
|
198 |
"/ |
|
199 |
"/ ObjectFileLoader loadedObjectHandles do:[:h | |
|
200 |
"/ |cls prj mDir| |
|
201 |
"/ |
|
202 |
"/ cls := h classes firstIfEmpty:nil. |
|
203 |
"/ cls notNil ifTrue:[ |
|
204 |
"/ prj := packages at:cls package ifAbsent:nil. |
|
205 |
"/ prj notNil ifTrue:[ |
|
206 |
"/ mDir := h pathName asFilename directory pathName. |
|
207 |
"/ prj directory = '???' ifTrue:[ |
|
208 |
"/ prj directory:mDir |
|
209 |
"/ ] ifFalse:[ |
|
210 |
"/ prj directory ~= mDir ifTrue:[ |
|
211 |
"/ ('Project [warning]: conflicting project directories for ' , cls package) infoPrintCR. |
|
212 |
"/ ] |
|
213 |
"/ ] |
|
214 |
"/ ] |
|
215 |
"/ ]. |
|
216 |
"/ ]. |
|
217 |
"/ |
|
218 |
"/ self changed:#allProjects |
|
219 |
||
220 |
||
221 |
||
222 |
||
4668 | 223 |
|
4066 | 224 |
"/ |stx p| |
225 |
"/ |
|
226 |
"/ stx := self new name:'stx'. |
|
227 |
"/ stx packageName:'noPackage'. |
|
228 |
"/ stx changeSet:nil. |
|
229 |
"/ stx type:#smalltalk. |
|
230 |
"/ stx comment:'The ST/X project itself'. |
|
231 |
"/ |
|
232 |
"/ AllProjects add:stx. |
|
233 |
"/ |
|
234 |
"/ #( |
|
235 |
"/ ('libbasic' #'stx:libbasic' 'Basic (non-GUI) classes. Required for all applications') |
|
236 |
"/ ('libbasic2' #'stx:libbasic2' 'More basic (non-GUI) classes. Required for most applications') |
|
237 |
"/ ('libbasic3' #'stx:libbasic3' 'More basic (non-GUI) classes. Required for development') |
|
238 |
"/ ('libcomp' #'stx:libcomp' 'The bytecode compiler. Required for all applications') |
|
239 |
"/ ('libview' #'stx:libview' 'Low level GUI classes. Required for all GUI applications') |
|
240 |
"/ ('libview2' #'stx:libview2' 'Additional low level GUI classes. Required for most GUI applications') |
|
241 |
"/ ('libwidg' #'stx:libwidg' 'Basic widgets. Required for all GUI applications') |
|
242 |
"/ ('libwidg2' #'stx:libwidg2' 'More widgets. Required for most GUI applications') |
|
243 |
"/ ('libwidg3' #'stx:libwidg3' 'More (fun) widgets. Seldom required') |
|
244 |
"/ ('libtool' #'stx:libtool' 'Development applications. Required for program development') |
|
245 |
"/ ('libtool2' #'stx:libtool2' 'More development applications. Required for GUI development') |
|
246 |
"/ ('libui' #'stx:libui' 'UI spec classes. Required for UIPainter applications') |
|
247 |
"/ ('libhtml' #'stx:libhtml' 'HTML related classes. Required for Web applications and the HTML browser') |
|
248 |
"/ ('libodbc' #'stx:libodbc' 'ODBC interface classes.') |
|
249 |
"/ ('libopengl' #'stx:libopengl' 'OpenGL interface classes.') |
|
250 |
"/ ('persistency' #'stx:goodies/persistency' 'Simple DB interface') |
|
251 |
"/ ('goodies' #'stx:goodies' 'Misc goodies - not really maintained') |
|
252 |
"/ ) do:[:entry | |
|
253 |
"/ |libName package comment| |
|
254 |
"/ |
|
255 |
"/ libName := entry at:1. |
|
256 |
"/ package := entry at:2. |
|
257 |
"/ comment := entry at:3. |
|
258 |
"/ |
|
259 |
"/ p := self new name:libName. |
|
260 |
"/ p packageName:package. |
|
261 |
"/ p type:#library. |
|
262 |
"/ p comment:comment. |
|
263 |
"/ stx addSubProject:p. |
|
264 |
"/ ]. |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
265 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
266 |
" |
4668 | 267 |
AllProjects := nil. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
268 |
self initKnownProjects |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
269 |
" |
4069 | 270 |
|
4912 | 271 |
"Modified: / 16.10.1999 / 13:10:37 / cg" |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
272 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
273 |
|
236 | 274 |
initialize |
338 | 275 |
SystemProject isNil ifTrue:[ |
5547 | 276 |
self initializeSystemProject. |
338 | 277 |
]. |
278 |
||
279 |
CurrentProject := SystemProject. |
|
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
280 |
AllProjects := nil. |
5547 | 281 |
self initKnownProjects. |
236 | 282 |
|
315 | 283 |
" |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
284 |
SystemProject := nil. |
315 | 285 |
Project initialize |
286 |
" |
|
4886 | 287 |
! |
288 |
||
5547 | 289 |
initializeSystemProject |
290 |
NextSequential := 1. |
|
291 |
SystemProject := self new name:'default'. |
|
292 |
"/ SystemProject package:(OperatingSystem getLoginName , ':NoProject') asSymbol. |
|
293 |
SystemProject package:#'__NoProject__'. |
|
294 |
SystemProject defaultNameSpace:Smalltalk. |
|
295 |
SystemProject comment:'A default (dummy) project. |
|
296 |
Is used as the current project in case no real project is ever activated. |
|
297 |
Please do never save/checkin this project; instead, move classes & methods |
|
298 |
into a concrete, real project and save that one in regular intervals. |
|
299 |
Use this as a `scratch project''. |
|
300 |
'. |
|
301 |
||
302 |
"/ no longer - changes are always remembered in some project |
|
303 |
false ifTrue:[ |
|
304 |
" |
|
305 |
the SystemProject does not keep a record if changes, |
|
306 |
but instead depends on the changes file - recording anything there. |
|
307 |
" |
|
308 |
SystemProject changeSet:nil. |
|
309 |
]. |
|
310 |
ChangeSet notNil ifTrue:[ |
|
311 |
SystemProject changeSet:ChangeSet new |
|
312 |
]. |
|
313 |
self changed:#defaultProject |
|
314 |
! |
|
315 |
||
4886 | 316 |
reinitKnownProjects |
317 |
"rescan the image for projects" |
|
318 |
||
319 |
AllProjects := nil. |
|
320 |
self initKnownProjects |
|
236 | 321 |
! ! |
322 |
||
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
323 |
!Project class methodsFor:'instance creation'! |
236 | 324 |
|
325 |
new |
|
326 |
^ self basicNew initialize |
|
327 |
! ! |
|
328 |
||
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
329 |
!Project class methodsFor:'accessing'! |
1 | 330 |
|
4071 | 331 |
addKnownProject:aProject |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
332 |
|allProjects| |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
333 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
334 |
allProjects := self knownProjects. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
335 |
(allProjects detect:[:p | p package = aProject package] ifNone:nil) notNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
336 |
self warn:'Project for ' , aProject package , ' is already present.'. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
337 |
^ self. |
4071 | 338 |
]. |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
339 |
|
4071 | 340 |
AllProjects add:aProject. |
341 |
self changed:#allProjects |
|
342 |
! |
|
343 |
||
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
344 |
addLoadedProject:aProject |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
345 |
aProject isLoaded:true. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
346 |
self addKnownProject:aProject. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
347 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
348 |
|
1 | 349 |
current |
10 | 350 |
"return the currently active project" |
351 |
||
5692 | 352 |
CurrentProject isNil ifTrue:[CurrentProject := SystemProject ]. |
1 | 353 |
^ CurrentProject |
354 |
||
362 | 355 |
" |
356 |
Project current |
|
357 |
" |
|
1 | 358 |
! |
359 |
||
360 |
current:aProject |
|
10 | 361 |
"set the currently active project" |
362 |
||
5542 | 363 |
|prevProject| |
364 |
||
365 |
prevProject := CurrentProject. |
|
315 | 366 |
CurrentProject := aProject. |
5542 | 367 |
prevProject notNil ifTrue:[ |
368 |
self changed:#currentProject |
|
369 |
]. |
|
334 | 370 |
! |
371 |
||
617 | 372 |
currentPackageName |
373 |
CurrentProject notNil ifTrue:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
374 |
^ CurrentProject package |
617 | 375 |
]. |
4112
5ee841c34b10
return nil (instead of 'no package') if no current package is defined.
Claus Gittinger <cg@exept.de>
parents:
4099
diff
changeset
|
376 |
^ nil |
617 | 377 |
|
378 |
" |
|
379 |
Project currentPackageName |
|
380 |
" |
|
381 |
! |
|
382 |
||
336 | 383 |
defaultProject |
384 |
"return the SystemDefault project" |
|
385 |
||
386 |
^ SystemProject. |
|
387 |
! |
|
388 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
389 |
knownProjects |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
390 |
AllProjects isNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
391 |
self initKnownProjects |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
392 |
]. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
393 |
^ AllProjects ? #() |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
394 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
395 |
|
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
396 |
loadedProjects |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
397 |
^ self knownProjects select:[:p | p isLoaded] |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
398 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
399 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
400 |
projectNamed:aProjectName |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
401 |
"retrieve the named project; return nil if not known" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
402 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
403 |
^ self knownProjects detect:[:p | p name = aProjectName] ifNone:nil. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
404 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
405 |
" |
5547 | 406 |
Project projectNamed:'stx' |
407 |
Project projectNamed:'default' |
|
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
408 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
409 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
410 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
411 |
projectWithId:aPackageId |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
412 |
"retrieve the project with a particular id; return nil if not known" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
413 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
414 |
^ self knownProjects detect:[:p | p package = aPackageId] ifNone:nil. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
415 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
416 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
417 |
Project projectWithId:#'stx:libbasic' |
5547 | 418 |
Project projectWithId:'__NoProject__' |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
419 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
420 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
421 |
|
334 | 422 |
setDefaultProject |
423 |
"set the currently active project to be the SystemDEfault project" |
|
424 |
||
425 |
self current:SystemProject. |
|
939
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
426 |
! |
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
427 |
|
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
428 |
setProject:aProjectOrNil |
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
429 |
"set the currently active project without updating others" |
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
430 |
|
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
431 |
CurrentProject := aProjectOrNil. |
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
432 |
|
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
433 |
"Created: 7.2.1996 / 14:00:45 / cg" |
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
434 |
"Modified: 7.2.1996 / 14:01:16 / cg" |
1 | 435 |
! ! |
436 |
||
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
437 |
!Project class methodsFor:'changes management'! |
149 | 438 |
|
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
439 |
addClassCommentChangeFor:aClass |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
440 |
"add a comment-change for aClass to the current project" |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
441 |
|
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
442 |
|p| |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
443 |
|
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
444 |
p := CurrentProject. |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
445 |
p notNil ifTrue:[ |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
446 |
p addClassCommentChangeFor:aClass |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
447 |
] |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
448 |
! |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
449 |
|
664 | 450 |
addClassDefinitionChangeFor:aClass |
1115 | 451 |
"add a class-def-change for aClass to the current project" |
452 |
||
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
453 |
|p| |
664 | 454 |
|
455 |
p := CurrentProject. |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
456 |
p notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
457 |
p addClassDefinitionChangeFor:aClass |
664 | 458 |
] |
459 |
||
460 |
"Created: 3.12.1995 / 13:44:58 / cg" |
|
461 |
"Modified: 3.12.1995 / 13:58:04 / cg" |
|
462 |
! |
|
463 |
||
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
464 |
addInstVarDefinitionChangeFor:aClass |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
465 |
"add an instvar-change for aClass to the current project" |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
466 |
|
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
467 |
|p| |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
468 |
|
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
469 |
p := CurrentProject. |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
470 |
p notNil ifTrue:[ |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
471 |
p addInstVarDefinitionChangeFor:aClass |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
472 |
] |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
473 |
|
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
474 |
"Created: 3.12.1995 / 13:44:58 / cg" |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
475 |
"Modified: 3.12.1995 / 13:58:04 / cg" |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
476 |
! |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
477 |
|
617 | 478 |
addMethodCategoryChange:aMethod category:newCategory in:aClass |
1115 | 479 |
"add a method-category-change for aMethod in aClass to the current project" |
480 |
||
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
481 |
|p| |
617 | 482 |
|
483 |
p := CurrentProject. |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
484 |
p notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
485 |
p addMethodCategoryChange:aMethod category:newCategory in:aClass |
617 | 486 |
] |
487 |
! |
|
488 |
||
5553
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
489 |
addMethodChange:aMethod fromOld:oldMethod in:aClass |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
490 |
"add a method change in aClass to the current project" |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
491 |
|
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
492 |
|p| |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
493 |
|
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
494 |
p := CurrentProject. |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
495 |
p notNil ifTrue:[ |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
496 |
p addMethodChange:aMethod fromOld:oldMethod in:aClass |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
497 |
]. |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
498 |
! |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
499 |
|
149 | 500 |
addMethodChange:aMethod in:aClass |
1115 | 501 |
"add a method change in aClass to the current project" |
149 | 502 |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
503 |
|p| |
149 | 504 |
|
505 |
p := CurrentProject. |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
506 |
p notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
507 |
p addMethodChange:aMethod in:aClass |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
508 |
]. |
203 | 509 |
! |
510 |
||
617 | 511 |
addMethodPrivacyChange:aMethod in:aClass |
1115 | 512 |
"add a privacy change for aMethod in aClass to the current project" |
513 |
||
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
514 |
|p| |
617 | 515 |
|
516 |
p := CurrentProject. |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
517 |
p notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
518 |
p addMethodPrivacyChange:aMethod in:aClass |
617 | 519 |
] |
520 |
||
521 |
"Modified: 27.8.1995 / 22:48:17 / claus" |
|
522 |
! |
|
523 |
||
705 | 524 |
addPrimitiveDefinitionsChangeFor:aClass |
1115 | 525 |
"add a primitiveDef change for aClass to the current project" |
526 |
||
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
527 |
|p| |
705 | 528 |
|
529 |
p := CurrentProject. |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
530 |
p notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
531 |
p addPrimitiveDefinitionsChangeFor:aClass |
705 | 532 |
] |
533 |
! |
|
534 |
||
535 |
addPrimitiveFunctionsChangeFor:aClass |
|
1115 | 536 |
"add a primitiveFuncs change for aClass to the current project" |
537 |
||
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
538 |
|p| |
705 | 539 |
|
540 |
p := CurrentProject. |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
541 |
p notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
542 |
p addPrimitiveFunctionsChangeFor:aClass |
705 | 543 |
] |
544 |
! |
|
545 |
||
546 |
addPrimitiveVariablesChangeFor:aClass |
|
1115 | 547 |
"add a primitiveVars change for aClass to the current project" |
548 |
||
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
549 |
|p| |
705 | 550 |
|
551 |
p := CurrentProject. |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
552 |
p notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
553 |
p addPrimitiveVariablesChangeFor:aClass |
705 | 554 |
] |
555 |
! |
|
556 |
||
3288
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
557 |
addRemoveSelectorChange:aSelector in:aClass |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
558 |
"add a method-remove change in aClass to the current project" |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
559 |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
560 |
|p| |
3288
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
561 |
|
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
562 |
p := CurrentProject. |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
563 |
p notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
564 |
p addRemoveSelectorChange:aSelector in:aClass |
3288
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
565 |
] |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
566 |
|
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
567 |
"Created: / 16.2.1998 / 12:45:10 / cg" |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
568 |
! |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
569 |
|
5239
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
570 |
addRenameCategoryChangeIn:aClass from:oldCategory to:newCategory |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
571 |
"add a category rename change for aClass to the current project" |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
572 |
|
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
573 |
|p| |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
574 |
|
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
575 |
p := CurrentProject. |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
576 |
p notNil ifTrue:[ |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
577 |
p addRenameCategoryChangeIn:aClass from:oldCategory to:newCategory |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
578 |
] |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
579 |
|
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
580 |
"Created: / 6.2.2000 / 02:27:35 / cg" |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
581 |
! |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
582 |
|
149 | 583 |
currentProjectDirectory |
584 |
"return the name of the directory to use for fileOut. |
|
235 | 585 |
The returned name already includes a file-separator at the end, |
586 |
so the filename can be concatenated to it." |
|
149 | 587 |
|
588 |
|p dirName| |
|
589 |
||
590 |
p := CurrentProject. |
|
591 |
p notNil ifTrue:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
592 |
dirName := p directory |
149 | 593 |
] ifFalse:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
594 |
dirName := Filename currentDirectory name |
149 | 595 |
]. |
2962 | 596 |
^ dirName |
2907 | 597 |
|
598 |
"Modified: 7.9.1997 / 23:52:25 / cg" |
|
2334
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
599 |
! |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
600 |
|
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
601 |
rememberOverwrittenMethod:newMethod from:oldMethod |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
602 |
"remember a method (from another package) being overwritten. |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
603 |
This is only remembered, if the current project is not the |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
604 |
system project (to avoid filling this remembered-table)" |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
605 |
|
2558 | 606 |
|p| |
2334
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
607 |
|
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
608 |
p := CurrentProject. |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
609 |
(p notNil |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
610 |
and:[p ~~ SystemProject]) ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
611 |
p rememberOverwrittenMethod:newMethod from:oldMethod |
2334
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
612 |
] ifFalse:[ |
3332
8014b817988b
remove the 'does not remember ...' message.
Claus Gittinger <cg@exept.de>
parents:
3288
diff
changeset
|
613 |
"/ 'Project [info]: DefaultProject does not remember overwritten methods' infoPrintCR |
2334
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
614 |
] |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
615 |
|
3332
8014b817988b
remove the 'does not remember ...' message.
Claus Gittinger <cg@exept.de>
parents:
3288
diff
changeset
|
616 |
"Modified: / 7.3.1998 / 13:38:39 / cg" |
13 | 617 |
! ! |
618 |
||
4909 | 619 |
!Project class methodsFor:'misc'! |
620 |
||
621 |
projectFileFormatVersion |
|
622 |
^ 1 |
|
623 |
! ! |
|
624 |
||
5151 | 625 |
!Project class methodsFor:'testing'! |
626 |
||
627 |
isClassChanged:aClass |
|
5547 | 628 |
"return true, if aClass has been changed" |
5151 | 629 |
|
630 |
^self current changedClasses includesIdentical:aClass |
|
631 |
! ! |
|
632 |
||
1 | 633 |
!Project methodsFor:'accessing'! |
634 |
||
5177 | 635 |
addPrerequisitePackage:aPackageId |
636 |
"add onother prerequisitePackage to the project" |
|
637 |
||
638 |
|list| |
|
639 |
||
640 |
list := self prerequisites. |
|
641 |
(list includes:aPackageId) ifFalse:[ |
|
642 |
list addLast:aPackageId |
|
643 |
]. |
|
644 |
! |
|
645 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
646 |
addSubProject:aProject |
4097 | 647 |
"add a subproject - obsolete; we use prerequisites now" |
648 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
649 |
subProjects isNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
650 |
subProjects := OrderedCollection new. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
651 |
]. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
652 |
subProjects add:aProject |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
653 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
654 |
|
1 | 655 |
changeSet |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
656 |
"return the set of changes made in this project" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
657 |
|
1 | 658 |
^ changeSet |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
659 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
660 |
"Modified: 27.1.1997 / 11:58:36 / cg" |
1 | 661 |
! |
662 |
||
236 | 663 |
changeSet:aChangeSet |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
664 |
"set the set of changes made in this project - dangerous, you may loose |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
665 |
the actual changeSet." |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
666 |
|
236 | 667 |
changeSet := aChangeSet |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
668 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
669 |
"Modified: 27.1.1997 / 11:59:02 / cg" |
73 | 670 |
! |
671 |
||
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
672 |
changedClasses |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
673 |
^ changedClasses ifNil:[changedClasses := IdentitySet new]. |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
674 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
675 |
" |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
676 |
self new changedClasses |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
677 |
" |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
678 |
! |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
679 |
|
2028 | 680 |
defaultNameSpace |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
681 |
"return the defaultNameSpace of this project. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
682 |
New classes will (if not specified by a directive) be installed |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
683 |
in this nameSpace. Useful, when filing in ST-80 code, to avoid |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
684 |
overwriting of standard classes." |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
685 |
|
4726 | 686 |
^ (self propertyAt:#defaultNameSpace) ? Smalltalk |
2028 | 687 |
|
688 |
! |
|
689 |
||
690 |
defaultNameSpace:aNamespace |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
691 |
"set the defaultNameSpace of this project. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
692 |
New classes will (if not specified by a directive) be installed |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
693 |
in this nameSpace. Useful, when filing in ST-80 code, to avoid |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
694 |
overwriting of standard classes." |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
695 |
|
4726 | 696 |
|prevDefault| |
697 |
||
698 |
prevDefault := self defaultNameSpace. |
|
699 |
aNamespace ~~ prevDefault ifTrue:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
700 |
self propertyAt:#defaultNameSpace put:aNamespace. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
701 |
self changed:#defaultNameSpace. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
702 |
self == CurrentProject ifTrue:[ |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
703 |
Project changed:#defaultNameSpace |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
704 |
] |
2032 | 705 |
] |
2028 | 706 |
|
707 |
"Created: 2.1.1997 / 19:54:37 / cg" |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
708 |
"Modified: 27.1.1997 / 12:00:01 / cg" |
2028 | 709 |
! |
710 |
||
315 | 711 |
directory |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
712 |
"return the projects directory. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
713 |
If not specified, a fileOut will be done into that directory" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
714 |
|
315 | 715 |
directoryName isNil ifTrue:[^ '.']. |
716 |
^ directoryName |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
717 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
718 |
"Modified: 27.1.1997 / 12:00:41 / cg" |
315 | 719 |
! |
720 |
||
721 |
directory:aDirectoryName |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
722 |
"set the projects directory. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
723 |
If not specified, a fileOut will be done into that directory" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
724 |
|
315 | 725 |
directoryName := aDirectoryName. |
4070 | 726 |
self changed:#directory. |
315 | 727 |
self == CurrentProject ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
728 |
Project changed:#directory |
315 | 729 |
] |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
730 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
731 |
"Modified: 27.1.1997 / 12:00:47 / cg" |
617 | 732 |
! |
356 | 733 |
|
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
734 |
isLoaded:aBoolean |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
735 |
isLoaded := aBoolean |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
736 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
737 |
|
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
738 |
libraryName |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
739 |
"return the projects library name. |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
740 |
This is the name of a classLibrary, created from this project" |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
741 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
742 |
|nm| |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
743 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
744 |
nm := self name. |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
745 |
^ nm copyFrom:(nm lastIndexOfAny:':/')+1 |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
746 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
747 |
"/ ^ (self name copyReplaceAll:$/ with:$_) replaceAll:$: with:$_ |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
748 |
! |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
749 |
|
617 | 750 |
name |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
751 |
"return the projects name. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
752 |
This is for the user only - shown in the projectViews label" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
753 |
|
617 | 754 |
^ name |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
755 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
756 |
"Modified: 27.1.1997 / 12:01:16 / cg" |
617 | 757 |
! |
356 | 758 |
|
617 | 759 |
name:aString |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
760 |
"set the projects name. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
761 |
This is for the user only - shown in the projectViews label" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
762 |
|
617 | 763 |
name := aString. |
4070 | 764 |
self changed:#name. |
617 | 765 |
self == CurrentProject ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
766 |
Project changed:#name |
617 | 767 |
] |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
768 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
769 |
"Modified: 27.1.1997 / 12:01:09 / cg" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
770 |
! |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
771 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
772 |
overwrittenMethods |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
773 |
"return the set of methods which were overwritten in this project. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
774 |
This information allows uninstalling, by switching back to the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
775 |
original methods." |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
776 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
777 |
^ overwrittenMethods |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
778 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
779 |
"Created: 27.1.1997 / 11:57:21 / cg" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
780 |
"Modified: 27.1.1997 / 12:09:14 / cg" |
356 | 781 |
! |
782 |
||
4668 | 783 |
package |
784 |
"return the projects package identifier. |
|
785 |
This identifier marks all methods and new classes which were created |
|
786 |
in this project." |
|
787 |
||
788 |
^ packageName |
|
789 |
||
790 |
"Modified: 27.1.1997 / 12:10:00 / cg" |
|
791 |
! |
|
792 |
||
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
793 |
package:aPackageId |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
794 |
"set the projects package identifier. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
795 |
This identifier marks all methods and new classes which were created |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
796 |
in this project." |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
797 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
798 |
packageName := aPackageId |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
799 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
800 |
"Modified: 27.1.1997 / 12:10:00 / cg" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
801 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
802 |
|
4727 | 803 |
packageName:aPackageId |
804 |
"set the projects package identifier. |
|
805 |
This identifier marks all methods and new classes which were created |
|
806 |
in this project." |
|
807 |
||
808 |
self package:aPackageId |
|
809 |
||
810 |
"Modified: 27.1.1997 / 12:10:00 / cg" |
|
811 |
! |
|
812 |
||
4099 | 813 |
prerequisiteClasses |
814 |
"return the prerequisiteClasses of the project" |
|
815 |
||
816 |
^ (self propertyAt:#prerequisiteClasses) ? #() |
|
817 |
! |
|
818 |
||
4124 | 819 |
prerequisiteClasses:aCollectionOfClassesOrClassNames |
4099 | 820 |
"set the prerequisiteClasses of the project" |
821 |
||
4124 | 822 |
^ self propertyAt:#prerequisiteClasses put:aCollectionOfClassesOrClassNames |
823 |
||
824 |
"Modified: / 26.4.1999 / 23:33:44 / cg" |
|
825 |
! |
|
826 |
||
827 |
prerequisitePackages |
|
828 |
"return the prerequisitePackages of the project" |
|
829 |
||
830 |
^ self prerequisites |
|
831 |
||
832 |
"Created: / 26.4.1999 / 23:33:22 / cg" |
|
833 |
! |
|
834 |
||
835 |
prerequisitePackages:aCollectionOfPackagesOrPackageNames |
|
836 |
"set the prerequisitePackages of the project" |
|
837 |
||
838 |
^ self prerequisites:aCollectionOfPackagesOrPackageNames |
|
839 |
||
840 |
"Modified: / 26.4.1999 / 23:34:40 / cg" |
|
4099 | 841 |
! |
842 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
843 |
prerequisites |
4097 | 844 |
"return the prerequisites of the project" |
845 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
846 |
^ prerequisites ? #() |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
847 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
848 |
|
3973 | 849 |
prerequisites:aCollectionOfProjects |
4097 | 850 |
"set the prerequisites of the project" |
851 |
||
3973 | 852 |
prerequisites := aCollectionOfProjects |
853 |
! |
|
854 |
||
654 | 855 |
repositoryDirectory |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
856 |
"return the projects default repository location. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
857 |
This is offered initially, when classes are checked into the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
858 |
source repository initially" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
859 |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
860 |
^ repositoryDirectory |
654 | 861 |
|
862 |
"Created: 25.11.1995 / 18:04:51 / cg" |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
863 |
"Modified: 27.1.1997 / 12:13:35 / cg" |
654 | 864 |
! |
865 |
||
866 |
repositoryDirectory:aRelativePathName |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
867 |
"set the projects default repository location. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
868 |
This will be offered initially, when classes are checked into the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
869 |
source repository initially" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
870 |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
871 |
repositoryDirectory := aRelativePathName |
654 | 872 |
|
873 |
"Created: 25.11.1995 / 18:05:06 / cg" |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
874 |
"Modified: 27.1.1997 / 12:13:28 / cg" |
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
875 |
! |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
876 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
877 |
repositoryModule |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
878 |
"return the projects default repository module name. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
879 |
This is offered initially, when classes are checked into the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
880 |
source repository initially" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
881 |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
882 |
^ repositoryModule |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
883 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
884 |
"Created: 25.11.1995 / 18:04:51 / cg" |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
885 |
"Modified: 27.1.1997 / 12:13:50 / cg" |
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
886 |
! |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
887 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
888 |
repositoryModule:aString |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
889 |
"set the projects default repository module name. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
890 |
This is offered initially, when classes are checked into the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
891 |
source repository initially" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
892 |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
893 |
repositoryModule := aString |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
894 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
895 |
"Created: 25.11.1995 / 18:05:06 / cg" |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
896 |
"Modified: 27.1.1997 / 12:13:57 / cg" |
654 | 897 |
! |
898 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
899 |
subProjects |
4097 | 900 |
"return the subprojects - obsolete; we use prerequisites now" |
901 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
902 |
^ subProjects ? #() |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
903 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
904 |
|
617 | 905 |
views |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
906 |
"return a collection of views which were opened in this project" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
907 |
|
617 | 908 |
^ views asArray |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
909 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
910 |
"Modified: 27.1.1997 / 12:14:18 / cg" |
338 | 911 |
! |
912 |
||
617 | 913 |
views:aSetOfViews |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
914 |
"set the collection of views which were opened in this project" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
915 |
|
617 | 916 |
views := WeakIdentitySet withAll:aSetOfViews |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
917 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
918 |
"Modified: 27.1.1997 / 12:14:26 / cg" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
919 |
! ! |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
920 |
|
4079 | 921 |
!Project methodsFor:'administration'! |
922 |
||
923 |
removeClassesFromSystem |
|
924 |
"remove the all of my classes & patches from the system" |
|
925 |
||
926 |
self classInfo do:[:clsInfo | |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
927 |
|clsName cls| |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
928 |
|
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
929 |
clsName := clsInfo className. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
930 |
clsName isSymbol ifTrue:[ |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
931 |
cls := Smalltalk at:clsName. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
932 |
cls notNil ifTrue:[ |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
933 |
cls removeFromSystem. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
934 |
]. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
935 |
] ifFalse:[ |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
936 |
self halt |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
937 |
]. |
4079 | 938 |
]. |
939 |
||
940 |
! |
|
941 |
||
942 |
removeFromSystem |
|
943 |
"remove the project and all of its classes & patches from the |
|
944 |
system" |
|
945 |
||
946 |
self removeClassesFromSystem. |
|
947 |
AllProjects remove:self ifAbsent:nil. |
|
948 |
! ! |
|
949 |
||
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
950 |
!Project methodsFor:'changes'! |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
951 |
|
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
952 |
addClassCommentChangeFor:aClass |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
953 |
"add a comment-change for aClass to the receivers changeSet" |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
954 |
|
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
955 |
|changeSet| |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
956 |
|
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
957 |
(changeSet := self changeSet) notNil ifTrue:[ |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
958 |
changeSet addClassCommentChangeFor:aClass |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
959 |
]. |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
960 |
self rememberChangedClass:aClass |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
961 |
|
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
962 |
! |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
963 |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
964 |
addClassDefinitionChangeFor:aClass |
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
965 |
"add a class-def-change for aClass to the receivers changeSet" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
966 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
967 |
|changeSet| |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
968 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
969 |
(changeSet := self changeSet) notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
970 |
changeSet addClassDefinitionChangeFor:aClass |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
971 |
]. |
5156 | 972 |
self rememberChangedClass:aClass |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
973 |
! |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
974 |
|
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
975 |
addInstVarDefinitionChangeFor:aClass |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
976 |
"add an instvar-definition-change for aClass to the receivers changeSet" |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
977 |
|
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
978 |
|changeSet| |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
979 |
|
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
980 |
(changeSet := self changeSet) notNil ifTrue:[ |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
981 |
changeSet addInstVarDefinitionChangeFor:aClass |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
982 |
]. |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
983 |
self rememberChangedClass:aClass |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
984 |
! |
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
985 |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
986 |
addMethodCategoryChange:aMethod category:newCategory in:aClass |
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
987 |
"add a method-category-change for aMethod in aClass to the receivers changeSet" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
988 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
989 |
|changeSet| |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
990 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
991 |
(changeSet := self changeSet) notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
992 |
changeSet addMethodCategoryChange:aMethod category:newCategory in:aClass |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
993 |
]. |
5156 | 994 |
self rememberChangedClass:aClass |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
995 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
996 |
! |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
997 |
|
5553
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
998 |
addMethodChange:aMethod fromOld:oldMethod in:aClass |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
999 |
"add a method change in aClass to the receivers changeSet" |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
1000 |
|
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
1001 |
|changeSet| |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
1002 |
|
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
1003 |
(changeSet := self changeSet) notNil ifTrue:[ |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
1004 |
changeSet addMethodChange:aMethod fromOld:oldMethod in:aClass |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
1005 |
]. |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
1006 |
self rememberChangedClass:aClass |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
1007 |
! |
1740d3ae50ff
keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents:
5547
diff
changeset
|
1008 |
|
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1009 |
addMethodChange:aMethod in:aClass |
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1010 |
"add a method change in aClass to the receivers changeSet" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1011 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1012 |
|changeSet| |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1013 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1014 |
(changeSet := self changeSet) notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1015 |
changeSet addMethodChange:aMethod in:aClass |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1016 |
]. |
5156 | 1017 |
self rememberChangedClass:aClass |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1018 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1019 |
! |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1020 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1021 |
addMethodPrivacyChange:aMethod in:aClass |
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1022 |
"add a privacy change for aMethod in aClass to the receivers changeSet" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1023 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1024 |
|changeSet| |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1025 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1026 |
(changeSet := self changeSet) notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1027 |
changeSet addMethodPrivacyChange:aMethod in:aClass |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1028 |
]. |
5156 | 1029 |
self rememberChangedClass:aClass |
1030 |
||
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1031 |
! |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1032 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1033 |
addPrimitiveDefinitionsChangeFor:aClass |
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1034 |
"add a primitiveDef change for aClass to the receivers changeSet" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1035 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1036 |
|changeSet| |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1037 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1038 |
(changeSet := self changeSet) notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1039 |
changeSet addPrimitiveDefinitionsChangeFor:aClass |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1040 |
]. |
5156 | 1041 |
self rememberChangedClass:aClass |
1042 |
||
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1043 |
! |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1044 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1045 |
addPrimitiveFunctionsChangeFor:aClass |
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1046 |
"add a primitiveFuncs change for aClass to the receivers changeSet" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1047 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1048 |
|changeSet| |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1049 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1050 |
(changeSet := self changeSet) notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1051 |
changeSet addPrimitiveFunctionsChangeFor:aClass |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1052 |
]. |
5156 | 1053 |
self rememberChangedClass:aClass |
1054 |
||
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1055 |
! |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1056 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1057 |
addPrimitiveVariablesChangeFor:aClass |
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1058 |
"add a primitiveVars change for aClass to the receivers changeSet" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1059 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1060 |
|changeSet| |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1061 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1062 |
(changeSet := self changeSet) notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1063 |
changeSet addPrimitiveVariablesChangeFor:aClass |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1064 |
]. |
5156 | 1065 |
self rememberChangedClass:aClass |
1066 |
||
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1067 |
! |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1068 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1069 |
addRemoveSelectorChange:aSelector in:aClass |
5224
003c8edae743
comments; handle class-instvar and comment changes
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1070 |
"add a method-remove change in aClass to the receivers changeSet" |
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1071 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1072 |
|changeSet| |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1073 |
|
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1074 |
(changeSet := self changeSet) notNil ifTrue:[ |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1075 |
changeSet addRemoveSelectorChange:aSelector in:aClass |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1076 |
]. |
5156 | 1077 |
self rememberChangedClass:aClass |
1078 |
||
5150
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1079 |
! |
d7f854b5ede8
keep track of changed classes (even if current project has no changeSet)
Claus Gittinger <cg@exept.de>
parents:
5126
diff
changeset
|
1080 |
|
5239
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1081 |
addRenameCategoryChangeIn:aClass from:oldCategory to:newCategory |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1082 |
"add a category rename change in aClass to the receivers changeSet" |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1083 |
|
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1084 |
|changeSet| |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1085 |
|
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1086 |
(changeSet := self changeSet) notNil ifTrue:[ |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1087 |
changeSet addRenameCategoryChangeIn:aClass from:oldCategory to:newCategory |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1088 |
]. |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1089 |
self rememberChangedClass:aClass |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1090 |
|
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1091 |
"Created: / 6.2.2000 / 02:28:07 / cg" |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1092 |
! |
8b70947d7036
category change in changeSet
Claus Gittinger <cg@exept.de>
parents:
5232
diff
changeset
|
1093 |
|
5155 | 1094 |
condenseChangesForClassCheckin:aClass |
1095 |
|changeSet| |
|
1096 |
||
1097 |
(changeSet := self changeSet) notNil ifTrue:[ |
|
1098 |
changeSet condenseChangesForClass:aClass package:aClass package |
|
1099 |
]. |
|
1100 |
#TODO. |
|
1101 |
"/ do not remove, if there are still methodChanges for other |
|
1102 |
"/ packages around |
|
5156 | 1103 |
changedClasses := self changedClasses select:[:cls | |realClass| |
1104 |
(realClass := cls) isMeta ifTrue:[ |
|
1105 |
realClass := cls soleInstance |
|
1106 |
]. |
|
1107 |
realClass name ~= aClass name |
|
1108 |
]. |
|
1109 |
! |
|
1110 |
||
5181 | 1111 |
condenseChangesForClassFilein:aClass |
1112 |
||
1113 |
#TODO. |
|
1114 |
"/ do not remove, if there are still methodChanges for other |
|
1115 |
"/ packages around |
|
1116 |
changedClasses := self changedClasses select:[:cls | |realClass| |
|
1117 |
(realClass := cls) isMeta ifTrue:[ |
|
1118 |
realClass := cls soleInstance |
|
1119 |
]. |
|
1120 |
realClass name ~= aClass name |
|
1121 |
]. |
|
1122 |
! |
|
1123 |
||
5156 | 1124 |
rememberChangedClass:aClass |
1125 |
|realClass| |
|
1126 |
||
1127 |
(realClass := aClass) isMeta ifTrue:[ |
|
1128 |
realClass := aClass soleInstance |
|
1129 |
]. |
|
5181 | 1130 |
self changedClasses add:realClass. |
1131 |
changedClasses := changedClasses select:[:aClass | aClass isObsolete not]. |
|
5156 | 1132 |
|
5155 | 1133 |
! |
1134 |
||
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
1135 |
rememberOverwrittenMethod:newMethod from:oldMethod |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
1136 |
"this is sent whenever a method is installed, which overwrites |
2334
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
1137 |
an existing method from a different package. |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
1138 |
Allows previous methods to be reconstructed." |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
1139 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
1140 |
overwrittenMethods isNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
1141 |
overwrittenMethods := IdentityDictionary new. |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
1142 |
]. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
1143 |
overwrittenMethods at:newMethod put:oldMethod |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
1144 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
1145 |
"Created: 27.1.1997 / 11:52:01 / cg" |
2334
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
1146 |
"Modified: 30.1.1997 / 21:10:51 / cg" |
10 | 1147 |
! ! |
1148 |
||
236 | 1149 |
!Project methodsFor:'initialization'! |
1150 |
||
1151 |
initialize |
|
338 | 1152 |
|numString| |
1153 |
||
330 | 1154 |
views := WeakIdentitySet new. |
338 | 1155 |
numString := NextSequential printString. |
315 | 1156 |
NextSequential := NextSequential + 1. |
338 | 1157 |
|
1158 |
name := 'new Project-' , numString. |
|
1159 |
packageName := 'private-' , numString. |
|
2034
1c96469c3df8
preinit the defaultNamespace of new projects (to Smalltalk)
Claus Gittinger <cg@exept.de>
parents:
2032
diff
changeset
|
1160 |
|
848
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
1161 |
"/ |
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
1162 |
"/ for tiny-configurations, allow ChangeSet to be absent |
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
1163 |
"/ |
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
1164 |
ChangeSet notNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
1165 |
changeSet := ChangeSet new. |
848
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
1166 |
]. |
654 | 1167 |
self directory:'.'. |
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
1168 |
self repositoryModule:(OperatingSystem getLoginName). |
654 | 1169 |
self repositoryDirectory:'private' |
1170 |
||
1171 |
"Created: 25.11.1995 / 18:05:44 / cg" |
|
2034
1c96469c3df8
preinit the defaultNamespace of new projects (to Smalltalk)
Claus Gittinger <cg@exept.de>
parents:
2032
diff
changeset
|
1172 |
"Modified: 3.1.1997 / 13:24:10 / cg" |
236 | 1173 |
! ! |
1174 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1175 |
!Project methodsFor:'load & save'! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1176 |
|
4805
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1177 |
conditionForAutoloadIsTrue:cond |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1178 |
"check condition ..." |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1179 |
|
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1180 |
^ cond == #autoload |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1181 |
! |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1182 |
|
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1183 |
conditionForInclusionIsTrue:cond |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1184 |
"check condition ..." |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1185 |
|
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1186 |
cond == #always ifTrue:[^ true]. |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1187 |
cond == #autoload ifTrue:[^ true]. |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1188 |
cond == #never ifTrue:[^ false]. |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1189 |
|
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1190 |
cond == #unix ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
1191 |
^ OperatingSystem isUNIXlike |
4805
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1192 |
]. |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1193 |
cond == #win32 ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
1194 |
^ OperatingSystem isMSWINDOWSlike |
4805
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1195 |
]. |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1196 |
cond == #vms ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
1197 |
^ OperatingSystem isVMSlike |
4805
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1198 |
]. |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1199 |
cond == #macos ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
1200 |
^ OperatingSystem isMAClike |
4805
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1201 |
]. |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1202 |
self halt:'bad condition' |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1203 |
! |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1204 |
|
4079 | 1205 |
loadClassesFromProjectDirectory |
1206 |
"load my classes into the system. |
|
1207 |
The classes are loaded from the directory as defined by my |
|
1208 |
directory insTvar" |
|
1209 |
||
4805
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1210 |
|myDirectory firstTrip| |
4079 | 1211 |
|
1212 |
myDirectory := self directory asFilename. |
|
4805
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1213 |
firstTrip := true. |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1214 |
|
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1215 |
"/ read twice; if the load order was not correct, |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1216 |
"/ this will fix things (i.e. nil superclasses ...) |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1217 |
|
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1218 |
2 timesRepeat:[ |
4886 | 1219 |
self classInfo do:[:clsInfo | |
1220 |
|clsName clsFileNameString cls clsFilename |
|
1221 |
cond include asAutoload| |
|
1222 |
||
1223 |
clsName := clsInfo className. |
|
1224 |
(clsName startsWith:'Smalltalk::') ifTrue:[ |
|
1225 |
clsInfo className:(clsName := clsName copyFrom:'Smalltalk::' size + 1). |
|
1226 |
]. |
|
1227 |
clsName := clsName asSymbol. |
|
1228 |
||
1229 |
clsFileNameString := clsInfo classFileName. |
|
1230 |
clsFileNameString isNil ifTrue:[clsFileNameString := clsName , '.st']. |
|
1231 |
||
1232 |
clsName isSymbol ifTrue:[ |
|
1233 |
clsFilename := myDirectory construct:clsFileNameString. |
|
1234 |
cls := Smalltalk at:clsName. |
|
1235 |
(cls isNil or:[firstTrip]) ifTrue:[ |
|
1236 |
"/ ok - really not yet loaded. |
|
1237 |
Transcript showCR:'loading ' , clsFilename pathName , ' ...'. |
|
1238 |
] ifFalse:[ |
|
1239 |
Transcript showCR:'reloading ' , clsFilename pathName , ' ...'. |
|
1240 |
]. |
|
1241 |
"/ check condition ... |
|
1242 |
cond := clsInfo conditionForInclusion. |
|
1243 |
(self conditionForInclusionIsTrue:cond) ifTrue:[ |
|
1244 |
(self conditionForAutoloadIsTrue:cond) ifTrue:[ |
|
1245 |
Smalltalk |
|
1246 |
installAutoloadedClassNamed:clsName |
|
1247 |
category:'autoloaded' |
|
1248 |
package:self package |
|
1249 |
revision:nil |
|
1250 |
] ifFalse:[ |
|
5199 | 1251 |
Object errorSignal handle:[:ex | |
1252 |
self warn:'error during fileIn: ' , ex errorString |
|
1253 |
] do:[ |
|
1254 |
Class packageQuerySignal answer:packageName do:[ |
|
5690 | 1255 |
Parser::UndefinedSuperclassError handle:[:ex | |
1256 |
firstTrip ifFalse:[ |
|
1257 |
ex reject. |
|
1258 |
] |
|
1259 |
] do:[ |
|
1260 |
clsFilename fileIn. |
|
1261 |
"/ Smalltalk fileIn:clsFilename |
|
1262 |
] |
|
5199 | 1263 |
] |
1264 |
] |
|
4886 | 1265 |
] |
1266 |
] |
|
1267 |
] ifFalse:[ |
|
1268 |
self halt |
|
1269 |
]. |
|
1270 |
]. |
|
1271 |
||
1272 |
firstTrip := false. |
|
4079 | 1273 |
]. |
1274 |
! |
|
1275 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1276 |
loadFromProjectFile:aFilename |
4097 | 1277 |
"fill all of my attributes from a projects file (.prj-file)" |
1278 |
||
5232 | 1279 |
|f l pack targetConditions s sourcesSubDir files module dir |
1280 |
methodsFile formatVersion| |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1281 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1282 |
f := aFilename asFilename. |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1283 |
directoryName := f directory pathName. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1284 |
self directory:(f directory pathName). |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1285 |
pack := ResourcePack fromFile:f baseName directory:directoryName. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1286 |
|
4909 | 1287 |
formatVersion := pack at:'fileFormatVersion' ifAbsent:nil. |
1288 |
||
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1289 |
"/ convert the resourcePack ... |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1290 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1291 |
packageName := pack at:'package' ifAbsent:packageName. |
5232 | 1292 |
repositoryModule := packageName upTo:$:. |
1293 |
repositoryDirectory := packageName restAfter:$:. |
|
1294 |
||
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1295 |
name := pack at:'name' ifAbsent:name. |
4071 | 1296 |
|
4769 | 1297 |
self type:(pack at:'type' ifAbsent:#application) asSymbol. |
1298 |
||
4124 | 1299 |
module := pack at:'repository.module' ifAbsent:nil. |
1300 |
module notNil ifTrue:[ |
|
5232 | 1301 |
repositoryModule ~= module ifTrue:[ |
1302 |
'Project [warning]: module does not correspond to packageId' infoPrintCR. |
|
1303 |
'Project [info]: this will be not supported in future versions' infoPrintCR. |
|
1304 |
]. |
|
4833 | 1305 |
repositoryModule := module. |
5232 | 1306 |
dir := pack at:'repository.directory' ifAbsent:nil. |
1307 |
dir notNil ifTrue:[ |
|
1308 |
repositoryDirectory ~= dir ifTrue:[ |
|
1309 |
'Project [warning]: directory does not correspond to packageId' infoPrintCR. |
|
1310 |
'Project [info]: this will be not supported in future versions' infoPrintCR. |
|
1311 |
]. |
|
1312 |
repositoryDirectory := dir. |
|
1313 |
] |
|
4124 | 1314 |
]. |
4071 | 1315 |
|
4099 | 1316 |
prerequisites := pack at:'prerequisites' ifAbsent:#(). |
1317 |
self prerequisiteClasses:(pack at:'prerequisiteClasses' ifAbsent:#()). |
|
1318 |
||
4074 | 1319 |
s := pack at:'nameSpace' ifAbsent:nil. |
1320 |
s notNil ifTrue:[ |
|
5328
319b8e3ee60e
renamed Namespace to NameSpace
Claus Gittinger <cg@exept.de>
parents:
5327
diff
changeset
|
1321 |
self defaultNameSpace:(NameSpace name:s asSymbol). |
4074 | 1322 |
]. |
1323 |
||
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1324 |
subProjects := pack at:'subProjects' ifAbsent:subProjects. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1325 |
(s := pack at:'comment' ifAbsent:nil) notNil ifTrue:[ |
4833 | 1326 |
self comment:s |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1327 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1328 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1329 |
"/ first, all of the conditions ... |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1330 |
targetConditions := Dictionary new. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1331 |
pack keysAndValuesDo:[:key :val | |
4833 | 1332 |
|conditionKey| |
1333 |
||
1334 |
(key startsWith:'target.condition.') ifTrue:[ |
|
1335 |
conditionKey := key copyFrom:'target.condition.' size + 1. |
|
1336 |
targetConditions at:conditionKey put:val. |
|
1337 |
] |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1338 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1339 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1340 |
properties isNil ifTrue:[ |
4833 | 1341 |
properties := IdentityDictionary new |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1342 |
]. |
4124 | 1343 |
properties at:#'targetconditions' put:targetConditions. |
1344 |
||
1345 |
sourcesSubDir := pack at:'sources' ifAbsent:nil. |
|
1346 |
sourcesSubDir notNil ifTrue:[ |
|
4833 | 1347 |
properties at:#'sourcesDirectory' put:sourcesSubDir. |
4124 | 1348 |
]. |
4833 | 1349 |
"/ methodsFile := pack at:'methodsFile' ifAbsent:nil. |
1350 |
"/ methodsFile size > 0 ifTrue:[ |
|
1351 |
"/ properties at:#'methodsFile' put:methodsFile. |
|
1352 |
"/ ]. |
|
1353 |
properties declare:#methodsFile from:pack. |
|
1354 |
||
1355 |
"/ files := pack at:'files' ifAbsent:nil. |
|
1356 |
"/ files notNil ifTrue:[ |
|
1357 |
"/ properties at:#'files' put:files. |
|
1358 |
"/ ]. |
|
1359 |
properties declare:#files from:pack. |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1360 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1361 |
"/ fetch class info |
4805
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1362 |
"/ |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1363 |
"/ each entry consist of: |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1364 |
"/ full-name-of-class |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1365 |
"/ condition (optional) - #unix / #win32 / #vms / #macos / #always / #never / #autoload |
a7e6d2cb9b29
care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents:
4796
diff
changeset
|
1366 |
"/ fileName (optional) |
5201 | 1367 |
properties at:#autoIncludeImageClasses put:false. |
1368 |
||
4071 | 1369 |
(pack at:'classes' default:#()) do:[:info | |
4833 | 1370 |
|condKey className optionalFileName| |
1371 |
||
1372 |
condKey := #always. |
|
1373 |
info isSymbol ifTrue:[ |
|
1374 |
className := info. |
|
1375 |
] ifFalse:[ |
|
1376 |
className := info at:1. |
|
4909 | 1377 |
formatVersion == 0 ifTrue:[ |
1378 |
info size > 1 ifTrue:[ |
|
1379 |
optionalFileName := info at:2. |
|
1380 |
info size > 2 ifTrue:[ |
|
1381 |
condKey := info at:3. |
|
1382 |
] |
|
1383 |
]. |
|
1384 |
] ifFalse:[ |
|
1385 |
className := info at:1. |
|
1386 |
info size > 1 ifTrue:[ |
|
1387 |
condKey := info at:2. |
|
1388 |
info size > 2 ifTrue:[ |
|
1389 |
optionalFileName := info at:3. |
|
1390 |
] |
|
1391 |
]. |
|
4833 | 1392 |
]. |
1393 |
]. |
|
1394 |
self |
|
1395 |
addClass:className |
|
1396 |
conditionForInclusion:condKey |
|
1397 |
classFileName:optionalFileName |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1398 |
]. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1399 |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1400 |
"/ fetch methods info |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1401 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1402 |
(pack at:'methods' default:#()) do:[:info | |
4833 | 1403 |
|condKey className methodName optionalFileName| |
1404 |
||
1405 |
condKey := #always. |
|
1406 |
className := info at:1. |
|
1407 |
methodName := info at:2. |
|
1408 |
info size > 2 ifTrue:[ |
|
1409 |
optionalFileName := info at:3. |
|
1410 |
info size > 3 ifTrue:[ |
|
1411 |
condKey := info at:4. |
|
1412 |
] |
|
1413 |
]. |
|
1414 |
self |
|
1415 |
addMethod:methodName inClass:className |
|
1416 |
conditionForInclusion:condKey |
|
1417 |
fileName:optionalFileName |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1418 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1419 |
|
4069 | 1420 |
self wasLoadedFromFile:true. |
1421 |
||
4099 | 1422 |
"/ all remaining properties |
1423 |
pack keysAndValuesDo:[:key :val | |
|
4833 | 1424 |
(key startsWith:'property.') ifTrue:[ |
1425 |
self propertyAt:(key copyFrom:'property.' size+1) asSymbol put:val. |
|
1426 |
] |
|
4099 | 1427 |
]. |
1428 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1429 |
" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1430 |
Project current saveAsProjectFile. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1431 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1432 |
Project new loadFromProjectFile:'default.prj' |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1433 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1434 |
Project new loadFromProjectFile:'../../libbasic/libbasic.prj' |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1435 |
" |
4069 | 1436 |
|
4124 | 1437 |
"Modified: / 26.4.1999 / 23:21:33 / cg" |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1438 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1439 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1440 |
saveAsProjectFile |
4097 | 1441 |
"store all of my attributes into a projects file (.prj-file) |
1442 |
(in the project-directory and named as <projectName>.prj)" |
|
1443 |
||
4769 | 1444 |
|dir fn nm s| |
1445 |
||
1446 |
dir := self directory asFilename. |
|
4790 | 1447 |
nm := self libraryName. |
4769 | 1448 |
fn := dir construct:nm. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1449 |
fn := fn withSuffix:'prj'. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1450 |
|
4124 | 1451 |
fn exists ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
1452 |
fn copyTo:(fn pathName , '.bak') |
4124 | 1453 |
]. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1454 |
s := fn writeStream. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1455 |
self saveAsProjectFileOn:s. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1456 |
s close. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1457 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1458 |
" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1459 |
Project current saveAsProjectFile |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1460 |
" |
4124 | 1461 |
|
1462 |
"Modified: / 26.4.1999 / 22:53:38 / cg" |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1463 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1464 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1465 |
saveAsProjectFileOn:aStream |
4074 | 1466 |
"save the project info in a format which is both usable for reload |
1467 |
and somehow readable for humans. |
|
1468 |
Actually, the format is the same as used for resources (i.e. key - value pairs) |
|
1469 |
and the code below could be much simpler - if there where no humans to read it ..." |
|
1470 |
||
5232 | 1471 |
|s coll first maxLen t defNS methodsFile classes packageId |
1472 |
moduleFromPackageId directoryFromPackageId| |
|
1473 |
||
1474 |
packageId := self package. |
|
1475 |
packageId isNil ifTrue:[ |
|
1476 |
'Project [warning]: no valid packageId - generating a default' infoPrintCR. |
|
1477 |
packageId := OperatingSystem getLoginName , ':private'. |
|
1478 |
] ifFalse:[ |
|
1479 |
(packageId includes:$:) ifFalse:[ |
|
1480 |
'Project [warning]: no module in packageId - generating a default' infoPrintCR. |
|
1481 |
packageId := OperatingSystem getLoginName , ':' , packageId. |
|
1482 |
] |
|
1483 |
]. |
|
1484 |
moduleFromPackageId := packageId upTo:$:. |
|
1485 |
directoryFromPackageId := packageId restAfter:$:. |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1486 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1487 |
s := aStream. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1488 |
|
4099 | 1489 |
s nextPutLine:'; $Header' , '$'; nextPutLine:';'. |
4074 | 1490 |
s nextPutLine:'; Project saved ' , Smalltalk timeStamp; nextPutLine:';'. |
4769 | 1491 |
s nextPutAll:'; Be careful when editing - do not corrupt the files syntax. |
1492 |
; Lines starting with a semicolon are comment lines. |
|
1493 |
; Lines ending with a backslash are concatenated with the following line. |
|
1494 |
; Entries are key-value pairs, separated by whitespace; |
|
1495 |
; the value is a smalltalk literal expression. |
|
1496 |
'. |
|
1497 |
||
4909 | 1498 |
s nextPutAll:'fileFormatVersion'; tab; nextPutLine:(self class projectFileFormatVersion printString). |
1499 |
||
4769 | 1500 |
s nextPutAll:' |
1501 |
; |
|
1502 |
; general: |
|
1503 |
; |
|
1504 |
'. |
|
4071 | 1505 |
|
1506 |
s nextPutAll:'comment'. |
|
1507 |
s tab. s nextPutLine:(self comment storeString). |
|
1508 |
||
1509 |
s nextPutAll:'name'. |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1510 |
s tab. s nextPutLine:(name storeString). |
4071 | 1511 |
|
1512 |
s nextPutAll:'type'. |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1513 |
s tab. s nextPutLine:(self type storeString). |
4071 | 1514 |
|
1515 |
s nextPutAll:'package'. |
|
5232 | 1516 |
s tab. s nextPutLine:(packageId storeString). |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1517 |
|
4726 | 1518 |
defNS := self defaultNameSpace. |
5199 | 1519 |
(defNS notNil and:[defNS ~~ Smalltalk]) ifTrue:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1520 |
s nextPutAll:'nameSpace'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1521 |
s tab. s nextPutLine:(defNS name storeString). |
5199 | 1522 |
] ifFalse:[ |
1523 |
defNS := nil. |
|
4074 | 1524 |
]. |
1525 |
||
5232 | 1526 |
"/ skip if same as what the packageID implies; |
1527 |
"/ this will be enforced in future versions. |
|
1528 |
repositoryModule isNil ifTrue:[ |
|
1529 |
repositoryModule := moduleFromPackageId. |
|
1530 |
]. |
|
1531 |
repositoryDirectory isNil ifTrue:[ |
|
1532 |
repositoryDirectory := directoryFromPackageId |
|
1533 |
]. |
|
1534 |
||
1535 |
(repositoryModule ~= moduleFromPackageId |
|
1536 |
or:[repositoryDirectory ~= directoryFromPackageId]) ifTrue:[ |
|
1537 |
'Project [warning]: module/directory does not correspond to packageId' infoPrintCR. |
|
1538 |
'Project [info]: this will be not supported in future versions' infoPrintCR. |
|
1539 |
||
1540 |
s nextPutAll:' |
|
4769 | 1541 |
; |
1542 |
; repository: |
|
1543 |
; |
|
1544 |
'. |
|
5232 | 1545 |
s nextPutAll:'repository.module'. |
1546 |
s tab. s nextPutLine:(repositoryModule ? 'private') storeString. |
|
1547 |
s nextPutAll:'repository.directory'. |
|
1548 |
s tab. s nextPutLine:(repositoryDirectory ? packageId) storeString. |
|
1549 |
s cr. |
|
1550 |
]. |
|
4071 | 1551 |
|
4124 | 1552 |
(t := properties at:#'sourcesDirectory' ifAbsent:nil) notNil ifTrue:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1553 |
s nextPutAll:'sources'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1554 |
s tab. s nextPutLine:(t storeString). |
4124 | 1555 |
]. |
1556 |
||
4074 | 1557 |
first := true. |
4071 | 1558 |
properties keysAndValuesDo:[:key :val | |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1559 |
(#( |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1560 |
comment |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1561 |
wasLoadedFromFile |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1562 |
targetconditions |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1563 |
classes |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1564 |
classInfo |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1565 |
methodInfo |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1566 |
prerequisiteClasses |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1567 |
files |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1568 |
sourcesDirectory |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1569 |
methodsFile |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1570 |
type |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1571 |
defaultNameSpace |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1572 |
) includes:key) ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1573 |
first ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1574 |
first := false. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1575 |
s nextPutAll:' |
4769 | 1576 |
; |
1577 |
; properties: |
|
1578 |
; |
|
1579 |
'. |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1580 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1581 |
s nextPutAll:'property.'; nextPutAll:key. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1582 |
s tab. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1583 |
key == #defaultNameSpace ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1584 |
s nextPutLine:val name storeString. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1585 |
] ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1586 |
s nextPutLine:val storeString. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1587 |
] |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1588 |
] |
4071 | 1589 |
]. |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1590 |
|
5232 | 1591 |
s nextPutAll:' |
1592 |
; |
|
1593 |
; sub-projects: |
|
1594 |
; |
|
1595 |
'. |
|
1596 |
s nextPutAll:'subProjects'; tab. |
|
1597 |
coll := self subProjects. |
|
1598 |
coll size = 0 ifTrue:[ |
|
1599 |
s nextPutLine:'#()'. |
|
1600 |
] ifFalse:[ |
|
1601 |
s nextPutLine:'#( \'. |
|
1602 |
coll do:[:aProjectOrProjectNameList | |
|
1603 |
|pName pPath| |
|
1604 |
||
1605 |
aProjectOrProjectNameList isString ifTrue:[ |
|
1606 |
pName := aProjectOrProjectNameList. |
|
1607 |
] ifFalse:[ |
|
1608 |
aProjectOrProjectNameList isArray ifTrue:[ |
|
1609 |
pName := aProjectOrProjectNameList at:1. |
|
1610 |
pPath := aProjectOrProjectNameList at:2. |
|
1611 |
] ifFalse:[ |
|
1612 |
pName := aProjectOrProjectNameList name. |
|
1613 |
pPath := aProjectOrProjectNameList repositoryPath. |
|
1614 |
] |
|
1615 |
]. |
|
1616 |
||
1617 |
pPath isNil ifTrue:[ |
|
1618 |
s tab. s nextPutAll:(pName storeString); nextPutLine:' \'. |
|
1619 |
] ifFalse:[ |
|
1620 |
s tab. s nextPutAll:'( '. |
|
1621 |
s nextPutAll:(pName storeString); space; |
|
1622 |
nextPutAll:(pPath storeString); nextPutLine:') \'. |
|
1623 |
] |
|
1624 |
]. |
|
1625 |
s nextPutLine:')'. |
|
1626 |
]. |
|
4074 | 1627 |
|
4769 | 1628 |
s nextPutAll:' |
1629 |
; |
|
1630 |
; required packages: |
|
1631 |
; |
|
1632 |
'. |
|
4074 | 1633 |
s nextPutAll:'prerequisites'; tab. |
1634 |
coll := self prerequisites. |
|
1635 |
coll size = 0 ifTrue:[ |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1636 |
s nextPutLine:'#()'. |
4074 | 1637 |
] ifFalse:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1638 |
s nextPutLine:'#( \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1639 |
coll do:[:aProjectOrProjectNameList | |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1640 |
|pName pPath| |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1641 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1642 |
aProjectOrProjectNameList isString ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1643 |
pName := aProjectOrProjectNameList. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1644 |
] ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1645 |
aProjectOrProjectNameList isArray ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1646 |
pName := aProjectOrProjectNameList at:1. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1647 |
pPath := aProjectOrProjectNameList at:2. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1648 |
] ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1649 |
pName := aProjectOrProjectNameList name. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1650 |
pPath := aProjectOrProjectNameList repositoryPath. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1651 |
] |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1652 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1653 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1654 |
pPath isNil ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1655 |
s tab. s nextPutAll:(pName storeString); nextPutLine:' \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1656 |
] ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1657 |
s tab. s nextPutAll:'( '. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1658 |
s nextPutAll:(pName storeString); space; |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1659 |
nextPutAll:(pPath storeString); nextPutLine:') \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1660 |
] |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1661 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1662 |
s nextPutLine:')'. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1663 |
]. |
4124 | 1664 |
|
4769 | 1665 |
s nextPutAll:' |
1666 |
; |
|
1667 |
; required classes: |
|
1668 |
; |
|
1669 |
'. |
|
4099 | 1670 |
s nextPutAll:'prerequisiteClasses'; tab. |
1671 |
coll := self prerequisiteClasses. |
|
4769 | 1672 |
coll size = 0 ifTrue:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1673 |
s nextPutLine:'#()'. |
4769 | 1674 |
] ifFalse:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1675 |
s nextPutLine:'#( \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1676 |
coll do:[:aClassOrSymbol | |className| |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1677 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1678 |
(className := aClassOrSymbol) isSymbol ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1679 |
className := aClassOrSymbol name |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1680 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1681 |
s tab. s nextPutAll:(className storeString); nextPutLine:' \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1682 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1683 |
s nextPutLine:')'. |
4099 | 1684 |
]. |
4769 | 1685 |
|
1686 |
s nextPutAll:' |
|
1687 |
; |
|
1688 |
; classes: |
|
1689 |
; (for each class, one line of the form: ( #''className'' [condition [fileName]] ) |
|
1690 |
; (where fileName and condition are optional) |
|
1691 |
; |
|
1692 |
'. |
|
1693 |
||
1694 |
s nextPutAll:'classes'; tab. |
|
4074 | 1695 |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1696 |
classes := self classesInOrderFor:'save ''prj''-file.'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1697 |
classes isNil ifTrue:[^ self]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1698 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1699 |
classes size = 0 ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1700 |
s nextPutLine:'#()'. |
4769 | 1701 |
] ifFalse:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1702 |
s nextPutLine:'#( \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1703 |
"/ find the longest className (for layout only) |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1704 |
|
5199 | 1705 |
maxLen := classes inject:0 into:[:maxSoFar :aClassOrName | |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1706 |
|clsName| |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1707 |
|
5199 | 1708 |
aClassOrName isBehavior ifTrue:[ |
1709 |
clsName := aClassOrName name. |
|
1710 |
] ifFalse:[ |
|
1711 |
clsName := aClassOrName. |
|
1712 |
defNS notNil ifTrue:[ |
|
1713 |
(clsName startsWith:(defNS name , '::')) ifFalse:[ |
|
1714 |
clsName := (defNS name , '::' , clsName) |
|
1715 |
] |
|
1716 |
]. |
|
1717 |
clsName := clsName asSymbol. |
|
1718 |
]. |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1719 |
maxSoFar max:clsName storeString size |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1720 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1721 |
|
5199 | 1722 |
classes do:[:aClassOrName | |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1723 |
|clsInfo clsName fileName cond| |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1724 |
|
5199 | 1725 |
aClassOrName isBehavior ifTrue:[ |
1726 |
clsName := aClassOrName name. |
|
1727 |
] ifFalse:[ |
|
1728 |
clsName := aClassOrName. |
|
1729 |
defNS notNil ifTrue:[ |
|
1730 |
(clsName startsWith:(defNS name , '::')) ifFalse:[ |
|
1731 |
clsName := (defNS name , '::' , clsName) |
|
1732 |
] |
|
1733 |
]. |
|
1734 |
clsName := clsName asSymbol. |
|
1735 |
]. |
|
1736 |
clsInfo := self classInfoFor:clsName. |
|
1737 |
clsInfo isNil ifTrue:[ |
|
1738 |
clsInfo := self classInfoFor:aClassOrName. |
|
1739 |
]. |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1740 |
fileName := clsInfo classFileName. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1741 |
fileName = (clsName , '.st') ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1742 |
fileName := nil |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1743 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1744 |
cond := (clsInfo conditionForInclusion) ? #always. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1745 |
s tab. s nextPutAll:'( '; |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1746 |
nextPutAll:(clsName storeString paddedTo:maxLen). |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1747 |
(cond ~~ #always or:[fileName notNil]) ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1748 |
s tab; nextPutAll:cond storeString. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1749 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1750 |
fileName notNil ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1751 |
s tab; nextPutAll:fileName storeString. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1752 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1753 |
s nextPutLine:') \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1754 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1755 |
s nextPutLine:')'. |
4124 | 1756 |
]. |
4769 | 1757 |
|
1758 |
s nextPutAll:' |
|
1759 |
; |
|
1760 |
; methods (patches & extensions): |
|
1761 |
; (for each method, one line of the form: ( #''className'' #''methodName'' ) |
|
1762 |
; (for metaclasses, #''name class'' is used) |
|
5232 | 1763 |
; These are stored in the methodsFile (see below) |
4769 | 1764 |
'. |
1765 |
||
1766 |
s nextPutAll:'methods'; tab. |
|
1767 |
||
1768 |
coll := self methodInfo. |
|
1769 |
coll size = 0 ifTrue:[ |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1770 |
s nextPutLine:'#()'. |
4769 | 1771 |
] ifFalse:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1772 |
s nextPutLine:'#( \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1773 |
"/ find the longest className (for layout only) |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1774 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1775 |
maxLen := coll inject:0 into:[:maxSoFar :aMethodInfo | |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1776 |
|clsName| |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1777 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1778 |
clsName := aMethodInfo className. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1779 |
maxSoFar max:clsName storeString size |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1780 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1781 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1782 |
coll do:[:aMethodInfo | |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1783 |
|clsName mthdName fileName cond| |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1784 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1785 |
clsName := aMethodInfo className. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1786 |
mthdName := aMethodInfo methodName. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1787 |
s tab. s nextPutAll:'( '; |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1788 |
nextPutAll:(clsName storeString paddedTo:maxLen); |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1789 |
tab; nextPutAll:mthdName storeString. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1790 |
s nextPutLine:') \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1791 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1792 |
s nextPutLine:')'. |
4769 | 1793 |
]. |
1794 |
||
1795 |
methodsFile := properties at:#methodsFile ifAbsent:nil. |
|
5232 | 1796 |
methodsFile size == 0 ifTrue:[ |
1797 |
self methodInfo size > 0 ifTrue:[ |
|
1798 |
'Project [warning]: no methodsFile defined - generating a default' infoPrintCR. |
|
1799 |
methodsFile := 'extensions.st' |
|
1800 |
] |
|
1801 |
]. |
|
4792 | 1802 |
methodsFile size > 0 ifTrue:[ |
5232 | 1803 |
s nextPutAll:' |
1804 |
; |
|
1805 |
; methods above are stored in: |
|
1806 |
; |
|
1807 |
'. |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1808 |
s nextPutAll:'methodsFile'; tab; nextPutLine:'''' , methodsFile , ''''. |
4769 | 1809 |
]. |
1810 |
||
1811 |
s nextPutAll:' |
|
1812 |
; |
|
1813 |
; files (for deployment): |
|
1814 |
; |
|
1815 |
'. |
|
4314 | 1816 |
|
4124 | 1817 |
s nextPutAll:'files'; tab. |
1818 |
coll := properties at:#'files' ifAbsent:#(). |
|
4769 | 1819 |
coll size = 0 ifTrue:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1820 |
s nextPutLine:'#()'. |
4769 | 1821 |
] ifFalse:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1822 |
s nextPutLine:'#( \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1823 |
coll do:[:aFileEntry | |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1824 |
s tab. s nextPutAll:(aFileEntry storeString); nextPutLine:' \'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1825 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1826 |
s nextPutLine:')'. |
4124 | 1827 |
]. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1828 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1829 |
" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1830 |
Project current saveOn:Transcript |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1831 |
" |
4124 | 1832 |
|
1833 |
"Modified: / 26.4.1999 / 23:24:12 / cg" |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1834 |
! ! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1835 |
|
2 | 1836 |
!Project methodsFor:'maintenance'! |
1837 |
||
13 | 1838 |
buildProject |
4097 | 1839 |
"invoke 'make' in the project directory" |
1840 |
||
13 | 1841 |
OperatingSystem executeCommand:('cd ' , self directory , ' ; make') |
1842 |
! |
|
1843 |
||
4850 | 1844 |
buildProjectWithOutputTo:aStream |
1845 |
"invoke 'make' in the project directory" |
|
1846 |
||
1847 |
|p cmdOutStream cmdInStream readerProcess| |
|
1848 |
||
1849 |
aStream notNil ifTrue:[ |
|
1850 |
"/ need an external stream for that. |
|
1851 |
aStream isExternalStream ifTrue:[ |
|
1852 |
cmdOutStream := aStream |
|
1853 |
] ifFalse:[ |
|
1854 |
p := ExternalStream makePipe. |
|
1855 |
cmdOutStream := p at:2. |
|
1856 |
"/ start a reader process |
|
1857 |
readerProcess := [ |
|
1858 |
|data| |
|
1859 |
||
1860 |
cmdInStream := p at:1. |
|
1861 |
[cmdInStream atEnd] whileFalse:[ |
|
1862 |
data := cmdInStream nextAvailable:512. |
|
1863 |
aStream nextPutAll:data. |
|
1864 |
] |
|
1865 |
] newProcess. |
|
1866 |
readerProcess name:'cmd output reader'. |
|
1867 |
readerProcess resume. |
|
1868 |
] |
|
1869 |
]. |
|
1870 |
||
1871 |
OperatingSystem |
|
1872 |
executeCommand:('cd ' , self directory , ' ; make') |
|
1873 |
inputFrom:nil |
|
1874 |
outputTo:cmdOutStream |
|
1875 |
errorTo:cmdOutStream |
|
1876 |
inDirectory:nil |
|
1877 |
onError:[:status| false]. |
|
1878 |
||
1879 |
readerProcess terminate. |
|
1880 |
cmdInStream close. |
|
1881 |
cmdOutStream close. |
|
1882 |
! |
|
1883 |
||
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1884 |
classesInOrderFor:whatMsg |
5199 | 1885 |
|classesOrNames classes numBad firstBad msg| |
1886 |
||
1887 |
classesOrNames := self classes. |
|
4097 | 1888 |
numBad := 0. |
1889 |
firstBad := nil. |
|
1890 |
||
5199 | 1891 |
classes := classesOrNames collect:[:clsOrSymbol | |cls| |
4886 | 1892 |
clsOrSymbol isBehavior ifFalse:[ |
1893 |
cls := Smalltalk at:clsOrSymbol asSymbol. |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1894 |
cls isNil ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1895 |
numBad := numBad + 1. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1896 |
firstBad := firstBad ? clsOrSymbol. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1897 |
] ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1898 |
cls isLoaded ifFalse:[ |
5671 | 1899 |
cls := cls autoload. |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1900 |
cls isLoaded ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1901 |
cls := nil |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1902 |
] |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1903 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1904 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1905 |
cls. |
4886 | 1906 |
] ifTrue:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1907 |
clsOrSymbol |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1908 |
] |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1909 |
]. |
4097 | 1910 |
numBad ~~ 0 ifTrue:[ |
5199 | 1911 |
msg := 'Cannot determine load/compile order when about to ' , whatMsg. |
5734 | 1912 |
msg := msg , '\Reason: Class ''' , firstBad allBold |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1913 |
, ''' is not loaded.'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1914 |
numBad ~~ 1 ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1915 |
msg := msg , '\(' , (numBad-1) printString , ' more unloaded classes were found)' |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1916 |
]. |
5199 | 1917 |
msg := msg , '\\You will have to manually load the classes or edit the project file.'. |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1918 |
self warn:msg withCRs. |
5199 | 1919 |
^ classesOrNames. |
4097 | 1920 |
]. |
1921 |
||
4785 | 1922 |
"/ to not list private classes |
1923 |
classes := classes select:[:cls | cls owningClass isNil]. |
|
4097 | 1924 |
classes := classes copy topologicalSort:[:a :b | b isSubclassOf:a]. |
1925 |
||
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1926 |
^ classes |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1927 |
! |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1928 |
|
5314 | 1929 |
createAbbrevFile |
1930 |
"creates a 'abbrev.stc' file, for autoloading classes." |
|
1931 |
||
1932 |
|d f out in topName classes classInfo myPackage |
|
1933 |
methodsFile prerequisitePackages transcript notEmpty| |
|
1934 |
||
1935 |
classes := self classesInOrderFor:'generate ''abbrev.stc''-file.'. |
|
1936 |
classes isNil ifTrue:[^ self]. |
|
1937 |
||
1938 |
notEmpty := (classes size > 0). |
|
1939 |
||
1940 |
transcript := Transcript current. |
|
1941 |
transcript showCR:'creating abbrev.stc file'. |
|
1942 |
||
1943 |
d := directoryName asFilename. |
|
1944 |
f := d construct:'abbrev.stc'. |
|
1945 |
||
1946 |
out := f writeStream. |
|
1947 |
out isNil ifTrue:[ |
|
1948 |
self warn:'cannot create abbrev.stc'. |
|
1949 |
^ self |
|
1950 |
]. |
|
1951 |
||
1952 |
myPackage := self package. |
|
1953 |
||
1954 |
notEmpty ifTrue:[ |
|
1955 |
classes do:[:cls | |
|
5338 | 1956 |
|clsInfo cond fileName clsName clsCategory| |
5314 | 1957 |
|
1958 |
clsInfo := self classInfoFor:cls. |
|
1959 |
cond := clsInfo conditionForInclusion. |
|
1960 |
(cond == #always or:[cond == #autoload]) ifTrue:[ |
|
1961 |
fileName := clsInfo classFileName. |
|
1962 |
fileName isNil ifTrue:[ |
|
5338 | 1963 |
cls isBehavior ifTrue:[ |
1964 |
fileName := cls nameWithoutNameSpacePrefix |
|
1965 |
] ifFalse:[ |
|
1966 |
fileName := cls |
|
1967 |
] |
|
5314 | 1968 |
]. |
1969 |
(fileName endsWith:'.st') ifTrue:[ |
|
1970 |
fileName := fileName copyWithoutLast:3 |
|
1971 |
]. |
|
5338 | 1972 |
cls isBehavior ifTrue:[ |
1973 |
clsName := cls name. |
|
1974 |
clsCategory := cls category. |
|
1975 |
] ifFalse:[ |
|
1976 |
clsName := cls. |
|
1977 |
clsCategory := 'unknown category'. |
|
1978 |
]. |
|
1979 |
out nextPutAll:clsName. |
|
5314 | 1980 |
out space. |
1981 |
out nextPutAll:fileName. |
|
1982 |
out space. |
|
5338 | 1983 |
out nextPutAll:self package. |
5314 | 1984 |
out space. |
5338 | 1985 |
out nextPut:$'; nextPutAll:clsCategory; nextPut:$'. |
5314 | 1986 |
out cr. |
1987 |
] |
|
1988 |
]. |
|
1989 |
]. |
|
1990 |
out close |
|
1991 |
! |
|
1992 |
||
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1993 |
createLoadAllFile |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1994 |
"creates a 'loadAll' file, which will load all classes |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1995 |
of the project - this loadAll file is supposed to be located |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1996 |
in the projects source directory." |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1997 |
|
5670 | 1998 |
|d f out in classes transcript | |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
1999 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2000 |
classes := self classesInOrderFor:'generate ''loadAll''-file.'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2001 |
classes isNil ifTrue:[^ self]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2002 |
|
4850 | 2003 |
transcript := Transcript current. |
2004 |
transcript showCR:'creating loadAll file'. |
|
4097 | 2005 |
|
2006 |
d := directoryName asFilename. |
|
2007 |
f := d construct:'loadAll'. |
|
2008 |
f exists ifTrue:[ |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2009 |
f renameTo:(d construct:'loadAll.bak') |
4097 | 2010 |
]. |
2011 |
out := f writeStream. |
|
2012 |
out isNil ifTrue:[ |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2013 |
self warn:'cannot create loadAll'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2014 |
(d construct:'loadAll.bak') renameTo:f. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2015 |
^ self |
4097 | 2016 |
]. |
5670 | 2017 |
self createLoadAllFileOn:out. |
2018 |
out close |
|
2019 |
! |
|
2020 |
||
2021 |
createLoadAllFileOn:outStream |
|
2022 |
"creates a 'loadAll' file, which will load all classes |
|
2023 |
of the project - this loadAll file is supposed to be located |
|
2024 |
in the projects source directory." |
|
2025 |
||
2026 |
|in classes classInfo myPackage |
|
2027 |
methodsFile prerequisitePackages transcript notEmpty| |
|
2028 |
||
2029 |
classes := self classesInOrderFor:'generate ''loadAll''-file.'. |
|
2030 |
classes isNil ifTrue:[^ self]. |
|
2031 |
||
2032 |
methodsFile := self propertyAt:#methodsFile. |
|
2033 |
notEmpty := (classes size > 0 or:[methodsFile size > 0]). |
|
4097 | 2034 |
|
4886 | 2035 |
myPackage := self package. |
2036 |
||
5670 | 2037 |
outStream nextPutLine:'"/ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2038 |
"/ $' , 'Header' , '$'. |
5670 | 2039 |
outStream nextPutLine:'"/ |
4886 | 2040 |
"/ loadAll-file to fileIn code for: ' , myPackage. |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2041 |
|
5670 | 2042 |
outStream nextPutAll:'"/ |
4776 | 2043 |
"/ Automatically generated from project definition. |
4786 | 2044 |
"/ DO NOT MODIFY THIS fILE; |
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
2045 |
"/ modify the .prj file instead, and regenerate this file |
4786 | 2046 |
"/ with the ProjectBrowser tool. |
4776 | 2047 |
"/ |
2048 |
||
2049 |
"/ |
|
2050 |
"/ Prerequisites: |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2051 |
"/'. |
4796 | 2052 |
prerequisitePackages := self prerequisitePackages |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2053 |
collect:[:entry | |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2054 |
|pName| |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2055 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2056 |
entry isString ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2057 |
pName := entry |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2058 |
] ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2059 |
entry isArray ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2060 |
pName := entry at:1 |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2061 |
] ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2062 |
pName := entry name |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2063 |
] |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2064 |
] |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2065 |
]. |
4796 | 2066 |
|
2067 |
prerequisitePackages size == 0 ifTrue:[ |
|
5670 | 2068 |
outStream nextPutLine:''. |
2069 |
outStream nextPutLine:'"/ Smalltalk loadPackage:''module:directory''.'. |
|
2070 |
outStream nextPutLine:'"/ Smalltalk loadPackage:''....''.'. |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2071 |
] ifFalse:[ |
5670 | 2072 |
outStream cr. |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2073 |
prerequisitePackages do:[:packName | |
5670 | 2074 |
outStream nextPutLine:'Smalltalk loadPackage:''' , packName , '''.'. |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2075 |
] |
4796 | 2076 |
]. |
2077 |
||
5167 | 2078 |
methodsFile := self propertyAt:#methodsFile. |
5177 | 2079 |
notEmpty ifTrue:[ |
5167 | 2080 |
|
5670 | 2081 |
outStream nextPutAll:'!! |
4776 | 2082 |
|
4886 | 2083 |
"{ package:''' , myPackage , ''' }"!! |
4776 | 2084 |
|
4097 | 2085 |
|files| |
2086 |
||
4886 | 2087 |
''loading package ' , myPackage , ' ...'' infoPrintCR. |
4776 | 2088 |
|
4097 | 2089 |
files := #( |
2090 |
'. |
|
2091 |
||
5167 | 2092 |
classes do:[:cls | |
2093 |
|clsInfo cond fileName| |
|
2094 |
||
2095 |
clsInfo := self classInfoFor:cls. |
|
2096 |
cond := clsInfo conditionForInclusion. |
|
2097 |
(cond == #always or:[cond == #autoload]) ifTrue:[ |
|
5670 | 2098 |
outStream nextPutAll:' '''. |
5167 | 2099 |
fileName := clsInfo classFileName. |
2100 |
fileName isNil ifTrue:[ |
|
5337 | 2101 |
cls isBehavior ifFalse:[ |
2102 |
fileName := cls |
|
2103 |
] ifTrue:[ |
|
2104 |
fileName := cls nameWithoutNameSpacePrefix |
|
2105 |
] |
|
5167 | 2106 |
]. |
2107 |
(fileName endsWith:'.st') ifFalse:[ |
|
2108 |
fileName := fileName , '.st' |
|
2109 |
]. |
|
5670 | 2110 |
fileName printOn:outStream. |
2111 |
outStream nextPutAll:''''; cr. |
|
5167 | 2112 |
] |
2113 |
]. |
|
2114 |
methodsFile size > 0 ifTrue:[ |
|
5670 | 2115 |
outStream |
5167 | 2116 |
nextPutAll:' '''; |
2117 |
nextPutAll:methodsFile; |
|
2118 |
nextPutAll:''''; |
|
2119 |
cr. |
|
2120 |
]. |
|
2121 |
||
5670 | 2122 |
outStream nextPutAll:') asOrderedCollection. |
4776 | 2123 |
|
4960 | 2124 |
"/ see if there is a classLibrary |
5173 | 2125 |
(Smalltalk fileInClassLibrary:''' , self libraryName , ''') ifTrue:[ |
4776 | 2126 |
|handle loaded| |
2127 |
||
4785 | 2128 |
handle := ObjectFileLoader loadedObjectHandles |
4886 | 2129 |
detect:[:h | h package = ''' , myPackage , '''] ifNone:nil. |
4776 | 2130 |
handle ifNotNil:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2131 |
loaded := Set new:(handle classes size). |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2132 |
handle classes do:[:c| c isMeta ifFalse:[loaded add:c classFilename]]. |
4785 | 2133 |
'. |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2134 |
|
5167 | 2135 |
methodsFile size > 0 ifTrue:[ |
5670 | 2136 |
outStream nextPutLine:(' loaded add:''' , methodsFile , '''.'). |
5167 | 2137 |
]. |
5670 | 2138 |
outStream nextPutAll:' files := files asOrderedCollection select:[:f| (loaded includes:f) not]. |
4776 | 2139 |
]. |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2140 |
]. |
4097 | 2141 |
|
4960 | 2142 |
"/ load files which are not in the classLibrary (all if there is none) |
2143 |
files size > 0 ifTrue:[ |
|
5165 | 2144 |
files do:[:f | |
4785 | 2145 |
''.'' infoPrint. |
5165 | 2146 |
f asFilename exists ifTrue:[ |
2147 |
Smalltalk fileIn:f. |
|
2148 |
] ifFalse:[ |
|
2149 |
Smalltalk fileIn:(''source/'' , f) |
|
2150 |
] |
|
4960 | 2151 |
]. |
2152 |
'' '' infoPrintCR. |
|
4097 | 2153 |
]. |
4886 | 2154 |
'' done (' , myPackage , ').'' infoPrintCR. |
4887 | 2155 |
'. |
4097 | 2156 |
|
5167 | 2157 |
]. |
4097 | 2158 |
! |
2159 |
||
4850 | 2160 |
createMacMakefile |
2161 |
"creates an mac-os makefile" |
|
2162 |
||
2163 |
Transcript current showCR:'Mac support not yet implemented - no mac.mak created for Mac'. |
|
2164 |
! |
|
2165 |
||
2 | 2166 |
createMakefile |
4779 | 2167 |
"creates an initial Makefile from a Make.proto file. |
2168 |
Requires the stmkmf script" |
|
2169 |
||
5166 | 2170 |
|d top transcript stmkmf| |
2 | 2171 |
|
4821 | 2172 |
OperatingSystem isUNIXlike ifTrue:[ |
4850 | 2173 |
Transcript current showCR:'creating Makefile'. |
4821 | 2174 |
|
2175 |
d := directoryName asFilename pathName. |
|
5166 | 2176 |
top := (d , '/' , (self findTopFrom:directoryName)) asFilename. |
2177 |
||
2178 |
(top construct:'rules') exists ifFalse:[ |
|
2179 |
self warn:'Could not execute stmkmf - no TOP/rules directory found.' |
|
2180 |
]. |
|
2181 |
(stmkmf := ((top construct:'rules') construct:'stmkmf')) exists ifFalse:[ |
|
2182 |
self warn:'Could not execute stmkmf - no TOP/rules/stmkmf found.' |
|
2183 |
]. |
|
4821 | 2184 |
|
4850 | 2185 |
transcript := Transcript current. |
2186 |
||
4821 | 2187 |
(OperatingSystem |
5166 | 2188 |
executeCommand:('sh ' , stmkmf pathName) |
4850 | 2189 |
outputTo:transcript |
2190 |
errorTo:transcript |
|
2191 |
inDirectory:d |
|
2192 |
) ifFalse:[ |
|
5166 | 2193 |
self warn:'Error executing stmkmf - no Makefile built.' |
4821 | 2194 |
]. |
13 | 2195 |
]. |
4850 | 2196 |
self createNTMakefile. |
2197 |
self createVMSMakefile. |
|
2198 |
self createMacMakefile. |
|
4779 | 2199 |
|
4821 | 2200 |
"Modified: / 26.9.1999 / 16:18:29 / cg" |
2 | 2201 |
! |
2202 |
||
4822 | 2203 |
createNTMakefile |
4850 | 2204 |
"creates an nt.mak makefile" |
4822 | 2205 |
|
2206 |
|d f s type appName libName startUpClass startUpSelector |
|
4850 | 2207 |
topName classes methodsFile transcript| |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2208 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2209 |
classes := self classesInOrderFor:'generate ''nt.mak''-file.'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2210 |
classes isNil ifTrue:[^ self]. |
4822 | 2211 |
|
2212 |
topName := self findTopFrom:directoryName. |
|
2213 |
||
4850 | 2214 |
transcript := Transcript current. |
2215 |
transcript showCR:'Generating make support for Win9x/WinNT...'. |
|
2216 |
transcript showCR:'creating bmake.bat'. |
|
2217 |
||
4822 | 2218 |
d := directoryName asFilename. |
2219 |
f := d construct:'bmake.bat'. |
|
2220 |
s := f writeStream. |
|
2221 |
s isNil ifTrue:[ |
|
2222 |
self warn:'cannot create bmake.bat'. |
|
2223 |
^ self |
|
2224 |
]. |
|
4824 | 2225 |
s nextPutLine:'if not exist object\nul mkdir objbc'. |
4822 | 2226 |
s nextPutLine:'make.exe -N -f nt.mak %1 %'. |
2227 |
s close. |
|
2228 |
||
4823 | 2229 |
|
4850 | 2230 |
transcript showCR:'creating bc.def'. |
2231 |
||
4822 | 2232 |
d := directoryName asFilename. |
2233 |
f := d construct:'bc.def'. |
|
2234 |
s := f writeStream. |
|
2235 |
s isNil ifTrue:[ |
|
2236 |
self warn:'cannot create bc.def'. |
|
2237 |
^ self |
|
2238 |
]. |
|
2239 |
s nextPutLine:'LIBRARY ' , self libraryName. |
|
2240 |
s nextPutLine:'DESCRIPTION ''AddOn library for ST/X'' |
|
2241 |
CODE PRELOAD MOVEABLE DISCARDABLE |
|
2242 |
SEGMENTS |
|
2243 |
INITCODE PRELOAD SHARED DISCARDABLE |
|
2244 |
EXPORTS |
|
2245 |
__' , self libraryName , '_Init @1'. |
|
2246 |
s close. |
|
2247 |
||
4823 | 2248 |
|
4850 | 2249 |
transcript showCR:'creating nt.def'. |
2250 |
||
4822 | 2251 |
d := directoryName asFilename. |
2252 |
f := d construct:'nt.def'. |
|
2253 |
s := f writeStream. |
|
2254 |
s isNil ifTrue:[ |
|
2255 |
self warn:'cannot create nt.def'. |
|
2256 |
^ self |
|
2257 |
]. |
|
2258 |
s nextPutLine:'LIBRARY ' , self libraryName. |
|
2259 |
s nextPutLine:'DESCRIPTION ''AddOn library for ST/X'' |
|
2260 |
CODE EXECUTE READ SHARED |
|
2261 |
DATA READ WRITE |
|
2262 |
SECTIONS |
|
2263 |
INITCODE READ EXECUTE SHARED |
|
2264 |
INITDATA READ WRITE |
|
2265 |
EXPORTS |
|
2266 |
_' , self libraryName , '_Init'. |
|
2267 |
s close. |
|
2268 |
||
4823 | 2269 |
|
4850 | 2270 |
transcript showCR:'creating libInit.cc'. |
2271 |
||
4823 | 2272 |
d := directoryName asFilename. |
2273 |
f := d construct:'libInit.cc'. |
|
2274 |
s := f writeStream. |
|
2275 |
s isNil ifTrue:[ |
|
2276 |
self warn:'cannot create libInit.cc'. |
|
2277 |
^ self |
|
2278 |
]. |
|
2279 |
s nextPutAll:'/* |
|
2280 |
* DO NOT EDIT |
|
2281 |
* automatically generated from project.prj |
|
2282 |
*/ |
|
2283 |
#define __INDIRECTVMINITCALLS__ |
|
2284 |
#include <stc.h> |
|
2285 |
#define INIT_TEXT_SECT /* as nothing */ |
|
2286 |
#ifdef WIN32 |
|
2287 |
# pragma codeseg INITCODE "INITCODE" |
|
2288 |
#else /* not WIN32 */ |
|
2289 |
# if defined(__GNUC__) |
|
2290 |
# if (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ > 2 |
|
2291 |
# undef INIT_TEXT_SECT |
|
2292 |
# define INIT_TEXT_SECT __attribute__((section(".stxitext"))) |
|
2293 |
# endif |
|
2294 |
# endif /* not GNUC */ |
|
2295 |
#endif /* not WIN32 */ |
|
2296 |
#ifdef INIT_TEXT_SECT |
|
2297 |
extern void _' , self libraryName , '_Init() INIT_TEXT_SECT; |
|
2298 |
#endif |
|
2299 |
void _' , self libraryName , '_Init(pass, __pRT__, snd) |
|
2300 |
OBJ snd; struct __vmData__ *__pRT__; { |
|
2301 |
__BEGIN_PACKAGE2__("' , self libraryName , '", _' , self libraryName , '_Init, "' , self package , '"); |
|
2302 |
'. |
|
2303 |
classes notNil ifTrue:[ |
|
2304 |
classes do:[:aClass | |
|
2305 |
|abbrev| |
|
2306 |
||
2307 |
abbrev := Smalltalk fileNameForClass:aClass name. |
|
2308 |
s nextPutAll:'_'; nextPutAll:abbrev; nextPutLine:'_Init(pass,__pRT__,snd);'. |
|
2309 |
]. |
|
2310 |
]. |
|
2311 |
s nextPutAll:'__END_PACKAGE__(); |
|
2312 |
} |
|
2313 |
'. |
|
2314 |
s close. |
|
2315 |
||
4850 | 2316 |
transcript showCR:'creating nt.mak'. |
4822 | 2317 |
|
2318 |
d := directoryName asFilename. |
|
2319 |
f := d construct:'nt.mak'. |
|
2320 |
f exists ifTrue:[ |
|
2321 |
f renameTo:(d construct:'nt.mak.bak') |
|
2322 |
]. |
|
2323 |
s := f writeStream. |
|
2324 |
s isNil ifTrue:[ |
|
2325 |
self warn:'cannot create nt.mak'. |
|
2326 |
^ self |
|
2327 |
]. |
|
2328 |
s nextPutAll:'# $' , 'Header'. |
|
2329 |
s nextPutLine:'$'. |
|
2330 |
s nextPutAll:'# |
|
2331 |
# -- nt.mak created from project at ' . |
|
2332 |
s nextPutAll:Smalltalk timeStamp. |
|
2333 |
s nextPutAll:' |
|
2334 |
# |
|
2335 |
# Warning: YOU SHOULD NOT MODIFY THIS FILE - MODIFY THE .prj FILE INSTEAD |
|
2336 |
# and let the ProjectBrowser recreate this file. |
|
2337 |
# once you modify this file, do not recreate nt.mak again |
|
2338 |
# - otherwise, your changes are lost. |
|
2339 |
||
2340 |
# module and directory-in-module; |
|
2341 |
# these should correspond to the directory hierarchy |
|
2342 |
# location (otherwise, ST/X will have a hard time to |
|
2343 |
# find out the packages location from its packageID) |
|
2344 |
MODULE=' , self repositoryModule ? 'unknown' , ' |
|
2345 |
MODULE_DIR=' , self repositoryDirectory ? 'unknown' , ' |
|
2346 |
||
2347 |
# default installation directory: |
|
2348 |
# (overwrite with ''make INSTALLTOP_DIR=... install'') |
|
2349 |
# the INSTALLBASE is imported from configurations... and usually |
|
2350 |
# defaults to something like /opt/smalltalk. |
|
2351 |
# (overwrite with ''make INSTALLBASE=... install'') |
|
2352 |
INSTALLTOP_DIR=$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR) |
|
2353 |
INSTALLLIB_DIR=$(INSTALLTOP_DIR) |
|
2354 |
INSTALLBIN_DIR=$(INSTALLTOP_DIR) |
|
2355 |
||
2356 |
# |
|
2357 |
# position (of this package) in directory hierarchy: |
|
2358 |
# (must point to ST/X top directory, for tools and includes) |
|
2359 |
TOP=' , topName ,' |
|
2360 |
||
5126 | 2361 |
!!INCLUDE "$(TOP)\rules\stdHeader_nt" |
4822 | 2362 |
|
2363 |
# subdirectories where targets are to be made: |
|
2364 |
SUBDIRS= |
|
2365 |
||
2366 |
# subdirectories where Makefiles are to be made: |
|
2367 |
# (only define if different from SUBDIRS) |
|
2368 |
# ALLSUBDIRS= |
|
2369 |
||
2370 |
||
2371 |
# the name of your classLibrary: |
|
2372 |
# ********** REQUIRED: CHECK the next line *** |
|
2373 |
LIBNAME=' , self libraryName , ' |
|
2374 |
||
5196 | 2375 |
#### LIB_BASE =0x05000000 |
4822 | 2376 |
|
2377 |
# the next define suppresses installation of |
|
2378 |
# the classes as autoloaded (i.e. not added to abbrev.stc). |
|
2379 |
SUPPRESS_LOCAL_ABBREVS=1 |
|
2380 |
||
2381 |
# the package is stored as an ID in classes and methods |
|
2382 |
# to identify code belonging to this project. |
|
2383 |
# It also specifies the position in the source repository |
|
2384 |
# and directory tree, when packages are loaded by packageID. |
|
2385 |
# ********** REQUIRED: CHECK the next line *** |
|
2386 |
PACKAGE=$(MODULE):$(MODULE_DIR) |
|
2387 |
||
2388 |
# Argument(s) to the stc compiler. |
|
2389 |
# -H. : create header files locally |
|
2390 |
# (if removed, they will be created as common |
|
2391 |
# -Pxxx : defines the package |
|
2392 |
# -Zxxx : a prefix for variables within the classLib |
|
2393 |
# -Dxxx : defines passed to to CC for inline C-code |
|
2394 |
# -Ixxx : include path passed to CC for inline C-code |
|
2395 |
# +optspace : optimized for space |
|
2396 |
# +optspace2 : optimized more for space |
|
2397 |
# +optspace3 : optimized even more for space |
|
2398 |
# +optinline : generate inline code for some ST constructs |
|
2399 |
# +inlineNew : additionally inline new |
|
2400 |
# +inlineMath : additionally inline some floatPnt math stuff |
|
2401 |
# |
|
2402 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
2403 |
# STCLOCALOPTIMIZATIONS=+optinline +inlineNew |
|
2404 |
# STCLOCALOPTIMIZATIONS=+optspace3 |
|
2405 |
STCLOCALOPTIMIZATIONS=+optspace3 |
|
2406 |
||
2407 |
# Argument(s) to the stc compiler. |
|
2408 |
# -warn : no warnings |
|
2409 |
# -warnNonStandard : no warnings about ST/X extensions |
|
2410 |
# -warnEOLComments : no warnings about EOL comment extension |
|
2411 |
# -warnPrivacy : no warnings about privateClass extension |
|
2412 |
# |
|
2413 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
2414 |
# STCWARNINGS=-warn |
|
2415 |
# STCWARNINGS=-warnNonStandard |
|
2416 |
# STCWARNINGS=-warnEOLComments |
|
2417 |
STCWARNINGS='. |
|
2418 |
(self propertyAt:#'make.stc.warnEOLComments') == false ifTrue:[ |
|
2419 |
s nextPutAll:'-warnEOLComments '. |
|
2420 |
]. |
|
2421 |
(self propertyAt:#'make.stc.warnNonStandard') == false ifTrue:[ |
|
2422 |
s nextPutAll:'-warnNonStandard '. |
|
2423 |
]. |
|
2424 |
s nextPutAll:((self propertyAt:#'make.stc.WARNINGOPTIONS') ? '') , ' |
|
2425 |
||
2426 |
# if your embedded C code requires any system includes, |
|
2427 |
# add the path(es) here:, |
|
2428 |
# ********** OPTIONAL: MODIFY the next lines *** |
|
2429 |
# LOCALINCLUDES=-Ifoo -Ibar |
|
2430 |
LOCALINCLUDES=' , ((self propertyAt:#'make.stc.LOCALINCLUDES') ? '') , ' |
|
2431 |
||
2432 |
# if you need any additional defines for embedded C code, |
|
2433 |
# add them here:, |
|
2434 |
# ********** OPTIONAL: MODIFY the next lines *** |
|
2435 |
# LOCALDEFINES=-Dfoo -Dbar -DDEBUG |
|
2436 |
LOCALDEFINES=' , ((self propertyAt:#'make.stc.LOCALDEFINES') ? '') , ' |
|
2437 |
||
5125 | 2438 |
STCLOCALOPT=-I. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALINCLUDES) $(LOCALDEFINES) -H. -package=$(PACKAGE) -varPrefix=$(LIBNAME) $(COMMONSYMFLAG) $(INITCODESEPFLAG) |
4822 | 2439 |
|
2440 |
# ********** OPTIONAL: MODIFY the next line *** |
|
2441 |
# additional C-libraries that should be pre-linked with the class-objects |
|
2442 |
LD_OBJ_LIBS=' , ((self propertyAt:#'make.LD_OBJ_LIBS') ? '') , ' |
|
2443 |
||
2444 |
# ********** OPTIONAL: MODIFY the next line *** |
|
2445 |
# additional C targets or libraries should be added below |
|
2446 |
LOCAL_EXTRA_TARGETS=' , ((self propertyAt:#'make.LOCAL_EXTRA_TARGETS') ? '') , ' |
|
2447 |
||
2448 |
#ALL:: preMake $(LIBDIR)\$(LIBNAME).lib $(BINDIR)\$(LIBNAME).dll postMake |
|
2449 |
ALL:: $(LIBDIR)\$(LIBNAME).lib $(BINDIR)\$(LIBNAME).dll |
|
2450 |
||
2451 |
||
2452 |
'. |
|
2453 |
||
2454 |
"/ type := #library. |
|
2455 |
"/ appName := 'app'. |
|
2456 |
"/ libName := 'lib'. |
|
2457 |
"/ startUpClass := 'Smalltalk'. |
|
2458 |
"/ startUpSelector := 'start'. |
|
2459 |
"/ |
|
2460 |
"/ properties notNil ifTrue:[ |
|
2461 |
"/ type := properties at:#projectType ifAbsent:type. |
|
2462 |
"/ appName := properties at:#applicationName ifAbsent:appName. |
|
2463 |
"/ startUpClass := properties at:#startupClass ifAbsent:startUpClass. |
|
2464 |
"/ startUpSelector := properties at:#startupSelector ifAbsent:startUpSelector. |
|
2465 |
"/ ]. |
|
2466 |
"/ |
|
2467 |
"/ s nextPutAll:'# |
|
2468 |
"/# define the name of the library to create |
|
2469 |
"/# |
|
2470 |
"/'. |
|
2471 |
"/ s nextPutAll:'LIBNAME=lib' , appName; cr; cr. |
|
2472 |
"/ |
|
2473 |
"/ s nextPutAll:'# |
|
2474 |
"/# the target rule: |
|
2475 |
"/# |
|
2476 |
"/all:: abbrev.stc objs genClassList $(OBJTARGET) |
|
2477 |
"/ |
|
2478 |
"/'. |
|
2479 |
"/ |
|
2480 |
"/ type == #executable ifTrue:[ |
|
2481 |
"/ s nextPutAll:'PROGS = ' , appName; cr. |
|
2482 |
"/ s nextPutAll:('STARTUP_CLASS=' , startUpClass); cr. |
|
2483 |
"/ s nextPutAll:'STARTUP_SELECTOR="' , startUpSelector; nextPutAll:'"'; cr. |
|
2484 |
"/ ]. |
|
2485 |
"/ |
|
2486 |
"/ s nextPutAll:'# |
|
2487 |
"/# define the object files that are to be created |
|
2488 |
"/# |
|
2489 |
"/'. |
|
2490 |
s nextPutAll:'OBJS='. |
|
2491 |
||
2492 |
classes do:[:aClass | |
|
4833 | 2493 |
|fileName clsInfo cond include| |
4822 | 2494 |
|
2495 |
clsInfo := self classInfoFor:aClass. |
|
2496 |
include := true. |
|
2497 |
clsInfo notNil ifTrue:[ |
|
2498 |
cond := clsInfo conditionForInclusion. |
|
2499 |
(self conditionForInclusionIsTrue:cond) ifFalse:[ |
|
2500 |
include := false. |
|
2501 |
] ifTrue:[ |
|
2502 |
(self conditionForAutoloadIsTrue:cond) ifTrue:[ |
|
2503 |
include := false |
|
2504 |
] |
|
2505 |
]. |
|
2506 |
]. |
|
2507 |
include ifTrue:[ |
|
2508 |
s nextPutAll:' \'. s cr. |
|
4833 | 2509 |
fileName := clsInfo classFileName. |
2510 |
fileName isNil ifTrue:[ |
|
2511 |
fileName := Smalltalk fileNameForClass:aClass name. |
|
2512 |
]. |
|
2513 |
fileName := fileName asFilename withoutSuffix name. |
|
2514 |
s nextPutAll:' $(OUTDIR)'; nextPutAll:fileName; nextPutAll:'.$(O)'. |
|
4822 | 2515 |
] |
2516 |
]. |
|
2517 |
(methodsFile := self propertyAt:#methodsFile) size > 0 ifTrue:[ |
|
2518 |
s nextPutAll:' \'. s cr. |
|
2519 |
s nextPutAll:' $(OUTDIR)'; |
|
2520 |
nextPutAll:(methodsFile asFilename withoutSuffix baseName); |
|
2521 |
nextPutAll:'.$(O)'. |
|
2522 |
]. |
|
2523 |
s cr. |
|
2524 |
||
2525 |
s nextPutAll:' |
|
2526 |
# add more install actions here |
|
2527 |
install: |
|
2528 |
||
2529 |
# add more install actions for aux-files (resources) here |
|
2530 |
installAux: |
|
2531 |
||
2532 |
# add more preMake actions here |
|
2533 |
preMake: |
|
2534 |
||
2535 |
# add more postMake actions here |
|
2536 |
postMake: cleanjunk |
|
2537 |
||
2538 |
#clean:: |
|
2539 |
#' , Character tab , '-del $(OUTDIR)*.obj |
|
2540 |
#' , Character tab , '-del *.sc |
|
2541 |
||
2542 |
#clobber:: |
|
2543 |
#' , Character tab , '-del $(OUTDIR)*.obj |
|
2544 |
#' , Character tab , '-del *.sc |
|
2545 |
#' , Character tab , '-del *.dll |
|
2546 |
#' , Character tab , '-del *.lib |
|
2547 |
||
2548 |
||
5126 | 2549 |
!!INCLUDE $(TOP)\rules\stdRules_nt |
4822 | 2550 |
|
2551 |
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it |
|
2552 |
'. |
|
2553 |
classes notNil ifTrue:[ |
|
2554 |
classes do:[:aClass | |
|
4833 | 2555 |
|fileName clsInfo| |
2556 |
||
2557 |
clsInfo := self classInfoFor:aClass. |
|
2558 |
fileName := clsInfo classFileName. |
|
2559 |
fileName isNil ifTrue:[ |
|
2560 |
fileName := Smalltalk fileNameForClass:aClass name. |
|
2561 |
]. |
|
2562 |
fileName := fileName asFilename withoutSuffix name. |
|
2563 |
s nextPutAll:'$(OUTDIR)'; nextPutAll:fileName; nextPutAll:'.$(O): '. |
|
2564 |
s nextPutAll:fileName; nextPutAll:'.st '. |
|
4822 | 2565 |
"/ aClass allSuperclassesDo:[:superClass| |
2566 |
"/ s nextPutAll:(Smalltalk fileNameForClass:superClass name) , '.$(H) '. |
|
2567 |
"/ ]. |
|
2568 |
s nextPutAll:'$(STCHDR)'; cr. |
|
2569 |
]. |
|
2570 |
]. |
|
2571 |
s nextPutAll:'# ENDMAKEDEPEND --- do not remove this line'. |
|
2572 |
s cr; cr. |
|
2573 |
||
2574 |
type == #executable ifTrue:[ |
|
2575 |
s nextPutAll:'ALL:: $(PROGS)'; cr. |
|
2576 |
||
2577 |
s nextPutAll:appName. |
|
2578 |
s nextPutAll:':: main.$(O) classList.$(O) $(OBJS)'; cr. |
|
2579 |
s tab; nextPutAll:'$(LD) $(ST_LDFLAG) $(LDFLAGS) -o '; |
|
2580 |
nextPutAll:appName; |
|
2581 |
nextPutAll:' \'; cr. |
|
2582 |
s tab; tab; nextPutAll:'$(CRT0) main.$(O) classList.$(O) $(OBJS) $(EXTRA_OBJ) $(LIBOBJS) \'; cr. |
|
2583 |
s tab; tab; nextPutAll:'$(LIBRUNDIR)/hidata.o $(LIBRUN) \'; cr. |
|
2584 |
s tab; tab; nextPutAll:'$(MATHLIB) $(EXTRALIBS) -lXext $(SYSLIBS) $(OTHERLIBS) $(CRTN)'; cr. |
|
2585 |
]. |
|
2586 |
||
2587 |
s close |
|
2588 |
||
5196 | 2589 |
"Modified: / 19.1.2000 / 16:55:34 / cg" |
4822 | 2590 |
! |
2591 |
||
617 | 2592 |
createProjectFiles |
2593 |
"actually, creates all files to do a make in the project directory" |
|
2594 |
||
2595 |
directoryName asFilename exists ifFalse:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2596 |
(self confirm:'create new projectDirectory: ' , directoryName) |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2597 |
ifFalse:[^ self]. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2598 |
OperatingSystem recursiveCreateDirectory:directoryName. |
617 | 2599 |
]. |
2600 |
self createMakefile. |
|
2601 |
self createSourcefiles. |
|
2602 |
self createProtoMakefile. |
|
4097 | 2603 |
(self propertyAt:#deliverLoadAllFile) == true ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2604 |
self createLoadAllFile |
4097 | 2605 |
]. |
617 | 2606 |
! |
2607 |
||
2 | 2608 |
createProtoMakefile |
2609 |
"creates a Make.proto file" |
|
2610 |
||
362 | 2611 |
|d f s type appName libName startUpClass startUpSelector |
5177 | 2612 |
topName classes methodsFile notEmpty repositoryModule repositoryDirectory pkg| |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2613 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2614 |
classes := self classesInOrderFor:'generate ''Make.proto''-file.'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2615 |
classes isNil ifTrue:[^ self]. |
2 | 2616 |
|
5177 | 2617 |
methodsFile := self propertyAt:#methodsFile. |
2618 |
notEmpty := (classes size > 0 or:[methodsFile size > 0]). |
|
2619 |
||
362 | 2620 |
topName := self findTopFrom:directoryName. |
2 | 2621 |
|
5177 | 2622 |
repositoryModule := self repositoryModule ? 'unknown'. |
2623 |
repositoryDirectory := self repositoryDirectory ? 'unknown'. |
|
2624 |
pkg := repositoryModule , ':' , repositoryDirectory. |
|
4779 | 2625 |
|
4850 | 2626 |
Transcript current showCR:'creating Make.proto'. |
13 | 2627 |
|
356 | 2628 |
d := directoryName asFilename. |
2 | 2629 |
f := d construct:'Make.proto'. |
2630 |
f exists ifTrue:[ |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2631 |
f renameTo:(d construct:'Make.proto.bak') |
2 | 2632 |
]. |
2633 |
s := f writeStream. |
|
13 | 2634 |
s isNil ifTrue:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2635 |
self warn:'cannot create prototype Makefile'. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2636 |
^ self |
13 | 2637 |
]. |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2638 |
s nextPutAll:'# $' , 'Header'. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2639 |
s nextPutLine:'$'. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2640 |
s nextPutAll:'# |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2641 |
# -- Make.proto created from project at ' . |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2642 |
s nextPutAll:Smalltalk timeStamp. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
2643 |
s nextPutAll:' |
2 | 2644 |
# |
4786 | 2645 |
# Warning: YOU SHOULD NOT MODIFY THIS FILE - MODIFY THE .prj FILE INSTEAD |
2646 |
# and let the ProjectBrowser recreate this file. |
|
2647 |
# once you modify this file, do not rerun |
|
4779 | 2648 |
# stmkmp or recreate the Make.proto again - otherwise, your changes are lost. |
2649 |
||
2650 |
# module and directory-in-module; |
|
2651 |
# these should correspond to the directory hierarchy |
|
2652 |
# location (otherwise, ST/X will have a hard time to |
|
2653 |
# find out the packages location from its packageID) |
|
5177 | 2654 |
MODULE=' , repositoryModule , ' |
2655 |
MODULE_DIR=' , repositoryDirectory , ' |
|
2656 |
'. |
|
2657 |
s nextPutAll:' |
|
4779 | 2658 |
# default installation directory: |
2659 |
# (overwrite with ''make INSTALLTOP_DIR=... install'') |
|
2660 |
# the INSTALLBASE is imported from configurations... and usually |
|
2661 |
# defaults to something like /opt/smalltalk. |
|
2662 |
# (overwrite with ''make INSTALLBASE=... install'') |
|
2663 |
INSTALLTOP_DIR=$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR) |
|
2664 |
INSTALLLIB_DIR=$(INSTALLTOP_DIR) |
|
2665 |
INSTALLBIN_DIR=$(INSTALLTOP_DIR) |
|
5177 | 2666 |
'. |
2667 |
s nextPutAll:' |
|
362 | 2668 |
# |
4779 | 2669 |
# position (of this package) in directory hierarchy: |
2670 |
# (must point to ST/X top directory, for tools and includes) |
|
2671 |
TOP=' , topName ,' |
|
2672 |
||
2673 |
# subdirectories where targets are to be made: |
|
5177 | 2674 |
SUBDIRS='. |
2675 |
self prerequisitePackages do:[:aPackageId | |
|
5179 | 2676 |
|p| |
2677 |
||
5229 | 2678 |
"/ add sub-packages only |
5177 | 2679 |
(aPackageId startsWith:pkg) ifTrue:[ |
5179 | 2680 |
p := aPackageId copyFrom:pkg size + 1. |
2681 |
(p startsWith:$/) ifTrue:[ |
|
2682 |
p := p copyFrom:2 |
|
2683 |
]. |
|
2684 |
s nextPutAll:p. |
|
5177 | 2685 |
s space. |
2686 |
] |
|
2687 |
]. |
|
2688 |
||
2689 |
s nextPutAll:' |
|
362 | 2690 |
|
4779 | 2691 |
# subdirectories where Makefiles are to be made: |
2692 |
# (only define if different from SUBDIRS) |
|
2693 |
# ALLSUBDIRS= |
|
5177 | 2694 |
'. |
2695 |
notEmpty ifTrue:[ |
|
2696 |
s nextPutAll:' |
|
4779 | 2697 |
# the name of your classLibrary: |
2698 |
# ********** REQUIRED: CHECK the next line *** |
|
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
2699 |
LIBNAME=' , self libraryName , ' |
4779 | 2700 |
|
5177 | 2701 |
'. |
2702 |
]. |
|
2703 |
||
2704 |
false ifTrue:[ |
|
2705 |
s nextPutAll:' |
|
4779 | 2706 |
# the next define suppresses installation of |
2707 |
# the classes as autoloaded (i.e. not added to abbrev.stc). |
|
2708 |
SUPPRESS_LOCAL_ABBREVS=1 |
|
5177 | 2709 |
'. |
2710 |
]. |
|
2711 |
s nextPutAll:' |
|
4779 | 2712 |
# the package is stored as an ID in classes and methods |
2713 |
# to identify code belonging to this project. |
|
2714 |
# It also specifies the position in the source repository |
|
2715 |
# and directory tree, when packages are loaded by packageID. |
|
2716 |
# ********** REQUIRED: CHECK the next line *** |
|
2717 |
PACKAGE=$(MODULE):$(MODULE_DIR) |
|
2718 |
||
2719 |
# Argument(s) to the stc compiler. |
|
2720 |
# -H. : create header files locally |
|
2721 |
# (if removed, they will be created as common |
|
2722 |
# -Pxxx : defines the package |
|
2723 |
# -Zxxx : a prefix for variables within the classLib |
|
2724 |
# -Dxxx : defines passed to to CC for inline C-code |
|
2725 |
# -Ixxx : include path passed to CC for inline C-code |
|
2726 |
# +optspace : optimized for space |
|
2727 |
# +optspace2 : optimized more for space |
|
2728 |
# +optspace3 : optimized even more for space |
|
2729 |
# +optinline : generate inline code for some ST constructs |
|
2730 |
# +inlineNew : additionally inline new |
|
2731 |
# +inlineMath : additionally inline some floatPnt math stuff |
|
362 | 2732 |
# |
4779 | 2733 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
2734 |
# STCLOCALOPTIMIZATIONS=+optinline +inlineNew |
|
2735 |
# STCLOCALOPTIMIZATIONS=+optspace3 |
|
2736 |
STCLOCALOPTIMIZATIONS=+optspace3 |
|
2737 |
||
2738 |
# Argument(s) to the stc compiler. |
|
2739 |
# -warn : no warnings |
|
2740 |
# -warnNonStandard : no warnings about ST/X extensions |
|
2741 |
# -warnEOLComments : no warnings about EOL comment extension |
|
2742 |
# -warnPrivacy : no warnings about privateClass extension |
|
362 | 2743 |
# |
4779 | 2744 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
2745 |
# STCWARNINGS=-warn |
|
2746 |
# STCWARNINGS=-warnNonStandard |
|
2747 |
# STCWARNINGS=-warnEOLComments |
|
4796 | 2748 |
STCWARNINGS='. |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2749 |
(self propertyAt:#'make.stc.warnEOLComments') == false ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2750 |
s nextPutAll:'-warnEOLComments '. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2751 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2752 |
(self propertyAt:#'make.stc.warnNonStandard') == false ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2753 |
s nextPutAll:'-warnNonStandard '. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2754 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2755 |
s nextPutAll:((self propertyAt:#'make.stc.WARNINGOPTIONS') ? '') , ' |
4779 | 2756 |
|
2757 |
# if your embedded C code requires any system includes, |
|
2758 |
# add the path(es) here:, |
|
2759 |
# ********** OPTIONAL: MODIFY the next lines *** |
|
2760 |
# LOCALINCLUDES=-Ifoo -Ibar |
|
5229 | 2761 |
LOCALINCLUDES='. |
2762 |
s nextPutAll:((self propertyAt:#'make.stc.LOCALINCLUDES') ? ''). |
|
2763 |
self prerequisitePackages do:[:aPackageId | |
|
2764 |
|prj| |
|
2765 |
||
2766 |
s nextPutAll:'-I$(TOP)/../' , (aPackageId copyReplaceAll:$: with:$/) , ' '. |
|
2767 |
]. |
|
2768 |
s nextPutAll:' |
|
4779 | 2769 |
|
2770 |
# if you need any additional defines for embedded C code, |
|
2771 |
# add them here:, |
|
2772 |
# ********** OPTIONAL: MODIFY the next lines *** |
|
2773 |
# LOCALDEFINES=-Dfoo -Dbar -DDEBUG |
|
4796 | 2774 |
LOCALDEFINES=' , ((self propertyAt:#'make.stc.LOCALDEFINES') ? '') , ' |
4779 | 2775 |
|
2776 |
STCLOCALOPT=-I. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALINCLUDES) $(LOCALDEFINES) -H. ''-P$(PACKAGE)'' ''-Z$(LIBNAME)'' $(COMMONSYMFLAG) $(INITCODESEPFLAG) |
|
2777 |
||
2778 |
# ********** OPTIONAL: MODIFY the next line *** |
|
2779 |
# additional C-libraries that should be pre-linked with the class-objects |
|
4796 | 2780 |
LD_OBJ_LIBS=' , ((self propertyAt:#'make.LD_OBJ_LIBS') ? '') , ' |
4779 | 2781 |
|
2782 |
# ********** OPTIONAL: MODIFY the next line *** |
|
2783 |
# additional C targets or libraries should be added below |
|
4796 | 2784 |
LOCAL_EXTRA_TARGETS=' , ((self propertyAt:#'make.LOCAL_EXTRA_TARGETS') ? '') , ' |
4779 | 2785 |
|
5177 | 2786 |
'. |
2787 |
||
2788 |
s nextPutAll:' |
|
2789 |
all:: preMake '. |
|
2790 |
notEmpty ifTrue:[ |
|
2791 |
s nextPutAll:'classLibRule ' |
|
2792 |
]. |
|
2793 |
s nextPutAll:'postMake |
|
4779 | 2794 |
|
2 | 2795 |
|
2796 |
'. |
|
2797 |
||
4779 | 2798 |
"/ type := #library. |
2799 |
"/ appName := 'app'. |
|
2800 |
"/ libName := 'lib'. |
|
2801 |
"/ startUpClass := 'Smalltalk'. |
|
2802 |
"/ startUpSelector := 'start'. |
|
2803 |
"/ |
|
2804 |
"/ properties notNil ifTrue:[ |
|
2805 |
"/ type := properties at:#projectType ifAbsent:type. |
|
2806 |
"/ appName := properties at:#applicationName ifAbsent:appName. |
|
2807 |
"/ startUpClass := properties at:#startupClass ifAbsent:startUpClass. |
|
2808 |
"/ startUpSelector := properties at:#startupSelector ifAbsent:startUpSelector. |
|
2809 |
"/ ]. |
|
2810 |
"/ |
|
2811 |
"/ s nextPutAll:'# |
|
2812 |
"/# define the name of the library to create |
|
2813 |
"/# |
|
2814 |
"/'. |
|
2815 |
"/ s nextPutAll:'LIBNAME=lib' , appName; cr; cr. |
|
2816 |
"/ |
|
2817 |
"/ s nextPutAll:'# |
|
2818 |
"/# the target rule: |
|
2819 |
"/# |
|
2820 |
"/all:: abbrev.stc objs genClassList $(OBJTARGET) |
|
2821 |
"/ |
|
2822 |
"/'. |
|
2823 |
"/ |
|
2824 |
"/ type == #executable ifTrue:[ |
|
2825 |
"/ s nextPutAll:'PROGS = ' , appName; cr. |
|
2826 |
"/ s nextPutAll:('STARTUP_CLASS=' , startUpClass); cr. |
|
2827 |
"/ s nextPutAll:'STARTUP_SELECTOR="' , startUpSelector; nextPutAll:'"'; cr. |
|
2828 |
"/ ]. |
|
2829 |
"/ |
|
2830 |
"/ s nextPutAll:'# |
|
2831 |
"/# define the object files that are to be created |
|
2832 |
"/# |
|
2833 |
"/'. |
|
2834 |
s nextPutAll:'OBJS='. |
|
2835 |
||
2836 |
classes do:[:aClass | |
|
4833 | 2837 |
|clsInfo cond include fileName| |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2838 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2839 |
clsInfo := self classInfoFor:aClass. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2840 |
include := true. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2841 |
clsInfo notNil ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2842 |
cond := clsInfo conditionForInclusion. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2843 |
(self conditionForInclusionIsTrue:cond) ifFalse:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2844 |
include := false. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2845 |
] ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2846 |
(self conditionForAutoloadIsTrue:cond) ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2847 |
include := false |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2848 |
] |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2849 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2850 |
]. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2851 |
include ifTrue:[ |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2852 |
s nextPutAll:' \'. s cr. |
4833 | 2853 |
fileName := clsInfo classFileName. |
2854 |
fileName isNil ifTrue:[ |
|
2855 |
fileName := Smalltalk fileNameForClass:aClass name. |
|
2856 |
]. |
|
2857 |
fileName := fileName asFilename withoutSuffix name. |
|
2858 |
s nextPutAll:' '; nextPutAll:fileName; nextPutAll:'.$(O)'. |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2859 |
] |
2 | 2860 |
]. |
4792 | 2861 |
(methodsFile := self propertyAt:#methodsFile) size > 0 ifTrue:[ |
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2862 |
s nextPutAll:' \'. s cr. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2863 |
s nextPutAll:' '; |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2864 |
nextPutAll:(methodsFile asFilename withoutSuffix baseName); |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2865 |
nextPutAll:'.$(O)'. |
4785 | 2866 |
]. |
4779 | 2867 |
s cr. |
2868 |
||
5229 | 2869 |
self prerequisitePackages size > 0 ifTrue:[ |
2870 |
s nextPutAll:' |
|
2871 |
# make required packages |
|
2872 |
prerequisites:: |
|
2873 |
'. |
|
2874 |
self prerequisitePackages do:[:aPackageId | |
|
2875 |
|prj| |
|
2876 |
||
2877 |
s tab; nextPutAll:'(cd $(TOP)/../' , (aPackageId copyReplaceAll:$: with:$/) , '; $(MAKE) ) '; cr. |
|
2878 |
]. |
|
2879 |
s cr. |
|
2880 |
]. |
|
4779 | 2881 |
s nextPutAll:' |
2882 |
# add more install actions here |
|
2883 |
install:: |
|
2884 |
||
2885 |
# add more install actions for aux-files (resources) here |
|
2886 |
installAux:: |
|
2887 |
||
2888 |
# add more preMake actions here |
|
2889 |
preMake:: |
|
2890 |
||
2891 |
# add more postMake actions here |
|
2892 |
postMake:: cleanjunk |
|
2893 |
||
2894 |
cleanjunk:: |
|
2895 |
||
2896 |
clean:: |
|
2897 |
' , Character tab , '-rm -f *.o *.H |
|
2898 |
||
2899 |
clobber:: |
|
2900 |
' , Character tab , '-rm -f *.so *.dll |
|
2901 |
||
2902 |
$(INSTALLBASE):: |
|
5177 | 2903 |
' , Character tab , '@test -d $@ || mkdir -p $@ |
4779 | 2904 |
|
2905 |
$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR):: $(INSTALLBASE)/packages/$(MODULE) |
|
5177 | 2906 |
' , Character tab , '@test -d $@ || mkdir -p $@ |
4779 | 2907 |
|
2908 |
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it |
|
362 | 2909 |
'. |
4779 | 2910 |
"/ classes notNil ifTrue:[ |
2911 |
"/ classes do:[:aClass | |
|
2912 |
"/ |abbrev| |
|
2913 |
"/ |
|
2914 |
"/ abbrev := Smalltalk fileNameForClass:aClass name. |
|
2915 |
"/ s nextPutAll:abbrev; nextPutAll:'.$(O): '. |
|
2916 |
"/ s nextPutAll:abbrev; nextPutAll:'.st '. |
|
2917 |
"/ aClass allSuperclassesDo:[:superClass| |
|
2918 |
"/ s nextPutAll:(Smalltalk fileNameForClass:superClass name) , '.$(H) '. |
|
2919 |
"/ ]. |
|
2920 |
"/ s nextPutAll:'$(STCHDR)'; cr. |
|
2921 |
"/ ]. |
|
2922 |
"/ ]. |
|
2923 |
s nextPutAll:'# ENDMAKEDEPEND --- do not remove this line'. |
|
362 | 2924 |
s cr; cr. |
2 | 2925 |
|
2926 |
type == #executable ifTrue:[ |
|
4832
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2927 |
s nextPutAll:'all:: $(PROGS)'; cr. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2928 |
|
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2929 |
s nextPutAll:appName. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2930 |
s nextPutAll:':: main.o classList.o $(OBJS)'; cr. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2931 |
s tab; nextPutAll:'$(LD) $(ST_LDFLAG) $(LDFLAGS) -o '; |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2932 |
nextPutAll:appName; |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2933 |
nextPutAll:' \'; cr. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2934 |
s tab; tab; nextPutAll:'$(CRT0) main.$(O) classList.$(O) $(OBJS) $(EXTRA_OBJ) $(LIBOBJS) \'; cr. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2935 |
s tab; tab; nextPutAll:'$(LIBRUNDIR)/hidata.o $(LIBRUN) \'; cr. |
d335c43bf297
care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents:
4824
diff
changeset
|
2936 |
s tab; tab; nextPutAll:'$(MATHLIB) $(EXTRALIBS) -lXext $(SYSLIBS) $(OTHERLIBS) $(CRTN)'; cr. |
2 | 2937 |
]. |
2938 |
||
2939 |
s close |
|
1420 | 2940 |
|
4069 | 2941 |
"Modified: / 23.3.1999 / 14:20:09 / cg" |
617 | 2942 |
! |
2943 |
||
2944 |
createSourcefiles |
|
2945 |
"creates all Smalltalk-source files in the project directory" |
|
2946 |
||
2947 |
|classes methods methodClasses dir stream| |
|
2948 |
||
2956
952a09bdeed1
Use Filename instead of obsolete FileDirectory
Stefan Vogel <sv@exept.de>
parents:
2907
diff
changeset
|
2949 |
dir := self directory asFilename. |
4850 | 2950 |
Transcript current showCR:'creating sources in ' , dir pathName , ' ...'; endEntry. |
617 | 2951 |
|
2952 |
classes := self classes. |
|
4885 | 2953 |
classes size == 0 ifTrue:[ |
4850 | 2954 |
self warn:'no classes in current project' |
4885 | 2955 |
] ifFalse:[ |
4850 | 2956 |
classes do:[:aClass | |
2957 |
aClass isLoaded ifFalse:[ |
|
2958 |
aClass autoload. |
|
2959 |
]. |
|
2960 |
]. |
|
2961 |
"/ to not list private classes |
|
2962 |
classes := classes select:[:cls | cls owningClass isNil]. |
|
2963 |
classes := classes topologicalSort:[:a :b | a isSubclassOf:b]. |
|
2964 |
||
2965 |
classes do:[:aClass | |
|
2966 |
Transcript current show:' ... '; showCR:aClass name, '.st'; endEntry. |
|
2967 |
aClass fileOutIn:dir |
|
2968 |
] |
|
617 | 2969 |
]. |
2970 |
||
2971 |
methods := self individualMethods. |
|
4885 | 2972 |
methods size > 0 ifTrue:[ |
4850 | 2973 |
methods := methods asIdentitySet. |
2974 |
" |
|
2975 |
get classes ... |
|
2976 |
" |
|
2977 |
methodClasses := IdentitySet new. |
|
2978 |
methods do:[:m | |
|
2979 |
|mCls| |
|
2980 |
||
2981 |
mCls := m containingClass. |
|
2982 |
mCls isMeta ifTrue:[ |
|
2983 |
mCls := mCls soleInstance. |
|
2984 |
]. |
|
2985 |
methodClasses add:mCls]. |
|
2986 |
" |
|
2987 |
fileOut by class |
|
2988 |
" |
|
2989 |
methodClasses do:[:cls | |
|
2990 |
stream := (self directory asFilename construct:(cls name , '.chg')) writeStream. |
|
2991 |
||
2992 |
Transcript current show:' ... '; showCR:cls name, '.chg'; endEntry. |
|
2993 |
methods do:[:m | |
|
2994 |
|mCls| |
|
2995 |
||
2996 |
mCls := m containingClass. |
|
2997 |
(mCls == cls or:[mCls == cls class]) ifTrue:[ |
|
2998 |
mCls fileOutMethod:m on:stream. |
|
2999 |
]. |
|
3000 |
stream cr. |
|
3001 |
]. |
|
3002 |
stream close. |
|
3003 |
]. |
|
617 | 3004 |
]. |
1420 | 3005 |
|
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
3006 |
"Modified: 1.11.1996 / 16:37:15 / cg" |
2956
952a09bdeed1
Use Filename instead of obsolete FileDirectory
Stefan Vogel <sv@exept.de>
parents:
2907
diff
changeset
|
3007 |
"Modified: 18.9.1997 / 18:50:34 / stefan" |
617 | 3008 |
! |
3009 |
||
4850 | 3010 |
createVMSMakefile |
3011 |
"creates an vms.mak makefile" |
|
3012 |
||
3013 |
Transcript current showCR:'VMS support not yet implemented - no vms.mak created'. |
|
3014 |
||
3015 |
! |
|
3016 |
||
617 | 3017 |
findTopFrom:directoryName |
3018 |
"returns the relative path from directoryName to the TOP |
|
3019 |
directory." |
|
3020 |
||
3021 |
|topName relParent foundTop| |
|
3022 |
||
3023 |
"/ find TOP |
|
3024 |
relParent := '..'. |
|
3025 |
foundTop := false. |
|
3026 |
[foundTop] whileFalse:[ |
|
4820 | 3027 |
topName := directoryName asFilename construct:relParent. |
3028 |
((topName construct:'stx') construct:'configurations') exists ifTrue:[ |
|
3029 |
((topName construct:'stx') construct:'include') exists ifTrue:[ |
|
4821 | 3030 |
^ relParent asFilename constructString:'stx'. |
4820 | 3031 |
] |
3032 |
]. |
|
3033 |
(topName construct:'configurations') exists ifTrue:[ |
|
3034 |
(topName construct:'include') exists ifTrue:[ |
|
4888 | 3035 |
^ relParent asFilename name |
4820 | 3036 |
] |
3037 |
]. |
|
3038 |
relParent := relParent asFilename constructString:'..'. |
|
3039 |
||
3040 |
topName isRootDirectory ifTrue:[ |
|
3041 |
self warn:'could not find TOP; assume absolute path to TOP'. |
|
3042 |
^ nil. |
|
4779 | 3043 |
"/ topName := '/usr/local/lib/smalltalk'. |
3044 |
"/ foundTop := true. |
|
4820 | 3045 |
] |
617 | 3046 |
]. |
4779 | 3047 |
^ topName pathName |
4820 | 3048 |
|
4821 | 3049 |
"Modified: / 26.9.1999 / 16:15:14 / cg" |
617 | 3050 |
! ! |
3051 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3052 |
!Project methodsFor:'printing & storing'! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3053 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3054 |
displayString |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3055 |
^ super displayString , '(''' , (name ? '<unnamed>') , ''')' |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3056 |
! ! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3057 |
|
617 | 3058 |
!Project methodsFor:'properties'! |
3059 |
||
4886 | 3060 |
addClass:classOrClassName |
3061 |
"add a class to the project" |
|
3062 |
||
3063 |
|fn| |
|
3064 |
||
3065 |
(classOrClassName isBehavior and:[classOrClassName isLoaded]) ifTrue:[ |
|
3066 |
fn := classOrClassName classFilename. |
|
3067 |
]. |
|
3068 |
fn isNil ifTrue:[ |
|
3069 |
fn := (Smalltalk fileNameForClass:classOrClassName) , '.st' |
|
3070 |
]. |
|
3071 |
self addClass:classOrClassName classFileName:fn |
|
3072 |
||
3073 |
! |
|
3074 |
||
4097 | 3075 |
addClass:classOrClassName classFileName:fileName |
3076 |
"add a class to the project" |
|
3077 |
||
3078 |
self |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3079 |
addClass:classOrClassName |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3080 |
conditionForInclusion:#always |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3081 |
classFileName:fileName |
4097 | 3082 |
|
3083 |
! |
|
3084 |
||
3085 |
addClass:classOrClassName conditionForInclusion:conditionBlock classFileName:fileName |
|
3086 |
"add a class to the project" |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3087 |
|
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3088 |
|i clsName| |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3089 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3090 |
(clsName := classOrClassName) isBehavior ifTrue:[ |
4886 | 3091 |
clsName := classOrClassName name |
3092 |
]. |
|
3093 |
(clsName startsWith:'Smalltalk::') ifTrue:[ |
|
3094 |
clsName := clsName copyFrom:'Smalltalk::' size + 1. |
|
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3095 |
]. |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3096 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3097 |
i := ClassInfo new. |
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3098 |
i className:clsName. |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3099 |
i classFileName:fileName. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3100 |
i conditionForInclusion:conditionBlock. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3101 |
self addClassInfo:i |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3102 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3103 |
|
4089 | 3104 |
addClassInfo:newInfo |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3105 |
"add a class info to the project" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3106 |
|
4315 | 3107 |
|infoCollection index nm prefix| |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3108 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3109 |
(infoCollection := self classInfo) isNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3110 |
self classInfo:(infoCollection := OrderedCollection new). |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3111 |
]. |
4315 | 3112 |
|
3113 |
index := infoCollection findFirst:[:i | |nm1 nm2| |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3114 |
nm1 := i className. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3115 |
nm2 := newInfo className. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3116 |
nm1 = nm2 |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3117 |
]. |
4089 | 3118 |
index ~~ 0 ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3119 |
infoCollection at:index put:newInfo |
4089 | 3120 |
] ifFalse:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3121 |
infoCollection add:newInfo |
4089 | 3122 |
] |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3123 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3124 |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3125 |
addMethod:methodName inClass:classOrClassName conditionForInclusion:condition fileName:optionalFileName |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3126 |
"add a method to the project" |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3127 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3128 |
|i| |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3129 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3130 |
i := MethodInfo new. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3131 |
i className:classOrClassName. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3132 |
i methodName:methodName. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3133 |
i fileName:optionalFileName. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3134 |
i conditionForInclusion:condition. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3135 |
self addMethodInfo:i |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3136 |
! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3137 |
|
4668 | 3138 |
addMethod:methodOrSelector inClass:aClassOrClassName fileName:fileName |
3139 |
"add an individual method to the project" |
|
3140 |
||
3141 |
|i| |
|
3142 |
||
3143 |
i := MethodInfo new. |
|
3144 |
i methodName:methodOrSelector. |
|
3145 |
i className:aClassOrClassName. |
|
3146 |
i fileName:fileName. |
|
3147 |
self addMethodInfo:i |
|
3148 |
! |
|
3149 |
||
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3150 |
addMethodInfo:newInfo |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3151 |
"add a method info to the project" |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3152 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3153 |
|infoCollection index nm prefix| |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3154 |
|
5655 | 3155 |
prefix := self defaultNameSpace name , '::'. |
3156 |
||
4887 | 3157 |
infoCollection := self methodInfo. |
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3158 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3159 |
index := infoCollection findFirst:[:i | |cnm1 cnm2| |
4887 | 3160 |
cnm1 := i className. |
3161 |
cnm2 := newInfo className. |
|
3162 |
(cnm1 includes:$:) ifFalse:[ |
|
5655 | 3163 |
cnm1 := prefix , cnm1 |
4887 | 3164 |
]. |
3165 |
(cnm2 includes:$:) ifFalse:[ |
|
5655 | 3166 |
cnm2 := prefix , cnm2 |
4887 | 3167 |
]. |
3168 |
cnm1 = cnm2 and:[i methodName = newInfo methodName] |
|
3169 |
]. |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3170 |
"/ strip off nameSpace prefix, if its the same as |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3171 |
"/ the default ... |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3172 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3173 |
nm := newInfo className. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3174 |
(nm startsWith:prefix) ifTrue:[ |
4887 | 3175 |
nm := nm copyFrom:(prefix size + 1). |
3176 |
newInfo className:nm asSymbol. |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3177 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3178 |
index ~~ 0 ifTrue:[ |
4887 | 3179 |
infoCollection at:index put:newInfo |
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3180 |
] ifFalse:[ |
4887 | 3181 |
infoCollection add:newInfo |
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3182 |
] |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3183 |
! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3184 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3185 |
classInfo:aClassInfoCollection |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3186 |
"set the class info of the project" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3187 |
|
4071 | 3188 |
self propertyAt:#classInfo put:aClassInfoCollection |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3189 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3190 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3191 |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3192 |
comment |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3193 |
"return the comment of the project" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3194 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3195 |
properties isNil ifTrue:[^ '']. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3196 |
^ properties at:#comment ifAbsent:'' |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3197 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3198 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3199 |
comment:aString |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3200 |
"set the projects comment" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3201 |
|
4071 | 3202 |
self propertyAt:#comment put:aString |
4070 | 3203 |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3204 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3205 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3206 |
documentationURL |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3207 |
"return the documentation-URL of the project" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3208 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3209 |
properties isNil ifTrue:[^ nil]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3210 |
^ properties at:#documentationURL ifAbsent:nil |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3211 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3212 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3213 |
documentationURL:anURLString |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3214 |
"set the projects documentation-URL" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3215 |
|
4071 | 3216 |
self propertyAt:#documentationURL put:anURLString |
3217 |
||
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3218 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3219 |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3220 |
methodInfo:aMethodInfoCollection |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3221 |
"set the method info of the project" |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3222 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3223 |
self propertyAt:#methodInfo put:aMethodInfoCollection |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3224 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3225 |
! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3226 |
|
617 | 3227 |
properties |
4097 | 3228 |
"return the property dictionary" |
3229 |
||
617 | 3230 |
^ properties |
3231 |
! |
|
3232 |
||
3233 |
properties:p |
|
4097 | 3234 |
"set the property dictionary" |
3235 |
||
617 | 3236 |
properties := p |
3237 |
! |
|
3238 |
||
4071 | 3239 |
propertyAt:aKey |
4097 | 3240 |
"return a property; the key is a symbol" |
3241 |
||
4071 | 3242 |
properties isNil ifTrue:[^ nil]. |
3243 |
^ properties at:aKey ifAbsent:nil. |
|
3244 |
! |
|
3245 |
||
3246 |
propertyAt:aKey put:aValue |
|
4097 | 3247 |
"set a property; the key is a symbol" |
3248 |
||
4077 | 3249 |
|oldValue| |
3250 |
||
3251 |
oldValue := self propertyAt:aKey. |
|
3252 |
||
4071 | 3253 |
properties isNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3254 |
properties := IdentityDictionary new |
4071 | 3255 |
]. |
3256 |
properties at:aKey put:aValue. |
|
4077 | 3257 |
|
3258 |
oldValue ~~ aValue ifTrue:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3259 |
self changed:aKey. |
4077 | 3260 |
]. |
4071 | 3261 |
|
3262 |
"Created: / 23.3.1999 / 14:21:11 / cg" |
|
3263 |
! |
|
3264 |
||
4792 | 3265 |
removeClass:classOrClassName |
3266 |
"remove a class from the project" |
|
3267 |
||
3268 |
|infoCollection index className| |
|
3269 |
||
3270 |
(infoCollection := self classInfo) isNil ifTrue:[^ self]. |
|
3271 |
||
3272 |
(className := classOrClassName) isBehavior ifTrue:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3273 |
className := classOrClassName name |
4792 | 3274 |
]. |
3275 |
||
3276 |
index := infoCollection findFirst:[:i | i className = className.]. |
|
3277 |
index ~~ 0 ifTrue:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3278 |
infoCollection removeIndex:index |
4792 | 3279 |
] |
3280 |
! |
|
3281 |
||
4834 | 3282 |
removeMethod:method |
3283 |
"remove a method from the project" |
|
3284 |
||
3285 |
|infoCollection index className selector| |
|
3286 |
||
4887 | 3287 |
(infoCollection := self methodInfo) size == 0 ifTrue:[^ self]. |
4834 | 3288 |
className := method who methodClass name. |
3289 |
selector := method who methodSelector. |
|
3290 |
||
3291 |
index := infoCollection findFirst:[:i | i className = className.]. |
|
3292 |
index ~~ 0 ifTrue:[ |
|
3293 |
infoCollection removeIndex:index |
|
3294 |
] |
|
3295 |
! |
|
3296 |
||
617 | 3297 |
type |
4097 | 3298 |
"return the type of project (one of #application, #library, #smalltalk)" |
617 | 3299 |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3300 |
properties isNil ifTrue:[^ #application]. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3301 |
^ properties at:#type ifAbsent:#application |
617 | 3302 |
! |
3303 |
||
3304 |
type:aSymbol |
|
4097 | 3305 |
"set the projects type (one of #application, #library, #smalltalk)" |
617 | 3306 |
|
4769 | 3307 |
|sym| |
3308 |
||
3309 |
(sym := aSymbol) == #classLibrary ifTrue:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3310 |
sym := #library |
4769 | 3311 |
]. |
3312 |
(#(application library extension smalltalk) includes:sym) ifFalse:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3313 |
self warn:'invalid project type'. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3314 |
^ self |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
3315 |
]. |
4769 | 3316 |
self propertyAt:#type put:sym |
4069 | 3317 |
! |
3318 |
||
3319 |
wasLoadedFromFile |
|
3320 |
"return true, if the project was loaded from a file" |
|
3321 |
||
3322 |
properties isNil ifTrue:[^ nil]. |
|
3323 |
^ properties at:#wasLoadedFromFile ifAbsent:false |
|
3324 |
||
3325 |
"Modified: / 23.3.1999 / 13:59:32 / cg" |
|
3326 |
"Created: / 23.3.1999 / 14:21:06 / cg" |
|
3327 |
! |
|
3328 |
||
3329 |
wasLoadedFromFile:aBoolean |
|
4097 | 3330 |
"set/clear the flag stating that the project was loaded from a file" |
3331 |
||
4071 | 3332 |
self propertyAt:#wasLoadedFromFile put:aBoolean |
617 | 3333 |
! ! |
3334 |
||
3335 |
!Project methodsFor:'queries'! |
|
3336 |
||
4688 | 3337 |
areAllClassesLoaded |
3338 |
"return true, if all classes of the package are loaded |
|
3339 |
(i.e. there are no autoloaded stubs present)" |
|
3340 |
||
4690 | 3341 |
|classes| |
3342 |
||
3343 |
classes := self classes. |
|
4885 | 3344 |
classes size == 0 ifTrue:[^ isLoaded ? false]. |
3345 |
||
4690 | 3346 |
classes do:[:aClass | |
4900 | 3347 |
aClass isBehavior ifFalse:[^ false]. |
4885 | 3348 |
aClass isLoaded ifFalse:[^ false]. |
4688 | 3349 |
]. |
3350 |
^ true |
|
3351 |
||
3352 |
! |
|
3353 |
||
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3354 |
classInfo |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3355 |
"return a classInfo collection of classes belonging to that project" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3356 |
|
4073 | 3357 |
|classInfo classes| |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3358 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3359 |
properties notNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3360 |
classInfo := properties at:#classInfo ifAbsent:nil. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3361 |
classInfo notNil ifTrue:[^ classInfo]. |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3362 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3363 |
|
4073 | 3364 |
classes := self classes. |
3365 |
classes size == 0 ifTrue:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3366 |
classInfo := OrderedCollection new |
4073 | 3367 |
] ifFalse:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3368 |
classInfo := classes asOrderedCollection |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3369 |
collect:[:class | |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3370 |
|i fn| |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3371 |
|
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3372 |
i := ClassInfo new. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3373 |
i conditionForInclusion:#always. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3374 |
i className:class name. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3375 |
fn := class classFilename ? ((Smalltalk fileNameForClass:class) , '.st'). |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3376 |
i classFileName:fn. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3377 |
i |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3378 |
] |
4073 | 3379 |
]. |
3380 |
self propertyAt:#classInfo put:classInfo. |
|
3381 |
^ classInfo |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3382 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3383 |
"Modified: 4.1.1997 / 16:51:18 / cg" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3384 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3385 |
|
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3386 |
classInfoFor:aClassOrClassName |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3387 |
"return a classInfo for a particular class" |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3388 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3389 |
|classInfo clsName index| |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3390 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3391 |
(classInfo := self classInfo) isNil ifTrue:[^ nil]. |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3392 |
(clsName := aClassOrClassName) isBehavior ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3393 |
clsName := aClassOrClassName name |
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3394 |
]. |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3395 |
^ classInfo detect:[:i | i className = clsName] ifNone:nil. |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3396 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3397 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3398 |
"Modified: 4.1.1997 / 16:51:18 / cg" |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3399 |
! |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
3400 |
|
617 | 3401 |
classes |
4013
f06d31702f2a
ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents:
4010
diff
changeset
|
3402 |
"return a collection of classes belonging to that project. |
f06d31702f2a
ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents:
4010
diff
changeset
|
3403 |
This excludes any private classes." |
617 | 3404 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3405 |
|classes classInfo| |
617 | 3406 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3407 |
properties notNil ifTrue:[ |
4885 | 3408 |
classInfo := properties at:#classInfo ifAbsent:nil. |
3409 |
classInfo notNil ifTrue:[ |
|
3410 |
classes := classInfo collect:[:i | i className] |
|
3411 |
] ifFalse:[ |
|
3412 |
classes := properties at:#classes ifAbsent:nil |
|
3413 |
] |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3414 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3415 |
|
5201 | 3416 |
(properties isNil |
3417 |
or:[properties at:#autoIncludeImageClasses ifAbsent:true]) |
|
3418 |
ifTrue:[ |
|
3419 |
classes isNil ifTrue:[ |
|
3420 |
classes := OrderedCollection new. |
|
3421 |
Smalltalk |
|
3422 |
allClassesDo:[:aClass | |
|
3423 |
(true "aClass owningClass isNil" |
|
3424 |
and:[aClass isMeta not |
|
3425 |
and:[aClass package = packageName |
|
5327
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3426 |
and:[aClass isNameSpace not or:[aClass == Smalltalk]]]]) ifTrue:[ |
5201 | 3427 |
classes add:aClass |
3428 |
] |
|
3429 |
]. |
|
3430 |
]. |
|
617 | 3431 |
]. |
4885 | 3432 |
^ classes ? #() |
617 | 3433 |
|
2056 | 3434 |
"Modified: 4.1.1997 / 16:51:18 / cg" |
617 | 3435 |
! |
3436 |
||
4887 | 3437 |
includesClass:aClassOrClassName |
3438 |
"return true, if a class is contained in the project" |
|
3439 |
||
3440 |
|infoCollection index className| |
|
3441 |
||
3442 |
(infoCollection := self classInfo) isNil ifTrue:[^ false]. |
|
3443 |
||
3444 |
aClassOrClassName isBehavior ifTrue:[ |
|
3445 |
className := aClassOrClassName name |
|
3446 |
] ifFalse:[ |
|
3447 |
className := aClassOrClassName |
|
3448 |
]. |
|
3449 |
||
3450 |
index := infoCollection findFirst:[:i | |nm1 nm2| |
|
3451 |
i className = className |
|
3452 |
]. |
|
3453 |
^ index ~~ 0 |
|
3454 |
! |
|
3455 |
||
3456 |
includesMethod:aMethod |
|
3457 |
"return true, if the given method is contained in the project |
|
3458 |
(either as patch/extension or as class" |
|
3459 |
||
3460 |
|who methodClass| |
|
3461 |
||
3462 |
who := aMethod who. |
|
3463 |
who isNil ifTrue:[^ false]. |
|
3464 |
methodClass := who methodClass. |
|
3465 |
(self includesClass:methodClass) ifTrue:[^ true]. |
|
3466 |
^ self includesMethodPatch:aMethod |
|
3467 |
! |
|
3468 |
||
3469 |
includesMethodPatch:aMethod |
|
3470 |
"return true, if the given method is contained in the project |
|
3471 |
as patch/extension" |
|
3472 |
||
3473 |
|who methodClass methodClassName methodSelector infoCollection index className selector| |
|
3474 |
||
3475 |
who := aMethod who. |
|
3476 |
who isNil ifTrue:[^ false]. |
|
3477 |
methodClass := who methodClass. |
|
3478 |
methodClassName := methodClass name. |
|
3479 |
methodSelector := who methodSelector. |
|
3480 |
||
3481 |
infoCollection := self methodInfo. |
|
3482 |
||
3483 |
index := infoCollection findFirst:[:i | |
|
3484 |
(i className = methodClassName |
|
3485 |
and:[i methodName = methodSelector]) |
|
3486 |
]. |
|
3487 |
^ index ~~ 0 |
|
3488 |
! |
|
3489 |
||
617 | 3490 |
individualMethods |
3491 |
"return a collection of individual methods belonging to that project, |
|
3492 |
only methods are returned which are not contained in the |
|
3493 |
projects class set." |
|
3494 |
||
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3495 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3496 |
"/ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3497 |
"/ obsoleted by #methods ... |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3498 |
"/ |
617 | 3499 |
|classes methods| |
3500 |
||
3501 |
classes := self classes. |
|
4885 | 3502 |
classes size > 0 ifTrue:[ |
3503 |
classes := classes asIdentitySet. |
|
617 | 3504 |
]. |
3505 |
||
3506 |
methods := IdentitySet new. |
|
5581 | 3507 |
Smalltalk allClassesDo:[:cls | |
4885 | 3508 |
|classToCheck| |
3509 |
||
3510 |
classToCheck := cls. |
|
4670 | 3511 |
"/ cls isPrivate ifTrue:[ |
3512 |
"/ classToCheck := cls topOwningClass |
|
3513 |
"/ ]. |
|
4885 | 3514 |
((classes includes:classToCheck) |
3515 |
or:[classes includes:classToCheck name]) not |
|
3516 |
ifTrue:[ |
|
5371
6376d1fcf30f
use #allSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents:
5338
diff
changeset
|
3517 |
cls allSelectorsAndMethodsDo:[:sel :m | |
4885 | 3518 |
m package = packageName ifTrue:[ |
3519 |
methods add:m |
|
3520 |
] |
|
3521 |
]. |
|
3522 |
] |
|
617 | 3523 |
]. |
3524 |
^ methods asArray |
|
3525 |
||
3526 |
" |
|
3527 |
Project current classes |
|
3528 |
Project current individualMethods |
|
3529 |
" |
|
1461
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
3530 |
|
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
3531 |
"Modified: 7.6.1996 / 09:16:25 / stefan" |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3532 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3533 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3534 |
isLoaded |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3535 |
"return true, if all of this project-package has been loaded |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3536 |
into the system" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3537 |
|
4769 | 3538 |
|binaryModule cls| |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3539 |
|
5178 | 3540 |
isLoaded == true ifTrue:[^ isLoaded]. |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3541 |
|
4791 | 3542 |
"/ check for loaded class-library - assume loaded if present. |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3543 |
binaryModule := ObjectMemory binaryModuleInfo detect:[:i | i package = self package] ifNone:nil. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3544 |
binaryModule notNil ifTrue:[ |
5178 | 3545 |
isLoaded := true. |
4819 | 3546 |
^ true |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3547 |
]. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3548 |
|
4769 | 3549 |
"/ check for all classes ... |
3550 |
self classes do:[:aClassOrClassName | |
|
4819 | 3551 |
aClassOrClassName isBehavior ifFalse:[ |
5165 | 3552 |
aClassOrClassName isString ifTrue:[ |
3553 |
(cls := Smalltalk at:aClassOrClassName asSymbol) isNil ifTrue:[ |
|
4819 | 3554 |
^ false |
3555 |
]. |
|
3556 |
cls isBehavior ifFalse:[^ false]. |
|
3557 |
cls isLoaded ifFalse:[^ false]. |
|
3558 |
] ifFalse:[ |
|
3559 |
self halt. |
|
3560 |
^ false |
|
3561 |
] |
|
3562 |
] |
|
4769 | 3563 |
]. |
3564 |
||
4791 | 3565 |
"/ check for all patches & extensions ... |
3566 |
self methods do:[:aMethodInfo | |
|
4819 | 3567 |
aMethodInfo theMethod isNil ifTrue:[ |
3568 |
^ false |
|
3569 |
]. |
|
4791 | 3570 |
]. |
3571 |
||
5178 | 3572 |
isLoaded := true. |
4791 | 3573 |
^ true |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3574 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3575 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3576 |
(Project projectWithId:#'stx:libbasic') isLoaded |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3577 |
(Project projectWithId:#'stx:goodies/persistency') isLoaded |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3578 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
3579 |
|
4819 | 3580 |
"Modified: / 26.9.1999 / 13:39:55 / cg" |
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3581 |
! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3582 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3583 |
methodInfo |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3584 |
"return a methodInfo collection of methods belonging to that project" |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3585 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3586 |
|methodInfo methods| |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3587 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3588 |
properties notNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3589 |
methodInfo := properties at:#methodInfo ifAbsent:nil. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3590 |
methodInfo notNil ifTrue:[^ methodInfo]. |
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3591 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3592 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3593 |
methods := self methods. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3594 |
methods size == 0 ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3595 |
methodInfo := OrderedCollection new |
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3596 |
] ifFalse:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3597 |
methodInfo := methods asOrderedCollection |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3598 |
collect:[:mthd | |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3599 |
|i fn who className selector| |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3600 |
|
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3601 |
mthd isMethod ifTrue:[ |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3602 |
who := mthd who. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3603 |
className := who methodClass name. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3604 |
selector := who methodSelector. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3605 |
i := MethodInfo new. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3606 |
i conditionForInclusion:#always. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3607 |
i className:className. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3608 |
i methodName:className. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3609 |
fn := mthd sourceFilename. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3610 |
i fileName:fn. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3611 |
i |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3612 |
] ifFalse:[ |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3613 |
mthd "/ already a methodInfo |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3614 |
] |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3615 |
] |
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3616 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3617 |
self propertyAt:#methodInfo put:methodInfo. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3618 |
^ methodInfo |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3619 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3620 |
"Modified: 4.1.1997 / 16:51:18 / cg" |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3621 |
! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3622 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3623 |
methods |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3624 |
"return a collection of methods belonging to that project. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3625 |
This excludes any methods which are already in my class-set." |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3626 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3627 |
|methods methodsInfo| |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3628 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3629 |
properties notNil ifTrue:[ |
5327
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3630 |
methodsInfo := properties at:#methodsInfo ifAbsent:nil. |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3631 |
methodsInfo notNil ifTrue:[ |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3632 |
methods := methodsInfo collect:[:i | i className] |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3633 |
] ifFalse:[ |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3634 |
methods := properties at:#methods ifAbsent:nil |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3635 |
] |
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3636 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3637 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3638 |
methods isNil ifTrue:[ |
5327
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3639 |
methods := OrderedCollection new. |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3640 |
Smalltalk allClassesDo:[:aClass | |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3641 |
(true "aClass owningClass isNil" |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3642 |
and:[aClass isMeta not |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3643 |
and:[aClass package ~= packageName |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3644 |
and:[aClass isNameSpace not or:[aClass == Smalltalk]]]]) ifTrue:[ |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3645 |
|
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3646 |
aClass methodDictionary keysAndValuesDo:[:sel :mthd | |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3647 |
mthd package = packageName ifTrue:[ |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3648 |
methods add:(MethodInfo new |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3649 |
className:aClass name; |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3650 |
methodName:sel; |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3651 |
yourself) |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3652 |
]. |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3653 |
]. |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3654 |
aClass class methodDictionary keysAndValuesDo:[:sel :mthd | |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3655 |
mthd package = packageName ifTrue:[ |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3656 |
methods add:(MethodInfo new |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3657 |
className:(aClass name , ' class'); |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3658 |
methodName:sel; |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3659 |
yourself) |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3660 |
]. |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3661 |
] |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3662 |
] |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3663 |
]. |
5e5602d156fa
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
5314
diff
changeset
|
3664 |
methods isEmpty ifTrue:[^ #()]. |
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3665 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3666 |
^ methods |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3667 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3668 |
"Modified: 4.1.1997 / 16:51:18 / cg" |
2 | 3669 |
! ! |
3670 |
||
3671 |
!Project methodsFor:'specifications'! |
|
3672 |
||
3673 |
readSpec |
|
3674 |
|s chunk fileName| |
|
3675 |
||
3676 |
fileName := (properties at:#directoryName) asFilename construct:'.project'. |
|
3677 |
s := fileName readStream. |
|
3678 |
s isNil ifTrue:[^ self]. |
|
3679 |
[s atEnd] whileFalse:[ |
|
203 | 3680 |
chunk := s nextChunk. |
3681 |
Compiler evaluate:chunk receiver:properties notifying:nil |
|
2 | 3682 |
]. |
3683 |
s close. |
|
3684 |
||
3685 |
"(Project new directory:'../projects/Clock') readSpec" |
|
3686 |
! |
|
3687 |
||
3688 |
saveSpec |
|
3689 |
|f d s| |
|
3690 |
||
3691 |
d := (properties at:#directoryName) asFilename. |
|
3692 |
d exists ifFalse:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3693 |
self error:'directory does not exist' mayProceed:true. |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3694 |
^ self |
2 | 3695 |
]. |
3696 |
f := d construct:'.project'. |
|
3697 |
s := f writeStream. |
|
3698 |
s isNil ifTrue:[^ self]. |
|
3699 |
properties associationsDo:[:aProp | |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3700 |
(aProp == #directoryName) ifFalse:[ |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3701 |
s nextChunkPut:('self at:' , aProp key storeString, |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3702 |
' put:' , aProp value storeString). |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3703 |
s cr |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3704 |
] |
2 | 3705 |
]. |
3706 |
s close |
|
3707 |
||
3708 |
"((Project new directory:'../projects/Clock') readSpec |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3709 |
directory:'../projects/xxx') saveSpec" |
2 | 3710 |
! ! |
3711 |
||
617 | 3712 |
!Project methodsFor:'views'! |
3713 |
||
3714 |
addView:aView |
|
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3715 |
"add a view to this projects set of views" |
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3716 |
|
617 | 3717 |
views notNil ifTrue:[views add:aView] |
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3718 |
|
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3719 |
"Modified: 14.2.1997 / 15:36:51 / cg" |
617 | 3720 |
! |
3721 |
||
3722 |
destroyViews |
|
3723 |
"destroy all views of this project" |
|
3724 |
||
3725 |
views notNil ifTrue:[ |
|
3726 |
views do:[:aView | |
|
3727 |
aView notNil ifTrue:[aView destroy] |
|
3728 |
] |
|
3729 |
]. |
|
3730 |
! |
|
3731 |
||
3732 |
hideViews |
|
3733 |
"hide all views of this project" |
|
3734 |
||
3735 |
views notNil ifTrue:[ |
|
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3736 |
views do:[:aView | |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3737 |
aView notNil ifTrue:[aView unmap] |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3738 |
] |
617 | 3739 |
]. |
1332
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
3740 |
|
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
3741 |
"Modified: 3.5.1996 / 23:48:51 / stefan" |
617 | 3742 |
! |
3743 |
||
3744 |
removeView:aView |
|
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3745 |
"remove a view from this projects set of views" |
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3746 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3747 |
views notNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3748 |
views remove:aView ifAbsent:nil |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
3749 |
] |
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3750 |
|
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3751 |
"Modified: 14.2.1997 / 15:37:20 / cg" |
617 | 3752 |
! |
3753 |
||
3754 |
showViews |
|
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3755 |
"show all views of this project" |
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3756 |
|
617 | 3757 |
views notNil ifTrue:[ |
4814
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3758 |
views do:[:aView | |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3759 |
aView notNil ifTrue:[aView remap] |
7825b9141f01
changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents:
4813
diff
changeset
|
3760 |
] |
617 | 3761 |
]. |
1332
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
3762 |
|
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
3763 |
"Modified: 3.5.1996 / 23:59:10 / stefan" |
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
3764 |
"Modified: 14.2.1997 / 15:38:47 / cg" |
617 | 3765 |
! ! |
3766 |
||
5734 | 3767 |
!Project::ClassInfo methodsFor:'accessing'! |
3768 |
||
3769 |
classFileName |
|
3770 |
"return the value of the instance variable 'classFileName' (automatically generated)" |
|
3771 |
||
3772 |
^ classFileName |
|
3773 |
! |
|
3774 |
||
3775 |
classFileName:something |
|
3776 |
"set the value of the instance variable 'classFileName' (automatically generated)" |
|
3777 |
||
3778 |
classFileName := something. |
|
3779 |
! |
|
3780 |
||
3781 |
className |
|
3782 |
"return the value of the instance variable 'className' (automatically generated)" |
|
3783 |
||
3784 |
^ className |
|
3785 |
! |
|
3786 |
||
3787 |
className:something |
|
3788 |
"set the value of the instance variable 'className' (automatically generated)" |
|
3789 |
||
3790 |
className := something. |
|
3791 |
! |
|
3792 |
||
3793 |
conditionForInclusion |
|
3794 |
"return the value of the instance variable 'conditionForInclusion' (automatically generated)" |
|
3795 |
||
3796 |
^ conditionForInclusion |
|
3797 |
! |
|
3798 |
||
3799 |
conditionForInclusion:something |
|
3800 |
"set the value of the instance variable 'conditionForInclusion' (automatically generated)" |
|
3801 |
||
3802 |
conditionForInclusion := something. |
|
3803 |
! ! |
|
3804 |
||
3805 |
!Project::ClassInfo methodsFor:'printing & storing'! |
|
3806 |
||
3807 |
displayString |
|
3808 |
^ 'ClassInfo: ' , className |
|
3809 |
! ! |
|
3810 |
||
3811 |
!Project::ClassInfo methodsFor:'queries'! |
|
3812 |
||
3813 |
theClass |
|
3814 |
|cls| |
|
3815 |
||
3816 |
cls := Smalltalk classNamed:className. |
|
3817 |
cls isNil ifTrue:[ ^ nil]. |
|
3818 |
^ cls |
|
3819 |
||
3820 |
"Created: / 26.9.1999 / 13:39:00 / cg" |
|
3821 |
! ! |
|
3822 |
||
4743 | 3823 |
!Project::MethodInfo methodsFor:'accessing'! |
3824 |
||
3825 |
className |
|
3826 |
"return the value of the instance variable 'className' (automatically generated)" |
|
3827 |
||
5734 | 3828 |
^ className |
3829 |
! |
|
4743 | 3830 |
|
3831 |
className:something |
|
3832 |
"set the value of the instance variable 'className' (automatically generated)" |
|
3833 |
||
5734 | 3834 |
className := something. |
3835 |
! |
|
4743 | 3836 |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3837 |
conditionForInclusion |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3838 |
"return the value of the instance variable 'conditionForInclusion' (automatically generated)" |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3839 |
|
5734 | 3840 |
^ conditionForInclusion |
3841 |
! |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3842 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3843 |
conditionForInclusion:something |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3844 |
"set the value of the instance variable 'conditionForInclusion' (automatically generated)" |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3845 |
|
5734 | 3846 |
conditionForInclusion := something. |
3847 |
! |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3848 |
|
4743 | 3849 |
fileName |
3850 |
"return the value of the instance variable 'fileName' (automatically generated)" |
|
3851 |
||
5734 | 3852 |
^ fileName |
3853 |
! |
|
4743 | 3854 |
|
3855 |
fileName:something |
|
3856 |
"set the value of the instance variable 'fileName' (automatically generated)" |
|
3857 |
||
5734 | 3858 |
fileName := something. |
3859 |
! |
|
4743 | 3860 |
|
3861 |
methodName |
|
3862 |
"return the value of the instance variable 'methodName' (automatically generated)" |
|
3863 |
||
5734 | 3864 |
^ methodName |
3865 |
! |
|
4743 | 3866 |
|
3867 |
methodName:something |
|
3868 |
"set the value of the instance variable 'methodName' (automatically generated)" |
|
3869 |
||
5734 | 3870 |
methodName := something. |
3871 |
! ! |
|
4743 | 3872 |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3873 |
!Project::MethodInfo methodsFor:'printing & storing'! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3874 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3875 |
displayString |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3876 |
^ 'MethodInfo: ' , className , ' ' , methodName |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3877 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3878 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3879 |
! ! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
3880 |
|
4791 | 3881 |
!Project::MethodInfo methodsFor:'queries'! |
3882 |
||
3883 |
method |
|
4819 | 3884 |
self obsoleteMethodWarning. |
3885 |
^ self theMethod. |
|
3886 |
||
3887 |
"Modified: / 26.9.1999 / 13:40:16 / cg" |
|
3888 |
! |
|
3889 |
||
3890 |
theMethod |
|
4791 | 3891 |
|cls| |
3892 |
||
3893 |
cls := Smalltalk classNamed:className. |
|
3894 |
cls isNil ifTrue:[ ^ nil]. |
|
3895 |
^ cls compiledMethodAt:methodName asSymbol. |
|
4819 | 3896 |
|
3897 |
"Created: / 26.9.1999 / 13:39:07 / cg" |
|
3898 |
! ! |
|
3899 |
||
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
3900 |
!Project class methodsFor:'documentation'! |
630 | 3901 |
|
3902 |
version |
|
5734 | 3903 |
^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.167 2000-12-01 15:44:08 cg Exp $' |
1298 | 3904 |
! ! |
1 | 3905 |
Project initialize! |