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