author | Claus Gittinger <cg@exept.de> |
Wed, 22 Sep 1999 18:26:29 +0200 | |
changeset 4790 | 38030fd8b681 |
parent 4789 | 72a61dc595ad |
child 4791 | c2cdad0ab823 |
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 |
||
4769 | 23 |
Object subclass:#ClassInfo |
24 |
instanceVariableNames:'conditionForInclusion className classFileName' |
|
4668 | 25 |
classVariableNames:'' |
26 |
poolDictionaries:'' |
|
27 |
privateIn:Project |
|
28 |
! |
|
29 |
||
4769 | 30 |
Object subclass:#MethodInfo |
31 |
instanceVariableNames:'conditionForInclusion methodName className fileName' |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
32 |
classVariableNames:'' |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
33 |
poolDictionaries:'' |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
34 |
privateIn:Project |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
35 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
36 |
|
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
37 |
!Project class methodsFor:'documentation'! |
89 | 38 |
|
39 |
copyright |
|
40 |
" |
|
41 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
203 | 42 |
All Rights Reserved |
89 | 43 |
|
44 |
This software is furnished under a license and may be used |
|
45 |
only in accordance with the terms of that license and with the |
|
46 |
inclusion of the above copyright notice. This software may not |
|
47 |
be provided or otherwise made available to, or used by, any |
|
48 |
other person. No title to or ownership of the software is |
|
49 |
hereby transferred. |
|
50 |
" |
|
51 |
! |
|
52 |
||
53 |
documentation |
|
54 |
" |
|
338 | 55 |
this class is still under construction (especially the build features are unfinished). |
235 | 56 |
Currently, all it does is keep track of per-project views |
57 |
(to hide or show them), define the directory when filing-out, |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
58 |
and define packageNames for new classes and methods. |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
59 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
60 |
instance variables: |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
61 |
name <String> the name of this project, as shown |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
62 |
in a ProjectView |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
63 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
64 |
changeSet <ChangeSet> changes done, while this was the active project |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
65 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
66 |
views <Collection> views opened while this was the active project |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
67 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
68 |
directoryName <String> directory name, where fileOuts are done |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
69 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
70 |
properties |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
71 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
72 |
packageName <String> given to classes/methods which are created while |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
73 |
this is the active project |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
74 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
75 |
repositoryDirectory (default) name of the repository, when a new source containers are |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
76 |
created. |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
77 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
78 |
repositoryModule (default) name of the module, when new source containers are |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
79 |
created. |
235 | 80 |
|
81 |
Future: |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
82 |
- keep track of per-project changes |
4069 | 83 |
- allow speficiation of the type of the project (application or library) |
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
84 |
- allow building of whatever the target (as defined by the type) is |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
85 |
(this will allow build of class libs and apps by clicking a button) |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
86 |
- allow removal of project specific classes, methods etc. |
1286 | 87 |
|
88 |
[author:] |
|
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:[ |
|
108 |
AllProjects := OrderedCollection new. |
|
109 |
] ifFalse:[ |
|
4787 | 110 |
AllProjects do:[:p | packages at:p package asSymbol put:p]. |
4668 | 111 |
]. |
112 |
Smalltalk allClassesDo:[:aClass | |
|
113 |
|packageID prj classFilename pkgInfo revInfo |
|
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
114 |
repositoryPath dir module lib nm| |
4668 | 115 |
|
116 |
aClass isMeta ifFalse:[ |
|
117 |
(aClass isNamespace not or:[aClass == Smalltalk]) ifTrue:[ |
|
118 |
packageID := aClass package asSymbol. |
|
4747
b642ad29477a
scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents:
4743
diff
changeset
|
119 |
(packages includesKey:packageID) ifFalse:[ |
4668 | 120 |
|
121 |
"/ a new one ... |
|
122 |
||
123 |
prj := self new. |
|
4726 | 124 |
prj package:packageID. |
4668 | 125 |
prj directory:'???'. |
126 |
prj repositoryModule:'unknown'. |
|
127 |
prj repositoryDirectory:'unknown'. |
|
128 |
||
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
129 |
nm := 'unknown'. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
130 |
|
4668 | 131 |
pkgInfo := aClass packageSourceCodeInfo. |
132 |
pkgInfo notNil ifTrue:[ |
|
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
133 |
module := pkgInfo at:#module ifAbsent:nil. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
134 |
module notNil ifTrue:[ |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
135 |
prj repositoryModule:module |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
136 |
]. |
4668 | 137 |
dir := pkgInfo at:#directory ifAbsent:nil. |
138 |
dir notNil ifTrue:[ |
|
4743 | 139 |
prj repositoryDirectory:dir |
4668 | 140 |
]. |
141 |
lib := pkgInfo at:#library ifAbsent:nil. |
|
142 |
lib notNil ifTrue:[ |
|
143 |
prj type:#library. |
|
144 |
]. |
|
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
145 |
prj isLoaded:true. |
4668 | 146 |
]. |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
147 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
148 |
nm := (module ? 'unknown') |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
149 |
, ':' |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
150 |
, (dir ? (lib ? 'unknown')). |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
151 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
152 |
prj name:nm. |
4668 | 153 |
AllProjects add:prj. |
4747
b642ad29477a
scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents:
4743
diff
changeset
|
154 |
packages at:packageID put:prj. |
4668 | 155 |
]. |
156 |
]. |
|
157 |
]. |
|
158 |
]. |
|
159 |
Method allSubInstancesDo:[:aMethod | |
|
160 |
|packageID prj who mthdClass| |
|
161 |
||
162 |
packageID := aMethod package asSymbol. |
|
4747
b642ad29477a
scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents:
4743
diff
changeset
|
163 |
(packages includesKey:packageID) ifFalse:[ |
4721
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
164 |
who := aMethod who. |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
165 |
who notNil ifTrue:[ "/ skip unbound methods ... |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
166 |
"/ a new one ... |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
167 |
prj := self new. |
4668 | 168 |
"/ prj name:libName. |
4721
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
169 |
prj package:packageID. |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
170 |
prj type:#library. |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
171 |
prj directory:'???'. |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
172 |
prj repositoryModule:'stx'. |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
173 |
prj repositoryDirectory:'???'. |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
174 |
prj isLoaded:true. |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
175 |
AllProjects add:prj. |
4747
b642ad29477a
scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents:
4743
diff
changeset
|
176 |
packages at:packageID put:prj. |
4668 | 177 |
] |
178 |
] |
|
179 |
]. |
|
4747
b642ad29477a
scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents:
4743
diff
changeset
|
180 |
|
b642ad29477a
scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents:
4743
diff
changeset
|
181 |
"/ 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
|
182 |
|
b642ad29477a
scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents:
4743
diff
changeset
|
183 |
ObjectFileLoader loadedObjectHandles do:[:h | |
b642ad29477a
scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents:
4743
diff
changeset
|
184 |
|cls prj mDir| |
b642ad29477a
scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents:
4743
diff
changeset
|
185 |
|
b642ad29477a
scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents:
4743
diff
changeset
|
186 |
cls := h classes firstIfEmpty:nil. |
b642ad29477a
scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents:
4743
diff
changeset
|
187 |
cls notNil ifTrue:[ |
b642ad29477a
scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents:
4743
diff
changeset
|
188 |
prj := packages at:cls package ifAbsent:nil. |
b642ad29477a
scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents:
4743
diff
changeset
|
189 |
prj notNil ifTrue:[ |
b642ad29477a
scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents:
4743
diff
changeset
|
190 |
mDir := h pathName asFilename directory pathName. |
b642ad29477a
scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents:
4743
diff
changeset
|
191 |
prj directory = '???' ifTrue:[ |
b642ad29477a
scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents:
4743
diff
changeset
|
192 |
prj directory:mDir |
b642ad29477a
scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents:
4743
diff
changeset
|
193 |
] ifFalse:[ |
b642ad29477a
scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents:
4743
diff
changeset
|
194 |
prj directory ~= mDir ifTrue:[ |
b642ad29477a
scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents:
4743
diff
changeset
|
195 |
('Project [warning]: conflicting project directories for ' , cls package) infoPrintCR. |
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 |
] |
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 |
]. |
b642ad29477a
scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents:
4743
diff
changeset
|
200 |
]. |
b642ad29477a
scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents:
4743
diff
changeset
|
201 |
|
4668 | 202 |
self changed:#allProjects |
203 |
||
4066 | 204 |
"/ |stx p| |
205 |
"/ |
|
206 |
"/ stx := self new name:'stx'. |
|
207 |
"/ stx packageName:'noPackage'. |
|
208 |
"/ stx changeSet:nil. |
|
209 |
"/ stx type:#smalltalk. |
|
210 |
"/ stx comment:'The ST/X project itself'. |
|
211 |
"/ |
|
212 |
"/ AllProjects add:stx. |
|
213 |
"/ |
|
214 |
"/ #( |
|
215 |
"/ ('libbasic' #'stx:libbasic' 'Basic (non-GUI) classes. Required for all applications') |
|
216 |
"/ ('libbasic2' #'stx:libbasic2' 'More basic (non-GUI) classes. Required for most applications') |
|
217 |
"/ ('libbasic3' #'stx:libbasic3' 'More basic (non-GUI) classes. Required for development') |
|
218 |
"/ ('libcomp' #'stx:libcomp' 'The bytecode compiler. Required for all applications') |
|
219 |
"/ ('libview' #'stx:libview' 'Low level GUI classes. Required for all GUI applications') |
|
220 |
"/ ('libview2' #'stx:libview2' 'Additional low level GUI classes. Required for most GUI applications') |
|
221 |
"/ ('libwidg' #'stx:libwidg' 'Basic widgets. Required for all GUI applications') |
|
222 |
"/ ('libwidg2' #'stx:libwidg2' 'More widgets. Required for most GUI applications') |
|
223 |
"/ ('libwidg3' #'stx:libwidg3' 'More (fun) widgets. Seldom required') |
|
224 |
"/ ('libtool' #'stx:libtool' 'Development applications. Required for program development') |
|
225 |
"/ ('libtool2' #'stx:libtool2' 'More development applications. Required for GUI development') |
|
226 |
"/ ('libui' #'stx:libui' 'UI spec classes. Required for UIPainter applications') |
|
227 |
"/ ('libhtml' #'stx:libhtml' 'HTML related classes. Required for Web applications and the HTML browser') |
|
228 |
"/ ('libodbc' #'stx:libodbc' 'ODBC interface classes.') |
|
229 |
"/ ('libopengl' #'stx:libopengl' 'OpenGL interface classes.') |
|
230 |
"/ ('persistency' #'stx:goodies/persistency' 'Simple DB interface') |
|
231 |
"/ ('goodies' #'stx:goodies' 'Misc goodies - not really maintained') |
|
232 |
"/ ) do:[:entry | |
|
233 |
"/ |libName package comment| |
|
234 |
"/ |
|
235 |
"/ libName := entry at:1. |
|
236 |
"/ package := entry at:2. |
|
237 |
"/ comment := entry at:3. |
|
238 |
"/ |
|
239 |
"/ p := self new name:libName. |
|
240 |
"/ p packageName:package. |
|
241 |
"/ p type:#library. |
|
242 |
"/ p comment:comment. |
|
243 |
"/ stx addSubProject:p. |
|
244 |
"/ ]. |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
245 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
246 |
" |
4668 | 247 |
AllProjects := nil. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
248 |
self initKnownProjects |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
249 |
" |
4069 | 250 |
|
251 |
"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
|
252 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
253 |
|
236 | 254 |
initialize |
338 | 255 |
SystemProject isNil ifTrue:[ |
2028 | 256 |
NextSequential := 1. |
257 |
SystemProject := self new name:'default'. |
|
4726 | 258 |
SystemProject package:'private'. |
2028 | 259 |
SystemProject defaultNameSpace:Smalltalk. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
260 |
SystemProject comment:'A default (dummy) project. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
261 |
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
|
262 |
|
2028 | 263 |
" |
264 |
the SystemProject does not keep a record if changes, |
|
265 |
but instead depends on the changes file - recording anything there. |
|
266 |
" |
|
267 |
SystemProject changeSet:nil. |
|
338 | 268 |
]. |
269 |
||
270 |
CurrentProject := SystemProject. |
|
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
271 |
AllProjects := nil. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
272 |
"/ now done lazy ... |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
273 |
"/ self initKnownProjects. |
236 | 274 |
|
315 | 275 |
" |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
276 |
SystemProject := nil. |
315 | 277 |
Project initialize |
278 |
" |
|
236 | 279 |
! ! |
280 |
||
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
281 |
!Project class methodsFor:'instance creation'! |
236 | 282 |
|
283 |
new |
|
284 |
^ self basicNew initialize |
|
285 |
! ! |
|
286 |
||
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
287 |
!Project class methodsFor:'accessing'! |
1 | 288 |
|
4071 | 289 |
addKnownProject:aProject |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
290 |
|allProjects| |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
291 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
292 |
allProjects := self knownProjects. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
293 |
(allProjects detect:[:p | p package = aProject package] ifNone:nil) notNil ifTrue:[ |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
294 |
self warn:'Project for ' , aProject package , ' is already present.'. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
295 |
^ self. |
4071 | 296 |
]. |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
297 |
|
4071 | 298 |
AllProjects add:aProject. |
299 |
self changed:#allProjects |
|
300 |
! |
|
301 |
||
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
302 |
addLoadedProject:aProject |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
303 |
aProject isLoaded:true. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
304 |
self addKnownProject:aProject. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
305 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
306 |
|
1 | 307 |
current |
10 | 308 |
"return the currently active project" |
309 |
||
1 | 310 |
^ CurrentProject |
311 |
||
362 | 312 |
" |
313 |
Project current |
|
314 |
" |
|
1 | 315 |
! |
316 |
||
317 |
current:aProject |
|
10 | 318 |
"set the currently active project" |
319 |
||
315 | 320 |
CurrentProject := aProject. |
321 |
self changed:#currentProject |
|
334 | 322 |
! |
323 |
||
617 | 324 |
currentPackageName |
325 |
CurrentProject notNil ifTrue:[ |
|
4726 | 326 |
^ CurrentProject package |
617 | 327 |
]. |
4112
5ee841c34b10
return nil (instead of 'no package') if no current package is defined.
Claus Gittinger <cg@exept.de>
parents:
4099
diff
changeset
|
328 |
^ nil |
617 | 329 |
|
330 |
" |
|
331 |
Project currentPackageName |
|
332 |
" |
|
333 |
! |
|
334 |
||
336 | 335 |
defaultProject |
336 |
"return the SystemDefault project" |
|
337 |
||
338 |
^ SystemProject. |
|
339 |
! |
|
340 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
341 |
knownProjects |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
342 |
AllProjects isNil ifTrue:[ |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
343 |
self initKnownProjects |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
344 |
]. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
345 |
^ AllProjects ? #() |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
346 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
347 |
|
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
348 |
loadedProjects |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
349 |
^ self knownProjects select:[:p | p isLoaded] |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
350 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
351 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
352 |
projectNamed:aProjectName |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
353 |
"retrieve the named project; return nil if not known" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
354 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
355 |
^ self knownProjects detect:[:p | p name = aProjectName] ifNone:nil. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
356 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
357 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
358 |
Project projectNamed:'libbasic' |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
359 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
360 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
361 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
362 |
projectWithId:aPackageId |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
363 |
"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
|
364 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
365 |
^ self knownProjects detect:[:p | p package = aPackageId] ifNone:nil. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
366 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
367 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
368 |
Project projectWithId:#'stx:libbasic' |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
369 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
370 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
371 |
|
334 | 372 |
setDefaultProject |
373 |
"set the currently active project to be the SystemDEfault project" |
|
374 |
||
375 |
self current:SystemProject. |
|
939
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
376 |
! |
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
377 |
|
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
378 |
setProject:aProjectOrNil |
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
379 |
"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
|
380 |
|
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
381 |
CurrentProject := aProjectOrNil. |
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
382 |
|
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
383 |
"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
|
384 |
"Modified: 7.2.1996 / 14:01:16 / cg" |
1 | 385 |
! ! |
386 |
||
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
387 |
!Project class methodsFor:'changes management'! |
149 | 388 |
|
664 | 389 |
addClassDefinitionChangeFor:aClass |
1115 | 390 |
"add a class-def-change for aClass to the current project" |
391 |
||
664 | 392 |
|p c| |
393 |
||
394 |
p := CurrentProject. |
|
395 |
(p notNil |
|
396 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
|
666
6d4175de8c55
fixed primitiveDefinitions changes
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
397 |
c addClassDefinitionChangeFor:aClass |
664 | 398 |
] |
399 |
||
400 |
"Created: 3.12.1995 / 13:44:58 / cg" |
|
401 |
"Modified: 3.12.1995 / 13:58:04 / cg" |
|
402 |
! |
|
403 |
||
617 | 404 |
addMethodCategoryChange:aMethod category:newCategory in:aClass |
1115 | 405 |
"add a method-category-change for aMethod in aClass to the current project" |
406 |
||
617 | 407 |
|p c| |
408 |
||
409 |
p := CurrentProject. |
|
410 |
(p notNil |
|
411 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
|
412 |
c addMethodCategoryChange:aMethod category:newCategory in:aClass |
|
413 |
] |
|
414 |
! |
|
415 |
||
149 | 416 |
addMethodChange:aMethod in:aClass |
1115 | 417 |
"add a method change in aClass to the current project" |
149 | 418 |
|
235 | 419 |
|p c| |
149 | 420 |
|
421 |
p := CurrentProject. |
|
422 |
(p notNil |
|
235 | 423 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
424 |
c addMethodChange:aMethod in:aClass |
|
203 | 425 |
] |
426 |
! |
|
427 |
||
617 | 428 |
addMethodPrivacyChange:aMethod in:aClass |
1115 | 429 |
"add a privacy change for aMethod in aClass to the current project" |
430 |
||
617 | 431 |
|p c| |
432 |
||
433 |
p := CurrentProject. |
|
434 |
(p notNil |
|
435 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
|
436 |
c addMethodPrivacyChange:aMethod in:aClass |
|
437 |
] |
|
438 |
||
439 |
"Modified: 27.8.1995 / 22:48:17 / claus" |
|
440 |
! |
|
441 |
||
705 | 442 |
addPrimitiveDefinitionsChangeFor:aClass |
1115 | 443 |
"add a primitiveDef change for aClass to the current project" |
444 |
||
705 | 445 |
|p c| |
446 |
||
447 |
p := CurrentProject. |
|
448 |
(p notNil |
|
449 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
|
450 |
c addPrimitiveDefinitionsChangeFor:aClass |
|
451 |
] |
|
452 |
! |
|
453 |
||
454 |
addPrimitiveFunctionsChangeFor:aClass |
|
1115 | 455 |
"add a primitiveFuncs change for aClass to the current project" |
456 |
||
705 | 457 |
|p c| |
458 |
||
459 |
p := CurrentProject. |
|
460 |
(p notNil |
|
461 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
|
462 |
c addPrimitiveFunctionsChangeFor:aClass |
|
463 |
] |
|
464 |
! |
|
465 |
||
466 |
addPrimitiveVariablesChangeFor:aClass |
|
1115 | 467 |
"add a primitiveVars change for aClass to the current project" |
468 |
||
705 | 469 |
|p c| |
470 |
||
471 |
p := CurrentProject. |
|
472 |
(p notNil |
|
473 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
|
474 |
c addPrimitiveVariablesChangeFor:aClass |
|
475 |
] |
|
476 |
! |
|
477 |
||
3288
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
478 |
addRemoveSelectorChange:aSelector in:aClass |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
479 |
"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
|
480 |
|
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
481 |
|p c| |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
482 |
|
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
483 |
p := CurrentProject. |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
484 |
(p notNil |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
485 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
486 |
c addRemoveSelectorChange:aSelector in:aClass |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
487 |
] |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
488 |
|
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
489 |
"Created: / 16.2.1998 / 12:45:10 / cg" |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
490 |
! |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
491 |
|
149 | 492 |
currentProjectDirectory |
493 |
"return the name of the directory to use for fileOut. |
|
235 | 494 |
The returned name already includes a file-separator at the end, |
495 |
so the filename can be concatenated to it." |
|
149 | 496 |
|
497 |
|p dirName| |
|
498 |
||
499 |
p := CurrentProject. |
|
500 |
p notNil ifTrue:[ |
|
2907 | 501 |
dirName := p directory |
149 | 502 |
] ifFalse:[ |
2907 | 503 |
dirName := Filename currentDirectory name |
149 | 504 |
]. |
2962 | 505 |
^ dirName |
2907 | 506 |
|
507 |
"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
|
508 |
! |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
509 |
|
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
510 |
rememberOverwrittenMethod:newMethod from:oldMethod |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
511 |
"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
|
512 |
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
|
513 |
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
|
514 |
|
2558 | 515 |
|p| |
2334
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
516 |
|
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
517 |
p := CurrentProject. |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
518 |
(p notNil |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
519 |
and:[p ~~ SystemProject]) ifTrue:[ |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
520 |
p rememberOverwrittenMethod:newMethod from:oldMethod |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
521 |
] ifFalse:[ |
3332
8014b817988b
remove the 'does not remember ...' message.
Claus Gittinger <cg@exept.de>
parents:
3288
diff
changeset
|
522 |
"/ '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
|
523 |
] |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
524 |
|
3332
8014b817988b
remove the 'does not remember ...' message.
Claus Gittinger <cg@exept.de>
parents:
3288
diff
changeset
|
525 |
"Modified: / 7.3.1998 / 13:38:39 / cg" |
13 | 526 |
! ! |
527 |
||
1 | 528 |
!Project methodsFor:'accessing'! |
529 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
530 |
addSubProject:aProject |
4097 | 531 |
"add a subproject - obsolete; we use prerequisites now" |
532 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
533 |
subProjects isNil ifTrue:[ |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
534 |
subProjects := OrderedCollection new. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
535 |
]. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
536 |
subProjects add:aProject |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
537 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
538 |
|
1 | 539 |
changeSet |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
540 |
"return the set of changes made in this project" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
541 |
|
1 | 542 |
^ changeSet |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
543 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
544 |
"Modified: 27.1.1997 / 11:58:36 / cg" |
1 | 545 |
! |
546 |
||
236 | 547 |
changeSet:aChangeSet |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
548 |
"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
|
549 |
the actual changeSet." |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
550 |
|
236 | 551 |
changeSet := aChangeSet |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
552 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
553 |
"Modified: 27.1.1997 / 11:59:02 / cg" |
73 | 554 |
! |
555 |
||
2028 | 556 |
defaultNameSpace |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
557 |
"return the defaultNameSpace of this project. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
558 |
New classes will (if not specified by a directive) be installed |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
559 |
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
|
560 |
overwriting of standard classes." |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
561 |
|
4726 | 562 |
^ (self propertyAt:#defaultNameSpace) ? Smalltalk |
2028 | 563 |
|
564 |
! |
|
565 |
||
566 |
defaultNameSpace:aNamespace |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
567 |
"set the defaultNameSpace of this project. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
568 |
New classes will (if not specified by a directive) be installed |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
569 |
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
|
570 |
overwriting of standard classes." |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
571 |
|
4726 | 572 |
|prevDefault| |
573 |
||
574 |
prevDefault := self defaultNameSpace. |
|
575 |
aNamespace ~~ prevDefault ifTrue:[ |
|
576 |
self propertyAt:#defaultNameSpace put:aNamespace. |
|
4077 | 577 |
self changed:#defaultNameSpace. |
578 |
self == CurrentProject ifTrue:[ |
|
579 |
Project changed:#defaultNameSpace |
|
580 |
] |
|
2032 | 581 |
] |
2028 | 582 |
|
583 |
"Created: 2.1.1997 / 19:54:37 / cg" |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
584 |
"Modified: 27.1.1997 / 12:00:01 / cg" |
2028 | 585 |
! |
586 |
||
315 | 587 |
directory |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
588 |
"return the projects directory. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
589 |
If not specified, a fileOut will be done into that directory" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
590 |
|
315 | 591 |
directoryName isNil ifTrue:[^ '.']. |
592 |
^ directoryName |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
593 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
594 |
"Modified: 27.1.1997 / 12:00:41 / cg" |
315 | 595 |
! |
596 |
||
597 |
directory:aDirectoryName |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
598 |
"set the projects directory. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
599 |
If not specified, a fileOut will be done into that directory" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
600 |
|
315 | 601 |
directoryName := aDirectoryName. |
4070 | 602 |
self changed:#directory. |
315 | 603 |
self == CurrentProject ifTrue:[ |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
604 |
Project changed:#directory |
315 | 605 |
] |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
606 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
607 |
"Modified: 27.1.1997 / 12:00:47 / cg" |
617 | 608 |
! |
356 | 609 |
|
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
610 |
isLoaded:aBoolean |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
611 |
isLoaded := aBoolean |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
612 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
613 |
|
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
614 |
libraryName |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
615 |
"return the projects library name. |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
616 |
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
|
617 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
618 |
|nm| |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
619 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
620 |
nm := self name. |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
621 |
^ nm copyFrom:(nm lastIndexOfAny:':/')+1 |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
622 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
623 |
"/ ^ (self name copyReplaceAll:$/ with:$_) replaceAll:$: with:$_ |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
624 |
! |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
625 |
|
617 | 626 |
name |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
627 |
"return the projects name. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
628 |
This is for the user only - shown in the projectViews label" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
629 |
|
617 | 630 |
^ name |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
631 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
632 |
"Modified: 27.1.1997 / 12:01:16 / cg" |
617 | 633 |
! |
356 | 634 |
|
617 | 635 |
name:aString |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
636 |
"set the projects name. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
637 |
This is for the user only - shown in the projectViews label" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
638 |
|
617 | 639 |
name := aString. |
4070 | 640 |
self changed:#name. |
617 | 641 |
self == CurrentProject ifTrue:[ |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
642 |
Project changed:#name |
617 | 643 |
] |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
644 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
645 |
"Modified: 27.1.1997 / 12:01:09 / cg" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
646 |
! |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
647 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
648 |
overwrittenMethods |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
649 |
"return the set of methods which were overwritten in this project. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
650 |
This information allows uninstalling, by switching back to the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
651 |
original methods." |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
652 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
653 |
^ overwrittenMethods |
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 |
"Created: 27.1.1997 / 11:57:21 / cg" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
656 |
"Modified: 27.1.1997 / 12:09:14 / cg" |
356 | 657 |
! |
658 |
||
4668 | 659 |
package |
660 |
"return the projects package identifier. |
|
661 |
This identifier marks all methods and new classes which were created |
|
662 |
in this project." |
|
663 |
||
664 |
^ packageName |
|
665 |
||
666 |
"Modified: 27.1.1997 / 12:10:00 / cg" |
|
667 |
! |
|
668 |
||
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
669 |
package:aPackageId |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
670 |
"set the projects package identifier. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
671 |
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
|
672 |
in this project." |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
673 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
674 |
packageName := aPackageId |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
675 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
676 |
"Modified: 27.1.1997 / 12:10:00 / cg" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
677 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
678 |
|
4727 | 679 |
packageName:aPackageId |
680 |
"set the projects package identifier. |
|
681 |
This identifier marks all methods and new classes which were created |
|
682 |
in this project." |
|
683 |
||
684 |
self package:aPackageId |
|
685 |
||
686 |
"Modified: 27.1.1997 / 12:10:00 / cg" |
|
687 |
! |
|
688 |
||
4099 | 689 |
prerequisiteClasses |
690 |
"return the prerequisiteClasses of the project" |
|
691 |
||
692 |
^ (self propertyAt:#prerequisiteClasses) ? #() |
|
693 |
! |
|
694 |
||
4124 | 695 |
prerequisiteClasses:aCollectionOfClassesOrClassNames |
4099 | 696 |
"set the prerequisiteClasses of the project" |
697 |
||
4124 | 698 |
^ self propertyAt:#prerequisiteClasses put:aCollectionOfClassesOrClassNames |
699 |
||
700 |
"Modified: / 26.4.1999 / 23:33:44 / cg" |
|
701 |
! |
|
702 |
||
703 |
prerequisitePackages |
|
704 |
"return the prerequisitePackages of the project" |
|
705 |
||
706 |
^ self prerequisites |
|
707 |
||
708 |
"Created: / 26.4.1999 / 23:33:22 / cg" |
|
709 |
! |
|
710 |
||
711 |
prerequisitePackages:aCollectionOfPackagesOrPackageNames |
|
712 |
"set the prerequisitePackages of the project" |
|
713 |
||
714 |
^ self prerequisites:aCollectionOfPackagesOrPackageNames |
|
715 |
||
716 |
"Modified: / 26.4.1999 / 23:34:40 / cg" |
|
4099 | 717 |
! |
718 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
719 |
prerequisites |
4097 | 720 |
"return the prerequisites of the project" |
721 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
722 |
^ prerequisites ? #() |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
723 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
724 |
|
3973 | 725 |
prerequisites:aCollectionOfProjects |
4097 | 726 |
"set the prerequisites of the project" |
727 |
||
3973 | 728 |
prerequisites := aCollectionOfProjects |
729 |
! |
|
730 |
||
654 | 731 |
repositoryDirectory |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
732 |
"return the projects default repository location. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
733 |
This is offered initially, when classes are checked into the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
734 |
source repository initially" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
735 |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
736 |
^ repositoryDirectory |
654 | 737 |
|
738 |
"Created: 25.11.1995 / 18:04:51 / cg" |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
739 |
"Modified: 27.1.1997 / 12:13:35 / cg" |
654 | 740 |
! |
741 |
||
742 |
repositoryDirectory:aRelativePathName |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
743 |
"set the projects default repository location. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
744 |
This will be offered initially, when classes are checked into the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
745 |
source repository initially" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
746 |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
747 |
repositoryDirectory := aRelativePathName |
654 | 748 |
|
749 |
"Created: 25.11.1995 / 18:05:06 / cg" |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
750 |
"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
|
751 |
! |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
752 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
753 |
repositoryModule |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
754 |
"return the projects default repository module name. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
755 |
This is offered initially, when classes are checked into the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
756 |
source repository initially" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
757 |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
758 |
^ repositoryModule |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
759 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
760 |
"Created: 25.11.1995 / 18:04:51 / cg" |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
761 |
"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
|
762 |
! |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
763 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
764 |
repositoryModule:aString |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
765 |
"set the projects default repository module name. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
766 |
This is offered initially, when classes are checked into the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
767 |
source repository initially" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
768 |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
769 |
repositoryModule := aString |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
770 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
771 |
"Created: 25.11.1995 / 18:05:06 / cg" |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
772 |
"Modified: 27.1.1997 / 12:13:57 / cg" |
654 | 773 |
! |
774 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
775 |
subProjects |
4097 | 776 |
"return the subprojects - obsolete; we use prerequisites now" |
777 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
778 |
^ subProjects ? #() |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
779 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
780 |
|
617 | 781 |
views |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
782 |
"return a collection of views which were opened in this project" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
783 |
|
617 | 784 |
^ views asArray |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
785 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
786 |
"Modified: 27.1.1997 / 12:14:18 / cg" |
338 | 787 |
! |
788 |
||
617 | 789 |
views:aSetOfViews |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
790 |
"set the collection of views which were opened in this project" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
791 |
|
617 | 792 |
views := WeakIdentitySet withAll:aSetOfViews |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
793 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
794 |
"Modified: 27.1.1997 / 12:14:26 / cg" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
795 |
! ! |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
796 |
|
4079 | 797 |
!Project methodsFor:'administration'! |
798 |
||
799 |
removeClassesFromSystem |
|
800 |
"remove the all of my classes & patches from the system" |
|
801 |
||
802 |
self classInfo do:[:clsInfo | |
|
803 |
|clsName cls| |
|
804 |
||
805 |
clsName := clsInfo className. |
|
806 |
clsName isSymbol ifTrue:[ |
|
807 |
cls := Smalltalk at:clsName. |
|
808 |
cls notNil ifTrue:[ |
|
809 |
cls removeFromSystem. |
|
810 |
]. |
|
811 |
] ifFalse:[ |
|
812 |
self halt |
|
813 |
]. |
|
814 |
]. |
|
815 |
||
816 |
! |
|
817 |
||
818 |
removeFromSystem |
|
819 |
"remove the project and all of its classes & patches from the |
|
820 |
system" |
|
821 |
||
822 |
self removeClassesFromSystem. |
|
823 |
AllProjects remove:self ifAbsent:nil. |
|
824 |
! ! |
|
825 |
||
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
826 |
!Project methodsFor:'changes'! |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
827 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
828 |
rememberOverwrittenMethod:newMethod from:oldMethod |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
829 |
"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
|
830 |
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
|
831 |
Allows previous methods to be reconstructed." |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
832 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
833 |
overwrittenMethods isNil ifTrue:[ |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
834 |
overwrittenMethods := IdentityDictionary new. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
835 |
]. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
836 |
overwrittenMethods at:newMethod put:oldMethod |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
837 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
838 |
"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
|
839 |
"Modified: 30.1.1997 / 21:10:51 / cg" |
10 | 840 |
! ! |
841 |
||
236 | 842 |
!Project methodsFor:'initialization'! |
843 |
||
844 |
initialize |
|
338 | 845 |
|numString| |
846 |
||
330 | 847 |
views := WeakIdentitySet new. |
338 | 848 |
numString := NextSequential printString. |
315 | 849 |
NextSequential := NextSequential + 1. |
338 | 850 |
|
851 |
name := 'new Project-' , numString. |
|
852 |
packageName := 'private-' , numString. |
|
2034
1c96469c3df8
preinit the defaultNamespace of new projects (to Smalltalk)
Claus Gittinger <cg@exept.de>
parents:
2032
diff
changeset
|
853 |
|
848
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
854 |
"/ |
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
855 |
"/ for tiny-configurations, allow ChangeSet to be absent |
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
856 |
"/ |
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
857 |
ChangeSet notNil ifTrue:[ |
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
858 |
changeSet := ChangeSet new. |
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
859 |
]. |
654 | 860 |
self directory:'.'. |
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
861 |
self repositoryModule:(OperatingSystem getLoginName). |
654 | 862 |
self repositoryDirectory:'private' |
863 |
||
864 |
"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
|
865 |
"Modified: 3.1.1997 / 13:24:10 / cg" |
236 | 866 |
! ! |
867 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
868 |
!Project methodsFor:'load & save'! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
869 |
|
4079 | 870 |
loadClassesFromProjectDirectory |
871 |
"load my classes into the system. |
|
872 |
The classes are loaded from the directory as defined by my |
|
873 |
directory insTvar" |
|
874 |
||
875 |
|myDirectory| |
|
876 |
||
877 |
myDirectory := self directory asFilename. |
|
878 |
||
879 |
self classInfo do:[:clsInfo | |
|
4080 | 880 |
|clsName clsFileNameString cls clsFilename| |
4079 | 881 |
|
882 |
clsName := clsInfo className. |
|
4080 | 883 |
clsFileNameString := clsInfo classFileName. |
884 |
clsFileNameString isNil ifTrue:[clsFileNameString := clsName , '.st']. |
|
4079 | 885 |
|
886 |
clsName isSymbol ifTrue:[ |
|
4080 | 887 |
clsFilename := myDirectory construct:clsFileNameString. |
4079 | 888 |
cls := Smalltalk at:clsName. |
889 |
cls isNil ifTrue:[ |
|
890 |
"/ ok - really not yet loaded. |
|
4080 | 891 |
Transcript showCR:'loading ' , clsFilename pathName , ' ...'. |
4079 | 892 |
] ifFalse:[ |
4080 | 893 |
Transcript showCR:'reloading ' , clsFilename pathName , ' ...'. |
4079 | 894 |
]. |
4080 | 895 |
Smalltalk fileIn:clsFilename |
4079 | 896 |
] ifFalse:[ |
897 |
self halt |
|
898 |
]. |
|
899 |
]. |
|
900 |
||
901 |
"/ read again; if the load order was not correct, |
|
902 |
"/ this will fix things (i.e. nil superclasses ...) |
|
903 |
||
904 |
self classInfo do:[:clsInfo | |
|
4080 | 905 |
|clsName clsFileNameString clsFilename| |
4079 | 906 |
|
907 |
clsName := clsInfo className. |
|
4080 | 908 |
clsFileNameString := clsInfo classFileName. |
909 |
clsFileNameString isNil ifTrue:[clsFileNameString := clsName , '.st']. |
|
4079 | 910 |
|
911 |
clsName isSymbol ifTrue:[ |
|
4080 | 912 |
clsFilename := myDirectory construct:clsFileNameString. |
913 |
Transcript showCR:'reloading ' , clsFilename pathName , ' ...'. |
|
914 |
Smalltalk fileIn:clsFilename |
|
4079 | 915 |
] ifFalse:[ |
916 |
self halt |
|
917 |
]. |
|
918 |
]. |
|
919 |
||
920 |
! |
|
921 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
922 |
loadFromProjectFile:aFilename |
4097 | 923 |
"fill all of my attributes from a projects file (.prj-file)" |
924 |
||
4769 | 925 |
|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
|
926 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
927 |
f := aFilename asFilename. |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
928 |
directoryName := f directory pathName. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
929 |
self directory:(f directory pathName). |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
930 |
pack := ResourcePack fromFile:f baseName directory:directoryName. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
931 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
932 |
"/ convert the resourcePack ... |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
933 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
934 |
packageName := pack at:'package' ifAbsent:packageName. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
935 |
name := pack at:'name' ifAbsent:name. |
4071 | 936 |
|
4769 | 937 |
self type:(pack at:'type' ifAbsent:#application) asSymbol. |
938 |
||
4124 | 939 |
module := pack at:'repository.module' ifAbsent:nil. |
940 |
module notNil ifTrue:[ |
|
941 |
repositoryModule := module. |
|
942 |
repositoryDirectory := pack at:'repository.directory' ifAbsent:''. |
|
943 |
]. |
|
4071 | 944 |
|
4099 | 945 |
prerequisites := pack at:'prerequisites' ifAbsent:#(). |
946 |
self prerequisiteClasses:(pack at:'prerequisiteClasses' ifAbsent:#()). |
|
947 |
||
4074 | 948 |
s := pack at:'nameSpace' ifAbsent:nil. |
949 |
s notNil ifTrue:[ |
|
4769 | 950 |
self defaultNameSpace:(Namespace name:s asSymbol). |
4074 | 951 |
]. |
952 |
||
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
953 |
subProjects := pack at:'subProjects' ifAbsent:subProjects. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
954 |
(s := pack at:'comment' ifAbsent:nil) notNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
955 |
self comment:s |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
956 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
957 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
958 |
"/ first, all of the conditions ... |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
959 |
targetConditions := Dictionary new. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
960 |
pack keysAndValuesDo:[:key :val | |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
961 |
|conditionKey| |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
962 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
963 |
(key startsWith:'target.condition.') ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
964 |
conditionKey := key copyFrom:'target.condition.' size + 1. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
965 |
targetConditions at:conditionKey put:val. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
966 |
] |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
967 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
968 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
969 |
properties isNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
970 |
properties := IdentityDictionary new |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
971 |
]. |
4124 | 972 |
properties at:#'targetconditions' put:targetConditions. |
973 |
||
974 |
sourcesSubDir := pack at:'sources' ifAbsent:nil. |
|
975 |
sourcesSubDir notNil ifTrue:[ |
|
976 |
properties at:#'sourcesDirectory' put:sourcesSubDir. |
|
977 |
]. |
|
4769 | 978 |
methodsFile := pack at:'methodsFile' ifAbsent:nil. |
979 |
methodsFile notNil ifTrue:[ |
|
980 |
properties at:#'methodsFile' put:methodsFile. |
|
981 |
]. |
|
4124 | 982 |
files := pack at:'files' ifAbsent:nil. |
983 |
files notNil ifTrue:[ |
|
984 |
properties at:#'files' put:files. |
|
985 |
]. |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
986 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
987 |
"/ fetch class info |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
988 |
|
4071 | 989 |
(pack at:'classes' default:#()) do:[:info | |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
990 |
|condKey className optionalFileName| |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
991 |
|
4078 | 992 |
condKey := #always. |
4073 | 993 |
info isSymbol ifTrue:[ |
994 |
className := info. |
|
995 |
] ifFalse:[ |
|
4078 | 996 |
className := info at:1. |
997 |
info size > 1 ifTrue:[ |
|
4769 | 998 |
condKey := info at:2. |
4078 | 999 |
info size > 2 ifTrue:[ |
4769 | 1000 |
optionalFileName := info at:3. |
4078 | 1001 |
] |
4073 | 1002 |
]. |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1003 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1004 |
self |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1005 |
addClass:className |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1006 |
conditionForInclusion:condKey |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1007 |
classFileName:optionalFileName |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1008 |
]. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1009 |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1010 |
"/ fetch methods info |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1011 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1012 |
(pack at:'methods' default:#()) do:[:info | |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1013 |
|condKey className methodName optionalFileName| |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1014 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1015 |
condKey := #always. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1016 |
className := info at:1. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1017 |
methodName := info at:2. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1018 |
info size > 2 ifTrue:[ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1019 |
optionalFileName := info at:3. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1020 |
info size > 3 ifTrue:[ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1021 |
condKey := info at:4. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1022 |
] |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1023 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1024 |
self |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1025 |
addMethod:methodName inClass:className |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1026 |
conditionForInclusion:condKey |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1027 |
fileName:optionalFileName |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1028 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1029 |
|
4069 | 1030 |
self wasLoadedFromFile:true. |
1031 |
||
4099 | 1032 |
"/ all remaining properties |
1033 |
pack keysAndValuesDo:[:key :val | |
|
1034 |
(key startsWith:'property.') ifTrue:[ |
|
1035 |
self propertyAt:(key copyFrom:'property.' size+1) asSymbol put:val. |
|
1036 |
] |
|
1037 |
]. |
|
1038 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1039 |
" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1040 |
Project current saveAsProjectFile. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1041 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1042 |
Project new loadFromProjectFile:'default.prj' |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1043 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1044 |
Project new loadFromProjectFile:'../../libbasic/libbasic.prj' |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1045 |
" |
4069 | 1046 |
|
4124 | 1047 |
"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
|
1048 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1049 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1050 |
saveAsProjectFile |
4097 | 1051 |
"store all of my attributes into a projects file (.prj-file) |
1052 |
(in the project-directory and named as <projectName>.prj)" |
|
1053 |
||
4769 | 1054 |
|dir fn nm s| |
1055 |
||
1056 |
dir := self directory asFilename. |
|
4790 | 1057 |
nm := self libraryName. |
4769 | 1058 |
fn := dir construct:nm. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1059 |
fn := fn withSuffix:'prj'. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1060 |
|
4124 | 1061 |
fn exists ifTrue:[ |
1062 |
fn copyTo:(fn pathName , '.bak') |
|
1063 |
]. |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1064 |
s := fn writeStream. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1065 |
self saveAsProjectFileOn:s. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1066 |
s close. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1067 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1068 |
" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1069 |
Project current saveAsProjectFile |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1070 |
" |
4124 | 1071 |
|
1072 |
"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
|
1073 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1074 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1075 |
saveAsProjectFileOn:aStream |
4074 | 1076 |
"save the project info in a format which is both usable for reload |
1077 |
and somehow readable for humans. |
|
1078 |
Actually, the format is the same as used for resources (i.e. key - value pairs) |
|
1079 |
and the code below could be much simpler - if there where no humans to read it ..." |
|
1080 |
||
4769 | 1081 |
|s coll first maxLen t defNS methodsFile| |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1082 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1083 |
s := aStream. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1084 |
|
4099 | 1085 |
s nextPutLine:'; $Header' , '$'; nextPutLine:';'. |
4074 | 1086 |
s nextPutLine:'; Project saved ' , Smalltalk timeStamp; nextPutLine:';'. |
4769 | 1087 |
s nextPutAll:'; Be careful when editing - do not corrupt the files syntax. |
1088 |
; Lines starting with a semicolon are comment lines. |
|
1089 |
; Lines ending with a backslash are concatenated with the following line. |
|
1090 |
; Entries are key-value pairs, separated by whitespace; |
|
1091 |
; the value is a smalltalk literal expression. |
|
1092 |
'. |
|
1093 |
||
1094 |
s nextPutAll:' |
|
1095 |
; |
|
1096 |
; general: |
|
1097 |
; |
|
1098 |
'. |
|
4071 | 1099 |
|
1100 |
s nextPutAll:'comment'. |
|
1101 |
s tab. s nextPutLine:(self comment storeString). |
|
1102 |
||
1103 |
s nextPutAll:'name'. |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1104 |
s tab. s nextPutLine:(name storeString). |
4071 | 1105 |
|
1106 |
s nextPutAll:'type'. |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1107 |
s tab. s nextPutLine:(self type storeString). |
4071 | 1108 |
|
1109 |
s nextPutAll:'package'. |
|
4726 | 1110 |
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
|
1111 |
|
4726 | 1112 |
defNS := self defaultNameSpace. |
1113 |
(defNS ~~ Smalltalk) ifTrue:[ |
|
4074 | 1114 |
s nextPutAll:'nameSpace'. |
4726 | 1115 |
s tab. s nextPutLine:(defNS name storeString). |
4074 | 1116 |
]. |
1117 |
||
4769 | 1118 |
s nextPutAll:' |
1119 |
; |
|
1120 |
; repository: |
|
1121 |
; |
|
1122 |
'. |
|
4071 | 1123 |
s nextPutAll:'repository.module'. |
4099 | 1124 |
s tab. s nextPutLine:(repositoryModule ? 'private') storeString. |
4071 | 1125 |
s nextPutAll:'repository.directory'. |
4726 | 1126 |
s tab. s nextPutLine:(repositoryDirectory ? self package) storeString. |
4071 | 1127 |
s cr. |
1128 |
||
4124 | 1129 |
(t := properties at:#'sourcesDirectory' ifAbsent:nil) notNil ifTrue:[ |
1130 |
s nextPutAll:'sources'. |
|
1131 |
s tab. s nextPutLine:(t storeString). |
|
1132 |
]. |
|
1133 |
||
4074 | 1134 |
first := true. |
4071 | 1135 |
properties keysAndValuesDo:[:key :val | |
1136 |
(#( |
|
1137 |
comment |
|
1138 |
wasLoadedFromFile |
|
1139 |
targetconditions |
|
4074 | 1140 |
classes |
1141 |
classInfo |
|
4769 | 1142 |
methodInfo |
4099 | 1143 |
prerequisiteClasses |
4124 | 1144 |
files |
4769 | 1145 |
sourcesDirectory |
1146 |
methodsFile |
|
1147 |
type |
|
1148 |
defaultNameSpace |
|
4071 | 1149 |
) includes:key) ifFalse:[ |
4074 | 1150 |
first ifTrue:[ |
1151 |
first := false. |
|
4769 | 1152 |
s nextPutAll:' |
1153 |
; |
|
1154 |
; properties: |
|
1155 |
; |
|
1156 |
'. |
|
4074 | 1157 |
]. |
4071 | 1158 |
s nextPutAll:'property.'; nextPutAll:key. |
4769 | 1159 |
s tab. |
1160 |
key == #defaultNameSpace ifTrue:[ |
|
1161 |
s nextPutLine:val name storeString. |
|
1162 |
] ifFalse:[ |
|
1163 |
s nextPutLine:val storeString. |
|
1164 |
] |
|
4071 | 1165 |
] |
1166 |
]. |
|
1167 |
||
4074 | 1168 |
"/ coll := self subProjects. |
1169 |
"/ coll size > 0 ifTrue:[ |
|
1170 |
"/ s nextPutLine:'[subprojects]'. |
|
1171 |
"/ coll do:[:aSubProject | |
|
1172 |
"/ s tab. s nextPutLine:(aSubProject name soreString). |
|
1173 |
"/ ]. |
|
1174 |
"/ ]. |
|
1175 |
||
4769 | 1176 |
s nextPutAll:' |
1177 |
; |
|
1178 |
; required packages: |
|
1179 |
; |
|
1180 |
'. |
|
4074 | 1181 |
s nextPutAll:'prerequisites'; tab. |
1182 |
coll := self prerequisites. |
|
1183 |
coll size = 0 ifTrue:[ |
|
1184 |
s nextPutLine:'#()'. |
|
1185 |
] ifFalse:[ |
|
1186 |
s nextPutLine:'#( \'. |
|
4124 | 1187 |
coll do:[:aProjectOrProjectNameList | |
1188 |
|pName pPath| |
|
1189 |
||
1190 |
aProjectOrProjectNameList isString ifTrue:[ |
|
1191 |
pName := aProjectOrProjectNameList. |
|
1192 |
] ifFalse:[ |
|
1193 |
aProjectOrProjectNameList isArray ifTrue:[ |
|
1194 |
pName := aProjectOrProjectNameList at:1. |
|
1195 |
pPath := aProjectOrProjectNameList at:2. |
|
1196 |
] ifFalse:[ |
|
1197 |
pName := aProjectOrProjectNameList name. |
|
1198 |
pPath := aProjectOrProjectNameList repositoryPath. |
|
1199 |
] |
|
1200 |
]. |
|
1201 |
||
1202 |
pPath isNil ifTrue:[ |
|
1203 |
s tab. s nextPutAll:(pName storeString); nextPutLine:' \'. |
|
1204 |
] ifFalse:[ |
|
1205 |
s tab. s nextPutAll:'( '. |
|
1206 |
s nextPutAll:(pName storeString); space; |
|
1207 |
nextPutAll:(pPath storeString); nextPutLine:') \'. |
|
1208 |
] |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1209 |
]. |
4074 | 1210 |
s nextPutLine:')'. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1211 |
]. |
4124 | 1212 |
|
4769 | 1213 |
s nextPutAll:' |
1214 |
; |
|
1215 |
; required classes: |
|
1216 |
; |
|
1217 |
'. |
|
4099 | 1218 |
s nextPutAll:'prerequisiteClasses'; tab. |
1219 |
coll := self prerequisiteClasses. |
|
4769 | 1220 |
coll size = 0 ifTrue:[ |
1221 |
s nextPutLine:'#()'. |
|
1222 |
] ifFalse:[ |
|
1223 |
s nextPutLine:'#( \'. |
|
1224 |
coll do:[:aClassOrSymbol | |className| |
|
1225 |
||
1226 |
(className := aClassOrSymbol) isSymbol ifFalse:[ |
|
1227 |
className := aClassOrSymbol name |
|
1228 |
]. |
|
1229 |
s tab. s nextPutAll:(className storeString); nextPutLine:' \'. |
|
4099 | 1230 |
]. |
4769 | 1231 |
s nextPutLine:')'. |
4099 | 1232 |
]. |
4769 | 1233 |
|
1234 |
s nextPutAll:' |
|
1235 |
; |
|
1236 |
; classes: |
|
1237 |
; (for each class, one line of the form: ( #''className'' [condition [fileName]] ) |
|
1238 |
; (where fileName and condition are optional) |
|
1239 |
; |
|
1240 |
'. |
|
1241 |
||
1242 |
s nextPutAll:'classes'; tab. |
|
4074 | 1243 |
|
1244 |
coll := self classInfo. |
|
4769 | 1245 |
coll size = 0 ifTrue:[ |
1246 |
s nextPutLine:'#()'. |
|
1247 |
] ifFalse:[ |
|
1248 |
s nextPutLine:'#( \'. |
|
1249 |
"/ find the longest className (for layout only) |
|
1250 |
||
1251 |
maxLen := coll inject:0 into:[:maxSoFar :aClassInfo | |
|
1252 |
|clsName| |
|
1253 |
||
1254 |
clsName := aClassInfo className. |
|
1255 |
maxSoFar max:clsName storeString size |
|
1256 |
]. |
|
1257 |
||
1258 |
coll do:[:aClassInfo | |
|
1259 |
|clsName fileName cond| |
|
1260 |
||
1261 |
clsName := aClassInfo className. |
|
1262 |
fileName := aClassInfo classFileName. |
|
1263 |
fileName = (clsName , '.st') ifTrue:[ |
|
1264 |
fileName := nil |
|
1265 |
]. |
|
1266 |
cond := (aClassInfo conditionForInclusion) ? #always. |
|
1267 |
s tab. s nextPutAll:'( '; |
|
1268 |
nextPutAll:(clsName storeString paddedTo:maxLen). |
|
1269 |
(cond ~~ #always or:[fileName notNil]) ifTrue:[ |
|
1270 |
s tab; nextPutAll:cond storeString. |
|
1271 |
]. |
|
1272 |
fileName notNil ifTrue:[ |
|
1273 |
s tab; nextPutAll:fileName storeString. |
|
1274 |
]. |
|
1275 |
s nextPutLine:') \'. |
|
4124 | 1276 |
]. |
4769 | 1277 |
s nextPutLine:')'. |
4124 | 1278 |
]. |
4769 | 1279 |
|
1280 |
s nextPutAll:' |
|
1281 |
; |
|
1282 |
; methods (patches & extensions): |
|
1283 |
; (for each method, one line of the form: ( #''className'' #''methodName'' ) |
|
1284 |
; (for metaclasses, #''name class'' is used) |
|
1285 |
; |
|
1286 |
'. |
|
1287 |
||
1288 |
s nextPutAll:'methods'; tab. |
|
1289 |
||
1290 |
coll := self methodInfo. |
|
1291 |
coll size = 0 ifTrue:[ |
|
1292 |
s nextPutLine:'#()'. |
|
1293 |
] ifFalse:[ |
|
1294 |
s nextPutLine:'#( \'. |
|
1295 |
"/ find the longest className (for layout only) |
|
1296 |
||
1297 |
maxLen := coll inject:0 into:[:maxSoFar :aMethodInfo | |
|
1298 |
|clsName| |
|
1299 |
||
1300 |
clsName := aMethodInfo className. |
|
1301 |
maxSoFar max:clsName storeString size |
|
1302 |
]. |
|
1303 |
||
1304 |
coll do:[:aMethodInfo | |
|
1305 |
|clsName mthdName fileName cond| |
|
1306 |
||
1307 |
clsName := aMethodInfo className. |
|
1308 |
mthdName := aMethodInfo methodName. |
|
1309 |
s tab. s nextPutAll:'( '; |
|
1310 |
nextPutAll:(clsName storeString paddedTo:maxLen); |
|
1311 |
tab; nextPutAll:mthdName storeString. |
|
1312 |
s nextPutLine:') \'. |
|
1313 |
]. |
|
1314 |
s nextPutLine:')'. |
|
1315 |
]. |
|
1316 |
||
1317 |
methodsFile := properties at:#methodsFile ifAbsent:nil. |
|
1318 |
methodsFile notNil ifTrue:[ |
|
1319 |
s cr; nextPutLine:';'; nextPutLine:'; methods above are stored in:'; nextPutLine:';'. |
|
1320 |
s nextPutLine:';'. |
|
1321 |
s nextPutAll:'methodsFile'; tab; nextPutLine:'''' , methodsFile , ''''. |
|
1322 |
]. |
|
1323 |
||
1324 |
s nextPutAll:' |
|
1325 |
; |
|
1326 |
; files (for deployment): |
|
1327 |
; |
|
1328 |
'. |
|
4314 | 1329 |
|
4124 | 1330 |
s nextPutAll:'files'; tab. |
1331 |
coll := properties at:#'files' ifAbsent:#(). |
|
4769 | 1332 |
coll size = 0 ifTrue:[ |
1333 |
s nextPutLine:'#()'. |
|
1334 |
] ifFalse:[ |
|
1335 |
s nextPutLine:'#( \'. |
|
1336 |
coll do:[:aFileEntry | |
|
1337 |
s tab. s nextPutAll:(aFileEntry storeString); nextPutLine:' \'. |
|
1338 |
]. |
|
1339 |
s nextPutLine:')'. |
|
4124 | 1340 |
]. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1341 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1342 |
" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1343 |
Project current saveOn:Transcript |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1344 |
" |
4124 | 1345 |
|
1346 |
"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
|
1347 |
! ! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1348 |
|
2 | 1349 |
!Project methodsFor:'maintenance'! |
1350 |
||
13 | 1351 |
buildProject |
4097 | 1352 |
"invoke 'make' in the project directory" |
1353 |
||
13 | 1354 |
OperatingSystem executeCommand:('cd ' , self directory , ' ; make') |
1355 |
! |
|
1356 |
||
4097 | 1357 |
createLoadAllFile |
1358 |
"creates a 'loadAll' file, which will load all classes |
|
1359 |
of the project - this loadAll file is supposed to be located |
|
1360 |
in the projects source directory." |
|
1361 |
||
4785 | 1362 |
|d f out in topName classes classInfo numBad firstBad msg methodsFile| |
4097 | 1363 |
|
1364 |
classes := self classes. |
|
1365 |
numBad := 0. |
|
1366 |
firstBad := nil. |
|
1367 |
||
1368 |
classes := classes collect:[:clsOrSymbol | |cls| |
|
1369 |
clsOrSymbol isSymbol ifTrue:[ |
|
1370 |
cls := Smalltalk at:clsOrSymbol. |
|
1371 |
cls isNil ifTrue:[ |
|
1372 |
numBad := numBad + 1. |
|
1373 |
firstBad := firstBad ? clsOrSymbol. |
|
1374 |
] ifFalse:[ |
|
1375 |
cls isLoaded ifFalse:[ |
|
1376 |
cls autoLoad. |
|
1377 |
cls isLoaded ifFalse:[ |
|
1378 |
cls := nil |
|
1379 |
] |
|
1380 |
]. |
|
1381 |
]. |
|
1382 |
cls. |
|
1383 |
] ifFalse:[ |
|
1384 |
clsOrSymbol |
|
1385 |
] |
|
1386 |
]. |
|
4785 | 1387 |
|
4097 | 1388 |
numBad ~~ 0 ifTrue:[ |
1389 |
msg := 'Cannot generate ''loadAll''-file.\\'. |
|
1390 |
msg := msg , 'Reason: Class ''' , firstBad asText allBold |
|
1391 |
, ''' is not loaded.'. |
|
1392 |
numBad ~~ 1 ifTrue:[ |
|
1393 |
msg := msg , '\(' , (numBad-1) printString , ' more unloaded classes were found)' |
|
1394 |
]. |
|
1395 |
self warn:msg withCRs. |
|
1396 |
^ self. |
|
1397 |
]. |
|
1398 |
||
4785 | 1399 |
"/ to not list private classes |
1400 |
classes := classes select:[:cls | cls owningClass isNil]. |
|
4097 | 1401 |
classes := classes copy topologicalSort:[:a :b | b isSubclassOf:a]. |
1402 |
||
1403 |
Transcript showCR:'creating loadAll file'. |
|
1404 |
||
1405 |
d := directoryName asFilename. |
|
1406 |
f := d construct:'loadAll'. |
|
1407 |
f exists ifTrue:[ |
|
1408 |
f renameTo:(d construct:'loadAll.bak') |
|
1409 |
]. |
|
1410 |
out := f writeStream. |
|
1411 |
out isNil ifTrue:[ |
|
1412 |
self warn:'cannot create loadAll'. |
|
1413 |
(d construct:'loadAll.bak') renameTo:f. |
|
1414 |
^ self |
|
1415 |
]. |
|
1416 |
||
4776 | 1417 |
out nextPutAll:'"/ |
4779 | 1418 |
"/ $' , 'Header' , '$ |
4776 | 1419 |
"/ |
4785 | 1420 |
"/ loadAll-file to fileIn code for: ' , self package , ' |
4776 | 1421 |
"/ |
1422 |
"/ Automatically generated from project definition. |
|
4786 | 1423 |
"/ DO NOT MODIFY THIS fILE; |
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
1424 |
"/ modify the .prj file instead, and regenerate this file |
4786 | 1425 |
"/ with the ProjectBrowser tool. |
4776 | 1426 |
"/ |
1427 |
||
1428 |
"/ |
|
1429 |
"/ Prerequisites: |
|
1430 |
"/ |
|
4785 | 1431 |
"/ Smalltalk loadPackage:''module:directory''. |
1432 |
"/ Smalltalk loadPackage:''....''. |
|
1433 |
"/ Smalltalk loadPackage:''....''. |
|
1434 |
!! |
|
4776 | 1435 |
|
1436 |
"{ package:''' , self package , ''' }"!! |
|
1437 |
||
4097 | 1438 |
|files| |
1439 |
||
4785 | 1440 |
''loading package ' , self package , ' ...'' infoPrintCR. |
4776 | 1441 |
|
4097 | 1442 |
files := #( |
1443 |
'. |
|
1444 |
||
1445 |
classes do:[:cls | |
|
4776 | 1446 |
out nextPutAll:' '''. |
4097 | 1447 |
cls nameWithoutNameSpacePrefix printOn:out. |
1448 |
out nextPutAll:'.st'''. |
|
1449 |
out cr. |
|
1450 |
]. |
|
4785 | 1451 |
(methodsFile := self propertyAt:#methodsFile) notNil ifTrue:[ |
1452 |
out |
|
1453 |
nextPutAll:' '''; |
|
1454 |
nextPutAll:methodsFile; |
|
1455 |
nextPutAll:''''. |
|
1456 |
]. |
|
4097 | 1457 |
|
4776 | 1458 |
out nextPutAll:') asOrderedCollection. |
1459 |
||
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
1460 |
(Smalltalk loadClassLibraryIfAbsent:''' , self libraryName , ''') ifTrue:[ |
4776 | 1461 |
|handle loaded| |
1462 |
||
4785 | 1463 |
handle := ObjectFileLoader loadedObjectHandles |
1464 |
detect:[:h | h package = ''' , self package , '''] ifNone:nil. |
|
4776 | 1465 |
handle ifNotNil:[ |
1466 |
loaded := Set new:(handle classes size). |
|
1467 |
handle classes do:[:c| c isMeta ifFalse:[loaded add:c classFilename]]. |
|
4785 | 1468 |
'. |
1469 |
methodsFile notNil ifTrue:[ |
|
1470 |
out nextPutAll: |
|
1471 |
' loaded add:''' , methodsFile , '''.'. |
|
1472 |
]. |
|
1473 |
out nextPutAll:' |
|
4776 | 1474 |
files := files asOrderedCollection select:[:f| (loaded includes:f) not]. |
1475 |
]. |
|
1476 |
]. |
|
4097 | 1477 |
|
1478 |
files do:[:s | |
|
4785 | 1479 |
''.'' infoPrint. |
4097 | 1480 |
Smalltalk fileIn:s. |
1481 |
]. |
|
4785 | 1482 |
'' '' infoPrintCR. |
1483 |
'' done (' , self package , ').'' infoPrintCR. |
|
4097 | 1484 |
'. |
1485 |
||
1486 |
out close |
|
1487 |
! |
|
1488 |
||
2 | 1489 |
createMakefile |
4779 | 1490 |
"creates an initial Makefile from a Make.proto file. |
1491 |
Requires the stmkmf script" |
|
1492 |
||
1493 |
|d top| |
|
2 | 1494 |
|
1420 | 1495 |
Transcript showCR:'creating Makefile'. |
13 | 1496 |
|
4779 | 1497 |
d := directoryName asFilename pathName. |
1498 |
top := (d , '/' , (self findTopFrom:directoryName)) asFilename pathName. |
|
1499 |
||
1500 |
(OperatingSystem |
|
1501 |
executeCommand:('sh ' , top , '/rules/stmkmf') |
|
1502 |
inDirectory:d) ifFalse:[ |
|
1503 |
self warn:'Could not execute stmkmf - no Makefile built.' |
|
13 | 1504 |
]. |
4779 | 1505 |
|
2 | 1506 |
! |
1507 |
||
617 | 1508 |
createProjectFiles |
1509 |
"actually, creates all files to do a make in the project directory" |
|
1510 |
||
1511 |
directoryName asFilename exists ifFalse:[ |
|
4097 | 1512 |
(self confirm:'create new projectDirectory: ' , directoryName) |
1513 |
ifFalse:[^ self]. |
|
1514 |
OperatingSystem recursiveCreateDirectory:directoryName. |
|
617 | 1515 |
]. |
1516 |
self createMakefile. |
|
1517 |
self createSourcefiles. |
|
1518 |
self createProtoMakefile. |
|
4097 | 1519 |
(self propertyAt:#deliverLoadAllFile) == true ifTrue:[ |
1520 |
self createLoadAllFile |
|
1521 |
]. |
|
617 | 1522 |
! |
1523 |
||
2 | 1524 |
createProtoMakefile |
1525 |
"creates a Make.proto file" |
|
1526 |
||
362 | 1527 |
|d f s type appName libName startUpClass startUpSelector |
4785 | 1528 |
topName classes numBad firstBad msg methodsFile| |
4779 | 1529 |
|
1530 |
classes := self classes. |
|
1531 |
numBad := 0. |
|
1532 |
firstBad := nil. |
|
1533 |
||
1534 |
classes := classes collect:[:clsOrSymbol | |cls| |
|
1535 |
clsOrSymbol isSymbol ifTrue:[ |
|
1536 |
cls := Smalltalk at:clsOrSymbol. |
|
1537 |
cls isNil ifTrue:[ |
|
1538 |
numBad := numBad + 1. |
|
1539 |
firstBad := firstBad ? clsOrSymbol. |
|
1540 |
] ifFalse:[ |
|
1541 |
cls isLoaded ifFalse:[ |
|
1542 |
cls autoLoad. |
|
1543 |
cls isLoaded ifFalse:[ |
|
1544 |
cls := nil |
|
1545 |
] |
|
1546 |
]. |
|
1547 |
]. |
|
1548 |
cls. |
|
1549 |
] ifFalse:[ |
|
1550 |
clsOrSymbol |
|
1551 |
] |
|
1552 |
]. |
|
1553 |
numBad ~~ 0 ifTrue:[ |
|
1554 |
msg := 'Cannot generate ''Make.proto''-file.\\'. |
|
1555 |
msg := msg , 'Reason: Class ''' , firstBad asText allBold |
|
1556 |
, ''' is not loaded.'. |
|
1557 |
numBad ~~ 1 ifTrue:[ |
|
1558 |
msg := msg , '\(' , (numBad-1) printString , ' more unloaded classes were found)' |
|
1559 |
]. |
|
1560 |
self warn:msg withCRs. |
|
1561 |
^ self. |
|
1562 |
]. |
|
1563 |
||
4785 | 1564 |
"/ to not list private classes |
1565 |
classes := classes select:[:cls | cls owningClass isNil]. |
|
4779 | 1566 |
classes := classes copy topologicalSort:[:a :b | b isSubclassOf:a]. |
2 | 1567 |
|
362 | 1568 |
topName := self findTopFrom:directoryName. |
2 | 1569 |
|
4779 | 1570 |
|
1420 | 1571 |
Transcript showCR:'creating Make.proto'. |
13 | 1572 |
|
356 | 1573 |
d := directoryName asFilename. |
2 | 1574 |
f := d construct:'Make.proto'. |
1575 |
f exists ifTrue:[ |
|
1420 | 1576 |
f renameTo:(d construct:'Make.proto.bak') |
2 | 1577 |
]. |
1578 |
s := f writeStream. |
|
13 | 1579 |
s isNil ifTrue:[ |
1420 | 1580 |
self warn:'cannot create prototype Makefile'. |
1581 |
^ self |
|
13 | 1582 |
]. |
4779 | 1583 |
s nextPutAll:'# $' , 'Header' , '$ |
362 | 1584 |
# |
4779 | 1585 |
# -- Make.proto created from project at ' , Smalltalk timeStamp , ' |
2 | 1586 |
# |
4786 | 1587 |
# Warning: YOU SHOULD NOT MODIFY THIS FILE - MODIFY THE .prj FILE INSTEAD |
1588 |
# and let the ProjectBrowser recreate this file. |
|
1589 |
# once you modify this file, do not rerun |
|
4779 | 1590 |
# stmkmp or recreate the Make.proto again - otherwise, your changes are lost. |
1591 |
||
1592 |
# module and directory-in-module; |
|
1593 |
# these should correspond to the directory hierarchy |
|
1594 |
# location (otherwise, ST/X will have a hard time to |
|
1595 |
# find out the packages location from its packageID) |
|
1596 |
MODULE=' , self repositoryModule ? 'unknown' , ' |
|
1597 |
MODULE_DIR=' , self repositoryDirectory ? 'unknown' , ' |
|
1598 |
||
1599 |
# default installation directory: |
|
1600 |
# (overwrite with ''make INSTALLTOP_DIR=... install'') |
|
1601 |
# the INSTALLBASE is imported from configurations... and usually |
|
1602 |
# defaults to something like /opt/smalltalk. |
|
1603 |
# (overwrite with ''make INSTALLBASE=... install'') |
|
1604 |
INSTALLTOP_DIR=$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR) |
|
1605 |
INSTALLLIB_DIR=$(INSTALLTOP_DIR) |
|
1606 |
INSTALLBIN_DIR=$(INSTALLTOP_DIR) |
|
362 | 1607 |
|
1608 |
# |
|
4779 | 1609 |
# position (of this package) in directory hierarchy: |
1610 |
# (must point to ST/X top directory, for tools and includes) |
|
1611 |
TOP=' , topName ,' |
|
1612 |
||
1613 |
# subdirectories where targets are to be made: |
|
362 | 1614 |
SUBDIRS= |
1615 |
||
4779 | 1616 |
# subdirectories where Makefiles are to be made: |
1617 |
# (only define if different from SUBDIRS) |
|
1618 |
# ALLSUBDIRS= |
|
1619 |
||
1620 |
||
1621 |
# the name of your classLibrary: |
|
1622 |
# ********** REQUIRED: CHECK the next line *** |
|
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
1623 |
LIBNAME=' , self libraryName , ' |
4779 | 1624 |
|
1625 |
||
1626 |
# the next define suppresses installation of |
|
1627 |
# the classes as autoloaded (i.e. not added to abbrev.stc). |
|
1628 |
SUPPRESS_LOCAL_ABBREVS=1 |
|
1629 |
||
1630 |
# the package is stored as an ID in classes and methods |
|
1631 |
# to identify code belonging to this project. |
|
1632 |
# It also specifies the position in the source repository |
|
1633 |
# and directory tree, when packages are loaded by packageID. |
|
1634 |
# ********** REQUIRED: CHECK the next line *** |
|
1635 |
PACKAGE=$(MODULE):$(MODULE_DIR) |
|
1636 |
||
1637 |
# Argument(s) to the stc compiler. |
|
1638 |
# -H. : create header files locally |
|
1639 |
# (if removed, they will be created as common |
|
1640 |
# -Pxxx : defines the package |
|
1641 |
# -Zxxx : a prefix for variables within the classLib |
|
1642 |
# -Dxxx : defines passed to to CC for inline C-code |
|
1643 |
# -Ixxx : include path passed to CC for inline C-code |
|
1644 |
# +optspace : optimized for space |
|
1645 |
# +optspace2 : optimized more for space |
|
1646 |
# +optspace3 : optimized even more for space |
|
1647 |
# +optinline : generate inline code for some ST constructs |
|
1648 |
# +inlineNew : additionally inline new |
|
1649 |
# +inlineMath : additionally inline some floatPnt math stuff |
|
362 | 1650 |
# |
4779 | 1651 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
1652 |
# STCLOCALOPTIMIZATIONS=+optinline +inlineNew |
|
1653 |
# STCLOCALOPTIMIZATIONS=+optspace3 |
|
1654 |
STCLOCALOPTIMIZATIONS=+optspace3 |
|
1655 |
||
1656 |
# Argument(s) to the stc compiler. |
|
1657 |
# -warn : no warnings |
|
1658 |
# -warnNonStandard : no warnings about ST/X extensions |
|
1659 |
# -warnEOLComments : no warnings about EOL comment extension |
|
1660 |
# -warnPrivacy : no warnings about privateClass extension |
|
362 | 1661 |
# |
4779 | 1662 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
1663 |
# STCWARNINGS=-warn |
|
1664 |
# STCWARNINGS=-warnNonStandard |
|
1665 |
# STCWARNINGS=-warnEOLComments |
|
1666 |
STCWARNINGS= |
|
1667 |
||
1668 |
# if your embedded C code requires any system includes, |
|
1669 |
# add the path(es) here:, |
|
1670 |
# ********** OPTIONAL: MODIFY the next lines *** |
|
1671 |
# LOCALINCLUDES=-Ifoo -Ibar |
|
1672 |
LOCALINCLUDES= |
|
1673 |
||
1674 |
# if you need any additional defines for embedded C code, |
|
1675 |
# add them here:, |
|
1676 |
# ********** OPTIONAL: MODIFY the next lines *** |
|
1677 |
# LOCALDEFINES=-Dfoo -Dbar -DDEBUG |
|
1678 |
LOCALDEFINES= |
|
1679 |
||
1680 |
STCLOCALOPT=-I. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALINCLUDES) $(LOCALDEFINES) -H. ''-P$(PACKAGE)'' ''-Z$(LIBNAME)'' $(COMMONSYMFLAG) $(INITCODESEPFLAG) |
|
1681 |
||
1682 |
# ********** OPTIONAL: MODIFY the next line *** |
|
1683 |
# additional C-libraries that should be pre-linked with the class-objects |
|
1684 |
LD_OBJ_LIBS= |
|
1685 |
||
1686 |
# ********** OPTIONAL: MODIFY the next line *** |
|
1687 |
# additional C targets or libraries should be added below |
|
1688 |
LOCAL_EXTRA_TARGETS= |
|
1689 |
||
1690 |
all:: preMake classLibRule postMake |
|
1691 |
||
2 | 1692 |
|
1693 |
'. |
|
1694 |
||
4779 | 1695 |
"/ type := #library. |
1696 |
"/ appName := 'app'. |
|
1697 |
"/ libName := 'lib'. |
|
1698 |
"/ startUpClass := 'Smalltalk'. |
|
1699 |
"/ startUpSelector := 'start'. |
|
1700 |
"/ |
|
1701 |
"/ properties notNil ifTrue:[ |
|
1702 |
"/ type := properties at:#projectType ifAbsent:type. |
|
1703 |
"/ appName := properties at:#applicationName ifAbsent:appName. |
|
1704 |
"/ startUpClass := properties at:#startupClass ifAbsent:startUpClass. |
|
1705 |
"/ startUpSelector := properties at:#startupSelector ifAbsent:startUpSelector. |
|
1706 |
"/ ]. |
|
1707 |
"/ |
|
1708 |
"/ s nextPutAll:'# |
|
1709 |
"/# define the name of the library to create |
|
1710 |
"/# |
|
1711 |
"/'. |
|
1712 |
"/ s nextPutAll:'LIBNAME=lib' , appName; cr; cr. |
|
1713 |
"/ |
|
1714 |
"/ s nextPutAll:'# |
|
1715 |
"/# the target rule: |
|
1716 |
"/# |
|
1717 |
"/all:: abbrev.stc objs genClassList $(OBJTARGET) |
|
1718 |
"/ |
|
1719 |
"/'. |
|
1720 |
"/ |
|
1721 |
"/ type == #executable ifTrue:[ |
|
1722 |
"/ s nextPutAll:'PROGS = ' , appName; cr. |
|
1723 |
"/ s nextPutAll:('STARTUP_CLASS=' , startUpClass); cr. |
|
1724 |
"/ s nextPutAll:'STARTUP_SELECTOR="' , startUpSelector; nextPutAll:'"'; cr. |
|
1725 |
"/ ]. |
|
1726 |
"/ |
|
1727 |
"/ s nextPutAll:'# |
|
1728 |
"/# define the object files that are to be created |
|
1729 |
"/# |
|
1730 |
"/'. |
|
1731 |
s nextPutAll:'OBJS='. |
|
1732 |
||
1733 |
classes do:[:aClass | |
|
1734 |
|abbrev| |
|
1735 |
||
1736 |
s nextPutAll:' \'. s cr. |
|
1737 |
abbrev := Smalltalk fileNameForClass:aClass name. |
|
1738 |
s nextPutAll:' '; nextPutAll:abbrev; nextPutAll:'.$(O)'. |
|
2 | 1739 |
]. |
4785 | 1740 |
(methodsFile := self propertyAt:#methodsFile) notNil ifTrue:[ |
1741 |
s nextPutAll:' \'. s cr. |
|
1742 |
s nextPutAll:' '; |
|
1743 |
nextPutAll:(methodsFile asFilename withoutSuffix baseName); |
|
1744 |
nextPutAll:'.$(O)'. |
|
1745 |
]. |
|
4779 | 1746 |
s cr. |
1747 |
||
1748 |
s nextPutAll:' |
|
1749 |
# add more install actions here |
|
1750 |
install:: |
|
1751 |
||
1752 |
# add more install actions for aux-files (resources) here |
|
1753 |
installAux:: |
|
1754 |
||
1755 |
# add more preMake actions here |
|
1756 |
preMake:: |
|
1757 |
||
1758 |
# add more postMake actions here |
|
1759 |
postMake:: cleanjunk |
|
1760 |
||
1761 |
cleanjunk:: |
|
1762 |
||
1763 |
clean:: |
|
1764 |
' , Character tab , '-rm -f *.o *.H |
|
1765 |
||
1766 |
clobber:: |
|
1767 |
' , Character tab , '-rm -f *.so *.dll |
|
1768 |
||
1769 |
$(INSTALLBASE):: |
|
1770 |
' , Character tab , '@test -d $@ || mkdir $@ |
|
1771 |
||
1772 |
$(INSTALLBASE)/packages:: $(INSTALLBASE) |
|
1773 |
' , Character tab , '@test -d $@ || mkdir $@ |
|
1774 |
||
1775 |
$(INSTALLBASE)/packages/$(MODULE):: $(INSTALLBASE)/packages |
|
1776 |
' , Character tab , '@test -d $@ || mkdir $@ |
|
1777 |
||
1778 |
$(INSTALLBASE)/packages/$(MODULE)/osi:: $(INSTALLBASE)/packages/$(MODULE) |
|
1779 |
' , Character tab , '@test -d $@ || mkdir $@ |
|
1780 |
||
1781 |
$(INSTALLBASE)/packages/$(MODULE)/osi/asn1:: $(INSTALLBASE)/packages/$(MODULE)/osi |
|
1782 |
' , Character tab , '@test -d $@ || mkdir $@ |
|
1783 |
||
1784 |
$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR):: $(INSTALLBASE)/packages/$(MODULE) |
|
1785 |
' , Character tab , '@test -d $@ || mkdir $@ |
|
1786 |
||
1787 |
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it |
|
362 | 1788 |
'. |
4779 | 1789 |
"/ classes notNil ifTrue:[ |
1790 |
"/ classes do:[:aClass | |
|
1791 |
"/ |abbrev| |
|
1792 |
"/ |
|
1793 |
"/ abbrev := Smalltalk fileNameForClass:aClass name. |
|
1794 |
"/ s nextPutAll:abbrev; nextPutAll:'.$(O): '. |
|
1795 |
"/ s nextPutAll:abbrev; nextPutAll:'.st '. |
|
1796 |
"/ aClass allSuperclassesDo:[:superClass| |
|
1797 |
"/ s nextPutAll:(Smalltalk fileNameForClass:superClass name) , '.$(H) '. |
|
1798 |
"/ ]. |
|
1799 |
"/ s nextPutAll:'$(STCHDR)'; cr. |
|
1800 |
"/ ]. |
|
1801 |
"/ ]. |
|
1802 |
s nextPutAll:'# ENDMAKEDEPEND --- do not remove this line'. |
|
362 | 1803 |
s cr; cr. |
2 | 1804 |
|
1805 |
type == #executable ifTrue:[ |
|
1420 | 1806 |
s nextPutAll:'all:: $(PROGS)'; cr. |
2 | 1807 |
|
1420 | 1808 |
s nextPutAll:appName. |
1809 |
s nextPutAll:':: main.o classList.o $(OBJS)'; cr. |
|
1810 |
s tab; nextPutAll:'$(LD) $(ST_LDFLAG) $(LDFLAGS) -o '; |
|
1811 |
nextPutAll:appName; |
|
1812 |
nextPutAll:' \'; cr. |
|
1813 |
s tab; tab; nextPutAll:'$(CRT0) main.$(O) classList.$(O) $(OBJS) $(EXTRA_OBJ) $(LIBOBJS) \'; cr. |
|
1814 |
s tab; tab; nextPutAll:'$(LIBRUNDIR)/hidata.o $(LIBRUN) \'; cr. |
|
1815 |
s tab; tab; nextPutAll:'$(MATHLIB) $(EXTRALIBS) -lXext $(SYSLIBS) $(OTHERLIBS) $(CRTN)'; cr. |
|
2 | 1816 |
]. |
1817 |
||
1818 |
s close |
|
1420 | 1819 |
|
4069 | 1820 |
"Modified: / 23.3.1999 / 14:20:09 / cg" |
617 | 1821 |
! |
1822 |
||
1823 |
createSourcefiles |
|
1824 |
"creates all Smalltalk-source files in the project directory" |
|
1825 |
||
1826 |
|classes methods methodClasses dir stream| |
|
1827 |
||
2956
952a09bdeed1
Use Filename instead of obsolete FileDirectory
Stefan Vogel <sv@exept.de>
parents:
2907
diff
changeset
|
1828 |
dir := self directory asFilename. |
1420 | 1829 |
Transcript showCR:'creating sources in ' , dir pathName , ' ...'; endEntry. |
617 | 1830 |
|
1831 |
classes := self classes. |
|
1832 |
classes isNil ifTrue:[ |
|
1420 | 1833 |
self warn:'no classes in current project' |
617 | 1834 |
]. |
1835 |
||
1836 |
classes notNil ifTrue:[ |
|
1420 | 1837 |
classes do:[:aClass | |
1838 |
aClass isLoaded ifFalse:[ |
|
1839 |
aClass autoload. |
|
1840 |
]. |
|
1841 |
]. |
|
4785 | 1842 |
"/ to not list private classes |
1843 |
classes := classes select:[:cls | cls owningClass isNil]. |
|
1420 | 1844 |
classes := classes topologicalSort:[:a :b | a isSubclassOf:b]. |
617 | 1845 |
|
1420 | 1846 |
classes do:[:aClass | |
1847 |
Transcript show:' ... '; showCR:aClass name, '.st'; endEntry. |
|
1848 |
aClass fileOutIn:dir |
|
1849 |
] |
|
617 | 1850 |
]. |
1851 |
||
1852 |
methods := self individualMethods. |
|
1853 |
methods notNil ifTrue:[ |
|
1420 | 1854 |
methods := methods asIdentitySet. |
1855 |
" |
|
1856 |
get classes ... |
|
1857 |
" |
|
1858 |
methodClasses := IdentitySet new. |
|
1859 |
methods do:[:m | |
|
1860 |
|mCls| |
|
617 | 1861 |
|
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
1862 |
mCls := m containingClass. |
1420 | 1863 |
mCls isMeta ifTrue:[ |
1864 |
mCls := mCls soleInstance. |
|
1865 |
]. |
|
1866 |
methodClasses add:mCls]. |
|
1867 |
" |
|
1868 |
fileOut by class |
|
1869 |
" |
|
1870 |
methodClasses do:[:cls | |
|
1871 |
stream := (self directory asFilename construct:(cls name , '.chg')) writeStream. |
|
617 | 1872 |
|
1420 | 1873 |
Transcript show:' ... '; showCR:cls name, '.chg'; endEntry. |
1874 |
methods do:[:m | |
|
1875 |
|mCls| |
|
617 | 1876 |
|
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
1877 |
mCls := m containingClass. |
1420 | 1878 |
(mCls == cls or:[mCls == cls class]) ifTrue:[ |
1879 |
mCls fileOutMethod:m on:stream. |
|
1880 |
]. |
|
1881 |
stream cr. |
|
1882 |
]. |
|
1883 |
stream close. |
|
1884 |
]. |
|
617 | 1885 |
]. |
1420 | 1886 |
|
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
1887 |
"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
|
1888 |
"Modified: 18.9.1997 / 18:50:34 / stefan" |
617 | 1889 |
! |
1890 |
||
1891 |
findTopFrom:directoryName |
|
1892 |
"returns the relative path from directoryName to the TOP |
|
1893 |
directory." |
|
1894 |
||
1895 |
|topName relParent foundTop| |
|
1896 |
||
1897 |
"/ find TOP |
|
1898 |
relParent := '..'. |
|
1899 |
foundTop := false. |
|
1900 |
[foundTop] whileFalse:[ |
|
4779 | 1901 |
topName := directoryName asFilename construct:relParent. |
1902 |
topName isRootDirectory ifTrue:[ |
|
1903 |
self warn:'could not find TOP; assume absoulte path to TOP'. |
|
1904 |
^ nil. |
|
1905 |
"/ topName := '/usr/local/lib/smalltalk'. |
|
1906 |
"/ foundTop := true. |
|
1907 |
] ifFalse:[ |
|
1908 |
((topName construct:'stx') construct:'configurations') exists ifTrue:[ |
|
1909 |
((topName construct:'stx') construct:'include') exists ifTrue:[ |
|
1910 |
^ relParent , '/stx'. |
|
1911 |
] |
|
1912 |
]. |
|
1913 |
(topName construct:'configurations') exists ifTrue:[ |
|
1914 |
(topName construct:'include') exists ifTrue:[ |
|
1915 |
^ relParent |
|
1916 |
] |
|
1917 |
]. |
|
1918 |
relParent := relParent , '/..' |
|
1919 |
] |
|
617 | 1920 |
]. |
4779 | 1921 |
^ topName pathName |
617 | 1922 |
! ! |
1923 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1924 |
!Project methodsFor:'printing & storing'! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1925 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1926 |
displayString |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1927 |
^ super displayString , '(''' , (name ? '<unnamed>') , ''')' |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1928 |
! ! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1929 |
|
617 | 1930 |
!Project methodsFor:'properties'! |
1931 |
||
4097 | 1932 |
addClass:classOrClassName classFileName:fileName |
1933 |
"add a class to the project" |
|
1934 |
||
1935 |
self |
|
1936 |
addClass:classOrClassName |
|
1937 |
conditionForInclusion:#always |
|
1938 |
classFileName:fileName |
|
1939 |
||
1940 |
! |
|
1941 |
||
1942 |
addClass:classOrClassName conditionForInclusion:conditionBlock classFileName:fileName |
|
1943 |
"add a class to the project" |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1944 |
|
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
1945 |
|i clsName| |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
1946 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
1947 |
(clsName := classOrClassName) isBehavior ifTrue:[ |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
1948 |
clsName := classOrClassName name |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
1949 |
]. |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1950 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1951 |
i := ClassInfo new. |
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
1952 |
i className:clsName. |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1953 |
i classFileName:fileName. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1954 |
i conditionForInclusion:conditionBlock. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1955 |
self addClassInfo:i |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1956 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1957 |
|
4089 | 1958 |
addClassInfo:newInfo |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1959 |
"add a class info to the project" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1960 |
|
4315 | 1961 |
|infoCollection index nm prefix| |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1962 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1963 |
(infoCollection := self classInfo) isNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1964 |
self classInfo:(infoCollection := OrderedCollection new). |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1965 |
]. |
4315 | 1966 |
|
1967 |
index := infoCollection findFirst:[:i | |nm1 nm2| |
|
1968 |
nm1 := i className. |
|
1969 |
nm2 := newInfo className. |
|
1970 |
nm1 = nm2 |
|
1971 |
]. |
|
4089 | 1972 |
index ~~ 0 ifTrue:[ |
1973 |
infoCollection at:index put:newInfo |
|
1974 |
] ifFalse:[ |
|
1975 |
infoCollection add:newInfo |
|
1976 |
] |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1977 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1978 |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1979 |
addMethod:methodName inClass:classOrClassName conditionForInclusion:condition fileName:optionalFileName |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1980 |
"add a method to the project" |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1981 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1982 |
|i| |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1983 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1984 |
i := MethodInfo new. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1985 |
i className:classOrClassName. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1986 |
i methodName:methodName. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1987 |
i fileName:optionalFileName. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1988 |
i conditionForInclusion:condition. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1989 |
self addMethodInfo:i |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1990 |
! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
1991 |
|
4668 | 1992 |
addMethod:methodOrSelector inClass:aClassOrClassName fileName:fileName |
1993 |
"add an individual method to the project" |
|
1994 |
||
1995 |
|i| |
|
1996 |
||
1997 |
i := MethodInfo new. |
|
1998 |
i methodName:methodOrSelector. |
|
1999 |
i className:aClassOrClassName. |
|
2000 |
i fileName:fileName. |
|
2001 |
self addMethodInfo:i |
|
2002 |
! |
|
2003 |
||
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2004 |
addMethodInfo:newInfo |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2005 |
"add a method info to the project" |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2006 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2007 |
|infoCollection index nm prefix| |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2008 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2009 |
(infoCollection := self methodInfo) isNil ifTrue:[ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2010 |
self methodInfo:(infoCollection := OrderedCollection new). |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2011 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2012 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2013 |
index := infoCollection findFirst:[:i | |cnm1 cnm2| |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2014 |
cnm1 := i className. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2015 |
cnm2 := newInfo className. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2016 |
(cnm1 includes:$:) ifFalse:[ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2017 |
cnm1 := self defaultNameSpace name , '::' , cnm1 |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2018 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2019 |
(cnm2 includes:$:) ifFalse:[ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2020 |
cnm2 := self defaultNameSpace name , '::' , cnm2 |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2021 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2022 |
cnm1 = cnm2 and:[i methodName = newInfo methodName] |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2023 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2024 |
"/ 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
|
2025 |
"/ the default ... |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2026 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2027 |
nm := newInfo className. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2028 |
prefix := self defaultNameSpace name , '::'. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2029 |
(nm startsWith:prefix) ifTrue:[ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2030 |
nm := nm copyFrom:(prefix size + 1). |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2031 |
newInfo className:nm asSymbol. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2032 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2033 |
index ~~ 0 ifTrue:[ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2034 |
infoCollection at:index put:newInfo |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2035 |
] ifFalse:[ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2036 |
infoCollection add:newInfo |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2037 |
] |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2038 |
! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2039 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2040 |
classInfo:aClassInfoCollection |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2041 |
"set the class info of the project" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2042 |
|
4071 | 2043 |
self propertyAt:#classInfo put:aClassInfoCollection |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2044 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2045 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2046 |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
2047 |
comment |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
2048 |
"return the comment of the project" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
2049 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
2050 |
properties isNil ifTrue:[^ '']. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
2051 |
^ properties at:#comment ifAbsent:'' |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
2052 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
2053 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
2054 |
comment:aString |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
2055 |
"set the projects comment" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
2056 |
|
4071 | 2057 |
self propertyAt:#comment put:aString |
4070 | 2058 |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
2059 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
2060 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2061 |
documentationURL |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2062 |
"return the documentation-URL of the project" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2063 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2064 |
properties isNil ifTrue:[^ nil]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2065 |
^ properties at:#documentationURL ifAbsent:nil |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2066 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2067 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2068 |
documentationURL:anURLString |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2069 |
"set the projects documentation-URL" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2070 |
|
4071 | 2071 |
self propertyAt:#documentationURL put:anURLString |
2072 |
||
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2073 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2074 |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2075 |
methodInfo:aMethodInfoCollection |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2076 |
"set the method info of the project" |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2077 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2078 |
self propertyAt:#methodInfo put:aMethodInfoCollection |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2079 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2080 |
! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2081 |
|
617 | 2082 |
properties |
4097 | 2083 |
"return the property dictionary" |
2084 |
||
617 | 2085 |
^ properties |
2086 |
! |
|
2087 |
||
2088 |
properties:p |
|
4097 | 2089 |
"set the property dictionary" |
2090 |
||
617 | 2091 |
properties := p |
2092 |
! |
|
2093 |
||
4071 | 2094 |
propertyAt:aKey |
4097 | 2095 |
"return a property; the key is a symbol" |
2096 |
||
4071 | 2097 |
properties isNil ifTrue:[^ nil]. |
2098 |
^ properties at:aKey ifAbsent:nil. |
|
2099 |
! |
|
2100 |
||
2101 |
propertyAt:aKey put:aValue |
|
4097 | 2102 |
"set a property; the key is a symbol" |
2103 |
||
4077 | 2104 |
|oldValue| |
2105 |
||
2106 |
oldValue := self propertyAt:aKey. |
|
2107 |
||
4071 | 2108 |
properties isNil ifTrue:[ |
2109 |
properties := IdentityDictionary new |
|
2110 |
]. |
|
2111 |
properties at:aKey put:aValue. |
|
4077 | 2112 |
|
2113 |
oldValue ~~ aValue ifTrue:[ |
|
2114 |
self changed:aKey. |
|
2115 |
]. |
|
4071 | 2116 |
|
2117 |
"Created: / 23.3.1999 / 14:21:11 / cg" |
|
2118 |
! |
|
2119 |
||
617 | 2120 |
type |
4097 | 2121 |
"return the type of project (one of #application, #library, #smalltalk)" |
617 | 2122 |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
2123 |
properties isNil ifTrue:[^ #application]. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
2124 |
^ properties at:#type ifAbsent:#application |
617 | 2125 |
! |
2126 |
||
2127 |
type:aSymbol |
|
4097 | 2128 |
"set the projects type (one of #application, #library, #smalltalk)" |
617 | 2129 |
|
4769 | 2130 |
|sym| |
2131 |
||
2132 |
(sym := aSymbol) == #classLibrary ifTrue:[ |
|
2133 |
sym := #library |
|
2134 |
]. |
|
2135 |
(#(application library extension smalltalk) includes:sym) ifFalse:[ |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
2136 |
self warn:'invalid project type'. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
2137 |
^ self |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
2138 |
]. |
4769 | 2139 |
self propertyAt:#type put:sym |
4069 | 2140 |
! |
2141 |
||
2142 |
wasLoadedFromFile |
|
2143 |
"return true, if the project was loaded from a file" |
|
2144 |
||
2145 |
properties isNil ifTrue:[^ nil]. |
|
2146 |
^ properties at:#wasLoadedFromFile ifAbsent:false |
|
2147 |
||
2148 |
"Modified: / 23.3.1999 / 13:59:32 / cg" |
|
2149 |
"Created: / 23.3.1999 / 14:21:06 / cg" |
|
2150 |
! |
|
2151 |
||
2152 |
wasLoadedFromFile:aBoolean |
|
4097 | 2153 |
"set/clear the flag stating that the project was loaded from a file" |
2154 |
||
4071 | 2155 |
self propertyAt:#wasLoadedFromFile put:aBoolean |
617 | 2156 |
! ! |
2157 |
||
2158 |
!Project methodsFor:'queries'! |
|
2159 |
||
4688 | 2160 |
areAllClassesLoaded |
2161 |
"return true, if all classes of the package are loaded |
|
2162 |
(i.e. there are no autoloaded stubs present)" |
|
2163 |
||
4690 | 2164 |
|classes| |
2165 |
||
2166 |
classes := self classes. |
|
2167 |
classes isNil ifTrue:[^ isLoaded ? false]. |
|
2168 |
classes do:[:aClass | |
|
4688 | 2169 |
aClass isLoaded ifFalse:[^ false]. |
2170 |
]. |
|
2171 |
^ true |
|
2172 |
||
2173 |
! |
|
2174 |
||
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2175 |
classInfo |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2176 |
"return a classInfo collection of classes belonging to that project" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2177 |
|
4073 | 2178 |
|classInfo classes| |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2179 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2180 |
properties notNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2181 |
classInfo := properties at:#classInfo ifAbsent:nil. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2182 |
classInfo notNil ifTrue:[^ classInfo]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2183 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2184 |
|
4073 | 2185 |
classes := self classes. |
2186 |
classes size == 0 ifTrue:[ |
|
2187 |
classInfo := OrderedCollection new |
|
2188 |
] ifFalse:[ |
|
2189 |
classInfo := classes asOrderedCollection |
|
2190 |
collect:[:class | |
|
2191 |
|i fn| |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2192 |
|
4073 | 2193 |
i := ClassInfo new. |
2194 |
i conditionForInclusion:#always. |
|
2195 |
i className:class name. |
|
2196 |
fn := class classFilename ? ((Smalltalk fileNameForClass:class) , '.st'). |
|
2197 |
i classFileName:fn. |
|
2198 |
i |
|
2199 |
] |
|
2200 |
]. |
|
2201 |
self propertyAt:#classInfo put:classInfo. |
|
2202 |
^ classInfo |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2203 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2204 |
"Modified: 4.1.1997 / 16:51:18 / cg" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2205 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2206 |
|
4789
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
2207 |
classInfoFor:aClassOrClassName |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
2208 |
"return a classInfo for a particular class" |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
2209 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
2210 |
|classInfo clsName index| |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
2211 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
2212 |
(classInfo := self classInfo) isNil ifTrue:[^ nil]. |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
2213 |
(clsName := aClassOrClassName) isBehavior ifTrue:[ |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
2214 |
clsName := aClassOrClassName name |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
2215 |
]. |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
2216 |
^ classInfo detect:[:i | i className = clsName] ifNone:nil. |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
2217 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
2218 |
|
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
2219 |
"Modified: 4.1.1997 / 16:51:18 / cg" |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
2220 |
! |
72a61dc595ad
loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents:
4787
diff
changeset
|
2221 |
|
617 | 2222 |
classes |
4013
f06d31702f2a
ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents:
4010
diff
changeset
|
2223 |
"return a collection of classes belonging to that project. |
f06d31702f2a
ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents:
4010
diff
changeset
|
2224 |
This excludes any private classes." |
617 | 2225 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2226 |
|classes classInfo| |
617 | 2227 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2228 |
properties notNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2229 |
classInfo := properties at:#classInfo ifAbsent:nil. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2230 |
classInfo notNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2231 |
classes := classInfo collect:[:i | i className] |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2232 |
] ifFalse:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2233 |
classes := properties at:#classes ifAbsent:nil |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2234 |
] |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2235 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2236 |
|
617 | 2237 |
classes isNil ifTrue:[ |
2056 | 2238 |
classes := OrderedCollection new. |
2239 |
Smalltalk |
|
4013
f06d31702f2a
ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents:
4010
diff
changeset
|
2240 |
allClassesDo:[:aClass | |
4670 | 2241 |
(true "aClass owningClass isNil" |
4089 | 2242 |
and:[aClass isMeta not |
4670 | 2243 |
and:[aClass package = packageName |
2244 |
and:[aClass isNamespace not or:[aClass == Smalltalk]]]]) ifTrue:[ |
|
4089 | 2245 |
classes add:aClass |
2056 | 2246 |
] |
2247 |
]. |
|
2248 |
classes isEmpty ifTrue:[^ nil]. |
|
617 | 2249 |
]. |
2250 |
^ classes |
|
2251 |
||
2056 | 2252 |
"Modified: 4.1.1997 / 16:51:18 / cg" |
617 | 2253 |
! |
2254 |
||
2255 |
individualMethods |
|
2256 |
"return a collection of individual methods belonging to that project, |
|
2257 |
only methods are returned which are not contained in the |
|
2258 |
projects class set." |
|
2259 |
||
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2260 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2261 |
"/ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2262 |
"/ obsoleted by #methods ... |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2263 |
"/ |
617 | 2264 |
|classes methods| |
2265 |
||
2266 |
classes := self classes. |
|
2267 |
classes notNil ifTrue:[ |
|
1461
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
2268 |
classes := classes asIdentitySet. |
617 | 2269 |
] ifFalse:[ |
1461
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
2270 |
classes := #() |
617 | 2271 |
]. |
2272 |
||
2273 |
methods := IdentitySet new. |
|
2274 |
Smalltalk allBehaviorsDo:[:cls | |
|
4119 | 2275 |
|classToCheck| |
2276 |
||
2277 |
classToCheck := cls. |
|
4670 | 2278 |
"/ cls isPrivate ifTrue:[ |
2279 |
"/ classToCheck := cls topOwningClass |
|
2280 |
"/ ]. |
|
4119 | 2281 |
(classes isNil |
2282 |
or:[((classes includes:classToCheck) |
|
2283 |
or:[classes includes:classToCheck name]) not]) ifTrue:[ |
|
1461
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
2284 |
cls methodDictionary do:[:m | |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
2285 |
m package = packageName ifTrue:[ |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
2286 |
methods add:m |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
2287 |
] |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
2288 |
]. |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
2289 |
cls class methodDictionary do:[:m | |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
2290 |
m package = packageName ifTrue:[ |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
2291 |
methods add:m |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
2292 |
] |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
2293 |
]. |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
2294 |
] |
617 | 2295 |
]. |
2296 |
^ methods asArray |
|
2297 |
||
2298 |
" |
|
2299 |
Project current classes |
|
2300 |
Project current individualMethods |
|
2301 |
" |
|
1461
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
2302 |
|
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
2303 |
"Modified: 7.6.1996 / 09:16:25 / stefan" |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
2304 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
2305 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
2306 |
isLoaded |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
2307 |
"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
|
2308 |
into the system" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
2309 |
|
4769 | 2310 |
|binaryModule cls| |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
2311 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
2312 |
isLoaded notNil ifTrue:[^ isLoaded]. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
2313 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
2314 |
"/ check for loaded class-libraries. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
2315 |
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
|
2316 |
binaryModule notNil ifTrue:[ |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
2317 |
^ true |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
2318 |
]. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
2319 |
|
4769 | 2320 |
"/ check for all classes ... |
2321 |
self classes do:[:aClassOrClassName | |
|
2322 |
aClassOrClassName isBehavior ifFalse:[ |
|
2323 |
aClassOrClassName isSymbol ifTrue:[ |
|
2324 |
(cls := Smalltalk at:aClassOrClassName) isNil ifTrue:[ |
|
2325 |
^ false |
|
2326 |
]. |
|
2327 |
cls isBehavior ifFalse:[^ false]. |
|
2328 |
cls isLoaded ifFalse:[^ false]. |
|
2329 |
] ifFalse:[ |
|
2330 |
self halt. |
|
2331 |
^ false |
|
2332 |
] |
|
2333 |
] |
|
2334 |
]. |
|
2335 |
||
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
2336 |
self halt. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
2337 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
2338 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
2339 |
(Project projectWithId:#'stx:libbasic') isLoaded |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
2340 |
(Project projectWithId:#'stx:goodies/persistency') isLoaded |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
2341 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
2342 |
|
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2343 |
! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2344 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2345 |
methodInfo |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2346 |
"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
|
2347 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2348 |
|methodInfo methods| |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2349 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2350 |
properties notNil ifTrue:[ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2351 |
methodInfo := properties at:#methodInfo ifAbsent:nil. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2352 |
methodInfo notNil ifTrue:[^ methodInfo]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2353 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2354 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2355 |
methods := self methods. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2356 |
methods size == 0 ifTrue:[ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2357 |
methodInfo := OrderedCollection new |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2358 |
] ifFalse:[ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2359 |
methodInfo := methods asOrderedCollection |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2360 |
collect:[:mthd | |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2361 |
|i fn who className selector| |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2362 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2363 |
mthd isMethod ifTrue:[ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2364 |
who := mthd who. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2365 |
className := who methodClass name. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2366 |
selector := who methodSelector. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2367 |
i := MethodInfo new. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2368 |
i conditionForInclusion:#always. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2369 |
i className:className. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2370 |
i methodName:className. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2371 |
fn := mthd sourceFilename. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2372 |
i fileName:fn. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2373 |
i |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2374 |
] ifFalse:[ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2375 |
mthd "/ already a methodInfo |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2376 |
] |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2377 |
] |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2378 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2379 |
self propertyAt:#methodInfo put:methodInfo. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2380 |
^ methodInfo |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2381 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2382 |
"Modified: 4.1.1997 / 16:51:18 / cg" |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2383 |
! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2384 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2385 |
methods |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2386 |
"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
|
2387 |
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
|
2388 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2389 |
|methods methodsInfo| |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2390 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2391 |
properties notNil ifTrue:[ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2392 |
methodsInfo := properties at:#methodsInfo ifAbsent:nil. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2393 |
methodsInfo notNil ifTrue:[ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2394 |
methods := methodsInfo collect:[:i | i className] |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2395 |
] ifFalse:[ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2396 |
methods := properties at:#methods ifAbsent:nil |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2397 |
] |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2398 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2399 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2400 |
methods isNil ifTrue:[ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2401 |
methods := OrderedCollection new. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2402 |
Smalltalk allClassesDo:[:aClass | |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2403 |
(true "aClass owningClass isNil" |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2404 |
and:[aClass isMeta not |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2405 |
and:[aClass package ~= packageName |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2406 |
and:[aClass isNamespace not or:[aClass == Smalltalk]]]]) ifTrue:[ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2407 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2408 |
aClass methodDictionary keysAndValuesDo:[:sel :mthd | |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2409 |
mthd package = packageName ifTrue:[ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2410 |
methods add:(MethodInfo new |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2411 |
className:aClass name; |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2412 |
methodName:sel; |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2413 |
yourself) |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2414 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2415 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2416 |
aClass class methodDictionary keysAndValuesDo:[:sel :mthd | |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2417 |
mthd package = packageName ifTrue:[ |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2418 |
methods add:(MethodInfo new |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2419 |
className:(aClass name , ' class'); |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2420 |
methodName:sel; |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2421 |
yourself) |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2422 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2423 |
] |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2424 |
] |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2425 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2426 |
methods isEmpty ifTrue:[^ #()]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2427 |
]. |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2428 |
^ methods |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2429 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2430 |
"Modified: 4.1.1997 / 16:51:18 / cg" |
2 | 2431 |
! ! |
2432 |
||
2433 |
!Project methodsFor:'specifications'! |
|
2434 |
||
2435 |
readSpec |
|
2436 |
|s chunk fileName| |
|
2437 |
||
2438 |
fileName := (properties at:#directoryName) asFilename construct:'.project'. |
|
2439 |
s := fileName readStream. |
|
2440 |
s isNil ifTrue:[^ self]. |
|
2441 |
[s atEnd] whileFalse:[ |
|
203 | 2442 |
chunk := s nextChunk. |
2443 |
Compiler evaluate:chunk receiver:properties notifying:nil |
|
2 | 2444 |
]. |
2445 |
s close. |
|
2446 |
||
2447 |
"(Project new directory:'../projects/Clock') readSpec" |
|
2448 |
! |
|
2449 |
||
2450 |
saveSpec |
|
2451 |
|f d s| |
|
2452 |
||
2453 |
d := (properties at:#directoryName) asFilename. |
|
2454 |
d exists ifFalse:[ |
|
4522
29a6625dc7b1
error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents:
4315
diff
changeset
|
2455 |
self error:'directory does not exist' mayProceed:true. |
29a6625dc7b1
error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents:
4315
diff
changeset
|
2456 |
^ self |
2 | 2457 |
]. |
2458 |
f := d construct:'.project'. |
|
2459 |
s := f writeStream. |
|
2460 |
s isNil ifTrue:[^ self]. |
|
2461 |
properties associationsDo:[:aProp | |
|
4522
29a6625dc7b1
error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents:
4315
diff
changeset
|
2462 |
(aProp == #directoryName) ifFalse:[ |
29a6625dc7b1
error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents:
4315
diff
changeset
|
2463 |
s nextChunkPut:('self at:' , aProp key storeString, |
29a6625dc7b1
error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents:
4315
diff
changeset
|
2464 |
' put:' , aProp value storeString). |
29a6625dc7b1
error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents:
4315
diff
changeset
|
2465 |
s cr |
29a6625dc7b1
error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents:
4315
diff
changeset
|
2466 |
] |
2 | 2467 |
]. |
2468 |
s close |
|
2469 |
||
2470 |
"((Project new directory:'../projects/Clock') readSpec |
|
4522
29a6625dc7b1
error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents:
4315
diff
changeset
|
2471 |
directory:'../projects/xxx') saveSpec" |
2 | 2472 |
! ! |
2473 |
||
617 | 2474 |
!Project methodsFor:'views'! |
2475 |
||
2476 |
addView:aView |
|
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
2477 |
"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
|
2478 |
|
617 | 2479 |
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
|
2480 |
|
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
2481 |
"Modified: 14.2.1997 / 15:36:51 / cg" |
617 | 2482 |
! |
2483 |
||
2484 |
destroyViews |
|
2485 |
"destroy all views of this project" |
|
2486 |
||
2487 |
views notNil ifTrue:[ |
|
2488 |
views do:[:aView | |
|
2489 |
aView notNil ifTrue:[aView destroy] |
|
2490 |
] |
|
2491 |
]. |
|
2492 |
! |
|
2493 |
||
2494 |
hideViews |
|
2495 |
"hide all views of this project" |
|
2496 |
||
2497 |
views notNil ifTrue:[ |
|
1332
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
2498 |
views do:[:aView | |
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
2499 |
aView notNil ifTrue:[aView unmap] |
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
2500 |
] |
617 | 2501 |
]. |
1332
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
2502 |
|
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
2503 |
"Modified: 3.5.1996 / 23:48:51 / stefan" |
617 | 2504 |
! |
2505 |
||
2506 |
removeView:aView |
|
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
2507 |
"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
|
2508 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2509 |
views notNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2510 |
views remove:aView ifAbsent:nil |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2511 |
] |
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
2512 |
|
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
2513 |
"Modified: 14.2.1997 / 15:37:20 / cg" |
617 | 2514 |
! |
2515 |
||
2516 |
showViews |
|
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
2517 |
"show all views of this project" |
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
2518 |
|
617 | 2519 |
views notNil ifTrue:[ |
1332
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
2520 |
views do:[:aView | |
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
2521 |
aView notNil ifTrue:[aView remap] |
1332
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
2522 |
] |
617 | 2523 |
]. |
1332
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
2524 |
|
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
2525 |
"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
|
2526 |
"Modified: 14.2.1997 / 15:38:47 / cg" |
617 | 2527 |
! ! |
2528 |
||
4769 | 2529 |
!Project::ClassInfo methodsFor:'accessing'! |
2530 |
||
2531 |
classFileName |
|
2532 |
"return the value of the instance variable 'classFileName' (automatically generated)" |
|
2533 |
||
2534 |
^ classFileName! |
|
2535 |
||
2536 |
classFileName:something |
|
2537 |
"set the value of the instance variable 'classFileName' (automatically generated)" |
|
2538 |
||
2539 |
classFileName := something.! |
|
2540 |
||
2541 |
className |
|
2542 |
"return the value of the instance variable 'className' (automatically generated)" |
|
2543 |
||
2544 |
^ className! |
|
2545 |
||
2546 |
className:something |
|
2547 |
"set the value of the instance variable 'className' (automatically generated)" |
|
2548 |
||
2549 |
className := something.! |
|
2550 |
||
2551 |
conditionForInclusion |
|
2552 |
"return the value of the instance variable 'conditionForInclusion' (automatically generated)" |
|
2553 |
||
2554 |
^ conditionForInclusion! |
|
2555 |
||
2556 |
conditionForInclusion:something |
|
2557 |
"set the value of the instance variable 'conditionForInclusion' (automatically generated)" |
|
2558 |
||
2559 |
conditionForInclusion := something.! ! |
|
2560 |
||
2561 |
!Project::ClassInfo methodsFor:'printing & storing'! |
|
2562 |
||
2563 |
displayString |
|
2564 |
^ 'ClassInfo: ' , className |
|
2565 |
! ! |
|
2566 |
||
4743 | 2567 |
!Project::MethodInfo methodsFor:'accessing'! |
2568 |
||
2569 |
className |
|
2570 |
"return the value of the instance variable 'className' (automatically generated)" |
|
2571 |
||
2572 |
^ className! |
|
2573 |
||
2574 |
className:something |
|
2575 |
"set the value of the instance variable 'className' (automatically generated)" |
|
2576 |
||
2577 |
className := something.! |
|
2578 |
||
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2579 |
conditionForInclusion |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2580 |
"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
|
2581 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2582 |
^ conditionForInclusion! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2583 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2584 |
conditionForInclusion:something |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2585 |
"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
|
2586 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2587 |
conditionForInclusion := something.! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2588 |
|
4743 | 2589 |
fileName |
2590 |
"return the value of the instance variable 'fileName' (automatically generated)" |
|
2591 |
||
2592 |
^ fileName! |
|
2593 |
||
2594 |
fileName:something |
|
2595 |
"set the value of the instance variable 'fileName' (automatically generated)" |
|
2596 |
||
2597 |
fileName := something.! |
|
2598 |
||
2599 |
methodName |
|
2600 |
"return the value of the instance variable 'methodName' (automatically generated)" |
|
2601 |
||
2602 |
^ methodName! |
|
2603 |
||
2604 |
methodName:something |
|
2605 |
"set the value of the instance variable 'methodName' (automatically generated)" |
|
2606 |
||
2607 |
methodName := something.! ! |
|
2608 |
||
4755
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2609 |
!Project::MethodInfo methodsFor:'printing & storing'! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2610 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2611 |
displayString |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2612 |
^ 'MethodInfo: ' , className , ' ' , methodName |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2613 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2614 |
|
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2615 |
! ! |
2d866f87d1da
preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents:
4747
diff
changeset
|
2616 |
|
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
2617 |
!Project class methodsFor:'documentation'! |
630 | 2618 |
|
2619 |
version |
|
4790 | 2620 |
^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.104 1999-09-22 16:26:29 cg Exp $' |
1298 | 2621 |
! ! |
1 | 2622 |
Project initialize! |