author | Claus Gittinger <cg@exept.de> |
Thu, 18 Jan 2018 19:07:03 +0100 | |
changeset 17944 | 58da3a446bc2 |
parent 17735 | 8622913edce8 |
child 18416 | 536ee8775804 |
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 |
|
17386 | 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). |
|
17735 | 44 |
This is a utility to be used by inspector2TabXXX methods, which want to embed a class browser." |
45 |
||
17265 | 46 |
|makeView view| |
47 |
||
17735 | 48 |
makeView := |
17265 | 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; |
|
17735 | 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; |
|
17386 | 89 |
view: makeView; |
17265 | 90 |
yourself |
17266 | 91 |
|
92 |
" |
|
93 |
GenericToolbarIconLibrary systemBrowserIcon inspect |
|
94 |
" |
|
17386 | 95 |
|
96 |
"Modified: / 11-02-2017 / 10:17:40 / cg" |
|
17735 | 97 |
"Modified (format): / 09-11-2017 / 09:59:28 / mawalch" |
17265 | 98 |
! ! |
99 |
||
8777 | 100 |
!Inspector2Tab methodsFor:'accessing'! |
101 |
||
17386 | 102 |
application:anApplicationModelOrBlockOrValueModel |
103 |
view := [ |
|
104 |
ApplicationSubView new |
|
105 |
client: anApplicationModelOrBlockOrValueModel value; |
|
106 |
yourself |
|
107 |
]. |
|
8777 | 108 |
|
109 |
"Created: / 16-01-2008 / 16:51:05 / janfrog" |
|
110 |
"Modified: / 17-02-2008 / 08:58:34 / janfrog" |
|
17386 | 111 |
"Modified: / 11-02-2017 / 10:19:39 / cg" |
8777 | 112 |
! |
113 |
||
17386 | 114 |
applicationHolder:aValueModelOrBlock |
115 |
<resource: #obsolete> |
|
116 |
self application:aValueModelOrBlock. |
|
117 |
||
118 |
"Modified: / 11-02-2017 / 10:20:09 / cg" |
|
119 |
! |
|
120 |
||
121 |
inspector:anInspector2 |
|
122 |
inspector := anInspector2 |
|
123 |
||
124 |
"Created: / 11-02-2017 / 10:24:29 / cg" |
|
16724 | 125 |
! |
126 |
||
8777 | 127 |
label |
128 |
^ label |
|
129 |
||
130 |
"Created: / 16-01-2008 / 16:51:05 / janfrog" |
|
131 |
! |
|
132 |
||
133 |
label:aString |
|
134 |
label := aString. |
|
135 |
||
136 |
"Created: / 16-01-2008 / 16:51:05 / janfrog" |
|
137 |
"Modified: / 17-02-2008 / 08:58:41 / janfrog" |
|
138 |
! |
|
139 |
||
140 |
priority |
|
141 |
^ priority ? 25 |
|
142 |
||
143 |
"Created: / 17-02-2008 / 10:05:51 / janfrog" |
|
144 |
! |
|
145 |
||
146 |
priority:something |
|
147 |
priority := something. |
|
148 |
||
149 |
"Created: / 17-02-2008 / 10:05:51 / janfrog" |
|
150 |
! |
|
151 |
||
152 |
text:aStringOrValueModel |
|
153 |
||
154 |
self view:((HVScrollableView for:TextView) model: aStringOrValueModel; yourself) |
|
155 |
||
156 |
"Modified: / 17-02-2008 / 08:58:41 / janfrog" |
|
157 |
"Created: / 07-11-2008 / 08:40:35 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
158 |
! |
|
159 |
||
160 |
view |
|
10874 | 161 |
view isNil ifTrue:[ |
17386 | 162 |
application notNil ifTrue:[ |
163 |
view := ApplicationSubView new. |
|
164 |
view client: application value. |
|
10874 | 165 |
] |
17386 | 166 |
] ifFalse:[ |
167 |
view isBlock ifTrue:[ |
|
168 |
view := view value |
|
169 |
]. |
|
10874 | 170 |
]. |
17386 | 171 |
self setupView. |
8777 | 172 |
^ view |
173 |
||
174 |
"Created: / 16-01-2008 / 16:51:05 / janfrog" |
|
175 |
"Modified: / 17-02-2008 / 10:38:59 / janfrog" |
|
14157
4467fff63f8c
Performance fixes in Inspector2:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11583
diff
changeset
|
176 |
"Modified: / 24-03-2014 / 18:25:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17386 | 177 |
"Modified: / 11-02-2017 / 10:22:09 / cg" |
8777 | 178 |
! |
179 |
||
17386 | 180 |
view:aViewOrBlockOrValueModel |
181 |
view := aViewOrBlockOrValueModel. |
|
8777 | 182 |
|
183 |
"Created: / 16-01-2008 / 16:51:05 / janfrog" |
|
184 |
"Modified: / 17-02-2008 / 08:58:46 / janfrog" |
|
17386 | 185 |
"Modified (format): / 11-02-2017 / 10:22:30 / cg" |
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 |
|
17386 | 188 |
viewHolder:aValueModelOrBlock |
189 |
<resource: #obsolete> |
|
190 |
self view: aValueModelOrBlock. |
|
191 |
||
192 |
"Modified: / 11-02-2017 / 10:22:53 / cg" |
|
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" |
|
17386 | 207 |
view setMasterInspectorApplication:inspector. |
16661 | 208 |
]. |
209 |
(view respondsTo:#sortOrderHolder:) ifTrue:[ |
|
17386 | 210 |
view sortOrderHolder:(inspector sortOrderHolder) |
16661 | 211 |
]. |
17386 | 212 |
|
213 |
"Modified: / 11-02-2017 / 10:23:28 / cg" |
|
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 |
||
230 |
version_SVN |
|
16661 | 231 |
^ '$Id$' |
8777 | 232 |
! ! |
14157
4467fff63f8c
Performance fixes in Inspector2:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11583
diff
changeset
|
233 |