author | Claus Gittinger <cg@exept.de> |
Wed, 15 Sep 1999 09:04:48 +0200 | |
changeset 4727 | ec580e5f9b22 |
parent 4726 | 5c5e1c7f8933 |
child 4743 | 11f9e45976cb |
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 |
||
4721
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
23 |
Object subclass:#ClassInfo |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
24 |
instanceVariableNames:'conditionForInclusion className classFileName' |
4668 | 25 |
classVariableNames:'' |
26 |
poolDictionaries:'' |
|
27 |
privateIn:Project |
|
28 |
! |
|
29 |
||
4721
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
30 |
Object subclass:#MethodInfo |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
31 |
instanceVariableNames:'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 |
|
105 |
packages := IdentitySet new. |
|
106 |
||
107 |
AllProjects isNil ifTrue:[ |
|
108 |
AllProjects := OrderedCollection new. |
|
109 |
] ifFalse:[ |
|
4726 | 110 |
AllProjects do:[:p | packages add:p package asSymbol]. |
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. |
|
119 |
(packages includes:packageID) ifFalse:[ |
|
120 |
packages add:packageID. |
|
121 |
||
122 |
"/ a new one ... |
|
123 |
||
124 |
prj := self new. |
|
4726 | 125 |
prj package:packageID. |
4668 | 126 |
prj directory:'???'. |
127 |
prj repositoryModule:'unknown'. |
|
128 |
prj repositoryDirectory:'unknown'. |
|
129 |
||
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
130 |
nm := 'unknown'. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
131 |
|
4668 | 132 |
pkgInfo := aClass packageSourceCodeInfo. |
133 |
pkgInfo notNil ifTrue:[ |
|
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
134 |
module := pkgInfo at:#module ifAbsent:nil. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
135 |
module notNil ifTrue:[ |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
136 |
prj repositoryModule:module |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
137 |
]. |
4668 | 138 |
dir := pkgInfo at:#directory ifAbsent:nil. |
139 |
dir notNil ifTrue:[ |
|
140 |
prj directory:dir |
|
141 |
]. |
|
142 |
lib := pkgInfo at:#library ifAbsent:nil. |
|
143 |
lib notNil ifTrue:[ |
|
144 |
prj type:#library. |
|
145 |
]. |
|
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
146 |
prj isLoaded:true. |
4668 | 147 |
]. |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
148 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
149 |
nm := (module ? 'unknown') |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
150 |
, ':' |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
151 |
, (dir ? (lib ? 'unknown')). |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
152 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
153 |
prj name:nm. |
4668 | 154 |
AllProjects add:prj. |
155 |
]. |
|
156 |
]. |
|
157 |
]. |
|
158 |
]. |
|
159 |
Method allSubInstancesDo:[:aMethod | |
|
160 |
|packageID prj who mthdClass| |
|
161 |
||
162 |
packageID := aMethod package asSymbol. |
|
4721
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
163 |
(packages includes:packageID) ifFalse:[ |
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 |
packages add:packageID. |
4668 | 167 |
|
4721
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
168 |
"/ a new one ... |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
169 |
prj := self new. |
4668 | 170 |
"/ prj name:libName. |
4721
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
171 |
prj package:packageID. |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
172 |
prj type:#library. |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
173 |
prj directory:'???'. |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
174 |
prj repositoryModule:'stx'. |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
175 |
prj repositoryDirectory:'???'. |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
176 |
prj isLoaded:true. |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
177 |
AllProjects add:prj. |
4668 | 178 |
] |
179 |
] |
|
180 |
]. |
|
181 |
self changed:#allProjects |
|
182 |
||
4066 | 183 |
"/ |stx p| |
184 |
"/ |
|
185 |
"/ stx := self new name:'stx'. |
|
186 |
"/ stx packageName:'noPackage'. |
|
187 |
"/ stx changeSet:nil. |
|
188 |
"/ stx type:#smalltalk. |
|
189 |
"/ stx comment:'The ST/X project itself'. |
|
190 |
"/ |
|
191 |
"/ AllProjects add:stx. |
|
192 |
"/ |
|
193 |
"/ #( |
|
194 |
"/ ('libbasic' #'stx:libbasic' 'Basic (non-GUI) classes. Required for all applications') |
|
195 |
"/ ('libbasic2' #'stx:libbasic2' 'More basic (non-GUI) classes. Required for most applications') |
|
196 |
"/ ('libbasic3' #'stx:libbasic3' 'More basic (non-GUI) classes. Required for development') |
|
197 |
"/ ('libcomp' #'stx:libcomp' 'The bytecode compiler. Required for all applications') |
|
198 |
"/ ('libview' #'stx:libview' 'Low level GUI classes. Required for all GUI applications') |
|
199 |
"/ ('libview2' #'stx:libview2' 'Additional low level GUI classes. Required for most GUI applications') |
|
200 |
"/ ('libwidg' #'stx:libwidg' 'Basic widgets. Required for all GUI applications') |
|
201 |
"/ ('libwidg2' #'stx:libwidg2' 'More widgets. Required for most GUI applications') |
|
202 |
"/ ('libwidg3' #'stx:libwidg3' 'More (fun) widgets. Seldom required') |
|
203 |
"/ ('libtool' #'stx:libtool' 'Development applications. Required for program development') |
|
204 |
"/ ('libtool2' #'stx:libtool2' 'More development applications. Required for GUI development') |
|
205 |
"/ ('libui' #'stx:libui' 'UI spec classes. Required for UIPainter applications') |
|
206 |
"/ ('libhtml' #'stx:libhtml' 'HTML related classes. Required for Web applications and the HTML browser') |
|
207 |
"/ ('libodbc' #'stx:libodbc' 'ODBC interface classes.') |
|
208 |
"/ ('libopengl' #'stx:libopengl' 'OpenGL interface classes.') |
|
209 |
"/ ('persistency' #'stx:goodies/persistency' 'Simple DB interface') |
|
210 |
"/ ('goodies' #'stx:goodies' 'Misc goodies - not really maintained') |
|
211 |
"/ ) do:[:entry | |
|
212 |
"/ |libName package comment| |
|
213 |
"/ |
|
214 |
"/ libName := entry at:1. |
|
215 |
"/ package := entry at:2. |
|
216 |
"/ comment := entry at:3. |
|
217 |
"/ |
|
218 |
"/ p := self new name:libName. |
|
219 |
"/ p packageName:package. |
|
220 |
"/ p type:#library. |
|
221 |
"/ p comment:comment. |
|
222 |
"/ stx addSubProject:p. |
|
223 |
"/ ]. |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
224 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
225 |
" |
4668 | 226 |
AllProjects := nil. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
227 |
self initKnownProjects |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
228 |
" |
4069 | 229 |
|
230 |
"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
|
231 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
232 |
|
236 | 233 |
initialize |
338 | 234 |
SystemProject isNil ifTrue:[ |
2028 | 235 |
NextSequential := 1. |
236 |
SystemProject := self new name:'default'. |
|
4726 | 237 |
SystemProject package:'private'. |
2028 | 238 |
SystemProject defaultNameSpace:Smalltalk. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
239 |
SystemProject comment:'A default (dummy) project. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
240 |
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
|
241 |
|
2028 | 242 |
" |
243 |
the SystemProject does not keep a record if changes, |
|
244 |
but instead depends on the changes file - recording anything there. |
|
245 |
" |
|
246 |
SystemProject changeSet:nil. |
|
338 | 247 |
]. |
248 |
||
249 |
CurrentProject := SystemProject. |
|
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
250 |
AllProjects := nil. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
251 |
"/ now done lazy ... |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
252 |
"/ self initKnownProjects. |
236 | 253 |
|
315 | 254 |
" |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
255 |
SystemProject := nil. |
315 | 256 |
Project initialize |
257 |
" |
|
236 | 258 |
! ! |
259 |
||
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
260 |
!Project class methodsFor:'instance creation'! |
236 | 261 |
|
262 |
new |
|
263 |
^ self basicNew initialize |
|
264 |
! ! |
|
265 |
||
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
266 |
!Project class methodsFor:'accessing'! |
1 | 267 |
|
4071 | 268 |
addKnownProject:aProject |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
269 |
|allProjects| |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
270 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
271 |
allProjects := self knownProjects. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
272 |
(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
|
273 |
self warn:'Project for ' , aProject package , ' is already present.'. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
274 |
^ self. |
4071 | 275 |
]. |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
276 |
|
4071 | 277 |
AllProjects add:aProject. |
278 |
self changed:#allProjects |
|
279 |
! |
|
280 |
||
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
281 |
addLoadedProject:aProject |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
282 |
aProject isLoaded:true. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
283 |
self addKnownProject:aProject. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
284 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
285 |
|
1 | 286 |
current |
10 | 287 |
"return the currently active project" |
288 |
||
1 | 289 |
^ CurrentProject |
290 |
||
362 | 291 |
" |
292 |
Project current |
|
293 |
" |
|
1 | 294 |
! |
295 |
||
296 |
current:aProject |
|
10 | 297 |
"set the currently active project" |
298 |
||
315 | 299 |
CurrentProject := aProject. |
300 |
self changed:#currentProject |
|
334 | 301 |
! |
302 |
||
617 | 303 |
currentPackageName |
304 |
CurrentProject notNil ifTrue:[ |
|
4726 | 305 |
^ CurrentProject package |
617 | 306 |
]. |
4112
5ee841c34b10
return nil (instead of 'no package') if no current package is defined.
Claus Gittinger <cg@exept.de>
parents:
4099
diff
changeset
|
307 |
^ nil |
617 | 308 |
|
309 |
" |
|
310 |
Project currentPackageName |
|
311 |
" |
|
312 |
! |
|
313 |
||
336 | 314 |
defaultProject |
315 |
"return the SystemDefault project" |
|
316 |
||
317 |
^ SystemProject. |
|
318 |
! |
|
319 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
320 |
knownProjects |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
321 |
AllProjects isNil ifTrue:[ |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
322 |
self initKnownProjects |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
323 |
]. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
324 |
^ AllProjects ? #() |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
325 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
326 |
|
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
327 |
loadedProjects |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
328 |
^ self knownProjects select:[:p | p isLoaded] |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
329 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
330 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
331 |
projectNamed:aProjectName |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
332 |
"retrieve the named project; return nil if not known" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
333 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
334 |
^ self knownProjects detect:[:p | p name = aProjectName] ifNone:nil. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
335 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
336 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
337 |
Project projectNamed:'libbasic' |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
338 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
339 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
340 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
341 |
projectWithId:aPackageId |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
342 |
"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
|
343 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
344 |
^ self knownProjects detect:[:p | p package = aPackageId] ifNone:nil. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
345 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
346 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
347 |
Project projectWithId:#'stx:libbasic' |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
348 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
349 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
350 |
|
334 | 351 |
setDefaultProject |
352 |
"set the currently active project to be the SystemDEfault project" |
|
353 |
||
354 |
self current:SystemProject. |
|
939
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
355 |
! |
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
356 |
|
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
357 |
setProject:aProjectOrNil |
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
358 |
"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
|
359 |
|
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
360 |
CurrentProject := aProjectOrNil. |
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
361 |
|
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
362 |
"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
|
363 |
"Modified: 7.2.1996 / 14:01:16 / cg" |
1 | 364 |
! ! |
365 |
||
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
366 |
!Project class methodsFor:'changes management'! |
149 | 367 |
|
664 | 368 |
addClassDefinitionChangeFor:aClass |
1115 | 369 |
"add a class-def-change for aClass to the current project" |
370 |
||
664 | 371 |
|p c| |
372 |
||
373 |
p := CurrentProject. |
|
374 |
(p notNil |
|
375 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
|
666
6d4175de8c55
fixed primitiveDefinitions changes
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
376 |
c addClassDefinitionChangeFor:aClass |
664 | 377 |
] |
378 |
||
379 |
"Created: 3.12.1995 / 13:44:58 / cg" |
|
380 |
"Modified: 3.12.1995 / 13:58:04 / cg" |
|
381 |
! |
|
382 |
||
617 | 383 |
addMethodCategoryChange:aMethod category:newCategory in:aClass |
1115 | 384 |
"add a method-category-change for aMethod in aClass to the current project" |
385 |
||
617 | 386 |
|p c| |
387 |
||
388 |
p := CurrentProject. |
|
389 |
(p notNil |
|
390 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
|
391 |
c addMethodCategoryChange:aMethod category:newCategory in:aClass |
|
392 |
] |
|
393 |
! |
|
394 |
||
149 | 395 |
addMethodChange:aMethod in:aClass |
1115 | 396 |
"add a method change in aClass to the current project" |
149 | 397 |
|
235 | 398 |
|p c| |
149 | 399 |
|
400 |
p := CurrentProject. |
|
401 |
(p notNil |
|
235 | 402 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
403 |
c addMethodChange:aMethod in:aClass |
|
203 | 404 |
] |
405 |
! |
|
406 |
||
617 | 407 |
addMethodPrivacyChange:aMethod in:aClass |
1115 | 408 |
"add a privacy change for aMethod in aClass to the current project" |
409 |
||
617 | 410 |
|p c| |
411 |
||
412 |
p := CurrentProject. |
|
413 |
(p notNil |
|
414 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
|
415 |
c addMethodPrivacyChange:aMethod in:aClass |
|
416 |
] |
|
417 |
||
418 |
"Modified: 27.8.1995 / 22:48:17 / claus" |
|
419 |
! |
|
420 |
||
705 | 421 |
addPrimitiveDefinitionsChangeFor:aClass |
1115 | 422 |
"add a primitiveDef change for aClass to the current project" |
423 |
||
705 | 424 |
|p c| |
425 |
||
426 |
p := CurrentProject. |
|
427 |
(p notNil |
|
428 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
|
429 |
c addPrimitiveDefinitionsChangeFor:aClass |
|
430 |
] |
|
431 |
! |
|
432 |
||
433 |
addPrimitiveFunctionsChangeFor:aClass |
|
1115 | 434 |
"add a primitiveFuncs change for aClass to the current project" |
435 |
||
705 | 436 |
|p c| |
437 |
||
438 |
p := CurrentProject. |
|
439 |
(p notNil |
|
440 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
|
441 |
c addPrimitiveFunctionsChangeFor:aClass |
|
442 |
] |
|
443 |
! |
|
444 |
||
445 |
addPrimitiveVariablesChangeFor:aClass |
|
1115 | 446 |
"add a primitiveVars change for aClass to the current project" |
447 |
||
705 | 448 |
|p c| |
449 |
||
450 |
p := CurrentProject. |
|
451 |
(p notNil |
|
452 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
|
453 |
c addPrimitiveVariablesChangeFor:aClass |
|
454 |
] |
|
455 |
! |
|
456 |
||
3288
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
457 |
addRemoveSelectorChange:aSelector in:aClass |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
458 |
"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
|
459 |
|
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
460 |
|p c| |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
461 |
|
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
462 |
p := CurrentProject. |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
463 |
(p notNil |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
464 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
465 |
c addRemoveSelectorChange:aSelector in:aClass |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
466 |
] |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
467 |
|
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
468 |
"Created: / 16.2.1998 / 12:45:10 / cg" |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
469 |
! |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
470 |
|
149 | 471 |
currentProjectDirectory |
472 |
"return the name of the directory to use for fileOut. |
|
235 | 473 |
The returned name already includes a file-separator at the end, |
474 |
so the filename can be concatenated to it." |
|
149 | 475 |
|
476 |
|p dirName| |
|
477 |
||
478 |
p := CurrentProject. |
|
479 |
p notNil ifTrue:[ |
|
2907 | 480 |
dirName := p directory |
149 | 481 |
] ifFalse:[ |
2907 | 482 |
dirName := Filename currentDirectory name |
149 | 483 |
]. |
2962 | 484 |
^ dirName |
2907 | 485 |
|
486 |
"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
|
487 |
! |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
488 |
|
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
489 |
rememberOverwrittenMethod:newMethod from:oldMethod |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
490 |
"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
|
491 |
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
|
492 |
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
|
493 |
|
2558 | 494 |
|p| |
2334
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
495 |
|
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
496 |
p := CurrentProject. |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
497 |
(p notNil |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
498 |
and:[p ~~ SystemProject]) ifTrue:[ |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
499 |
p rememberOverwrittenMethod:newMethod from:oldMethod |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
500 |
] ifFalse:[ |
3332
8014b817988b
remove the 'does not remember ...' message.
Claus Gittinger <cg@exept.de>
parents:
3288
diff
changeset
|
501 |
"/ '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
|
502 |
] |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
503 |
|
3332
8014b817988b
remove the 'does not remember ...' message.
Claus Gittinger <cg@exept.de>
parents:
3288
diff
changeset
|
504 |
"Modified: / 7.3.1998 / 13:38:39 / cg" |
13 | 505 |
! ! |
506 |
||
1 | 507 |
!Project methodsFor:'accessing'! |
508 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
509 |
addSubProject:aProject |
4097 | 510 |
"add a subproject - obsolete; we use prerequisites now" |
511 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
512 |
subProjects isNil ifTrue:[ |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
513 |
subProjects := OrderedCollection new. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
514 |
]. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
515 |
subProjects add:aProject |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
516 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
517 |
|
1 | 518 |
changeSet |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
519 |
"return the set of changes made in this project" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
520 |
|
1 | 521 |
^ changeSet |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
522 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
523 |
"Modified: 27.1.1997 / 11:58:36 / cg" |
1 | 524 |
! |
525 |
||
236 | 526 |
changeSet:aChangeSet |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
527 |
"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
|
528 |
the actual changeSet." |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
529 |
|
236 | 530 |
changeSet := aChangeSet |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
531 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
532 |
"Modified: 27.1.1997 / 11:59:02 / cg" |
73 | 533 |
! |
534 |
||
2028 | 535 |
defaultNameSpace |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
536 |
"return the defaultNameSpace of this project. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
537 |
New classes will (if not specified by a directive) be installed |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
538 |
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
|
539 |
overwriting of standard classes." |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
540 |
|
4726 | 541 |
^ (self propertyAt:#defaultNameSpace) ? Smalltalk |
2028 | 542 |
|
543 |
! |
|
544 |
||
545 |
defaultNameSpace:aNamespace |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
546 |
"set the defaultNameSpace of this project. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
547 |
New classes will (if not specified by a directive) be installed |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
548 |
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
|
549 |
overwriting of standard classes." |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
550 |
|
4726 | 551 |
|prevDefault| |
552 |
||
553 |
prevDefault := self defaultNameSpace. |
|
554 |
aNamespace ~~ prevDefault ifTrue:[ |
|
555 |
self propertyAt:#defaultNameSpace put:aNamespace. |
|
4077 | 556 |
self changed:#defaultNameSpace. |
557 |
self == CurrentProject ifTrue:[ |
|
558 |
Project changed:#defaultNameSpace |
|
559 |
] |
|
2032 | 560 |
] |
2028 | 561 |
|
562 |
"Created: 2.1.1997 / 19:54:37 / cg" |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
563 |
"Modified: 27.1.1997 / 12:00:01 / cg" |
2028 | 564 |
! |
565 |
||
315 | 566 |
directory |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
567 |
"return the projects directory. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
568 |
If not specified, a fileOut will be done into that directory" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
569 |
|
315 | 570 |
directoryName isNil ifTrue:[^ '.']. |
571 |
^ directoryName |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
572 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
573 |
"Modified: 27.1.1997 / 12:00:41 / cg" |
315 | 574 |
! |
575 |
||
576 |
directory:aDirectoryName |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
577 |
"set the projects directory. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
578 |
If not specified, a fileOut will be done into that directory" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
579 |
|
315 | 580 |
directoryName := aDirectoryName. |
4070 | 581 |
self changed:#directory. |
315 | 582 |
self == CurrentProject ifTrue:[ |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
583 |
Project changed:#directory |
315 | 584 |
] |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
585 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
586 |
"Modified: 27.1.1997 / 12:00:47 / cg" |
617 | 587 |
! |
356 | 588 |
|
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
589 |
isLoaded:aBoolean |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
590 |
isLoaded := aBoolean |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
591 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
592 |
|
617 | 593 |
name |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
594 |
"return the projects name. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
595 |
This is for the user only - shown in the projectViews label" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
596 |
|
617 | 597 |
^ name |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
598 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
599 |
"Modified: 27.1.1997 / 12:01:16 / cg" |
617 | 600 |
! |
356 | 601 |
|
617 | 602 |
name:aString |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
603 |
"set the projects name. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
604 |
This is for the user only - shown in the projectViews label" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
605 |
|
617 | 606 |
name := aString. |
4070 | 607 |
self changed:#name. |
617 | 608 |
self == CurrentProject ifTrue:[ |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
609 |
Project changed:#name |
617 | 610 |
] |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
611 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
612 |
"Modified: 27.1.1997 / 12:01:09 / cg" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
613 |
! |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
614 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
615 |
overwrittenMethods |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
616 |
"return the set of methods which were overwritten in this project. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
617 |
This information allows uninstalling, by switching back to the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
618 |
original methods." |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
619 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
620 |
^ overwrittenMethods |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
621 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
622 |
"Created: 27.1.1997 / 11:57:21 / cg" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
623 |
"Modified: 27.1.1997 / 12:09:14 / cg" |
356 | 624 |
! |
625 |
||
4668 | 626 |
package |
627 |
"return the projects package identifier. |
|
628 |
This identifier marks all methods and new classes which were created |
|
629 |
in this project." |
|
630 |
||
631 |
^ packageName |
|
632 |
||
633 |
"Modified: 27.1.1997 / 12:10:00 / cg" |
|
634 |
! |
|
635 |
||
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
636 |
package:aPackageId |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
637 |
"set the projects package identifier. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
638 |
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
|
639 |
in this project." |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
640 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
641 |
packageName := aPackageId |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
642 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
643 |
"Modified: 27.1.1997 / 12:10:00 / cg" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
644 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
645 |
|
4727 | 646 |
packageName:aPackageId |
647 |
"set the projects package identifier. |
|
648 |
This identifier marks all methods and new classes which were created |
|
649 |
in this project." |
|
650 |
||
651 |
self package:aPackageId |
|
652 |
||
653 |
"Modified: 27.1.1997 / 12:10:00 / cg" |
|
654 |
! |
|
655 |
||
4099 | 656 |
prerequisiteClasses |
657 |
"return the prerequisiteClasses of the project" |
|
658 |
||
659 |
^ (self propertyAt:#prerequisiteClasses) ? #() |
|
660 |
! |
|
661 |
||
4124 | 662 |
prerequisiteClasses:aCollectionOfClassesOrClassNames |
4099 | 663 |
"set the prerequisiteClasses of the project" |
664 |
||
4124 | 665 |
^ self propertyAt:#prerequisiteClasses put:aCollectionOfClassesOrClassNames |
666 |
||
667 |
"Modified: / 26.4.1999 / 23:33:44 / cg" |
|
668 |
! |
|
669 |
||
670 |
prerequisitePackages |
|
671 |
"return the prerequisitePackages of the project" |
|
672 |
||
673 |
^ self prerequisites |
|
674 |
||
675 |
"Created: / 26.4.1999 / 23:33:22 / cg" |
|
676 |
! |
|
677 |
||
678 |
prerequisitePackages:aCollectionOfPackagesOrPackageNames |
|
679 |
"set the prerequisitePackages of the project" |
|
680 |
||
681 |
^ self prerequisites:aCollectionOfPackagesOrPackageNames |
|
682 |
||
683 |
"Modified: / 26.4.1999 / 23:34:40 / cg" |
|
4099 | 684 |
! |
685 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
686 |
prerequisites |
4097 | 687 |
"return the prerequisites of the project" |
688 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
689 |
^ prerequisites ? #() |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
690 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
691 |
|
3973 | 692 |
prerequisites:aCollectionOfProjects |
4097 | 693 |
"set the prerequisites of the project" |
694 |
||
3973 | 695 |
prerequisites := aCollectionOfProjects |
696 |
! |
|
697 |
||
654 | 698 |
repositoryDirectory |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
699 |
"return the projects default repository location. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
700 |
This is offered initially, when classes are checked into the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
701 |
source repository initially" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
702 |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
703 |
^ repositoryDirectory |
654 | 704 |
|
705 |
"Created: 25.11.1995 / 18:04:51 / cg" |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
706 |
"Modified: 27.1.1997 / 12:13:35 / cg" |
654 | 707 |
! |
708 |
||
709 |
repositoryDirectory:aRelativePathName |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
710 |
"set the projects default repository location. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
711 |
This will be offered initially, when classes are checked into the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
712 |
source repository initially" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
713 |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
714 |
repositoryDirectory := aRelativePathName |
654 | 715 |
|
716 |
"Created: 25.11.1995 / 18:05:06 / cg" |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
717 |
"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
|
718 |
! |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
719 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
720 |
repositoryModule |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
721 |
"return the projects default repository module name. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
722 |
This is offered initially, when classes are checked into the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
723 |
source repository initially" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
724 |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
725 |
^ repositoryModule |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
726 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
727 |
"Created: 25.11.1995 / 18:04:51 / cg" |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
728 |
"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
|
729 |
! |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
730 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
731 |
repositoryModule:aString |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
732 |
"set the projects default repository module name. |
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 |
repositoryModule := aString |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
737 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
738 |
"Created: 25.11.1995 / 18:05:06 / cg" |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
739 |
"Modified: 27.1.1997 / 12:13:57 / cg" |
654 | 740 |
! |
741 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
742 |
subProjects |
4097 | 743 |
"return the subprojects - obsolete; we use prerequisites now" |
744 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
745 |
^ subProjects ? #() |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
746 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
747 |
|
617 | 748 |
views |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
749 |
"return a collection of views which were opened in this project" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
750 |
|
617 | 751 |
^ views asArray |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
752 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
753 |
"Modified: 27.1.1997 / 12:14:18 / cg" |
338 | 754 |
! |
755 |
||
617 | 756 |
views:aSetOfViews |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
757 |
"set the collection of views which were opened in this project" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
758 |
|
617 | 759 |
views := WeakIdentitySet withAll:aSetOfViews |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
760 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
761 |
"Modified: 27.1.1997 / 12:14:26 / cg" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
762 |
! ! |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
763 |
|
4079 | 764 |
!Project methodsFor:'administration'! |
765 |
||
766 |
removeClassesFromSystem |
|
767 |
"remove the all of my classes & patches from the system" |
|
768 |
||
769 |
self classInfo do:[:clsInfo | |
|
770 |
|clsName cls| |
|
771 |
||
772 |
clsName := clsInfo className. |
|
773 |
clsName isSymbol ifTrue:[ |
|
774 |
cls := Smalltalk at:clsName. |
|
775 |
cls notNil ifTrue:[ |
|
776 |
cls removeFromSystem. |
|
777 |
]. |
|
778 |
] ifFalse:[ |
|
779 |
self halt |
|
780 |
]. |
|
781 |
]. |
|
782 |
||
783 |
! |
|
784 |
||
785 |
removeFromSystem |
|
786 |
"remove the project and all of its classes & patches from the |
|
787 |
system" |
|
788 |
||
789 |
self removeClassesFromSystem. |
|
790 |
AllProjects remove:self ifAbsent:nil. |
|
791 |
! ! |
|
792 |
||
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
793 |
!Project methodsFor:'changes'! |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
794 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
795 |
rememberOverwrittenMethod:newMethod from:oldMethod |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
796 |
"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
|
797 |
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
|
798 |
Allows previous methods to be reconstructed." |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
799 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
800 |
overwrittenMethods isNil ifTrue:[ |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
801 |
overwrittenMethods := IdentityDictionary new. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
802 |
]. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
803 |
overwrittenMethods at:newMethod put:oldMethod |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
804 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
805 |
"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
|
806 |
"Modified: 30.1.1997 / 21:10:51 / cg" |
10 | 807 |
! ! |
808 |
||
236 | 809 |
!Project methodsFor:'initialization'! |
810 |
||
811 |
initialize |
|
338 | 812 |
|numString| |
813 |
||
330 | 814 |
views := WeakIdentitySet new. |
338 | 815 |
numString := NextSequential printString. |
315 | 816 |
NextSequential := NextSequential + 1. |
338 | 817 |
|
818 |
name := 'new Project-' , numString. |
|
819 |
packageName := 'private-' , numString. |
|
2034
1c96469c3df8
preinit the defaultNamespace of new projects (to Smalltalk)
Claus Gittinger <cg@exept.de>
parents:
2032
diff
changeset
|
820 |
|
848
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
821 |
"/ |
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
822 |
"/ for tiny-configurations, allow ChangeSet to be absent |
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
823 |
"/ |
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
824 |
ChangeSet notNil ifTrue:[ |
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
825 |
changeSet := ChangeSet new. |
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
826 |
]. |
654 | 827 |
self directory:'.'. |
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
828 |
self repositoryModule:(OperatingSystem getLoginName). |
654 | 829 |
self repositoryDirectory:'private' |
830 |
||
831 |
"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
|
832 |
"Modified: 3.1.1997 / 13:24:10 / cg" |
236 | 833 |
! ! |
834 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
835 |
!Project methodsFor:'load & save'! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
836 |
|
4079 | 837 |
loadClassesFromProjectDirectory |
838 |
"load my classes into the system. |
|
839 |
The classes are loaded from the directory as defined by my |
|
840 |
directory insTvar" |
|
841 |
||
842 |
|myDirectory| |
|
843 |
||
844 |
myDirectory := self directory asFilename. |
|
845 |
||
846 |
self classInfo do:[:clsInfo | |
|
4080 | 847 |
|clsName clsFileNameString cls clsFilename| |
4079 | 848 |
|
849 |
clsName := clsInfo className. |
|
4080 | 850 |
clsFileNameString := clsInfo classFileName. |
851 |
clsFileNameString isNil ifTrue:[clsFileNameString := clsName , '.st']. |
|
4079 | 852 |
|
853 |
clsName isSymbol ifTrue:[ |
|
4080 | 854 |
clsFilename := myDirectory construct:clsFileNameString. |
4079 | 855 |
cls := Smalltalk at:clsName. |
856 |
cls isNil ifTrue:[ |
|
857 |
"/ ok - really not yet loaded. |
|
4080 | 858 |
Transcript showCR:'loading ' , clsFilename pathName , ' ...'. |
4079 | 859 |
] ifFalse:[ |
4080 | 860 |
Transcript showCR:'reloading ' , clsFilename pathName , ' ...'. |
4079 | 861 |
]. |
4080 | 862 |
Smalltalk fileIn:clsFilename |
4079 | 863 |
] ifFalse:[ |
864 |
self halt |
|
865 |
]. |
|
866 |
]. |
|
867 |
||
868 |
"/ read again; if the load order was not correct, |
|
869 |
"/ this will fix things (i.e. nil superclasses ...) |
|
870 |
||
871 |
self classInfo do:[:clsInfo | |
|
4080 | 872 |
|clsName clsFileNameString clsFilename| |
4079 | 873 |
|
874 |
clsName := clsInfo className. |
|
4080 | 875 |
clsFileNameString := clsInfo classFileName. |
876 |
clsFileNameString isNil ifTrue:[clsFileNameString := clsName , '.st']. |
|
4079 | 877 |
|
878 |
clsName isSymbol ifTrue:[ |
|
4080 | 879 |
clsFilename := myDirectory construct:clsFileNameString. |
880 |
Transcript showCR:'reloading ' , clsFilename pathName , ' ...'. |
|
881 |
Smalltalk fileIn:clsFilename |
|
4079 | 882 |
] ifFalse:[ |
883 |
self halt |
|
884 |
]. |
|
885 |
]. |
|
886 |
||
887 |
! |
|
888 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
889 |
loadFromProjectFile:aFilename |
4097 | 890 |
"fill all of my attributes from a projects file (.prj-file)" |
891 |
||
4124 | 892 |
|f l pack targetConditions s sourcesSubDir files module| |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
893 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
894 |
f := aFilename asFilename. |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
895 |
directoryName := f directory pathName. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
896 |
self directory:(f directory pathName). |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
897 |
pack := ResourcePack fromFile:f baseName directory:directoryName. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
898 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
899 |
"/ convert the resourcePack ... |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
900 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
901 |
packageName := pack at:'package' ifAbsent:packageName. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
902 |
name := pack at:'name' ifAbsent:name. |
4071 | 903 |
|
4124 | 904 |
module := pack at:'repository.module' ifAbsent:nil. |
905 |
module notNil ifTrue:[ |
|
906 |
repositoryModule := module. |
|
907 |
repositoryDirectory := pack at:'repository.directory' ifAbsent:''. |
|
908 |
]. |
|
4071 | 909 |
|
4099 | 910 |
prerequisites := pack at:'prerequisites' ifAbsent:#(). |
911 |
self prerequisiteClasses:(pack at:'prerequisiteClasses' ifAbsent:#()). |
|
912 |
||
4074 | 913 |
s := pack at:'nameSpace' ifAbsent:nil. |
914 |
s notNil ifTrue:[ |
|
4726 | 915 |
self defaultNameSpace:(Namespace name:s). |
4074 | 916 |
]. |
917 |
||
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
918 |
subProjects := pack at:'subProjects' ifAbsent:subProjects. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
919 |
(s := pack at:'comment' ifAbsent:nil) notNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
920 |
self comment:s |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
921 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
922 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
923 |
"/ first, all of the conditions ... |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
924 |
targetConditions := Dictionary new. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
925 |
pack keysAndValuesDo:[:key :val | |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
926 |
|conditionKey| |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
927 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
928 |
(key startsWith:'target.condition.') ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
929 |
conditionKey := key copyFrom:'target.condition.' size + 1. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
930 |
targetConditions at:conditionKey put:val. |
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 |
]. |
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 |
properties isNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
935 |
properties := IdentityDictionary new |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
936 |
]. |
4124 | 937 |
properties at:#'targetconditions' put:targetConditions. |
938 |
||
939 |
sourcesSubDir := pack at:'sources' ifAbsent:nil. |
|
940 |
sourcesSubDir notNil ifTrue:[ |
|
941 |
properties at:#'sourcesDirectory' put:sourcesSubDir. |
|
942 |
]. |
|
943 |
files := pack at:'files' ifAbsent:nil. |
|
944 |
files notNil ifTrue:[ |
|
945 |
properties at:#'files' put:files. |
|
946 |
]. |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
947 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
948 |
"/ fetch class info |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
949 |
|
4071 | 950 |
(pack at:'classes' default:#()) do:[:info | |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
951 |
|condKey className optionalFileName| |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
952 |
|
4078 | 953 |
condKey := #always. |
4073 | 954 |
info isSymbol ifTrue:[ |
955 |
className := info. |
|
956 |
] ifFalse:[ |
|
4078 | 957 |
className := info at:1. |
958 |
info size > 1 ifTrue:[ |
|
959 |
optionalFileName := info at:2. |
|
960 |
info size > 2 ifTrue:[ |
|
961 |
condKey := info at:3. |
|
962 |
] |
|
4073 | 963 |
]. |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
964 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
965 |
self |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
966 |
addClass:className |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
967 |
conditionForInclusion:condKey |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
968 |
classFileName:optionalFileName |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
969 |
]. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
970 |
|
4069 | 971 |
self wasLoadedFromFile:true. |
972 |
||
4099 | 973 |
"/ all remaining properties |
974 |
pack keysAndValuesDo:[:key :val | |
|
975 |
(key startsWith:'property.') ifTrue:[ |
|
976 |
self propertyAt:(key copyFrom:'property.' size+1) asSymbol put:val. |
|
977 |
] |
|
978 |
]. |
|
979 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
980 |
" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
981 |
Project current saveAsProjectFile. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
982 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
983 |
Project new loadFromProjectFile:'default.prj' |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
984 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
985 |
Project new loadFromProjectFile:'../../libbasic/libbasic.prj' |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
986 |
" |
4069 | 987 |
|
4124 | 988 |
"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
|
989 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
990 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
991 |
saveAsProjectFile |
4097 | 992 |
"store all of my attributes into a projects file (.prj-file) |
993 |
(in the project-directory and named as <projectName>.prj)" |
|
994 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
995 |
|fn s| |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
996 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
997 |
fn := self directory asFilename. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
998 |
fn := fn construct:self name. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
999 |
fn := fn withSuffix:'prj'. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1000 |
|
4124 | 1001 |
fn exists ifTrue:[ |
1002 |
fn copyTo:(fn pathName , '.bak') |
|
1003 |
]. |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1004 |
s := fn writeStream. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1005 |
self saveAsProjectFileOn:s. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1006 |
s close. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1007 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1008 |
" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1009 |
Project current saveAsProjectFile |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1010 |
" |
4124 | 1011 |
|
1012 |
"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
|
1013 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1014 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1015 |
saveAsProjectFileOn:aStream |
4074 | 1016 |
"save the project info in a format which is both usable for reload |
1017 |
and somehow readable for humans. |
|
1018 |
Actually, the format is the same as used for resources (i.e. key - value pairs) |
|
1019 |
and the code below could be much simpler - if there where no humans to read it ..." |
|
1020 |
||
4726 | 1021 |
|s coll first maxLen t defNS| |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1022 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1023 |
s := aStream. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1024 |
|
4099 | 1025 |
s nextPutLine:'; $Header' , '$'; nextPutLine:';'. |
4074 | 1026 |
s nextPutLine:'; Project saved ' , Smalltalk timeStamp; nextPutLine:';'. |
1027 |
s nextPutLine:'; Be careful when editing - do not corrupt the files syntax.'. |
|
1028 |
s nextPutLine:'; (Lines starting with a semicolon are comment lines)'. |
|
1029 |
s nextPutLine:'; (Lines ending with a backslash are concatenated with the following line)'. |
|
1030 |
||
1031 |
s cr; nextPutLine:';'; nextPutLine:'; general:'; nextPutLine:';'. |
|
4071 | 1032 |
|
1033 |
s nextPutAll:'comment'. |
|
1034 |
s tab. s nextPutLine:(self comment storeString). |
|
1035 |
||
1036 |
s nextPutAll:'name'. |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1037 |
s tab. s nextPutLine:(name storeString). |
4071 | 1038 |
|
1039 |
s nextPutAll:'type'. |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1040 |
s tab. s nextPutLine:(self type storeString). |
4071 | 1041 |
|
1042 |
s nextPutAll:'package'. |
|
4726 | 1043 |
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
|
1044 |
|
4726 | 1045 |
defNS := self defaultNameSpace. |
1046 |
(defNS ~~ Smalltalk) ifTrue:[ |
|
4074 | 1047 |
s nextPutAll:'nameSpace'. |
4726 | 1048 |
s tab. s nextPutLine:(defNS name storeString). |
4074 | 1049 |
]. |
1050 |
||
1051 |
s cr; nextPutLine:';'; nextPutLine:'; repository:'; nextPutLine:';'. |
|
4071 | 1052 |
s nextPutAll:'repository.module'. |
4099 | 1053 |
s tab. s nextPutLine:(repositoryModule ? 'private') storeString. |
4071 | 1054 |
s nextPutAll:'repository.directory'. |
4726 | 1055 |
s tab. s nextPutLine:(repositoryDirectory ? self package) storeString. |
4071 | 1056 |
s cr. |
1057 |
||
4124 | 1058 |
(t := properties at:#'sourcesDirectory' ifAbsent:nil) notNil ifTrue:[ |
1059 |
s nextPutAll:'sources'. |
|
1060 |
s tab. s nextPutLine:(t storeString). |
|
1061 |
]. |
|
1062 |
||
4074 | 1063 |
first := true. |
4071 | 1064 |
properties keysAndValuesDo:[:key :val | |
1065 |
(#( |
|
1066 |
comment |
|
1067 |
wasLoadedFromFile |
|
1068 |
targetconditions |
|
4074 | 1069 |
classes |
1070 |
classInfo |
|
4099 | 1071 |
prerequisiteClasses |
4124 | 1072 |
files |
4071 | 1073 |
) includes:key) ifFalse:[ |
4074 | 1074 |
first ifTrue:[ |
1075 |
first := false. |
|
1076 |
s cr; nextPutLine:';'; nextPutLine:'; properties:'; nextPutLine:';'. |
|
1077 |
]. |
|
4071 | 1078 |
s nextPutAll:'property.'; nextPutAll:key. |
1079 |
s tab. s nextPutLine:val storeString. |
|
1080 |
] |
|
1081 |
]. |
|
1082 |
||
4074 | 1083 |
"/ coll := self subProjects. |
1084 |
"/ coll size > 0 ifTrue:[ |
|
1085 |
"/ s nextPutLine:'[subprojects]'. |
|
1086 |
"/ coll do:[:aSubProject | |
|
1087 |
"/ s tab. s nextPutLine:(aSubProject name soreString). |
|
1088 |
"/ ]. |
|
1089 |
"/ ]. |
|
1090 |
||
1091 |
s cr; nextPutLine:';'; nextPutLine:'; required packages:'; nextPutLine:';'. |
|
1092 |
s nextPutAll:'prerequisites'; tab. |
|
1093 |
coll := self prerequisites. |
|
1094 |
coll size = 0 ifTrue:[ |
|
1095 |
s nextPutLine:'#()'. |
|
1096 |
] ifFalse:[ |
|
1097 |
s nextPutLine:'#( \'. |
|
4124 | 1098 |
coll do:[:aProjectOrProjectNameList | |
1099 |
|pName pPath| |
|
1100 |
||
1101 |
aProjectOrProjectNameList isString ifTrue:[ |
|
1102 |
pName := aProjectOrProjectNameList. |
|
1103 |
] ifFalse:[ |
|
1104 |
aProjectOrProjectNameList isArray ifTrue:[ |
|
1105 |
pName := aProjectOrProjectNameList at:1. |
|
1106 |
pPath := aProjectOrProjectNameList at:2. |
|
1107 |
] ifFalse:[ |
|
1108 |
pName := aProjectOrProjectNameList name. |
|
1109 |
pPath := aProjectOrProjectNameList repositoryPath. |
|
1110 |
] |
|
1111 |
]. |
|
1112 |
||
1113 |
pPath isNil ifTrue:[ |
|
1114 |
s tab. s nextPutAll:(pName storeString); nextPutLine:' \'. |
|
1115 |
] ifFalse:[ |
|
1116 |
s tab. s nextPutAll:'( '. |
|
1117 |
s nextPutAll:(pName storeString); space; |
|
1118 |
nextPutAll:(pPath storeString); nextPutLine:') \'. |
|
1119 |
] |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1120 |
]. |
4074 | 1121 |
s nextPutLine:')'. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1122 |
]. |
4124 | 1123 |
|
4099 | 1124 |
s cr; nextPutLine:';'; nextPutLine:'; required classes:'; nextPutLine:';'. |
1125 |
s nextPutAll:'prerequisiteClasses'; tab. |
|
1126 |
coll := self prerequisiteClasses. |
|
4124 | 1127 |
s nextPutLine:'#( \'. |
1128 |
coll do:[:aClassOrSymbol | |className| |
|
4099 | 1129 |
|
4124 | 1130 |
(className := aClassOrSymbol) isSymbol ifFalse:[ |
1131 |
className := aClassOrSymbol name |
|
4099 | 1132 |
]. |
4124 | 1133 |
s tab. s nextPutAll:(className storeString); nextPutLine:' \'. |
4099 | 1134 |
]. |
4124 | 1135 |
s nextPutLine:')'. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1136 |
|
4074 | 1137 |
s cr; nextPutLine:';'; nextPutLine:'; classes:'; nextPutLine:';'. |
4078 | 1138 |
s nextPutLine:'; (for each class, one line of the form: ( #''className'' [fileName [condition]] )'. |
4315 | 1139 |
s nextPutLine:'; (where fileName and condition are optional)'. |
4078 | 1140 |
s nextPutLine:';'. |
4074 | 1141 |
|
1142 |
coll := self classInfo. |
|
4124 | 1143 |
s nextPutAll:'classes'; tab; nextPutLine:'#( \'. |
1144 |
"/ find the longest className (for layout only) |
|
1145 |
||
1146 |
maxLen := coll inject:0 into:[:maxSoFar :aClassInfo | |
|
1147 |
|clsName| |
|
4078 | 1148 |
|
4124 | 1149 |
clsName := aClassInfo className. |
1150 |
maxSoFar max:clsName storeString size |
|
1151 |
]. |
|
4078 | 1152 |
|
4124 | 1153 |
coll do:[:aClassInfo | |
1154 |
|clsName fileName cond| |
|
4074 | 1155 |
|
4124 | 1156 |
clsName := aClassInfo className. |
1157 |
fileName := aClassInfo classFileName. |
|
1158 |
fileName isNil ifTrue:[ |
|
1159 |
fileName := clsName , '.st' |
|
1160 |
]. |
|
1161 |
cond := aClassInfo conditionForInclusion. |
|
1162 |
s tab. s nextPutAll:'( '; |
|
1163 |
nextPutAll:(clsName storeString paddedTo:maxLen); |
|
1164 |
tab; nextPutAll:fileName storeString. |
|
1165 |
cond == #always ifFalse:[ |
|
1166 |
s tab; nextPutAll:cond storeString. |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1167 |
]. |
4124 | 1168 |
s nextPutLine:') \'. |
1169 |
]. |
|
1170 |
s nextPutLine:')'. |
|
1171 |
||
1172 |
s cr; nextPutLine:';'; nextPutLine:'; files (for deployment):'; nextPutLine:';'. |
|
4314 | 1173 |
"/ |
1174 |
"/ already in properties |
|
1175 |
"/ |
|
1176 |
"/ s nextPutAll:'installDirectoryUnix'; tab. |
|
1177 |
"/ s nextPutLine:self installDirectoryUnix. |
|
1178 |
"/ s nextPutAll:'installDirectoryWin32'; tab. |
|
1179 |
"/ s nextPutLine:self installDirectoryWin32. |
|
1180 |
"/ s nextPutAll:'installDirectoryVMS'; tab. |
|
1181 |
"/ s nextPutLine:self installDirectoryVMS. |
|
1182 |
"/ s nextPutAll:'installDirectoryMacOS'; tab. |
|
1183 |
"/ s nextPutLine:self installDirectoryMacOS. |
|
1184 |
||
4124 | 1185 |
s nextPutAll:'files'; tab. |
1186 |
coll := properties at:#'files' ifAbsent:#(). |
|
1187 |
s nextPutLine:'#( \'. |
|
1188 |
coll do:[:aFileEntry | |
|
1189 |
s tab. s nextPutAll:(aFileEntry storeString); nextPutLine:' \'. |
|
1190 |
]. |
|
1191 |
s nextPutLine:')'. |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1192 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1193 |
" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1194 |
Project current saveOn:Transcript |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1195 |
" |
4124 | 1196 |
|
1197 |
"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
|
1198 |
! ! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1199 |
|
2 | 1200 |
!Project methodsFor:'maintenance'! |
1201 |
||
13 | 1202 |
buildProject |
4097 | 1203 |
"invoke 'make' in the project directory" |
1204 |
||
13 | 1205 |
OperatingSystem executeCommand:('cd ' , self directory , ' ; make') |
1206 |
! |
|
1207 |
||
4097 | 1208 |
createLoadAllFile |
1209 |
"creates a 'loadAll' file, which will load all classes |
|
1210 |
of the project - this loadAll file is supposed to be located |
|
1211 |
in the projects source directory." |
|
1212 |
||
1213 |
|d f out in topName classes classInfo numBad firstBad msg| |
|
1214 |
||
1215 |
classes := self classes. |
|
1216 |
numBad := 0. |
|
1217 |
firstBad := nil. |
|
1218 |
||
1219 |
classes := classes collect:[:clsOrSymbol | |cls| |
|
1220 |
clsOrSymbol isSymbol ifTrue:[ |
|
1221 |
cls := Smalltalk at:clsOrSymbol. |
|
1222 |
cls isNil ifTrue:[ |
|
1223 |
numBad := numBad + 1. |
|
1224 |
firstBad := firstBad ? clsOrSymbol. |
|
1225 |
] ifFalse:[ |
|
1226 |
cls isLoaded ifFalse:[ |
|
1227 |
cls autoLoad. |
|
1228 |
cls isLoaded ifFalse:[ |
|
1229 |
cls := nil |
|
1230 |
] |
|
1231 |
]. |
|
1232 |
]. |
|
1233 |
cls. |
|
1234 |
] ifFalse:[ |
|
1235 |
clsOrSymbol |
|
1236 |
] |
|
1237 |
]. |
|
1238 |
numBad ~~ 0 ifTrue:[ |
|
1239 |
msg := 'Cannot generate ''loadAll''-file.\\'. |
|
1240 |
msg := msg , 'Reason: Class ''' , firstBad asText allBold |
|
1241 |
, ''' is not loaded.'. |
|
1242 |
numBad ~~ 1 ifTrue:[ |
|
1243 |
msg := msg , '\(' , (numBad-1) printString , ' more unloaded classes were found)' |
|
1244 |
]. |
|
1245 |
self warn:msg withCRs. |
|
1246 |
^ self. |
|
1247 |
]. |
|
1248 |
||
1249 |
classes := classes copy topologicalSort:[:a :b | b isSubclassOf:a]. |
|
1250 |
||
1251 |
Transcript showCR:'creating loadAll file'. |
|
1252 |
||
1253 |
d := directoryName asFilename. |
|
1254 |
f := d construct:'loadAll'. |
|
1255 |
f exists ifTrue:[ |
|
1256 |
f renameTo:(d construct:'loadAll.bak') |
|
1257 |
]. |
|
1258 |
out := f writeStream. |
|
1259 |
out isNil ifTrue:[ |
|
1260 |
self warn:'cannot create loadAll'. |
|
1261 |
(d construct:'loadAll.bak') renameTo:f. |
|
1262 |
^ self |
|
1263 |
]. |
|
1264 |
||
1265 |
out nextPutAll:' |
|
1266 |
|files| |
|
1267 |
||
1268 |
files := #( |
|
1269 |
'. |
|
1270 |
||
1271 |
classes do:[:cls | |
|
1272 |
out nextPut:$'. |
|
1273 |
cls nameWithoutNameSpacePrefix printOn:out. |
|
1274 |
out nextPutAll:'.st'''. |
|
1275 |
out cr. |
|
1276 |
]. |
|
1277 |
||
1278 |
out nextPutAll:'). |
|
1279 |
||
1280 |
files do:[:s | |
|
1281 |
''.'' print. |
|
1282 |
Smalltalk fileIn:s. |
|
1283 |
]. |
|
1284 |
'' done'' printCR. |
|
1285 |
'. |
|
1286 |
||
1287 |
out close |
|
1288 |
! |
|
1289 |
||
2 | 1290 |
createMakefile |
1291 |
"creates an initial makefile, which will recreate a correct |
|
1292 |
Makefile, then compile all" |
|
1293 |
||
362 | 1294 |
|d f out in topName| |
2 | 1295 |
|
1420 | 1296 |
Transcript showCR:'creating Makefile'. |
13 | 1297 |
|
356 | 1298 |
d := directoryName asFilename. |
2 | 1299 |
f := d construct:'Makefile'. |
13 | 1300 |
f exists ifTrue:[ |
1420 | 1301 |
f renameTo:(d construct:'Makefile.bak') |
13 | 1302 |
]. |
2 | 1303 |
out := f writeStream. |
13 | 1304 |
out isNil ifTrue:[ |
1420 | 1305 |
self warn:'cannot create Makefile'. |
1306 |
^ self |
|
13 | 1307 |
]. |
1308 |
in := Smalltalk systemFileStreamFor:'rules/stdHeader'. |
|
2 | 1309 |
out nextPutAll:in contents asString. |
1310 |
in close. |
|
362 | 1311 |
|
1312 |
topName := self findTopFrom:directoryName. |
|
1313 |
||
13 | 1314 |
out nextPutAll:'#TOP=/usr/local/lib/smalltalk'; cr. |
362 | 1315 |
out nextPutAll:'TOP=' , topName; cr. |
2 | 1316 |
out nextPutAll:'target:'; cr. |
1317 |
out tab; nextPutAll:'touch Make.proto'; cr. |
|
1318 |
out tab; nextPutAll:'$(MAKE) Makefile'; cr. |
|
1319 |
out tab; nextPutAll:'make'; cr; cr. |
|
1320 |
||
362 | 1321 |
in := Smalltalk systemFileStreamFor:'configurations/COMMON/defines'. |
1322 |
out nextPutAll:in contents asString. |
|
1323 |
in close. |
|
1324 |
||
1325 |
in := Smalltalk systemFileStreamFor:'configurations/vendorConf'. |
|
1326 |
out nextPutAll:in contents asString. |
|
1327 |
in close. |
|
1328 |
||
13 | 1329 |
in := Smalltalk systemFileStreamFor:'configurations/myConf'. |
2 | 1330 |
out nextPutAll:in contents asString. |
1331 |
in close. |
|
362 | 1332 |
|
13 | 1333 |
in := Smalltalk systemFileStreamFor:'rules/stdRules'. |
2 | 1334 |
out nextPutAll:in contents asString. |
1335 |
in close. |
|
1336 |
out close |
|
1420 | 1337 |
|
1338 |
"Modified: 18.5.1996 / 15:44:25 / cg" |
|
2 | 1339 |
! |
1340 |
||
617 | 1341 |
createProjectFiles |
1342 |
"actually, creates all files to do a make in the project directory" |
|
1343 |
||
1344 |
directoryName asFilename exists ifFalse:[ |
|
4097 | 1345 |
(self confirm:'create new projectDirectory: ' , directoryName) |
1346 |
ifFalse:[^ self]. |
|
1347 |
OperatingSystem recursiveCreateDirectory:directoryName. |
|
617 | 1348 |
]. |
1349 |
self createMakefile. |
|
1350 |
self createSourcefiles. |
|
1351 |
self createProtoMakefile. |
|
4097 | 1352 |
(self propertyAt:#deliverLoadAllFile) == true ifTrue:[ |
1353 |
self createLoadAllFile |
|
1354 |
]. |
|
617 | 1355 |
! |
1356 |
||
2 | 1357 |
createProtoMakefile |
1358 |
"creates a Make.proto file" |
|
1359 |
||
362 | 1360 |
|d f s type appName libName startUpClass startUpSelector |
1361 |
topName classes| |
|
2 | 1362 |
|
362 | 1363 |
topName := self findTopFrom:directoryName. |
2 | 1364 |
|
1420 | 1365 |
Transcript showCR:'creating Make.proto'. |
13 | 1366 |
|
356 | 1367 |
d := directoryName asFilename. |
2 | 1368 |
f := d construct:'Make.proto'. |
1369 |
f exists ifTrue:[ |
|
1420 | 1370 |
f renameTo:(d construct:'Make.proto.bak') |
2 | 1371 |
]. |
1372 |
s := f writeStream. |
|
13 | 1373 |
s isNil ifTrue:[ |
1420 | 1374 |
self warn:'cannot create prototype Makefile'. |
1375 |
^ self |
|
13 | 1376 |
]. |
2 | 1377 |
s nextPutAll:'# |
362 | 1378 |
# ' , Smalltalk timeStamp , ' |
1379 |
# |
|
235 | 1380 |
# created by Smalltalks Project support |
2 | 1381 |
# |
362 | 1382 |
|
1383 |
||
1384 |
# the next line defines the path to the TOP directory, |
|
1385 |
# (where the directories "configurations" and "include" are found) |
|
1386 |
# |
|
1387 |
#TOP=/usr/local/lib/smalltalk |
|
1388 |
TOP=' , topName ,' |
|
1389 |
||
1390 |
# |
|
1391 |
# add any subdirectories that have to be visited by make |
|
1392 |
# |
|
1393 |
SUBDIRS= |
|
1394 |
||
1395 |
# |
|
1396 |
# do not change |
|
1397 |
# |
|
2 | 1398 |
SHELL=/bin/sh |
1399 |
||
362 | 1400 |
'. |
1401 |
||
1402 |
s nextPutAll:'# |
|
1403 |
# set the stc options |
|
1404 |
# |
|
1405 |
STCOPT=$(DEFAULT_STCOPT) |
|
1406 |
# STCOPT=+optspace2 |
|
1407 |
# STCOPT=+optspace2 -warnNonStandard |
|
1408 |
||
1409 |
# |
|
1410 |
# and packageName option |
|
1411 |
# |
|
1412 |
STCLOCALOPT=''-Pprivate-classes-(libapp)'' |
|
2 | 1413 |
|
1414 |
'. |
|
1415 |
||
356 | 1416 |
type := #library. |
1417 |
appName := 'app'. |
|
1418 |
libName := 'lib'. |
|
1419 |
startUpClass := 'Smalltalk'. |
|
1420 |
startUpSelector := 'start'. |
|
13 | 1421 |
|
356 | 1422 |
properties notNil ifTrue:[ |
1420 | 1423 |
type := properties at:#projectType ifAbsent:type. |
1424 |
appName := properties at:#applicationName ifAbsent:appName. |
|
1425 |
startUpClass := properties at:#startupClass ifAbsent:startUpClass. |
|
1426 |
startUpSelector := properties at:#startupSelector ifAbsent:startUpSelector. |
|
356 | 1427 |
]. |
1428 |
||
362 | 1429 |
s nextPutAll:'# |
1430 |
# define the name of the library to create |
|
1431 |
# |
|
1432 |
'. |
|
1433 |
s nextPutAll:'LIBNAME=lib' , appName; cr; cr. |
|
1434 |
||
1435 |
s nextPutAll:'# |
|
1436 |
# the target rule: |
|
1437 |
# |
|
1438 |
all:: abbrev.stc objs genClassList $(OBJTARGET) |
|
1439 |
||
1440 |
'. |
|
2 | 1441 |
|
1442 |
type == #executable ifTrue:[ |
|
1420 | 1443 |
s nextPutAll:'PROGS = ' , appName; cr. |
1444 |
s nextPutAll:('STARTUP_CLASS=' , startUpClass); cr. |
|
1445 |
s nextPutAll:'STARTUP_SELECTOR="' , startUpSelector; nextPutAll:'"'; cr. |
|
2 | 1446 |
]. |
1447 |
||
362 | 1448 |
s nextPutAll:'# |
1449 |
# define the object files that are to be created |
|
1450 |
# |
|
1451 |
'. |
|
2 | 1452 |
s nextPutAll:'OBJS='. |
1453 |
||
362 | 1454 |
(classes := self classes) notNil ifTrue:[ |
1420 | 1455 |
classes do:[:aClass | |
1456 |
|abbrev| |
|
362 | 1457 |
|
1420 | 1458 |
s nextPutAll:' \'. s cr. |
1459 |
abbrev := Smalltalk fileNameForClass:aClass name. |
|
1460 |
s nextPutAll:' '; nextPutAll:abbrev; nextPutAll:'.o'. |
|
1461 |
]. |
|
2 | 1462 |
]. |
1463 |
s cr; cr. |
|
1464 |
||
362 | 1465 |
s nextPutAll:'# |
1466 |
# dependencies: |
|
1467 |
# |
|
1468 |
I=$(TOP)/include |
|
1469 |
RT_STUFF=$(I)/Object.H $(I)/stc.h $(I)/stcIntern.h |
|
1470 |
||
1471 |
'. |
|
1472 |
classes notNil ifTrue:[ |
|
1420 | 1473 |
classes do:[:aClass | |
1474 |
|abbrev| |
|
362 | 1475 |
|
1420 | 1476 |
abbrev := Smalltalk fileNameForClass:aClass name. |
1477 |
s nextPutAll:abbrev; nextPutAll:'.o: '. |
|
1478 |
s nextPutAll:abbrev; nextPutAll:'.st '. |
|
1479 |
aClass allSuperclassesDo:[:superClass| |
|
1480 |
s nextPutAll:'$(I)/'. |
|
1481 |
s nextPutAll:(Smalltalk fileNameForClass:superClass name) , '.H '. |
|
1482 |
]. |
|
1483 |
s nextPutAll:'$(RT_STUFF)'; cr. |
|
1484 |
]. |
|
362 | 1485 |
]. |
1486 |
s cr; cr. |
|
2 | 1487 |
|
1488 |
type == #executable ifTrue:[ |
|
1420 | 1489 |
s nextPutAll:'all:: $(PROGS)'; cr. |
2 | 1490 |
|
1420 | 1491 |
s nextPutAll:appName. |
1492 |
s nextPutAll:':: main.o classList.o $(OBJS)'; cr. |
|
1493 |
s tab; nextPutAll:'$(LD) $(ST_LDFLAG) $(LDFLAGS) -o '; |
|
1494 |
nextPutAll:appName; |
|
1495 |
nextPutAll:' \'; cr. |
|
1496 |
s tab; tab; nextPutAll:'$(CRT0) main.$(O) classList.$(O) $(OBJS) $(EXTRA_OBJ) $(LIBOBJS) \'; cr. |
|
1497 |
s tab; tab; nextPutAll:'$(LIBRUNDIR)/hidata.o $(LIBRUN) \'; cr. |
|
1498 |
s tab; tab; nextPutAll:'$(MATHLIB) $(EXTRALIBS) -lXext $(SYSLIBS) $(OTHERLIBS) $(CRTN)'; cr. |
|
2 | 1499 |
]. |
1500 |
||
1501 |
s close |
|
1420 | 1502 |
|
4069 | 1503 |
"Modified: / 23.3.1999 / 14:20:09 / cg" |
617 | 1504 |
! |
1505 |
||
1506 |
createSourcefiles |
|
1507 |
"creates all Smalltalk-source files in the project directory" |
|
1508 |
||
1509 |
|classes methods methodClasses dir stream| |
|
1510 |
||
2956
952a09bdeed1
Use Filename instead of obsolete FileDirectory
Stefan Vogel <sv@exept.de>
parents:
2907
diff
changeset
|
1511 |
dir := self directory asFilename. |
1420 | 1512 |
Transcript showCR:'creating sources in ' , dir pathName , ' ...'; endEntry. |
617 | 1513 |
|
1514 |
classes := self classes. |
|
1515 |
classes isNil ifTrue:[ |
|
1420 | 1516 |
self warn:'no classes in current project' |
617 | 1517 |
]. |
1518 |
||
1519 |
classes notNil ifTrue:[ |
|
1420 | 1520 |
classes do:[:aClass | |
1521 |
aClass isLoaded ifFalse:[ |
|
1522 |
aClass autoload. |
|
1523 |
]. |
|
1524 |
]. |
|
1525 |
classes := classes topologicalSort:[:a :b | a isSubclassOf:b]. |
|
617 | 1526 |
|
1420 | 1527 |
classes do:[:aClass | |
1528 |
Transcript show:' ... '; showCR:aClass name, '.st'; endEntry. |
|
1529 |
aClass fileOutIn:dir |
|
1530 |
] |
|
617 | 1531 |
]. |
1532 |
||
1533 |
methods := self individualMethods. |
|
1534 |
methods notNil ifTrue:[ |
|
1420 | 1535 |
methods := methods asIdentitySet. |
1536 |
" |
|
1537 |
get classes ... |
|
1538 |
" |
|
1539 |
methodClasses := IdentitySet new. |
|
1540 |
methods do:[:m | |
|
1541 |
|mCls| |
|
617 | 1542 |
|
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
1543 |
mCls := m containingClass. |
1420 | 1544 |
mCls isMeta ifTrue:[ |
1545 |
mCls := mCls soleInstance. |
|
1546 |
]. |
|
1547 |
methodClasses add:mCls]. |
|
1548 |
" |
|
1549 |
fileOut by class |
|
1550 |
" |
|
1551 |
methodClasses do:[:cls | |
|
1552 |
stream := (self directory asFilename construct:(cls name , '.chg')) writeStream. |
|
617 | 1553 |
|
1420 | 1554 |
Transcript show:' ... '; showCR:cls name, '.chg'; endEntry. |
1555 |
methods do:[:m | |
|
1556 |
|mCls| |
|
617 | 1557 |
|
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
1558 |
mCls := m containingClass. |
1420 | 1559 |
(mCls == cls or:[mCls == cls class]) ifTrue:[ |
1560 |
mCls fileOutMethod:m on:stream. |
|
1561 |
]. |
|
1562 |
stream cr. |
|
1563 |
]. |
|
1564 |
stream close. |
|
1565 |
]. |
|
617 | 1566 |
]. |
1420 | 1567 |
|
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
1568 |
"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
|
1569 |
"Modified: 18.9.1997 / 18:50:34 / stefan" |
617 | 1570 |
! |
1571 |
||
1572 |
findTopFrom:directoryName |
|
1573 |
"returns the relative path from directoryName to the TOP |
|
1574 |
directory." |
|
1575 |
||
1576 |
|topName relParent foundTop| |
|
1577 |
||
1578 |
"/ find TOP |
|
1579 |
relParent := '..'. |
|
1580 |
foundTop := false. |
|
1581 |
[foundTop] whileFalse:[ |
|
1582 |
topName := directoryName , '/' , relParent. |
|
1583 |
topName asFilename pathName = '/' ifTrue:[ |
|
1584 |
self warn:'could not find TOP; assume absoulte path to TOP'. |
|
1585 |
topName := '/usr/local/lib/smalltalk'. |
|
1586 |
foundTop := true. |
|
1587 |
] ifFalse:[ |
|
1588 |
(topName , '/configurations') asFilename exists ifTrue:[ |
|
1589 |
(topName , '/include') asFilename exists ifTrue:[ |
|
1590 |
foundTop := true. |
|
1591 |
topName := relParent. |
|
1592 |
] |
|
1593 |
]. |
|
1594 |
foundTop ifFalse:[ |
|
1595 |
relParent := relParent , '/..'. |
|
1596 |
] |
|
1597 |
] |
|
1598 |
]. |
|
1599 |
^ topName |
|
1600 |
! ! |
|
1601 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1602 |
!Project methodsFor:'printing & storing'! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1603 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1604 |
displayString |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1605 |
^ super displayString , '(''' , (name ? '<unnamed>') , ''')' |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1606 |
! ! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1607 |
|
617 | 1608 |
!Project methodsFor:'properties'! |
1609 |
||
4097 | 1610 |
addClass:classOrClassName classFileName:fileName |
1611 |
"add a class to the project" |
|
1612 |
||
1613 |
self |
|
1614 |
addClass:classOrClassName |
|
1615 |
conditionForInclusion:#always |
|
1616 |
classFileName:fileName |
|
1617 |
||
1618 |
! |
|
1619 |
||
1620 |
addClass:classOrClassName conditionForInclusion:conditionBlock classFileName:fileName |
|
1621 |
"add a class to the project" |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1622 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1623 |
|i| |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1624 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1625 |
i := ClassInfo new. |
4097 | 1626 |
i className:classOrClassName. |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1627 |
i classFileName:fileName. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1628 |
i conditionForInclusion:conditionBlock. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1629 |
self addClassInfo:i |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1630 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1631 |
|
4089 | 1632 |
addClassInfo:newInfo |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1633 |
"add a class info to the project" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1634 |
|
4315 | 1635 |
|infoCollection index nm prefix| |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1636 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1637 |
(infoCollection := self classInfo) isNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1638 |
self classInfo:(infoCollection := OrderedCollection new). |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1639 |
]. |
4315 | 1640 |
|
1641 |
index := infoCollection findFirst:[:i | |nm1 nm2| |
|
1642 |
nm1 := i className. |
|
1643 |
nm2 := newInfo className. |
|
1644 |
(nm1 includes:$:) ifFalse:[ |
|
1645 |
nm1 := self defaultNameSpace name , '::' , nm1 |
|
1646 |
]. |
|
1647 |
(nm2 includes:$:) ifFalse:[ |
|
1648 |
nm2 := self defaultNameSpace name , '::' , nm2 |
|
1649 |
]. |
|
1650 |
nm1 = nm2 |
|
1651 |
]. |
|
1652 |
"/ strip off nameSpace prefix, if its the same as |
|
1653 |
"/ the default ... |
|
1654 |
||
1655 |
nm := newInfo className. |
|
1656 |
prefix := self defaultNameSpace name , '::'. |
|
1657 |
(nm startsWith:prefix) ifTrue:[ |
|
1658 |
nm := nm copyFrom:(prefix size + 1). |
|
1659 |
newInfo className:nm asSymbol. |
|
1660 |
]. |
|
4089 | 1661 |
index ~~ 0 ifTrue:[ |
1662 |
infoCollection at:index put:newInfo |
|
1663 |
] ifFalse:[ |
|
1664 |
infoCollection add:newInfo |
|
1665 |
] |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1666 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1667 |
|
4668 | 1668 |
addMethod:methodOrSelector inClass:aClassOrClassName fileName:fileName |
1669 |
"add an individual method to the project" |
|
1670 |
||
1671 |
|i| |
|
1672 |
||
1673 |
i := MethodInfo new. |
|
1674 |
i methodName:methodOrSelector. |
|
1675 |
i className:aClassOrClassName. |
|
1676 |
i fileName:fileName. |
|
1677 |
self addMethodInfo:i |
|
1678 |
! |
|
1679 |
||
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1680 |
classInfo:aClassInfoCollection |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1681 |
"set the class info of the project" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1682 |
|
4071 | 1683 |
self propertyAt:#classInfo put:aClassInfoCollection |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1684 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1685 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1686 |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1687 |
comment |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1688 |
"return the comment of the project" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1689 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1690 |
properties isNil ifTrue:[^ '']. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1691 |
^ properties at:#comment ifAbsent:'' |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1692 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1693 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1694 |
comment:aString |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1695 |
"set the projects comment" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1696 |
|
4071 | 1697 |
self propertyAt:#comment put:aString |
4070 | 1698 |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1699 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1700 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1701 |
documentationURL |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1702 |
"return the documentation-URL of the project" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1703 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1704 |
properties isNil ifTrue:[^ nil]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1705 |
^ properties at:#documentationURL ifAbsent:nil |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1706 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1707 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1708 |
documentationURL:anURLString |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1709 |
"set the projects documentation-URL" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1710 |
|
4071 | 1711 |
self propertyAt:#documentationURL put:anURLString |
1712 |
||
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1713 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1714 |
|
617 | 1715 |
properties |
4097 | 1716 |
"return the property dictionary" |
1717 |
||
617 | 1718 |
^ properties |
1719 |
! |
|
1720 |
||
1721 |
properties:p |
|
4097 | 1722 |
"set the property dictionary" |
1723 |
||
617 | 1724 |
properties := p |
1725 |
! |
|
1726 |
||
4071 | 1727 |
propertyAt:aKey |
4097 | 1728 |
"return a property; the key is a symbol" |
1729 |
||
4071 | 1730 |
properties isNil ifTrue:[^ nil]. |
1731 |
^ properties at:aKey ifAbsent:nil. |
|
1732 |
! |
|
1733 |
||
1734 |
propertyAt:aKey put:aValue |
|
4097 | 1735 |
"set a property; the key is a symbol" |
1736 |
||
4077 | 1737 |
|oldValue| |
1738 |
||
1739 |
oldValue := self propertyAt:aKey. |
|
1740 |
||
4071 | 1741 |
properties isNil ifTrue:[ |
1742 |
properties := IdentityDictionary new |
|
1743 |
]. |
|
1744 |
properties at:aKey put:aValue. |
|
4077 | 1745 |
|
1746 |
oldValue ~~ aValue ifTrue:[ |
|
1747 |
self changed:aKey. |
|
1748 |
]. |
|
4071 | 1749 |
|
1750 |
"Created: / 23.3.1999 / 14:21:11 / cg" |
|
1751 |
! |
|
1752 |
||
617 | 1753 |
type |
4097 | 1754 |
"return the type of project (one of #application, #library, #smalltalk)" |
617 | 1755 |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1756 |
properties isNil ifTrue:[^ #application]. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1757 |
^ properties at:#type ifAbsent:#application |
617 | 1758 |
! |
1759 |
||
1760 |
type:aSymbol |
|
4097 | 1761 |
"set the projects type (one of #application, #library, #smalltalk)" |
617 | 1762 |
|
1763 |
(#(application library smalltalk) includes:aSymbol) ifFalse:[ |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1764 |
self warn:'invalid project type'. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1765 |
^ self |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1766 |
]. |
4077 | 1767 |
self propertyAt:#type put:aSymbol |
4069 | 1768 |
! |
1769 |
||
1770 |
wasLoadedFromFile |
|
1771 |
"return true, if the project was loaded from a file" |
|
1772 |
||
1773 |
properties isNil ifTrue:[^ nil]. |
|
1774 |
^ properties at:#wasLoadedFromFile ifAbsent:false |
|
1775 |
||
1776 |
"Modified: / 23.3.1999 / 13:59:32 / cg" |
|
1777 |
"Created: / 23.3.1999 / 14:21:06 / cg" |
|
1778 |
! |
|
1779 |
||
1780 |
wasLoadedFromFile:aBoolean |
|
4097 | 1781 |
"set/clear the flag stating that the project was loaded from a file" |
1782 |
||
4071 | 1783 |
self propertyAt:#wasLoadedFromFile put:aBoolean |
617 | 1784 |
! ! |
1785 |
||
1786 |
!Project methodsFor:'queries'! |
|
1787 |
||
4688 | 1788 |
areAllClassesLoaded |
1789 |
"return true, if all classes of the package are loaded |
|
1790 |
(i.e. there are no autoloaded stubs present)" |
|
1791 |
||
4690 | 1792 |
|classes| |
1793 |
||
1794 |
classes := self classes. |
|
1795 |
classes isNil ifTrue:[^ isLoaded ? false]. |
|
1796 |
classes do:[:aClass | |
|
4688 | 1797 |
aClass isLoaded ifFalse:[^ false]. |
1798 |
]. |
|
1799 |
^ true |
|
1800 |
||
1801 |
! |
|
1802 |
||
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1803 |
classInfo |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1804 |
"return a classInfo collection of classes belonging to that project" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1805 |
|
4073 | 1806 |
|classInfo classes| |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1807 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1808 |
properties notNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1809 |
classInfo := properties at:#classInfo ifAbsent:nil. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1810 |
classInfo notNil ifTrue:[^ classInfo]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1811 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1812 |
|
4073 | 1813 |
classes := self classes. |
1814 |
classes size == 0 ifTrue:[ |
|
1815 |
classInfo := OrderedCollection new |
|
1816 |
] ifFalse:[ |
|
1817 |
classInfo := classes asOrderedCollection |
|
1818 |
collect:[:class | |
|
1819 |
|i fn| |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1820 |
|
4073 | 1821 |
i := ClassInfo new. |
1822 |
i conditionForInclusion:#always. |
|
1823 |
i className:class name. |
|
1824 |
fn := class classFilename ? ((Smalltalk fileNameForClass:class) , '.st'). |
|
1825 |
i classFileName:fn. |
|
1826 |
i |
|
1827 |
] |
|
1828 |
]. |
|
1829 |
self propertyAt:#classInfo put:classInfo. |
|
1830 |
^ classInfo |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1831 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1832 |
"Modified: 4.1.1997 / 16:51:18 / cg" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1833 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1834 |
|
617 | 1835 |
classes |
4013
f06d31702f2a
ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents:
4010
diff
changeset
|
1836 |
"return a collection of classes belonging to that project. |
f06d31702f2a
ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents:
4010
diff
changeset
|
1837 |
This excludes any private classes." |
617 | 1838 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1839 |
|classes classInfo| |
617 | 1840 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1841 |
properties notNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1842 |
classInfo := properties at:#classInfo ifAbsent:nil. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1843 |
classInfo notNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1844 |
classes := classInfo collect:[:i | i className] |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1845 |
] ifFalse:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1846 |
classes := properties at:#classes ifAbsent:nil |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1847 |
] |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1848 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1849 |
|
617 | 1850 |
classes isNil ifTrue:[ |
2056 | 1851 |
classes := OrderedCollection new. |
1852 |
Smalltalk |
|
4013
f06d31702f2a
ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents:
4010
diff
changeset
|
1853 |
allClassesDo:[:aClass | |
4670 | 1854 |
(true "aClass owningClass isNil" |
4089 | 1855 |
and:[aClass isMeta not |
4670 | 1856 |
and:[aClass package = packageName |
1857 |
and:[aClass isNamespace not or:[aClass == Smalltalk]]]]) ifTrue:[ |
|
4089 | 1858 |
classes add:aClass |
2056 | 1859 |
] |
1860 |
]. |
|
1861 |
classes isEmpty ifTrue:[^ nil]. |
|
617 | 1862 |
]. |
1863 |
^ classes |
|
1864 |
||
2056 | 1865 |
"Modified: 4.1.1997 / 16:51:18 / cg" |
617 | 1866 |
! |
1867 |
||
1868 |
individualMethods |
|
1869 |
"return a collection of individual methods belonging to that project, |
|
1870 |
only methods are returned which are not contained in the |
|
1871 |
projects class set." |
|
1872 |
||
1873 |
|classes methods| |
|
1874 |
||
1875 |
classes := self classes. |
|
1876 |
classes notNil ifTrue:[ |
|
1461
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1877 |
classes := classes asIdentitySet. |
617 | 1878 |
] ifFalse:[ |
1461
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1879 |
classes := #() |
617 | 1880 |
]. |
1881 |
||
1882 |
methods := IdentitySet new. |
|
1883 |
Smalltalk allBehaviorsDo:[:cls | |
|
4119 | 1884 |
|classToCheck| |
1885 |
||
1886 |
classToCheck := cls. |
|
4670 | 1887 |
"/ cls isPrivate ifTrue:[ |
1888 |
"/ classToCheck := cls topOwningClass |
|
1889 |
"/ ]. |
|
4119 | 1890 |
(classes isNil |
1891 |
or:[((classes includes:classToCheck) |
|
1892 |
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
|
1893 |
cls methodDictionary do:[:m | |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1894 |
m package = packageName ifTrue:[ |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1895 |
methods add:m |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1896 |
] |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1897 |
]. |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1898 |
cls class methodDictionary do:[:m | |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1899 |
m package = packageName ifTrue:[ |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1900 |
methods add:m |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1901 |
] |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1902 |
]. |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1903 |
] |
617 | 1904 |
]. |
1905 |
^ methods asArray |
|
1906 |
||
1907 |
" |
|
1908 |
Project current classes |
|
1909 |
Project current individualMethods |
|
1910 |
" |
|
1461
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1911 |
|
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1912 |
"Modified: 7.6.1996 / 09:16:25 / stefan" |
4685
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
1913 |
! |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
1914 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
1915 |
isLoaded |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
1916 |
"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
|
1917 |
into the system" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
1918 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
1919 |
|binaryModule| |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
1920 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
1921 |
isLoaded notNil ifTrue:[^ isLoaded]. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
1922 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
1923 |
"/ check for loaded class-libraries. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
1924 |
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
|
1925 |
binaryModule notNil ifTrue:[ |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
1926 |
^ true |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
1927 |
]. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
1928 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
1929 |
self halt. |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
1930 |
|
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
1931 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
1932 |
(Project projectWithId:#'stx:libbasic') isLoaded |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
1933 |
(Project projectWithId:#'stx:goodies/persistency') isLoaded |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
1934 |
" |
d145298696b7
more package loading support
Claus Gittinger <cg@exept.de>
parents:
4670
diff
changeset
|
1935 |
|
2 | 1936 |
! ! |
1937 |
||
1938 |
!Project methodsFor:'specifications'! |
|
1939 |
||
1940 |
readSpec |
|
1941 |
|s chunk fileName| |
|
1942 |
||
1943 |
fileName := (properties at:#directoryName) asFilename construct:'.project'. |
|
1944 |
s := fileName readStream. |
|
1945 |
s isNil ifTrue:[^ self]. |
|
1946 |
[s atEnd] whileFalse:[ |
|
203 | 1947 |
chunk := s nextChunk. |
1948 |
Compiler evaluate:chunk receiver:properties notifying:nil |
|
2 | 1949 |
]. |
1950 |
s close. |
|
1951 |
||
1952 |
"(Project new directory:'../projects/Clock') readSpec" |
|
1953 |
! |
|
1954 |
||
1955 |
saveSpec |
|
1956 |
|f d s| |
|
1957 |
||
1958 |
d := (properties at:#directoryName) asFilename. |
|
1959 |
d exists ifFalse:[ |
|
4522
29a6625dc7b1
error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents:
4315
diff
changeset
|
1960 |
self error:'directory does not exist' mayProceed:true. |
29a6625dc7b1
error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents:
4315
diff
changeset
|
1961 |
^ self |
2 | 1962 |
]. |
1963 |
f := d construct:'.project'. |
|
1964 |
s := f writeStream. |
|
1965 |
s isNil ifTrue:[^ self]. |
|
1966 |
properties associationsDo:[:aProp | |
|
4522
29a6625dc7b1
error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents:
4315
diff
changeset
|
1967 |
(aProp == #directoryName) ifFalse:[ |
29a6625dc7b1
error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents:
4315
diff
changeset
|
1968 |
s nextChunkPut:('self at:' , aProp key storeString, |
29a6625dc7b1
error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents:
4315
diff
changeset
|
1969 |
' put:' , aProp value storeString). |
29a6625dc7b1
error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents:
4315
diff
changeset
|
1970 |
s cr |
29a6625dc7b1
error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents:
4315
diff
changeset
|
1971 |
] |
2 | 1972 |
]. |
1973 |
s close |
|
1974 |
||
1975 |
"((Project new directory:'../projects/Clock') readSpec |
|
4522
29a6625dc7b1
error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents:
4315
diff
changeset
|
1976 |
directory:'../projects/xxx') saveSpec" |
2 | 1977 |
! ! |
1978 |
||
617 | 1979 |
!Project methodsFor:'views'! |
1980 |
||
1981 |
addView:aView |
|
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
1982 |
"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
|
1983 |
|
617 | 1984 |
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
|
1985 |
|
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
1986 |
"Modified: 14.2.1997 / 15:36:51 / cg" |
617 | 1987 |
! |
1988 |
||
1989 |
destroyViews |
|
1990 |
"destroy all views of this project" |
|
1991 |
||
1992 |
views notNil ifTrue:[ |
|
1993 |
views do:[:aView | |
|
1994 |
aView notNil ifTrue:[aView destroy] |
|
1995 |
] |
|
1996 |
]. |
|
1997 |
! |
|
1998 |
||
1999 |
hideViews |
|
2000 |
"hide all views of this project" |
|
2001 |
||
2002 |
views notNil ifTrue:[ |
|
1332
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
2003 |
views do:[:aView | |
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
2004 |
aView notNil ifTrue:[aView unmap] |
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
2005 |
] |
617 | 2006 |
]. |
1332
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
2007 |
|
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
2008 |
"Modified: 3.5.1996 / 23:48:51 / stefan" |
617 | 2009 |
! |
2010 |
||
2011 |
removeView:aView |
|
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
2012 |
"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
|
2013 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2014 |
views notNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2015 |
views remove:aView ifAbsent:nil |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
2016 |
] |
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
2017 |
|
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
2018 |
"Modified: 14.2.1997 / 15:37:20 / cg" |
617 | 2019 |
! |
2020 |
||
2021 |
showViews |
|
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
2022 |
"show all views of this project" |
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
2023 |
|
617 | 2024 |
views notNil ifTrue:[ |
1332
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
2025 |
views do:[:aView | |
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
2026 |
aView notNil ifTrue:[aView remap] |
1332
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
2027 |
] |
617 | 2028 |
]. |
1332
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
2029 |
|
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
2030 |
"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
|
2031 |
"Modified: 14.2.1997 / 15:38:47 / cg" |
617 | 2032 |
! ! |
2033 |
||
4721
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2034 |
!Project::ClassInfo methodsFor:'accessing'! |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2035 |
|
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2036 |
classFileName |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2037 |
"return the value of the instance variable 'classFileName' (automatically generated)" |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2038 |
|
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2039 |
^ classFileName! |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2040 |
|
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2041 |
classFileName:something |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2042 |
"set the value of the instance variable 'classFileName' (automatically generated)" |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2043 |
|
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2044 |
classFileName := something.! |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2045 |
|
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2046 |
className |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2047 |
"return the value of the instance variable 'className' (automatically generated)" |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2048 |
|
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2049 |
^ className! |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2050 |
|
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2051 |
className:something |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2052 |
"set the value of the instance variable 'className' (automatically generated)" |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2053 |
|
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2054 |
className := something.! |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2055 |
|
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2056 |
conditionForInclusion |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2057 |
"return the value of the instance variable 'conditionForInclusion' (automatically generated)" |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2058 |
|
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2059 |
^ conditionForInclusion! |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2060 |
|
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2061 |
conditionForInclusion:something |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2062 |
"set the value of the instance variable 'conditionForInclusion' (automatically generated)" |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2063 |
|
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2064 |
conditionForInclusion := something.! ! |
df5b5d4bb02a
much faster initKnownProjects
Claus Gittinger <cg@exept.de>
parents:
4690
diff
changeset
|
2065 |
|
4668 | 2066 |
!Project::MethodInfo methodsFor:'accessing'! |
2067 |
||
2068 |
className |
|
2069 |
"return the value of the instance variable 'className' (automatically generated)" |
|
2070 |
||
2071 |
^ className! |
|
2072 |
||
2073 |
className:something |
|
2074 |
"set the value of the instance variable 'className' (automatically generated)" |
|
2075 |
||
2076 |
className := something.! |
|
2077 |
||
2078 |
fileName |
|
2079 |
"return the value of the instance variable 'fileName' (automatically generated)" |
|
2080 |
||
2081 |
^ fileName! |
|
2082 |
||
2083 |
fileName:something |
|
2084 |
"set the value of the instance variable 'fileName' (automatically generated)" |
|
2085 |
||
2086 |
fileName := something.! |
|
2087 |
||
2088 |
methodName |
|
2089 |
"return the value of the instance variable 'methodName' (automatically generated)" |
|
2090 |
||
2091 |
^ methodName! |
|
2092 |
||
2093 |
methodName:something |
|
2094 |
"set the value of the instance variable 'methodName' (automatically generated)" |
|
2095 |
||
2096 |
methodName := something.! ! |
|
2097 |
||
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
2098 |
!Project class methodsFor:'documentation'! |
630 | 2099 |
|
2100 |
version |
|
4727 | 2101 |
^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.92 1999-09-15 07:04:48 cg Exp $' |
1298 | 2102 |
! ! |
1 | 2103 |
Project initialize! |