author | Claus Gittinger <cg@exept.de> |
Wed, 25 Jan 2017 16:49:19 +0100 | |
changeset 17266 | 86241d1b895d |
parent 17265 | 60e2286680a6 |
child 17379 | 028adf14bc05 |
child 17386 | e56a6c5f1c59 |
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 |
|
16724 | 17 |
instanceVariableNames:'label view application priority viewHolder applicationHolder' |
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; |
|
89 |
viewHolder: makeView; |
|
90 |
yourself |
|
17266 | 91 |
|
92 |
" |
|
93 |
GenericToolbarIconLibrary systemBrowserIcon inspect |
|
94 |
" |
|
17265 | 95 |
! ! |
96 |
||
8777 | 97 |
!Inspector2Tab methodsFor:'accessing'! |
98 |
||
99 |
application |
|
100 |
^ application |
|
101 |
||
102 |
"Created: / 16-01-2008 / 16:51:05 / janfrog" |
|
103 |
! |
|
104 |
||
14157
4467fff63f8c
Performance fixes in Inspector2:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11583
diff
changeset
|
105 |
application:anApplicationModelOrBlock |
4467fff63f8c
Performance fixes in Inspector2:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11583
diff
changeset
|
106 |
application := anApplicationModelOrBlock. |
8777 | 107 |
|
108 |
"Created: / 16-01-2008 / 16:51:05 / janfrog" |
|
109 |
"Modified: / 17-02-2008 / 08:58:34 / janfrog" |
|
110 |
! |
|
111 |
||
16724 | 112 |
applicationHolder:something |
113 |
applicationHolder := something. |
|
114 |
! |
|
115 |
||
8777 | 116 |
label |
117 |
^ label |
|
118 |
||
119 |
"Created: / 16-01-2008 / 16:51:05 / janfrog" |
|
120 |
! |
|
121 |
||
122 |
label:aString |
|
123 |
label := aString. |
|
124 |
||
125 |
"Created: / 16-01-2008 / 16:51:05 / janfrog" |
|
126 |
"Modified: / 17-02-2008 / 08:58:41 / janfrog" |
|
127 |
! |
|
128 |
||
129 |
priority |
|
130 |
^ priority ? 25 |
|
131 |
||
132 |
"Created: / 17-02-2008 / 10:05:51 / janfrog" |
|
133 |
! |
|
134 |
||
135 |
priority:something |
|
136 |
priority := something. |
|
137 |
||
138 |
"Created: / 17-02-2008 / 10:05:51 / janfrog" |
|
139 |
! |
|
140 |
||
141 |
text:aStringOrValueModel |
|
142 |
||
143 |
self view:((HVScrollableView for:TextView) model: aStringOrValueModel; yourself) |
|
144 |
||
145 |
"Modified: / 17-02-2008 / 08:58:41 / janfrog" |
|
146 |
"Created: / 07-11-2008 / 08:40:35 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
147 |
! |
|
148 |
||
149 |
view |
|
10874 | 150 |
view isNil ifTrue:[ |
11583
8775311ee2f9
lazy setup of embedded browser brings up inspector much faster
Claus Gittinger <cg@exept.de>
parents:
10874
diff
changeset
|
151 |
viewHolder notNil ifTrue:[ |
8775311ee2f9
lazy setup of embedded browser brings up inspector much faster
Claus Gittinger <cg@exept.de>
parents:
10874
diff
changeset
|
152 |
view := viewHolder value |
8775311ee2f9
lazy setup of embedded browser brings up inspector much faster
Claus Gittinger <cg@exept.de>
parents:
10874
diff
changeset
|
153 |
] ifFalse:[ |
16724 | 154 |
applicationHolder notNil ifTrue:[ |
155 |
view := ApplicationSubView new. |
|
156 |
view client: applicationHolder value. |
|
11583
8775311ee2f9
lazy setup of embedded browser brings up inspector much faster
Claus Gittinger <cg@exept.de>
parents:
10874
diff
changeset
|
157 |
] |
10874 | 158 |
] |
159 |
]. |
|
8777 | 160 |
^ view |
161 |
||
162 |
"Created: / 16-01-2008 / 16:51:05 / janfrog" |
|
163 |
"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
|
164 |
"Modified: / 13-06-2012 / 14:57:25 / cg" |
14157
4467fff63f8c
Performance fixes in Inspector2:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11583
diff
changeset
|
165 |
"Modified: / 24-03-2014 / 18:25:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8777 | 166 |
! |
167 |
||
168 |
view:aView |
|
169 |
view := aView. |
|
170 |
||
171 |
"Created: / 16-01-2008 / 16:51:05 / janfrog" |
|
172 |
"Modified: / 17-02-2008 / 08:58:46 / janfrog" |
|
11583
8775311ee2f9
lazy setup of embedded browser brings up inspector much faster
Claus Gittinger <cg@exept.de>
parents:
10874
diff
changeset
|
173 |
! |
8775311ee2f9
lazy setup of embedded browser brings up inspector much faster
Claus Gittinger <cg@exept.de>
parents:
10874
diff
changeset
|
174 |
|
8775311ee2f9
lazy setup of embedded browser brings up inspector much faster
Claus Gittinger <cg@exept.de>
parents:
10874
diff
changeset
|
175 |
viewHolder:something |
8775311ee2f9
lazy setup of embedded browser brings up inspector much faster
Claus Gittinger <cg@exept.de>
parents:
10874
diff
changeset
|
176 |
viewHolder := something. |
14157
4467fff63f8c
Performance fixes in Inspector2:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11583
diff
changeset
|
177 |
! |
4467fff63f8c
Performance fixes in Inspector2:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11583
diff
changeset
|
178 |
|
4467fff63f8c
Performance fixes in Inspector2:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11583
diff
changeset
|
179 |
viewOrNil |
4467fff63f8c
Performance fixes in Inspector2:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11583
diff
changeset
|
180 |
^ view |
4467fff63f8c
Performance fixes in Inspector2:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11583
diff
changeset
|
181 |
|
4467fff63f8c
Performance fixes in Inspector2:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11583
diff
changeset
|
182 |
"Created: / 24-03-2014 / 18:23:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8777 | 183 |
! ! |
184 |
||
16661 | 185 |
!Inspector2Tab methodsFor:'setup'! |
186 |
||
187 |
setupView |
|
188 |
||
189 |
(view respondsTo:#setMasterInspectorApplication:) ifTrue:[ |
|
190 |
"this is for BridgeOjectInspectorView" |
|
191 |
view setMasterInspectorApplication:application. |
|
192 |
]. |
|
193 |
(view respondsTo:#sortOrderHolder:) ifTrue:[ |
|
194 |
view sortOrderHolder:(application sortOrderHolder) |
|
195 |
]. |
|
196 |
! ! |
|
197 |
||
8777 | 198 |
!Inspector2Tab class methodsFor:'documentation'! |
199 |
||
17266 | 200 |
version |
201 |
^ '$Header$' |
|
202 |
! |
|
203 |
||
8802 | 204 |
version_CVS |
16661 | 205 |
^ '$Header$' |
8802 | 206 |
! |
207 |
||
8815 | 208 |
version_CVS_jvrany |
16661 | 209 |
^ '$Header$' |
9997 | 210 |
! |
211 |
||
212 |
version_SVN |
|
16661 | 213 |
^ '$Id$' |
8777 | 214 |
! ! |
14157
4467fff63f8c
Performance fixes in Inspector2:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11583
diff
changeset
|
215 |