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