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