32 inclusion of the above copyright notice. This software may not |
32 inclusion of the above copyright notice. This software may not |
33 be provided or otherwise made available to, or used by, any |
33 be provided or otherwise made available to, or used by, any |
34 other person. No title to or ownership of the software is |
34 other person. No title to or ownership of the software is |
35 hereby transferred. |
35 hereby transferred. |
36 " |
36 " |
|
37 ! ! |
|
38 |
|
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 |
|
53 (view isNil ifTrue:[ |
|
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 |
|
71 navigationState classList value:(aClass theNonMetaclass withAllSuperclasses). |
|
72 navigationState meta value:(aClass isMetaclass). |
|
73 browser classListGenerator value:(aClass theNonMetaclass withAllSuperclasses). |
|
74 browser sortByNameAndInheritance value:true. |
|
75 browser |
|
76 selectClass:aClass; |
|
77 selectProtocol: (Tools::BrowserList nameListEntryForALL). |
|
78 browser switchToClass:aClass selector:initialSelectorOrNil updateHistory: false. |
|
79 view := ApplicationSubView new client: browser spec: spec. |
|
80 "/ sigh must be done after postbuild |
|
81 navigationState classListApplication addOwnerClasses value:false. |
|
82 ]). |
|
83 view |
|
84 ]. |
|
85 |
|
86 ^ self new |
|
87 priority: 0; |
|
88 label:label; |
|
89 viewHolder: makeView; |
|
90 yourself |
|
91 |
|
92 " |
|
93 GenericToolbarIconLibrary systemBrowserIcon inspect |
|
94 " |
37 ! ! |
95 ! ! |
38 |
96 |
39 !Inspector2Tab methodsFor:'accessing'! |
97 !Inspector2Tab methodsFor:'accessing'! |
40 |
98 |
41 application |
99 application |