author | Claus Gittinger <cg@exept.de> |
Sun, 01 Mar 2015 02:06:15 +0100 | |
changeset 976 | eba7baca1ed0 |
parent 617 | b4e6425ade69 |
child 986 | d59dea3216cb |
child 1025 | bf95002ac47f |
permissions | -rw-r--r-- |
47 | 1 |
"{ Package: 'stx:goodies/monticello' }" |
2 |
||
3 |
Object subclass:#MCDefinition |
|
4 |
instanceVariableNames:'' |
|
5 |
classVariableNames:'Instances' |
|
6 |
poolDictionaries:'' |
|
617 | 7 |
category:'SCM-Monticello-Base' |
47 | 8 |
! |
9 |
||
10 |
||
11 |
!MCDefinition class methodsFor:'as yet unclassified'! |
|
12 |
||
13 |
clearInstances |
|
244 | 14 |
|
15 |
Instances := nil |
|
16 |
||
17 |
"Modified: / 18-08-2009 / 10:14:13 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
47 | 18 |
! |
19 |
||
244 | 20 |
instanceLike: aDefinition |
145
a76be9988b5d
more porting (but still unfinished)
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
21 |
|
244 | 22 |
Instances ifNil: [ Instances := WeakIdentitySet new ]. |
23 |
Instances do: |
|
24 |
[:each|each = aDefinition ifTrue:[^each]]. |
|
25 |
Instances add: aDefinition. |
|
26 |
^aDefinition. |
|
27 |
||
28 |
"Modified: / 18-08-2009 / 10:18:15 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
47 | 29 |
! ! |
30 |
||
31 |
!MCDefinition methodsFor:'accessing'! |
|
32 |
||
33 |
provisions |
|
34 |
^ #() |
|
35 |
! |
|
36 |
||
37 |
requirements |
|
38 |
^ #() |
|
39 |
! ! |
|
40 |
||
41 |
!MCDefinition methodsFor:'annotations'! |
|
42 |
||
43 |
annotations |
|
44 |
^self annotations: Preferences defaultAnnotationRequests |
|
45 |
! |
|
46 |
||
47 |
annotations: requests |
|
48 |
"Answer a string for an annotation pane, trying to fulfill the annotation requests. |
|
49 |
These might include anything that |
|
50 |
Preferences defaultAnnotationRequests |
|
51 |
might return. Which includes anything in |
|
52 |
Preferences annotationInfo |
|
53 |
To edit these, use:" |
|
54 |
"Preferences editAnnotations" |
|
55 |
||
56 |
^String streamContents: [ :s | self printAnnotations: requests on: s ]. |
|
57 |
! |
|
58 |
||
59 |
printAnnotations: requests on: aStream |
|
60 |
"Add a string for an annotation pane, trying to fulfill the annotation requests. |
|
61 |
These might include anything that |
|
62 |
Preferences defaultAnnotationRequests |
|
63 |
might return. Which includes anything in |
|
64 |
Preferences annotationInfo |
|
65 |
To edit these, use:" |
|
66 |
"Preferences editAnnotations" |
|
67 |
||
68 |
aStream nextPutAll: 'not yet implemented' |
|
69 |
! ! |
|
70 |
||
71 |
!MCDefinition methodsFor:'comparing'! |
|
72 |
||
244 | 73 |
< aMCMethodDefinition |
74 |
||
75 |
^self <= aMCMethodDefinition |
|
76 |
and: [(self = aMCMethodDefinition) not] |
|
77 |
||
78 |
"Created: / 18-08-2009 / 10:25:23 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
145
a76be9988b5d
more porting (but still unfinished)
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
79 |
! |
a76be9988b5d
more porting (but still unfinished)
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
80 |
|
47 | 81 |
<= other |
82 |
^ self sortKey <= other sortKey |
|
83 |
! |
|
84 |
||
85 |
= aDefinition |
|
86 |
^ self isRevisionOf: aDefinition |
|
87 |
! |
|
88 |
||
89 |
description |
|
90 |
self subclassResponsibility |
|
91 |
! |
|
92 |
||
93 |
fullTimeStamp |
|
244 | 94 |
^Timestamp current |
47 | 95 |
! |
96 |
||
97 |
hash |
|
98 |
^ self description hash |
|
99 |
! |
|
100 |
||
101 |
isRevisionOf: aDefinition |
|
244 | 102 |
^ (aDefinition isKindOf: MCDefinition) and: [aDefinition description = self description] |
47 | 103 |
! |
104 |
||
105 |
isSameRevisionAs: aDefinition |
|
106 |
^ self = aDefinition |
|
107 |
! |
|
108 |
||
109 |
sortKey |
|
110 |
self subclassResponsibility |
|
111 |
! ! |
|
112 |
||
244 | 113 |
!MCDefinition methodsFor:'converting'! |
114 |
||
115 |
asChange |
|
116 |
"raise an error: must be redefined in concrete subclass(es)" |
|
117 |
||
118 |
^ self subclassResponsibility |
|
119 |
! ! |
|
120 |
||
47 | 121 |
!MCDefinition methodsFor:'installing'! |
122 |
||
123 |
load |
|
124 |
||
125 |
! |
|
126 |
||
127 |
loadOver: aDefinition |
|
128 |
self load |
|
129 |
||
130 |
! |
|
131 |
||
132 |
postload |
|
133 |
! |
|
134 |
||
135 |
postloadOver: aDefinition |
|
136 |
self postload |
|
137 |
! |
|
138 |
||
139 |
unload |
|
140 |
! ! |
|
141 |
||
142 |
!MCDefinition methodsFor:'printing'! |
|
143 |
||
144 |
printOn: aStream |
|
145 |
super printOn: aStream. |
|
146 |
aStream nextPutAll: '(', self summary, ')' |
|
147 |
! |
|
148 |
||
149 |
summary |
|
150 |
self subclassResponsibility |
|
151 |
! ! |
|
152 |
||
153 |
!MCDefinition methodsFor:'testing'! |
|
154 |
||
155 |
isClassDefinition |
|
156 |
^false |
|
157 |
! |
|
158 |
||
159 |
isClassDefinitionExtension |
|
160 |
"Answer true if this definition extends the regular class definition" |
|
161 |
^false |
|
162 |
! |
|
163 |
||
164 |
isMethodDefinition |
|
165 |
^false |
|
166 |
! |
|
167 |
||
168 |
isOrganizationDefinition |
|
169 |
^false |
|
244 | 170 |
! |
171 |
||
172 |
isOverrideDefinition |
|
173 |
^false |
|
174 |
||
175 |
"Created: / 08-11-2010 / 17:29:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
47 | 176 |
! ! |
177 |
||
178 |
!MCDefinition class methodsFor:'documentation'! |
|
179 |
||
180 |
version |
|
617 | 181 |
^ '$Header: /cvs/stx/stx/goodies/monticello/MCDefinition.st,v 1.5 2012-09-11 21:21:09 cg Exp $' |
145
a76be9988b5d
more porting (but still unfinished)
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
182 |
! |
a76be9988b5d
more porting (but still unfinished)
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
183 |
|
a76be9988b5d
more porting (but still unfinished)
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
184 |
version_CVS |
617 | 185 |
^ '$Header: /cvs/stx/stx/goodies/monticello/MCDefinition.st,v 1.5 2012-09-11 21:21:09 cg Exp $' |
244 | 186 |
! |
187 |
||
188 |
version_SVN |
|
189 |
^ '§Id: MCDefinition.st 24 2010-11-09 14:00:17Z vranyj1 §' |
|
47 | 190 |
! ! |