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