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