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