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