author | Claus Gittinger <cg@exept.de> |
Tue, 23 Mar 1999 12:10:24 +0100 | |
changeset 4066 | 74e64b5cedce |
parent 4013 | f06d31702f2a |
child 4069 | 7d36633a470a |
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 |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
76 |
- allow speficiation of the type of the project (application, library, etc) |
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 |
" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
138 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
139 |
|
236 | 140 |
initialize |
338 | 141 |
SystemProject isNil ifTrue:[ |
2028 | 142 |
NextSequential := 1. |
143 |
SystemProject := self new name:'default'. |
|
144 |
SystemProject packageName:'private'. |
|
145 |
SystemProject defaultNameSpace:Smalltalk. |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
146 |
SystemProject comment:'A default (dummy) project. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
147 |
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
|
148 |
|
2028 | 149 |
" |
150 |
the SystemProject does not keep a record if changes, |
|
151 |
but instead depends on the changes file - recording anything there. |
|
152 |
" |
|
153 |
SystemProject changeSet:nil. |
|
338 | 154 |
]. |
155 |
||
156 |
CurrentProject := SystemProject. |
|
4066 | 157 |
AllProjects := OrderedCollection new. |
158 |
"/ AllProjects := OrderedCollection with:SystemProject. |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
159 |
self initKnownProjects. |
236 | 160 |
|
315 | 161 |
" |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
162 |
SystemProject := nil. |
315 | 163 |
Project initialize |
164 |
" |
|
236 | 165 |
! ! |
166 |
||
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
167 |
!Project class methodsFor:'instance creation'! |
236 | 168 |
|
169 |
new |
|
170 |
^ self basicNew initialize |
|
171 |
! ! |
|
172 |
||
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
173 |
!Project class methodsFor:'accessing'! |
1 | 174 |
|
175 |
current |
|
10 | 176 |
"return the currently active project" |
177 |
||
1 | 178 |
^ CurrentProject |
179 |
||
362 | 180 |
" |
181 |
Project current |
|
182 |
" |
|
1 | 183 |
! |
184 |
||
185 |
current:aProject |
|
10 | 186 |
"set the currently active project" |
187 |
||
315 | 188 |
CurrentProject := aProject. |
189 |
self changed:#currentProject |
|
334 | 190 |
! |
191 |
||
617 | 192 |
currentPackageName |
193 |
CurrentProject notNil ifTrue:[ |
|
194 |
^ CurrentProject packageName |
|
195 |
]. |
|
196 |
^ 'no package' |
|
197 |
||
198 |
" |
|
199 |
Project currentPackageName |
|
200 |
" |
|
201 |
! |
|
202 |
||
336 | 203 |
defaultProject |
204 |
"return the SystemDefault project" |
|
205 |
||
206 |
^ SystemProject. |
|
207 |
! |
|
208 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
209 |
knownProjects |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
210 |
^ AllProjects ? #() |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
211 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
212 |
|
334 | 213 |
setDefaultProject |
214 |
"set the currently active project to be the SystemDEfault project" |
|
215 |
||
216 |
self current:SystemProject. |
|
939
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
217 |
! |
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
218 |
|
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
219 |
setProject:aProjectOrNil |
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
220 |
"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
|
221 |
|
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
222 |
CurrentProject := aProjectOrNil. |
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
223 |
|
ffee570b0f09
added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
224 |
"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
|
225 |
"Modified: 7.2.1996 / 14:01:16 / cg" |
1 | 226 |
! ! |
227 |
||
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
228 |
!Project class methodsFor:'changes management'! |
149 | 229 |
|
664 | 230 |
addClassDefinitionChangeFor:aClass |
1115 | 231 |
"add a class-def-change for aClass to the current project" |
232 |
||
664 | 233 |
|p c| |
234 |
||
235 |
p := CurrentProject. |
|
236 |
(p notNil |
|
237 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
|
666
6d4175de8c55
fixed primitiveDefinitions changes
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
238 |
c addClassDefinitionChangeFor:aClass |
664 | 239 |
] |
240 |
||
241 |
"Created: 3.12.1995 / 13:44:58 / cg" |
|
242 |
"Modified: 3.12.1995 / 13:58:04 / cg" |
|
243 |
! |
|
244 |
||
617 | 245 |
addMethodCategoryChange:aMethod category:newCategory in:aClass |
1115 | 246 |
"add a method-category-change for aMethod in aClass to the current project" |
247 |
||
617 | 248 |
|p c| |
249 |
||
250 |
p := CurrentProject. |
|
251 |
(p notNil |
|
252 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
|
253 |
c addMethodCategoryChange:aMethod category:newCategory in:aClass |
|
254 |
] |
|
255 |
! |
|
256 |
||
149 | 257 |
addMethodChange:aMethod in:aClass |
1115 | 258 |
"add a method change in aClass to the current project" |
149 | 259 |
|
235 | 260 |
|p c| |
149 | 261 |
|
262 |
p := CurrentProject. |
|
263 |
(p notNil |
|
235 | 264 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
265 |
c addMethodChange:aMethod in:aClass |
|
203 | 266 |
] |
267 |
! |
|
268 |
||
617 | 269 |
addMethodPrivacyChange:aMethod in:aClass |
1115 | 270 |
"add a privacy change for aMethod in aClass to the current project" |
271 |
||
617 | 272 |
|p c| |
273 |
||
274 |
p := CurrentProject. |
|
275 |
(p notNil |
|
276 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
|
277 |
c addMethodPrivacyChange:aMethod in:aClass |
|
278 |
] |
|
279 |
||
280 |
"Modified: 27.8.1995 / 22:48:17 / claus" |
|
281 |
! |
|
282 |
||
705 | 283 |
addPrimitiveDefinitionsChangeFor:aClass |
1115 | 284 |
"add a primitiveDef change for aClass to the current project" |
285 |
||
705 | 286 |
|p c| |
287 |
||
288 |
p := CurrentProject. |
|
289 |
(p notNil |
|
290 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
|
291 |
c addPrimitiveDefinitionsChangeFor:aClass |
|
292 |
] |
|
293 |
! |
|
294 |
||
295 |
addPrimitiveFunctionsChangeFor:aClass |
|
1115 | 296 |
"add a primitiveFuncs change for aClass to the current project" |
297 |
||
705 | 298 |
|p c| |
299 |
||
300 |
p := CurrentProject. |
|
301 |
(p notNil |
|
302 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
|
303 |
c addPrimitiveFunctionsChangeFor:aClass |
|
304 |
] |
|
305 |
! |
|
306 |
||
307 |
addPrimitiveVariablesChangeFor:aClass |
|
1115 | 308 |
"add a primitiveVars change for aClass to the current project" |
309 |
||
705 | 310 |
|p c| |
311 |
||
312 |
p := CurrentProject. |
|
313 |
(p notNil |
|
314 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
|
315 |
c addPrimitiveVariablesChangeFor:aClass |
|
316 |
] |
|
317 |
! |
|
318 |
||
3288
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
319 |
addRemoveSelectorChange:aSelector in:aClass |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
320 |
"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
|
321 |
|
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
322 |
|p c| |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
323 |
|
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
324 |
p := CurrentProject. |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
325 |
(p notNil |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
326 |
and:[(c := p changeSet) notNil]) ifTrue:[ |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
327 |
c addRemoveSelectorChange:aSelector in:aClass |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
328 |
] |
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
329 |
|
373af30a15ca
add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents:
2962
diff
changeset
|
330 |
"Created: / 16.2.1998 / 12:45:10 / cg" |
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 |
|
149 | 333 |
currentProjectDirectory |
334 |
"return the name of the directory to use for fileOut. |
|
235 | 335 |
The returned name already includes a file-separator at the end, |
336 |
so the filename can be concatenated to it." |
|
149 | 337 |
|
338 |
|p dirName| |
|
339 |
||
340 |
p := CurrentProject. |
|
341 |
p notNil ifTrue:[ |
|
2907 | 342 |
dirName := p directory |
149 | 343 |
] ifFalse:[ |
2907 | 344 |
dirName := Filename currentDirectory name |
149 | 345 |
]. |
2962 | 346 |
^ dirName |
2907 | 347 |
|
348 |
"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
|
349 |
! |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
350 |
|
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
351 |
rememberOverwrittenMethod:newMethod from:oldMethod |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
352 |
"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
|
353 |
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
|
354 |
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
|
355 |
|
2558 | 356 |
|p| |
2334
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
357 |
|
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
358 |
p := CurrentProject. |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
359 |
(p notNil |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
360 |
and:[p ~~ SystemProject]) ifTrue:[ |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
361 |
p rememberOverwrittenMethod:newMethod from:oldMethod |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
362 |
] ifFalse:[ |
3332
8014b817988b
remove the 'does not remember ...' message.
Claus Gittinger <cg@exept.de>
parents:
3288
diff
changeset
|
363 |
"/ '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
|
364 |
] |
7502902385ff
only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents:
2276
diff
changeset
|
365 |
|
3332
8014b817988b
remove the 'does not remember ...' message.
Claus Gittinger <cg@exept.de>
parents:
3288
diff
changeset
|
366 |
"Modified: / 7.3.1998 / 13:38:39 / cg" |
13 | 367 |
! ! |
368 |
||
1 | 369 |
!Project methodsFor:'accessing'! |
370 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
371 |
addSubProject:aProject |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
372 |
subProjects isNil ifTrue:[ |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
373 |
subProjects := OrderedCollection new. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
374 |
]. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
375 |
subProjects add:aProject |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
376 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
377 |
|
1 | 378 |
changeSet |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
379 |
"return the set of changes made in this project" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
380 |
|
1 | 381 |
^ changeSet |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
382 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
383 |
"Modified: 27.1.1997 / 11:58:36 / cg" |
1 | 384 |
! |
385 |
||
236 | 386 |
changeSet:aChangeSet |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
387 |
"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
|
388 |
the actual changeSet." |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
389 |
|
236 | 390 |
changeSet := aChangeSet |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
391 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
392 |
"Modified: 27.1.1997 / 11:59:02 / cg" |
73 | 393 |
! |
394 |
||
2028 | 395 |
defaultNameSpace |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
396 |
"return the defaultNameSpace of this project. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
397 |
New classes will (if not specified by a directive) be installed |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
398 |
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
|
399 |
overwriting of standard classes." |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
400 |
|
2028 | 401 |
^ defaultNameSpace |
402 |
||
403 |
"Created: 2.1.1997 / 19:54:42 / cg" |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
404 |
"Modified: 27.1.1997 / 11:59:53 / cg" |
2028 | 405 |
! |
406 |
||
407 |
defaultNameSpace:aNamespace |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
408 |
"set 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 |
|
2032 | 413 |
defaultNameSpace := aNamespace. |
414 |
self == CurrentProject ifTrue:[ |
|
415 |
Project changed:#defaultNameSpace |
|
416 |
] |
|
2028 | 417 |
|
418 |
"Created: 2.1.1997 / 19:54:37 / cg" |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
419 |
"Modified: 27.1.1997 / 12:00:01 / cg" |
2028 | 420 |
! |
421 |
||
315 | 422 |
directory |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
423 |
"return the projects directory. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
424 |
If not specified, a fileOut will be done into that directory" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
425 |
|
315 | 426 |
directoryName isNil ifTrue:[^ '.']. |
427 |
^ directoryName |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
428 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
429 |
"Modified: 27.1.1997 / 12:00:41 / cg" |
315 | 430 |
! |
431 |
||
432 |
directory:aDirectoryName |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
433 |
"set the projects directory. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
434 |
If not specified, a fileOut will be done into that directory" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
435 |
|
315 | 436 |
directoryName := aDirectoryName. |
437 |
self == CurrentProject ifTrue:[ |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
438 |
Project changed:#directory |
315 | 439 |
] |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
440 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
441 |
"Modified: 27.1.1997 / 12:00:47 / cg" |
617 | 442 |
! |
356 | 443 |
|
617 | 444 |
name |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
445 |
"return the projects name. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
446 |
This is for the user only - shown in the projectViews label" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
447 |
|
617 | 448 |
^ name |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
449 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
450 |
"Modified: 27.1.1997 / 12:01:16 / cg" |
617 | 451 |
! |
356 | 452 |
|
617 | 453 |
name:aString |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
454 |
"set the projects name. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
455 |
This is for the user only - shown in the projectViews label" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
456 |
|
617 | 457 |
name := aString. |
458 |
self == CurrentProject ifTrue:[ |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
459 |
Project changed:#name |
617 | 460 |
] |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
461 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
462 |
"Modified: 27.1.1997 / 12:01:09 / cg" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
463 |
! |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
464 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
465 |
overwrittenMethods |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
466 |
"return the set of methods which were overwritten in this project. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
467 |
This information allows uninstalling, by switching back to the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
468 |
original methods." |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
469 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
470 |
^ overwrittenMethods |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
471 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
472 |
"Created: 27.1.1997 / 11:57:21 / cg" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
473 |
"Modified: 27.1.1997 / 12:09:14 / cg" |
356 | 474 |
! |
475 |
||
617 | 476 |
packageName |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
477 |
"return the projects package identifier. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
478 |
This identifier marks all methods and new classes which were created |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
479 |
in this project." |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
480 |
|
617 | 481 |
^ packageName |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
482 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
483 |
"Modified: 27.1.1997 / 12:10:00 / cg" |
10 | 484 |
! |
485 |
||
617 | 486 |
packageName:aStringOrSymbol |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
487 |
"set the projects package identifier. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
488 |
This identifier marks all methods and new classes which were created |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
489 |
in this project." |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
490 |
|
617 | 491 |
packageName := aStringOrSymbol asSymbol. |
492 |
self == CurrentProject ifTrue:[ |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
493 |
Project changed:#package |
617 | 494 |
] |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
495 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
496 |
"Modified: 27.1.1997 / 12:10:09 / cg" |
10 | 497 |
! |
498 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
499 |
prerequisites |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
500 |
^ prerequisites ? #() |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
501 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
502 |
|
3973 | 503 |
prerequisites:aCollectionOfProjects |
504 |
prerequisites := aCollectionOfProjects |
|
505 |
! |
|
506 |
||
654 | 507 |
repositoryDirectory |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
508 |
"return the projects default repository location. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
509 |
This is offered initially, when classes are checked into the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
510 |
source repository initially" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
511 |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
512 |
^ repositoryDirectory |
654 | 513 |
|
514 |
"Created: 25.11.1995 / 18:04:51 / cg" |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
515 |
"Modified: 27.1.1997 / 12:13:35 / cg" |
654 | 516 |
! |
517 |
||
518 |
repositoryDirectory:aRelativePathName |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
519 |
"set the projects default repository location. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
520 |
This will be offered initially, when classes are checked into the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
521 |
source repository initially" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
522 |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
523 |
repositoryDirectory := aRelativePathName |
654 | 524 |
|
525 |
"Created: 25.11.1995 / 18:05:06 / cg" |
|
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
526 |
"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
|
527 |
! |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
528 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
529 |
repositoryModule |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
530 |
"return the projects default repository module name. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
531 |
This is offered initially, when classes are checked into the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
532 |
source repository initially" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
533 |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
534 |
^ repositoryModule |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
535 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
536 |
"Created: 25.11.1995 / 18:04:51 / cg" |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
537 |
"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
|
538 |
! |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
539 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
540 |
repositoryModule:aString |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
541 |
"set the projects default repository module name. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
542 |
This is offered initially, when classes are checked into the |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
543 |
source repository initially" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
544 |
|
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
545 |
repositoryModule := aString |
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
546 |
|
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
547 |
"Created: 25.11.1995 / 18:05:06 / cg" |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
548 |
"Modified: 27.1.1997 / 12:13:57 / cg" |
654 | 549 |
! |
550 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
551 |
subProjects |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
552 |
^ subProjects ? #() |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
553 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
554 |
|
617 | 555 |
views |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
556 |
"return a collection of views which were opened in this project" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
557 |
|
617 | 558 |
^ views asArray |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
559 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
560 |
"Modified: 27.1.1997 / 12:14:18 / cg" |
338 | 561 |
! |
562 |
||
617 | 563 |
views:aSetOfViews |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
564 |
"set the collection of views which were opened in this project" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
565 |
|
617 | 566 |
views := WeakIdentitySet withAll:aSetOfViews |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
567 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
568 |
"Modified: 27.1.1997 / 12:14:26 / cg" |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
569 |
! ! |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
570 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
571 |
!Project methodsFor:'changes'! |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
572 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
573 |
rememberOverwrittenMethod:newMethod from:oldMethod |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
574 |
"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
|
575 |
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
|
576 |
Allows previous methods to be reconstructed." |
2276
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
577 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
578 |
overwrittenMethods isNil ifTrue:[ |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
579 |
overwrittenMethods := IdentityDictionary new. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
580 |
]. |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
581 |
overwrittenMethods at:newMethod put:oldMethod |
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
582 |
|
4efec5219eef
remember overwritten methods
Claus Gittinger <cg@exept.de>
parents:
2164
diff
changeset
|
583 |
"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
|
584 |
"Modified: 30.1.1997 / 21:10:51 / cg" |
10 | 585 |
! ! |
586 |
||
236 | 587 |
!Project methodsFor:'initialization'! |
588 |
||
589 |
initialize |
|
338 | 590 |
|numString| |
591 |
||
330 | 592 |
views := WeakIdentitySet new. |
338 | 593 |
numString := NextSequential printString. |
315 | 594 |
NextSequential := NextSequential + 1. |
338 | 595 |
|
596 |
name := 'new Project-' , numString. |
|
597 |
packageName := 'private-' , numString. |
|
2034
1c96469c3df8
preinit the defaultNamespace of new projects (to Smalltalk)
Claus Gittinger <cg@exept.de>
parents:
2032
diff
changeset
|
598 |
defaultNameSpace := Smalltalk. |
1c96469c3df8
preinit the defaultNamespace of new projects (to Smalltalk)
Claus Gittinger <cg@exept.de>
parents:
2032
diff
changeset
|
599 |
|
848
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
600 |
"/ |
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
601 |
"/ for tiny-configurations, allow ChangeSet to be absent |
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
602 |
"/ |
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
603 |
ChangeSet notNil ifTrue:[ |
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
604 |
changeSet := ChangeSet new. |
76a83f34c26a
moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents:
725
diff
changeset
|
605 |
]. |
654 | 606 |
self directory:'.'. |
725
02759b2003a8
keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents:
705
diff
changeset
|
607 |
self repositoryModule:(OperatingSystem getLoginName). |
654 | 608 |
self repositoryDirectory:'private' |
609 |
||
610 |
"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
|
611 |
"Modified: 3.1.1997 / 13:24:10 / cg" |
236 | 612 |
! ! |
613 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
614 |
!Project methodsFor:'load & save'! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
615 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
616 |
loadFromProjectFile:aFilename |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
617 |
|f l pack targetConditions s| |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
618 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
619 |
f := aFilename asFilename. |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
620 |
directoryName := f directory pathName. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
621 |
self directory:(f directory pathName). |
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
622 |
pack := ResourcePack fromFile:f baseName directory:directoryName. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
623 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
624 |
"/ convert the resourcePack ... |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
625 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
626 |
packageName := pack at:'package' ifAbsent:packageName. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
627 |
name := pack at:'name' ifAbsent:name. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
628 |
repositoryModule := pack at:'repository.module' ifAbsent:repositoryModule. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
629 |
repositoryDirectory := pack at:'repository.directory' ifAbsent:repositoryDirectory. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
630 |
subProjects := pack at:'subProjects' ifAbsent:subProjects. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
631 |
(s := pack at:'comment' ifAbsent:nil) notNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
632 |
self comment:s |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
633 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
634 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
635 |
"/ first, all of the conditions ... |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
636 |
targetConditions := Dictionary new. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
637 |
pack keysAndValuesDo:[:key :val | |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
638 |
|conditionKey| |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
639 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
640 |
(key startsWith:'target.condition.') ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
641 |
conditionKey := key copyFrom:'target.condition.' size + 1. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
642 |
targetConditions at:conditionKey put:val. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
643 |
] |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
644 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
645 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
646 |
properties isNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
647 |
properties := IdentityDictionary new |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
648 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
649 |
properties at:'targetconditions' put:targetConditions. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
650 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
651 |
"/ fetch class info |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
652 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
653 |
(pack at:'classes') do:[:info | |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
654 |
|condKey className optionalFileName| |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
655 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
656 |
condKey := info at:1. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
657 |
className := info at:2. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
658 |
info size > 2 ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
659 |
optionalFileName := info at:3. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
660 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
661 |
self |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
662 |
addClass:className |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
663 |
conditionForInclusion:condKey |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
664 |
classFileName:optionalFileName |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
665 |
]. |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
666 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
667 |
" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
668 |
Project current saveAsProjectFile. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
669 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
670 |
Project new loadFromProjectFile:'default.prj' |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
671 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
672 |
Project new loadFromProjectFile:'../../libbasic/libbasic.prj' |
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
673 |
" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
674 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
675 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
676 |
saveAsProjectFile |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
677 |
|fn s| |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
678 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
679 |
fn := self directory asFilename. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
680 |
fn := fn construct:self name. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
681 |
fn := fn withSuffix:'prj'. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
682 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
683 |
s := fn writeStream. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
684 |
self saveAsProjectFileOn:s. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
685 |
s close. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
686 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
687 |
" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
688 |
Project current saveAsProjectFile |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
689 |
" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
690 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
691 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
692 |
saveAsProjectFileOn:aStream |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
693 |
|s coll| |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
694 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
695 |
s := aStream. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
696 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
697 |
s nextPutLine:'[name]'. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
698 |
s tab. s nextPutLine:(name storeString). |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
699 |
s nextPutLine:'[type]'. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
700 |
s tab. s nextPutLine:(self type storeString). |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
701 |
s nextPutLine:'[package]'. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
702 |
s tab. s nextPutLine:(self packageName storeString). |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
703 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
704 |
coll := self subProjects. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
705 |
coll size > 0 ifTrue:[ |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
706 |
s nextPutLine:'[subprojects]'. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
707 |
coll do:[:aSubProject | |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
708 |
s tab. s nextPutLine:(aSubProject name soreString). |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
709 |
]. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
710 |
]. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
711 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
712 |
coll := self prerequisites. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
713 |
coll size > 0 ifTrue:[ |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
714 |
s nextPutLine:'[prerequisites]'. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
715 |
coll do:[:aProject | |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
716 |
s tab. s nextPutLine:(aProject name soreString). |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
717 |
]. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
718 |
]. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
719 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
720 |
coll := self classes. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
721 |
coll size > 0 ifTrue:[ |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
722 |
s nextPutLine:'[classes]'. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
723 |
coll do:[:aClass | |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
724 |
s tab. s nextPutLine:(aClass name). |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
725 |
] |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
726 |
] |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
727 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
728 |
" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
729 |
Project current saveOn:Transcript |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
730 |
" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
731 |
! ! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
732 |
|
2 | 733 |
!Project methodsFor:'maintenance'! |
734 |
||
13 | 735 |
buildProject |
736 |
OperatingSystem executeCommand:('cd ' , self directory , ' ; make') |
|
737 |
! |
|
738 |
||
2 | 739 |
createMakefile |
740 |
"creates an initial makefile, which will recreate a correct |
|
741 |
Makefile, then compile all" |
|
742 |
||
362 | 743 |
|d f out in topName| |
2 | 744 |
|
1420 | 745 |
Transcript showCR:'creating Makefile'. |
13 | 746 |
|
356 | 747 |
d := directoryName asFilename. |
2 | 748 |
f := d construct:'Makefile'. |
13 | 749 |
f exists ifTrue:[ |
1420 | 750 |
f renameTo:(d construct:'Makefile.bak') |
13 | 751 |
]. |
2 | 752 |
out := f writeStream. |
13 | 753 |
out isNil ifTrue:[ |
1420 | 754 |
self warn:'cannot create Makefile'. |
755 |
^ self |
|
13 | 756 |
]. |
757 |
in := Smalltalk systemFileStreamFor:'rules/stdHeader'. |
|
2 | 758 |
out nextPutAll:in contents asString. |
759 |
in close. |
|
362 | 760 |
|
761 |
topName := self findTopFrom:directoryName. |
|
762 |
||
13 | 763 |
out nextPutAll:'#TOP=/usr/local/lib/smalltalk'; cr. |
362 | 764 |
out nextPutAll:'TOP=' , topName; cr. |
2 | 765 |
out nextPutAll:'target:'; cr. |
766 |
out tab; nextPutAll:'touch Make.proto'; cr. |
|
767 |
out tab; nextPutAll:'$(MAKE) Makefile'; cr. |
|
768 |
out tab; nextPutAll:'make'; cr; cr. |
|
769 |
||
362 | 770 |
in := Smalltalk systemFileStreamFor:'configurations/COMMON/defines'. |
771 |
out nextPutAll:in contents asString. |
|
772 |
in close. |
|
773 |
||
774 |
in := Smalltalk systemFileStreamFor:'configurations/vendorConf'. |
|
775 |
out nextPutAll:in contents asString. |
|
776 |
in close. |
|
777 |
||
13 | 778 |
in := Smalltalk systemFileStreamFor:'configurations/myConf'. |
2 | 779 |
out nextPutAll:in contents asString. |
780 |
in close. |
|
362 | 781 |
|
13 | 782 |
in := Smalltalk systemFileStreamFor:'rules/stdRules'. |
2 | 783 |
out nextPutAll:in contents asString. |
784 |
in close. |
|
785 |
out close |
|
1420 | 786 |
|
787 |
"Modified: 18.5.1996 / 15:44:25 / cg" |
|
2 | 788 |
! |
789 |
||
617 | 790 |
createProjectFiles |
791 |
"actually, creates all files to do a make in the project directory" |
|
792 |
||
793 |
directoryName asFilename exists ifFalse:[ |
|
794 |
(self confirm:'create new projectDirectory: ' , directoryName) |
|
795 |
ifFalse:[^ self]. |
|
796 |
OperatingSystem recursiveCreateDirectory:directoryName. |
|
797 |
]. |
|
798 |
self createMakefile. |
|
799 |
self createSourcefiles. |
|
800 |
self createProtoMakefile. |
|
801 |
! |
|
802 |
||
2 | 803 |
createProtoMakefile |
804 |
"creates a Make.proto file" |
|
805 |
||
362 | 806 |
|d f s type appName libName startUpClass startUpSelector |
807 |
topName classes| |
|
2 | 808 |
|
362 | 809 |
topName := self findTopFrom:directoryName. |
2 | 810 |
|
1420 | 811 |
Transcript showCR:'creating Make.proto'. |
13 | 812 |
|
356 | 813 |
d := directoryName asFilename. |
2 | 814 |
f := d construct:'Make.proto'. |
815 |
f exists ifTrue:[ |
|
1420 | 816 |
f renameTo:(d construct:'Make.proto.bak') |
2 | 817 |
]. |
818 |
s := f writeStream. |
|
13 | 819 |
s isNil ifTrue:[ |
1420 | 820 |
self warn:'cannot create prototype Makefile'. |
821 |
^ self |
|
13 | 822 |
]. |
2 | 823 |
s nextPutAll:'# |
362 | 824 |
# ' , Smalltalk timeStamp , ' |
825 |
# |
|
235 | 826 |
# created by Smalltalks Project support |
2 | 827 |
# |
362 | 828 |
|
829 |
||
830 |
# the next line defines the path to the TOP directory, |
|
831 |
# (where the directories "configurations" and "include" are found) |
|
832 |
# |
|
833 |
#TOP=/usr/local/lib/smalltalk |
|
834 |
TOP=' , topName ,' |
|
835 |
||
836 |
# |
|
837 |
# add any subdirectories that have to be visited by make |
|
838 |
# |
|
839 |
SUBDIRS= |
|
840 |
||
841 |
# |
|
842 |
# do not change |
|
843 |
# |
|
2 | 844 |
SHELL=/bin/sh |
845 |
||
362 | 846 |
'. |
847 |
||
848 |
s nextPutAll:'# |
|
849 |
# set the stc options |
|
850 |
# |
|
851 |
STCOPT=$(DEFAULT_STCOPT) |
|
852 |
# STCOPT=+optspace2 |
|
853 |
# STCOPT=+optspace2 -warnNonStandard |
|
854 |
||
855 |
# |
|
856 |
# and packageName option |
|
857 |
# |
|
858 |
STCLOCALOPT=''-Pprivate-classes-(libapp)'' |
|
2 | 859 |
|
860 |
'. |
|
861 |
||
356 | 862 |
type := #library. |
863 |
appName := 'app'. |
|
864 |
libName := 'lib'. |
|
865 |
startUpClass := 'Smalltalk'. |
|
866 |
startUpSelector := 'start'. |
|
13 | 867 |
|
356 | 868 |
properties notNil ifTrue:[ |
1420 | 869 |
type := properties at:#projectType ifAbsent:type. |
870 |
appName := properties at:#applicationName ifAbsent:appName. |
|
871 |
startUpClass := properties at:#startupClass ifAbsent:startUpClass. |
|
872 |
startUpSelector := properties at:#startupSelector ifAbsent:startUpSelector. |
|
356 | 873 |
]. |
874 |
||
362 | 875 |
s nextPutAll:'# |
876 |
# define the name of the library to create |
|
877 |
# |
|
878 |
'. |
|
879 |
s nextPutAll:'LIBNAME=lib' , appName; cr; cr. |
|
880 |
||
881 |
s nextPutAll:'# |
|
882 |
# the target rule: |
|
883 |
# |
|
884 |
all:: abbrev.stc objs genClassList $(OBJTARGET) |
|
885 |
||
886 |
'. |
|
2 | 887 |
|
888 |
type == #executable ifTrue:[ |
|
1420 | 889 |
s nextPutAll:'PROGS = ' , appName; cr. |
890 |
s nextPutAll:('STARTUP_CLASS=' , startUpClass); cr. |
|
891 |
s nextPutAll:'STARTUP_SELECTOR="' , startUpSelector; nextPutAll:'"'; cr. |
|
2 | 892 |
]. |
893 |
||
362 | 894 |
s nextPutAll:'# |
895 |
# define the object files that are to be created |
|
896 |
# |
|
897 |
'. |
|
2 | 898 |
s nextPutAll:'OBJS='. |
899 |
||
362 | 900 |
(classes := self classes) notNil ifTrue:[ |
1420 | 901 |
classes do:[:aClass | |
902 |
|abbrev| |
|
362 | 903 |
|
1420 | 904 |
s nextPutAll:' \'. s cr. |
905 |
abbrev := Smalltalk fileNameForClass:aClass name. |
|
906 |
s nextPutAll:' '; nextPutAll:abbrev; nextPutAll:'.o'. |
|
907 |
]. |
|
2 | 908 |
]. |
909 |
s cr; cr. |
|
910 |
||
362 | 911 |
s nextPutAll:'# |
912 |
# dependencies: |
|
913 |
# |
|
914 |
I=$(TOP)/include |
|
915 |
RT_STUFF=$(I)/Object.H $(I)/stc.h $(I)/stcIntern.h |
|
916 |
||
917 |
'. |
|
918 |
classes notNil ifTrue:[ |
|
1420 | 919 |
classes do:[:aClass | |
920 |
|abbrev| |
|
362 | 921 |
|
1420 | 922 |
abbrev := Smalltalk fileNameForClass:aClass name. |
923 |
s nextPutAll:abbrev; nextPutAll:'.o: '. |
|
924 |
s nextPutAll:abbrev; nextPutAll:'.st '. |
|
925 |
aClass allSuperclassesDo:[:superClass| |
|
926 |
s nextPutAll:'$(I)/'. |
|
927 |
s nextPutAll:(Smalltalk fileNameForClass:superClass name) , '.H '. |
|
928 |
]. |
|
929 |
s nextPutAll:'$(RT_STUFF)'; cr. |
|
930 |
]. |
|
362 | 931 |
]. |
932 |
s cr; cr. |
|
2 | 933 |
|
934 |
type == #executable ifTrue:[ |
|
1420 | 935 |
s nextPutAll:'all:: $(PROGS)'; cr. |
2 | 936 |
|
1420 | 937 |
s nextPutAll:appName. |
938 |
s nextPutAll:':: main.o classList.o $(OBJS)'; cr. |
|
939 |
s tab; nextPutAll:'$(LD) $(ST_LDFLAG) $(LDFLAGS) -o '; |
|
940 |
nextPutAll:appName; |
|
941 |
nextPutAll:' \'; cr. |
|
942 |
s tab; tab; nextPutAll:'$(CRT0) main.$(O) classList.$(O) $(OBJS) $(EXTRA_OBJ) $(LIBOBJS) \'; cr. |
|
943 |
s tab; tab; nextPutAll:'$(LIBRUNDIR)/hidata.o $(LIBRUN) \'; cr. |
|
944 |
s tab; tab; nextPutAll:'$(MATHLIB) $(EXTRALIBS) -lXext $(SYSLIBS) $(OTHERLIBS) $(CRTN)'; cr. |
|
2 | 945 |
]. |
946 |
||
947 |
s close |
|
1420 | 948 |
|
949 |
"Modified: 18.5.1996 / 15:44:28 / cg" |
|
617 | 950 |
! |
951 |
||
952 |
createSourcefiles |
|
953 |
"creates all Smalltalk-source files in the project directory" |
|
954 |
||
955 |
|classes methods methodClasses dir stream| |
|
956 |
||
2956
952a09bdeed1
Use Filename instead of obsolete FileDirectory
Stefan Vogel <sv@exept.de>
parents:
2907
diff
changeset
|
957 |
dir := self directory asFilename. |
1420 | 958 |
Transcript showCR:'creating sources in ' , dir pathName , ' ...'; endEntry. |
617 | 959 |
|
960 |
classes := self classes. |
|
961 |
classes isNil ifTrue:[ |
|
1420 | 962 |
self warn:'no classes in current project' |
617 | 963 |
]. |
964 |
||
965 |
classes notNil ifTrue:[ |
|
1420 | 966 |
classes do:[:aClass | |
967 |
aClass isLoaded ifFalse:[ |
|
968 |
aClass autoload. |
|
969 |
]. |
|
970 |
]. |
|
971 |
classes := classes topologicalSort:[:a :b | a isSubclassOf:b]. |
|
617 | 972 |
|
1420 | 973 |
classes do:[:aClass | |
974 |
Transcript show:' ... '; showCR:aClass name, '.st'; endEntry. |
|
975 |
aClass fileOutIn:dir |
|
976 |
] |
|
617 | 977 |
]. |
978 |
||
979 |
methods := self individualMethods. |
|
980 |
methods notNil ifTrue:[ |
|
1420 | 981 |
methods := methods asIdentitySet. |
982 |
" |
|
983 |
get classes ... |
|
984 |
" |
|
985 |
methodClasses := IdentitySet new. |
|
986 |
methods do:[:m | |
|
987 |
|mCls| |
|
617 | 988 |
|
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
989 |
mCls := m containingClass. |
1420 | 990 |
mCls isMeta ifTrue:[ |
991 |
mCls := mCls soleInstance. |
|
992 |
]. |
|
993 |
methodClasses add:mCls]. |
|
994 |
" |
|
995 |
fileOut by class |
|
996 |
" |
|
997 |
methodClasses do:[:cls | |
|
998 |
stream := (self directory asFilename construct:(cls name , '.chg')) writeStream. |
|
617 | 999 |
|
1420 | 1000 |
Transcript show:' ... '; showCR:cls name, '.chg'; endEntry. |
1001 |
methods do:[:m | |
|
1002 |
|mCls| |
|
617 | 1003 |
|
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
1004 |
mCls := m containingClass. |
1420 | 1005 |
(mCls == cls or:[mCls == cls class]) ifTrue:[ |
1006 |
mCls fileOutMethod:m on:stream. |
|
1007 |
]. |
|
1008 |
stream cr. |
|
1009 |
]. |
|
1010 |
stream close. |
|
1011 |
]. |
|
617 | 1012 |
]. |
1420 | 1013 |
|
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
1014 |
"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
|
1015 |
"Modified: 18.9.1997 / 18:50:34 / stefan" |
617 | 1016 |
! |
1017 |
||
1018 |
findTopFrom:directoryName |
|
1019 |
"returns the relative path from directoryName to the TOP |
|
1020 |
directory." |
|
1021 |
||
1022 |
|topName relParent foundTop| |
|
1023 |
||
1024 |
"/ find TOP |
|
1025 |
relParent := '..'. |
|
1026 |
foundTop := false. |
|
1027 |
[foundTop] whileFalse:[ |
|
1028 |
topName := directoryName , '/' , relParent. |
|
1029 |
topName asFilename pathName = '/' ifTrue:[ |
|
1030 |
self warn:'could not find TOP; assume absoulte path to TOP'. |
|
1031 |
topName := '/usr/local/lib/smalltalk'. |
|
1032 |
foundTop := true. |
|
1033 |
] ifFalse:[ |
|
1034 |
(topName , '/configurations') asFilename exists ifTrue:[ |
|
1035 |
(topName , '/include') asFilename exists ifTrue:[ |
|
1036 |
foundTop := true. |
|
1037 |
topName := relParent. |
|
1038 |
] |
|
1039 |
]. |
|
1040 |
foundTop ifFalse:[ |
|
1041 |
relParent := relParent , '/..'. |
|
1042 |
] |
|
1043 |
] |
|
1044 |
]. |
|
1045 |
^ topName |
|
1046 |
! ! |
|
1047 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1048 |
!Project methodsFor:'printing & storing'! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1049 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1050 |
displayString |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1051 |
^ super displayString , '(''' , (name ? '<unnamed>') , ''')' |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1052 |
! ! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1053 |
|
617 | 1054 |
!Project methodsFor:'properties'! |
1055 |
||
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1056 |
addClass:className conditionForInclusion:conditionBlock classFileName:fileName |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1057 |
"return the class info of the project" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1058 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1059 |
|i| |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1060 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1061 |
i := ClassInfo new. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1062 |
i className:className. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1063 |
i classFileName:fileName. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1064 |
i conditionForInclusion:conditionBlock. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1065 |
self addClassInfo:i |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1066 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1067 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1068 |
addClassInfo:info |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1069 |
"add a class info to the project" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1070 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1071 |
|infoCollection| |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1072 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1073 |
(infoCollection := self classInfo) isNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1074 |
self classInfo:(infoCollection := OrderedCollection new). |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1075 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1076 |
infoCollection add:info |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1077 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1078 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1079 |
classInfo:aClassInfoCollection |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1080 |
"set the class info of the project" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1081 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1082 |
properties isNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1083 |
properties := IdentityDictionary new |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1084 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1085 |
properties at:#classInfo put:aClassInfoCollection |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1086 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1087 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1088 |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1089 |
comment |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1090 |
"return the comment of the project" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1091 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1092 |
properties isNil ifTrue:[^ '']. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1093 |
^ properties at:#comment ifAbsent:'' |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1094 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1095 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1096 |
comment:aString |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1097 |
"set the projects comment" |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1098 |
|
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1099 |
properties isNil ifTrue:[ |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1100 |
properties := IdentityDictionary new |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1101 |
]. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1102 |
properties at:#comment put:aString |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1103 |
! |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1104 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1105 |
documentationURL |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1106 |
"return the documentation-URL of the project" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1107 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1108 |
properties isNil ifTrue:[^ nil]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1109 |
^ properties at:#documentationURL ifAbsent:nil |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1110 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1111 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1112 |
documentationURL:anURLString |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1113 |
"set the projects documentation-URL" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1114 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1115 |
properties isNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1116 |
properties := IdentityDictionary new |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1117 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1118 |
properties at:#documentationURL put:anURLString |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1119 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1120 |
|
617 | 1121 |
properties |
1122 |
^ properties |
|
1123 |
! |
|
1124 |
||
1125 |
properties:p |
|
1126 |
properties := p |
|
1127 |
! |
|
1128 |
||
1129 |
type |
|
1130 |
"return the type of project" |
|
1131 |
||
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1132 |
properties isNil ifTrue:[^ #application]. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1133 |
^ properties at:#type ifAbsent:#application |
617 | 1134 |
! |
1135 |
||
1136 |
type:aSymbol |
|
1137 |
"set the projects type" |
|
1138 |
||
1139 |
(#(application library smalltalk) includes:aSymbol) ifFalse:[ |
|
3972
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1140 |
self warn:'invalid project type'. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1141 |
^ self |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1142 |
]. |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1143 |
properties isNil ifTrue:[ |
efc25c2863e9
more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents:
3332
diff
changeset
|
1144 |
properties := IdentityDictionary new |
617 | 1145 |
]. |
1146 |
properties at:#type put:aSymbol |
|
1147 |
! ! |
|
1148 |
||
1149 |
!Project methodsFor:'queries'! |
|
1150 |
||
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1151 |
classInfo |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1152 |
"return a classInfo collection of classes belonging to that project" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1153 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1154 |
|classes classInfo| |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1155 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1156 |
properties notNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1157 |
classInfo := properties at:#classInfo ifAbsent:nil. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1158 |
classInfo notNil ifTrue:[^ classInfo]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1159 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1160 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1161 |
^ (self classes ? #()) collect:[:class | |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1162 |
|i fn| |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1163 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1164 |
i := ClassInfo new. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1165 |
i conditionForInclusion:#always. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1166 |
i className:class name. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1167 |
fn := class classFilename ? ((Smalltalk fileNameForClass:class) , '.st'). |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1168 |
i classFileName:fn. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1169 |
i |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1170 |
] |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1171 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1172 |
"Modified: 4.1.1997 / 16:51:18 / cg" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1173 |
! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1174 |
|
617 | 1175 |
classes |
4013
f06d31702f2a
ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents:
4010
diff
changeset
|
1176 |
"return a collection of classes belonging to that project. |
f06d31702f2a
ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents:
4010
diff
changeset
|
1177 |
This excludes any private classes." |
617 | 1178 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1179 |
|classes classInfo| |
617 | 1180 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1181 |
properties notNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1182 |
classInfo := properties at:#classInfo ifAbsent:nil. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1183 |
classInfo notNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1184 |
classes := classInfo collect:[:i | i className] |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1185 |
] ifFalse:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1186 |
classes := properties at:#classes ifAbsent:nil |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1187 |
] |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1188 |
]. |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1189 |
|
617 | 1190 |
classes isNil ifTrue:[ |
2056 | 1191 |
classes := OrderedCollection new. |
1192 |
Smalltalk |
|
4013
f06d31702f2a
ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents:
4010
diff
changeset
|
1193 |
allClassesDo:[:aClass | |
f06d31702f2a
ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents:
4010
diff
changeset
|
1194 |
aClass owningClass isNil ifTrue:[ |
f06d31702f2a
ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents:
4010
diff
changeset
|
1195 |
aClass package = packageName ifTrue:[ |
f06d31702f2a
ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents:
4010
diff
changeset
|
1196 |
classes add:aClass |
f06d31702f2a
ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents:
4010
diff
changeset
|
1197 |
] |
2056 | 1198 |
] |
1199 |
]. |
|
1200 |
classes isEmpty ifTrue:[^ nil]. |
|
617 | 1201 |
]. |
1202 |
^ classes |
|
1203 |
||
2056 | 1204 |
"Modified: 4.1.1997 / 16:51:18 / cg" |
617 | 1205 |
! |
1206 |
||
1207 |
individualMethods |
|
1208 |
"return a collection of individual methods belonging to that project, |
|
1209 |
only methods are returned which are not contained in the |
|
1210 |
projects class set." |
|
1211 |
||
1212 |
|classes methods| |
|
1213 |
||
1214 |
classes := self classes. |
|
1215 |
classes notNil ifTrue:[ |
|
1461
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1216 |
classes := classes asIdentitySet. |
617 | 1217 |
] ifFalse:[ |
1461
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1218 |
classes := #() |
617 | 1219 |
]. |
1220 |
||
1221 |
methods := IdentitySet new. |
|
1222 |
Smalltalk allBehaviorsDo:[:cls | |
|
1461
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1223 |
(classes isNil or:[(classes includes:cls) not]) ifTrue:[ |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1224 |
cls methodDictionary do:[:m | |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1225 |
m package = packageName ifTrue:[ |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1226 |
methods add:m |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1227 |
] |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1228 |
]. |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1229 |
cls class methodDictionary do:[:m | |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1230 |
m package = packageName ifTrue:[ |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1231 |
methods add:m |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1232 |
] |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1233 |
]. |
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1234 |
] |
617 | 1235 |
]. |
1236 |
^ methods asArray |
|
1237 |
||
1238 |
" |
|
1239 |
Project current classes |
|
1240 |
Project current individualMethods |
|
1241 |
" |
|
1461
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1242 |
|
dd25bb1e9973
Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents:
1420
diff
changeset
|
1243 |
"Modified: 7.6.1996 / 09:16:25 / stefan" |
2 | 1244 |
! ! |
1245 |
||
1246 |
!Project methodsFor:'specifications'! |
|
1247 |
||
1248 |
readSpec |
|
1249 |
|s chunk fileName| |
|
1250 |
||
1251 |
fileName := (properties at:#directoryName) asFilename construct:'.project'. |
|
1252 |
s := fileName readStream. |
|
1253 |
s isNil ifTrue:[^ self]. |
|
1254 |
[s atEnd] whileFalse:[ |
|
203 | 1255 |
chunk := s nextChunk. |
1256 |
Compiler evaluate:chunk receiver:properties notifying:nil |
|
2 | 1257 |
]. |
1258 |
s close. |
|
1259 |
||
1260 |
"(Project new directory:'../projects/Clock') readSpec" |
|
1261 |
! |
|
1262 |
||
1263 |
saveSpec |
|
1264 |
|f d s| |
|
1265 |
||
1266 |
d := (properties at:#directoryName) asFilename. |
|
1267 |
d exists ifFalse:[ |
|
203 | 1268 |
self error:'directory does not exist'. |
1269 |
^ self |
|
2 | 1270 |
]. |
1271 |
f := d construct:'.project'. |
|
1272 |
s := f writeStream. |
|
1273 |
s isNil ifTrue:[^ self]. |
|
1274 |
properties associationsDo:[:aProp | |
|
203 | 1275 |
(aProp == #directoryName) ifFalse:[ |
1276 |
s nextChunkPut:('self at:' , aProp key storeString, |
|
1277 |
' put:' , aProp value storeString). |
|
1278 |
s cr |
|
1279 |
] |
|
2 | 1280 |
]. |
1281 |
s close |
|
1282 |
||
1283 |
"((Project new directory:'../projects/Clock') readSpec |
|
203 | 1284 |
directory:'../projects/xxx') saveSpec" |
2 | 1285 |
! ! |
1286 |
||
617 | 1287 |
!Project methodsFor:'views'! |
1288 |
||
1289 |
addView:aView |
|
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
1290 |
"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
|
1291 |
|
617 | 1292 |
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
|
1293 |
|
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
1294 |
"Modified: 14.2.1997 / 15:36:51 / cg" |
617 | 1295 |
! |
1296 |
||
1297 |
destroyViews |
|
1298 |
"destroy all views of this project" |
|
1299 |
||
1300 |
views notNil ifTrue:[ |
|
1301 |
views do:[:aView | |
|
1302 |
aView notNil ifTrue:[aView destroy] |
|
1303 |
] |
|
1304 |
]. |
|
1305 |
! |
|
1306 |
||
1307 |
hideViews |
|
1308 |
"hide all views of this project" |
|
1309 |
||
1310 |
views notNil ifTrue:[ |
|
1332
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
1311 |
views do:[:aView | |
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
1312 |
aView notNil ifTrue:[aView unmap] |
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
1313 |
] |
617 | 1314 |
]. |
1332
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
1315 |
|
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
1316 |
"Modified: 3.5.1996 / 23:48:51 / stefan" |
617 | 1317 |
! |
1318 |
||
1319 |
removeView:aView |
|
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
1320 |
"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
|
1321 |
|
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1322 |
views notNil ifTrue:[ |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1323 |
views remove:aView ifAbsent:nil |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1324 |
] |
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
1325 |
|
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
1326 |
"Modified: 14.2.1997 / 15:37:20 / cg" |
617 | 1327 |
! |
1328 |
||
1329 |
showViews |
|
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
1330 |
"show all views of this project" |
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
1331 |
|
617 | 1332 |
views notNil ifTrue:[ |
1332
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
1333 |
views do:[:aView | |
2164
063b0227aeda
use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents:
2056
diff
changeset
|
1334 |
aView notNil ifTrue:[aView remap] |
1332
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
1335 |
] |
617 | 1336 |
]. |
1332
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
1337 |
|
a1d72522f5fc
Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents:
1298
diff
changeset
|
1338 |
"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
|
1339 |
"Modified: 14.2.1997 / 15:38:47 / cg" |
617 | 1340 |
! ! |
1341 |
||
3996
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1342 |
!Project::ClassInfo methodsFor:'accessing'! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1343 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1344 |
classFileName |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1345 |
"return the value of the instance variable 'classFileName' (automatically generated)" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1346 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1347 |
^ classFileName! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1348 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1349 |
classFileName:something |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1350 |
"set the value of the instance variable 'classFileName' (automatically generated)" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1351 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1352 |
classFileName := something.! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1353 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1354 |
className |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1355 |
"return the value of the instance variable 'className' (automatically generated)" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1356 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1357 |
^ className! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1358 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1359 |
className:something |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1360 |
"set the value of the instance variable 'className' (automatically generated)" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1361 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1362 |
className := something.! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1363 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1364 |
conditionForInclusion |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1365 |
"return the value of the instance variable 'conditionForInclusion' (automatically generated)" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1366 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1367 |
^ conditionForInclusion! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1368 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1369 |
conditionForInclusion:something |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1370 |
"set the value of the instance variable 'conditionForInclusion' (automatically generated)" |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1371 |
|
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1372 |
conditionForInclusion := something.! ! |
3183ccccabaa
more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents:
3974
diff
changeset
|
1373 |
|
1854
b44227fd2b3d
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
1374 |
!Project class methodsFor:'documentation'! |
630 | 1375 |
|
1376 |
version |
|
4066 | 1377 |
^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.66 1999-03-23 11:10:24 cg Exp $' |
1298 | 1378 |
! ! |
1 | 1379 |
Project initialize! |