Tools__Inspector2Tab.st
branchjv
changeset 17379 028adf14bc05
parent 16727 639ebd184cf4
parent 17266 86241d1b895d
child 17459 9f54cb54204c
equal deleted inserted replaced
17304:3eea1002b141 17379:028adf14bc05
    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
   142     ].
   200     ].
   143 ! !
   201 ! !
   144 
   202 
   145 !Inspector2Tab class methodsFor:'documentation'!
   203 !Inspector2Tab class methodsFor:'documentation'!
   146 
   204 
       
   205 version
       
   206     ^ '$Header$'
       
   207 !
       
   208 
   147 version_CVS
   209 version_CVS
   148     ^ '$Header$'
   210     ^ '$Header$'
   149 !
   211 !
   150 
   212 
   151 version_CVS_jvrany
   213 version_CVS_jvrany