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