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