author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 19 Jul 2017 09:42:32 +0200 | |
branch | jv |
changeset 17619 | edb119820fcb |
parent 17459 | 9f54cb54204c |
child 18226 | 346376844040 |
permissions | -rw-r--r-- |
9997 | 1 |
" |
2 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
3 |
All Rights Reserved |
|
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 |
" |
|
12 |
"{ Package: 'stx:libtool' }" |
|
8777 | 13 |
|
14 |
"{ NameSpace: Tools }" |
|
15 |
||
16 |
Object subclass:#Inspector2Tab |
|
17459
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
17 |
instanceVariableNames:'inspector label view application priority' |
8777 | 18 |
classVariableNames:'' |
19 |
poolDictionaries:'' |
|
10459 | 20 |
category:'Interface-Inspector2' |
8777 | 21 |
! |
22 |
||
9997 | 23 |
!Inspector2Tab class methodsFor:'documentation'! |
24 |
||
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
28 |
All Rights Reserved |
|
29 |
||
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! ! |
|
8777 | 38 |
|
17265 | 39 |
!Inspector2Tab class methodsFor:'special instance creation'! |
40 |
||
41 |
toBrowseClass:aClass selector:initialSelectorOrNil label:label |
|
42 |
"create and return an inspector tab containing |
|
43 |
a browser on aClass (and optional initialSelector). |
|
44 |
This is a utility to be used by inspector2TabXXX methods, which want to embed a clas browser." |
|
45 |
||
46 |
|makeView view| |
|
47 |
||
48 |
makeView := |
|
49 |
[ |
|
50 |
|spec browser navigationState canvas| |
|
51 |
||
52 |
||
17266 | 53 |
(view isNil ifTrue:[ |
17265 | 54 |
"/ spec := #singleClassBrowserSpec. |
55 |
spec := #multipleClassBrowserSpec. |
|
56 |
||
57 |
browser := Tools::NewSystemBrowser new. |
|
58 |
browser isEmbeddedBrowser:true. |
|
59 |
browser createBuilder. |
|
60 |
||
61 |
navigationState := browser navigationState. |
|
62 |
navigationState canvasType:spec. |
|
63 |
browser browserCanvasType:spec. |
|
64 |
||
65 |
canvas := browser browserCanvas value. |
|
66 |
canvas builder:(browser builder). |
|
67 |
navigationState canvas:canvas. |
|
68 |
"/ browser switchToClassHierarchyView. |
|
69 |
"/ browser showInheritedMethods. |
|
70 |
||
17266 | 71 |
navigationState classList value:(aClass theNonMetaclass withAllSuperclasses). |
72 |
navigationState meta value:(aClass isMetaclass). |
|
73 |
browser classListGenerator value:(aClass theNonMetaclass withAllSuperclasses). |
|
17265 | 74 |
browser sortByNameAndInheritance value:true. |
75 |
browser |
|
76 |
selectClass:aClass; |
|
77 |
selectProtocol: (Tools::BrowserList nameListEntryForALL). |
|
17266 | 78 |
browser switchToClass:aClass selector:initialSelectorOrNil updateHistory: false. |
17265 | 79 |
view := ApplicationSubView new client: browser spec: spec. |
17266 | 80 |
"/ sigh must be done after postbuild |
17265 | 81 |
navigationState classListApplication addOwnerClasses value:false. |
17266 | 82 |
]). |
17265 | 83 |
view |
84 |
]. |
|
85 |
||
86 |
^ self new |
|
87 |
priority: 0; |
|
88 |
label:label; |
|
17459
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
89 |
view: makeView; |
17265 | 90 |
yourself |
17266 | 91 |
|
92 |
" |
|
93 |
GenericToolbarIconLibrary systemBrowserIcon inspect |
|
94 |
" |
|
17459
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
95 |
|
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
96 |
"Modified: / 09-02-2017 / 00:33:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17265 | 97 |
! ! |
98 |
||
8777 | 99 |
!Inspector2Tab methodsFor:'accessing'! |
100 |
||
17459
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
101 |
application:anApplicationModelOrBlockOrValueModel |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
102 |
view := [ |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
103 |
ApplicationSubView new |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
104 |
client: anApplicationModelOrBlockOrValueModel value; |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
105 |
yourself |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
106 |
]. |
8777 | 107 |
|
108 |
"Created: / 16-01-2008 / 16:51:05 / janfrog" |
|
109 |
"Modified: / 17-02-2008 / 08:58:34 / janfrog" |
|
17459
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
110 |
"Modified: / 09-02-2017 / 09:23:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8777 | 111 |
! |
112 |
||
17459
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
113 |
applicationHolder:aValueModelOrBlock |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
114 |
<resource: #obsolete> "/ use #application: |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
115 |
self application: aValueModelOrBlock |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
116 |
|
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
117 |
"Modified: / 09-02-2017 / 09:23:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
118 |
! |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
119 |
|
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
120 |
inspector: anInspector2 |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
121 |
inspector := anInspector2 |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
122 |
|
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
123 |
"Created: / 09-02-2017 / 00:53:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
16724 | 124 |
! |
125 |
||
8777 | 126 |
label |
127 |
^ label |
|
128 |
||
129 |
"Created: / 16-01-2008 / 16:51:05 / janfrog" |
|
130 |
! |
|
131 |
||
132 |
label:aString |
|
133 |
label := aString. |
|
134 |
||
135 |
"Created: / 16-01-2008 / 16:51:05 / janfrog" |
|
136 |
"Modified: / 17-02-2008 / 08:58:41 / janfrog" |
|
137 |
! |
|
138 |
||
139 |
priority |
|
140 |
^ priority ? 25 |
|
141 |
||
142 |
"Created: / 17-02-2008 / 10:05:51 / janfrog" |
|
143 |
! |
|
144 |
||
145 |
priority:something |
|
146 |
priority := something. |
|
147 |
||
148 |
"Created: / 17-02-2008 / 10:05:51 / janfrog" |
|
149 |
! |
|
150 |
||
151 |
text:aStringOrValueModel |
|
152 |
||
153 |
self view:((HVScrollableView for:TextView) model: aStringOrValueModel; yourself) |
|
154 |
||
155 |
"Modified: / 17-02-2008 / 08:58:41 / janfrog" |
|
156 |
"Created: / 07-11-2008 / 08:40:35 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
157 |
! |
|
158 |
||
159 |
view |
|
10874 | 160 |
view isNil ifTrue:[ |
17459
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
161 |
application notNil ifTrue:[ |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
162 |
view := ApplicationSubView new. |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
163 |
view client: application value. |
10874 | 164 |
] |
17459
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
165 |
] ifFalse:[ |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
166 |
view isBlock ifTrue:[ |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
167 |
view := view value. |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
168 |
]. |
10874 | 169 |
]. |
17459
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
170 |
self setupView. |
8777 | 171 |
^ view |
172 |
||
173 |
"Created: / 16-01-2008 / 16:51:05 / janfrog" |
|
174 |
"Modified: / 17-02-2008 / 10:38:59 / janfrog" |
|
11583
8775311ee2f9
lazy setup of embedded browser brings up inspector much faster
Claus Gittinger <cg@exept.de>
parents:
10874
diff
changeset
|
175 |
"Modified: / 13-06-2012 / 14:57:25 / cg" |
17459
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
176 |
"Modified: / 09-02-2017 / 09:24:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8777 | 177 |
! |
178 |
||
17459
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
179 |
view:aViewOrBlockOrValueModel |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
180 |
view := aViewOrBlockOrValueModel. |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
181 |
|
8777 | 182 |
|
183 |
"Created: / 16-01-2008 / 16:51:05 / janfrog" |
|
184 |
"Modified: / 17-02-2008 / 08:58:46 / janfrog" |
|
15659
bdc9e920f640
Improved API for inspector 2 tabs: allow view to be actually a block returning the view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15566
diff
changeset
|
185 |
"Modified: / 21-05-2015 / 21:31:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
11583
8775311ee2f9
lazy setup of embedded browser brings up inspector much faster
Claus Gittinger <cg@exept.de>
parents:
10874
diff
changeset
|
186 |
! |
8775311ee2f9
lazy setup of embedded browser brings up inspector much faster
Claus Gittinger <cg@exept.de>
parents:
10874
diff
changeset
|
187 |
|
17459
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
188 |
viewHolder:aValueModelOrBlock |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
189 |
<resource: #obsolete> "/ use #view: |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
190 |
self view: aValueModelOrBlock |
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
191 |
|
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
192 |
"Modified: / 09-02-2017 / 09:23:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
14157
4467fff63f8c
Performance fixes in Inspector2:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11583
diff
changeset
|
193 |
! |
4467fff63f8c
Performance fixes in Inspector2:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11583
diff
changeset
|
194 |
|
4467fff63f8c
Performance fixes in Inspector2:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11583
diff
changeset
|
195 |
viewOrNil |
4467fff63f8c
Performance fixes in Inspector2:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11583
diff
changeset
|
196 |
^ view |
4467fff63f8c
Performance fixes in Inspector2:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11583
diff
changeset
|
197 |
|
4467fff63f8c
Performance fixes in Inspector2:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11583
diff
changeset
|
198 |
"Created: / 24-03-2014 / 18:23:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8777 | 199 |
! ! |
200 |
||
16661 | 201 |
!Inspector2Tab methodsFor:'setup'! |
202 |
||
203 |
setupView |
|
204 |
||
205 |
(view respondsTo:#setMasterInspectorApplication:) ifTrue:[ |
|
206 |
"this is for BridgeOjectInspectorView" |
|
17459
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
207 |
view setMasterInspectorApplication:inspector. |
16661 | 208 |
]. |
209 |
(view respondsTo:#sortOrderHolder:) ifTrue:[ |
|
17459
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
210 |
view sortOrderHolder:(inspector sortOrderHolder) |
16661 | 211 |
]. |
17459
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
212 |
|
9f54cb54204c
Issue #120: Fixed regression with Inspector2 not showing custom presentations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17379
diff
changeset
|
213 |
"Modified: / 09-02-2017 / 09:24:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
16661 | 214 |
! ! |
215 |
||
8777 | 216 |
!Inspector2Tab class methodsFor:'documentation'! |
217 |
||
17266 | 218 |
version |
219 |
^ '$Header$' |
|
220 |
! |
|
221 |
||
8802 | 222 |
version_CVS |
16661 | 223 |
^ '$Header$' |
8802 | 224 |
! |
225 |
||
8815 | 226 |
version_CVS_jvrany |
16661 | 227 |
^ '$Header$' |
9997 | 228 |
! |
229 |
||
15659
bdc9e920f640
Improved API for inspector 2 tabs: allow view to be actually a block returning the view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15566
diff
changeset
|
230 |
version_HG |
bdc9e920f640
Improved API for inspector 2 tabs: allow view to be actually a block returning the view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15566
diff
changeset
|
231 |
|
bdc9e920f640
Improved API for inspector 2 tabs: allow view to be actually a block returning the view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15566
diff
changeset
|
232 |
^ '$Changeset: <not expanded> $' |
bdc9e920f640
Improved API for inspector 2 tabs: allow view to be actually a block returning the view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15566
diff
changeset
|
233 |
! |
bdc9e920f640
Improved API for inspector 2 tabs: allow view to be actually a block returning the view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15566
diff
changeset
|
234 |
|
9997 | 235 |
version_SVN |
16661 | 236 |
^ '$Id$' |
8777 | 237 |
! ! |
14157
4467fff63f8c
Performance fixes in Inspector2:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11583
diff
changeset
|
238 |