ResourceSelectionBrowser.st
author Stefan Vogel <sv@exept.de>
Tue, 20 Feb 2018 21:52:40 +0100
changeset 3541 23028559b7b2
parent 3531 cf715db898dd
child 3652 2b6236bab321
permissions -rw-r--r--
#OTHER by stefan changed: #commonPostBuild rename #useAlienInfoLabeloHolder methodto #useAlienInfoLabel to avoid recursion
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
     1
"{ Encoding: utf8 }"
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
     2
425
cf47d420764a initial checkin
tz
parents:
diff changeset
     3
"
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
     4
 COPYRIGHT (c) 1997-1998 by eXept Software AG
425
cf47d420764a initial checkin
tz
parents:
diff changeset
     5
              All Rights Reserved
cf47d420764a initial checkin
tz
parents:
diff changeset
     6
cf47d420764a initial checkin
tz
parents:
diff changeset
     7
 This software is furnished under a license and may be used
cf47d420764a initial checkin
tz
parents:
diff changeset
     8
 only in accordance with the terms of that license and with the
cf47d420764a initial checkin
tz
parents:
diff changeset
     9
 inclusion of the above copyright notice. This software may not
cf47d420764a initial checkin
tz
parents:
diff changeset
    10
 be provided or otherwise made available to, or used by, any
cf47d420764a initial checkin
tz
parents:
diff changeset
    11
 other person. No title to or ownership of the software is
cf47d420764a initial checkin
tz
parents:
diff changeset
    12
 hereby transferred.
cf47d420764a initial checkin
tz
parents:
diff changeset
    13
"
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
    14
"{ Package: 'stx:libtool2' }"
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
    15
3198
d0f01dc022bb class: ResourceSelectionBrowser
Claus Gittinger <cg@exept.de>
parents: 3117
diff changeset
    16
"{ NameSpace: Smalltalk }"
d0f01dc022bb class: ResourceSelectionBrowser
Claus Gittinger <cg@exept.de>
parents: 3117
diff changeset
    17
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    18
SelectionBrowser subclass:#ResourceSelectionBrowser
477
857d4289a2bd improved class name completion routine
tz
parents: 472
diff changeset
    19
	instanceVariableNames:'resourceMethod resourceClass resourceSuperclass resourceTypes
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
    20
		allClasses classSelectionBlock classFilter packageFilter
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
    21
		metaClassOnly existingOnly filter classPresentation'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
    22
	classVariableNames:'LastClassPresentation'
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    23
	poolDictionaries:''
619
36c9d07f7dc3 class category changed
tz
parents: 616
diff changeset
    24
	category:'Interface-Dialogs'
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    25
!
cf47d420764a initial checkin
tz
parents:
diff changeset
    26
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
    27
Object subclass:#ResourceMethod
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    28
	instanceVariableNames:'method icon resourceType selector'
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    29
	classVariableNames:''
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    30
	poolDictionaries:''
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    31
	privateIn:ResourceSelectionBrowser
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    32
!
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    33
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    34
!ResourceSelectionBrowser class methodsFor:'documentation'!
cf47d420764a initial checkin
tz
parents:
diff changeset
    35
cf47d420764a initial checkin
tz
parents:
diff changeset
    36
copyright
cf47d420764a initial checkin
tz
parents:
diff changeset
    37
"
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
    38
 COPYRIGHT (c) 1997-1998 by eXept Software AG
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    39
              All Rights Reserved
cf47d420764a initial checkin
tz
parents:
diff changeset
    40
cf47d420764a initial checkin
tz
parents:
diff changeset
    41
 This software is furnished under a license and may be used
cf47d420764a initial checkin
tz
parents:
diff changeset
    42
 only in accordance with the terms of that license and with the
cf47d420764a initial checkin
tz
parents:
diff changeset
    43
 inclusion of the above copyright notice. This software may not
cf47d420764a initial checkin
tz
parents:
diff changeset
    44
 be provided or otherwise made available to, or used by, any
cf47d420764a initial checkin
tz
parents:
diff changeset
    45
 other person. No title to or ownership of the software is
cf47d420764a initial checkin
tz
parents:
diff changeset
    46
 hereby transferred.
cf47d420764a initial checkin
tz
parents:
diff changeset
    47
"
cf47d420764a initial checkin
tz
parents:
diff changeset
    48
cf47d420764a initial checkin
tz
parents:
diff changeset
    49
!
cf47d420764a initial checkin
tz
parents:
diff changeset
    50
cf47d420764a initial checkin
tz
parents:
diff changeset
    51
documentation
cf47d420764a initial checkin
tz
parents:
diff changeset
    52
"
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
    53
    The ResourceSelectionBrowser allows you to browse in class hierarchies
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
    54
    and to select resource methods for loading or to saving resource 
905c3b4ba565 revised
tz
parents: 769
diff changeset
    55
    specifications (#canvas, #menu, etc.).
905c3b4ba565 revised
tz
parents: 769
diff changeset
    56
905c3b4ba565 revised
tz
parents: 769
diff changeset
    57
    [instance variables:]
907
393a5860fc7d class presentation in categories added (2)
tz
parents: 906
diff changeset
    58
        resourceMethod          <Symbol>        selector of the resource spec
393a5860fc7d class presentation in categories added (2)
tz
parents: 906
diff changeset
    59
        resourceClass           <Symbol>        class of the resource spec
393a5860fc7d class presentation in categories added (2)
tz
parents: 906
diff changeset
    60
        resourceSuperclass      <Symbol>        root class of the tree list
393a5860fc7d class presentation in categories added (2)
tz
parents: 906
diff changeset
    61
        resourceTypes           <Array>         allowed resource types
393a5860fc7d class presentation in categories added (2)
tz
parents: 906
diff changeset
    62
        allClasses              <Array>         list of the subclasses of resourceSuperclass
393a5860fc7d class presentation in categories added (2)
tz
parents: 906
diff changeset
    63
        classSelectionBlock     <Block>         by evaluating this block the class selection is done
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
    64
        classFilter             <Block>         if non-nil, given a class, has to return true for a class to be shown
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
    65
        packageFilter           <Block>         if non-nil, given a package, has to return true for a class to be shown
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
    66
        existingOnly            <Boolean>       if set, only classes with existing resources are shown (for load dialogs);
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
    67
                                                otherwise, empty classes are also shown (for save dialogs)
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
    68
504
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    69
    [start with:]
907
393a5860fc7d class presentation in categories added (2)
tz
parents: 906
diff changeset
    70
        ResourceSelectionBrowser open
504
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    71
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    72
    [author:]
907
393a5860fc7d class presentation in categories added (2)
tz
parents: 906
diff changeset
    73
        Thomas Zwick, eXept Software AG
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    74
"
cf47d420764a initial checkin
tz
parents:
diff changeset
    75
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
    76
cf47d420764a initial checkin
tz
parents:
diff changeset
    77
!ResourceSelectionBrowser class methodsFor:'instance creation'!
cf47d420764a initial checkin
tz
parents:
diff changeset
    78
1978
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
    79
request:aTitle onSuperclass:aSuperclass andClass:aClassOrClassName andSelector:aSelector withResourceTypes:resourceTypes
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
    80
    "opens a ResourceSelectionBrowser; 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
    81
     return a Message-object (whoInfo) or nil."
1978
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
    82
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
    83
    ^ (self 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
    84
        title:aTitle 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
    85
        onSuperclass:aSuperclass 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
    86
        andClass:aClassOrClassName andSelector:aSelector 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
    87
        withResourceTypes:resourceTypes
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
    88
      ) openAndLetUserChoose
1978
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
    89
649
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
    90
    "
1978
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
    91
     ResourceSelectionBrowser
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
    92
        request: 'Select a Resource Selector'
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
    93
        onSuperclass: #ApplicationModel 
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
    94
        andClass: MenuEditor andSelector: #menuItemImage 
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
    95
        withResourceTypes: #(image) 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    96
    "
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    97
!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    98
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
    99
title:aTitle onSuperclass:aSuperclass andClass:aClassOrClassName andSelector:aSelector withResourceTypes:resourceTypes
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   100
    "creates and returns a ResourceSelectionBrowser but does not open it.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   101
     To open,
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   102
        send the returned browser an openAndLetUserChoose message,
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   103
        which returns the selected resource method's info (whoInfo) or nil on cancel.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   104
     Use this to set additional filters before opening"
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   105
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   106
    ^ (self new
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   107
        title: aTitle)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   108
            onSuperclass:aSuperclass
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   109
            andClass:aClassOrClassName
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   110
            andSelector:aSelector
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   111
            withResourceTypes:resourceTypes
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   112
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   113
    "
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   114
     (ResourceSelectionBrowser
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   115
        title: 'Select a Resource Selector'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   116
        onSuperclass: #ApplicationModel 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   117
        andClass: MenuEditor andSelector: #menuItemImage 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   118
        withResourceTypes: #(image)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   119
     ) openAndLetUserChoose
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   120
    "
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   121
! !
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   122
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   123
!ResourceSelectionBrowser class methodsFor:'image specs'!
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   124
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   125
iconCategory
3117
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   126
    <resource: #image>
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   127
    "This resource specification was automatically generated
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   128
     by the ImageEditor of ST/X."
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   129
    "Do not manually edit this!! If it is corrupted,
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   130
     the ImageEditor may not be able to read the specification."
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   131
    "
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   132
     self iconCategory inspect
3117
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   133
     ImageEditor openOnClass:self andSelector:#iconCategory"
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   134
    
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   135
    ^ Icon constantNamed:#'ResourceSelectionBrowser class iconCategory'
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   136
        ifAbsentPut:[
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   137
            (Depth4Image new)
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   138
                width:18;
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   139
                height:16;
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   140
                photometric:(#palette);
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   141
                bitsPerSample:(#( 4 ));
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   142
                samplesPerPixel:(1);
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   143
                bits:(ByteArray 
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   144
                            fromPackedString:'3L0@@@@@@L3L3L@@@@@@@@3L3@@3L3L3L0CL3@LQDQDQD#CL3@LRH"H"H3CL3@LRH"H"H3CL3@LRH"H"H3CL3@LRH"H"H3CL3@LRH"H"H3CL3@LRH"H"H3CL3@LRH"H"H3CL3@LRH"H"H3CL3@L#L3L3L3CL3@@3L3L3L0CL3L@@@@@@@@3L3L0@@@@@@L3L');
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   145
                colorMapFromArray:#[ 0 0 0 255 255 255 170 170 170 127 127 127 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 ];
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   146
                mask:((ImageMask new)
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   147
                            width:18;
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   148
                            height:16;
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   149
                            bits:(ByteArray 
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   150
                                        fromPackedString:'<@O@8@G@3?3@7?;@7?;@7?;@7?;@7?;@7?;@7?;@7?;@7?;@7?;@3?3@8@G@<@O@');
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   151
                            yourself);
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   152
                yourself
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   153
        ]
1493
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   154
!
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   155
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   156
iconClass
3117
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   157
    <resource: #image>
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   158
    "This resource specification was automatically generated
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   159
     by the ImageEditor of ST/X."
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   160
    "Do not manually edit this!! If it is corrupted,
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   161
     the ImageEditor may not be able to read the specification."
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   162
    "
1404
f088630ac860 images compactified
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
   163
     self iconClass inspect
3117
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   164
     ImageEditor openOnClass:self andSelector:#iconClass"
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   165
    
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   166
    ^ Icon constantNamed:#'ResourceSelectionBrowser class iconClass'
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   167
        ifAbsentPut:[
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   168
            (Depth2Image new)
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   169
                width:18;
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   170
                height:16;
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   171
                photometric:(#palette);
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   172
                bitsPerSample:(#( 2 ));
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   173
                samplesPerPixel:(1);
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   174
                bits:(ByteArray 
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   175
                            fromPackedString:'@@@@@@@*****ABUUUUT@IUUUUP@%UUUU@BUUUUT@IUUUUP@%UUUU@BUUUUT@IUUUUP@%UUUU@BUUUUT@IUUUUP@%UUUU@A@@@@@@@@@@@@@b');
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   176
                colorMapFromArray:#[ 0 0 0 170 170 170 255 255 255 ];
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   177
                mask:((ImageMask new)
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   178
                            width:18;
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   179
                            height:16;
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   180
                            bits:(ByteArray 
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   181
                                        fromPackedString:'_?>@???@???@???@???@???@???@???@???@???@???@???@???@???@???@_?>@');
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   182
                            yourself);
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   183
                yourself
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   184
        ]
1493
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   185
!
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   186
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   187
iconPrivateClass
3117
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   188
    <resource: #image>
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   189
    "This resource specification was automatically generated
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   190
     by the ImageEditor of ST/X."
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   191
    "Do not manually edit this!! If it is corrupted,
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   192
     the ImageEditor may not be able to read the specification."
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   193
    "
3117
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   194
     ImageEditor openOnClass:self andSelector:#iconPrivateClass"
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   195
    
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   196
    ^ Icon constantNamed:#'ResourceSelectionBrowser class iconPrivateClass'
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   197
        ifAbsentPut:[
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   198
            (Depth2Image new)
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   199
                width:18;
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   200
                height:16;
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   201
                photometric:(#palette);
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   202
                bitsPerSample:(#( 2 ));
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   203
                samplesPerPixel:(1);
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   204
                bits:(ByteArray 
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   205
                            fromPackedString:'@@@@@@PUUUUU A****(@F*??* @Z+??*@A*/*>(OF*>+: @Z+??*@A*/?:(DF*>** @Z+:**@A*/**(@F*>** @Z****C2@@@@@@@@@@@@@b');
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   206
                colorMapFromArray:#[ 0 0 0 255 255 255 170 170 170 255 0 0 ];
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   207
                mask:((ImageMask new)
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   208
                            width:18;
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   209
                            height:16;
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   210
                            bits:(ByteArray 
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   211
                                        fromPackedString:'_?>@???@???@???@???@???@???@???@???@???@???@???@???@???@???@_?>@');
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   212
                            yourself);
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   213
                yourself
ee3f64a07e16 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 2908
diff changeset
   214
        ]
1493
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   215
! !
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   216
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   217
!ResourceSelectionBrowser class methodsFor:'interface specs'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   218
cf47d420764a initial checkin
tz
parents:
diff changeset
   219
windowSpec
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   220
    "This resource specification was automatically generated
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   221
     by the UIPainter of ST/X."
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   222
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   223
    "Do not manually edit this!! If it is corrupted,
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   224
     the UIPainter may not be able to read the specification."
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   225
cf47d420764a initial checkin
tz
parents:
diff changeset
   226
    "
cf47d420764a initial checkin
tz
parents:
diff changeset
   227
     UIPainter new openOnClass:ResourceSelectionBrowser andSelector:#windowSpec
cf47d420764a initial checkin
tz
parents:
diff changeset
   228
     ResourceSelectionBrowser new openInterface:#windowSpec
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   229
     ResourceSelectionBrowser open
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   230
    "
cf47d420764a initial checkin
tz
parents:
diff changeset
   231
cf47d420764a initial checkin
tz
parents:
diff changeset
   232
    <resource: #canvas>
cf47d420764a initial checkin
tz
parents:
diff changeset
   233
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   234
    ^ 
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   235
    #(FullSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   236
       name: windowSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   237
       uuid: 'fb378b3c-07aa-11e8-8563-b8f6b1108e05'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   238
       window: 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   239
      (WindowSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   240
         label: 'Resource Selection Browser'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   241
         name: 'Resource Selection Browser'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   242
         uuid: 'f1361a68-0791-11e8-8563-b8f6b1108e05'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   243
         min: (Point 400 300)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   244
         bounds: (Rectangle 0 0 644 460)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   245
       )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   246
       component: 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   247
      (SpecCollection
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   248
         collection: (
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   249
          (VariableHorizontalPanelSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   250
             name: 'VariableHorizontalPanel'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   251
             layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 -36 1.0)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   252
             uuid: 'f1361c5c-0791-11e8-8563-b8f6b1108e05'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   253
             component: 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   254
            (SpecCollection
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   255
               collection: (
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   256
                (ViewSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   257
                   name: 'Box1'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   258
                   uuid: 'f1361df6-0791-11e8-8563-b8f6b1108e05'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   259
                   component: 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   260
                  (SpecCollection
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   261
                     collection: (
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   262
                      (HorizontalPanelViewSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   263
                         name: 'HorizontalPanel2'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   264
                         layout: (LayoutFrame 0 0 2 0 297 0 23 0)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   265
                         uuid: 'f1361ebe-0791-11e8-8563-b8f6b1108e05'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   266
                         horizontalLayout: leftSpace
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   267
                         verticalLayout: fit
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   268
                         horizontalSpace: 3
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   269
                         verticalSpace: 3
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   270
                         component: 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   271
                        (SpecCollection
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   272
                           collection: (
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   273
                            (RadioButtonSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   274
                               label: 'Flat'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   275
                               name: 'RadioButton1'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   276
                               uuid: 'f1362062-0791-11e8-8563-b8f6b1108e05'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   277
                               translateLabel: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   278
                               model: selectionOfClassPresentation
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   279
                               isTriggerOnDown: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   280
                               lampColor: (Color 0.0 0.0 0.0)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   281
                               select: Flat
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   282
                               extent: (Point 80 21)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   283
                             )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   284
                            (RadioButtonSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   285
                               label: 'Categories'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   286
                               name: 'ClassCategoriesRadioButton'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   287
                               uuid: 'f1362062-0791-11e8-8563-b8f6b1108e05'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   288
                               translateLabel: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   289
                               model: selectionOfClassPresentation
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   290
                               isTriggerOnDown: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   291
                               lampColor: (Color 0.0 0.0 0.0)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   292
                               select: #'Class Categories'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   293
                               extent: (Point 124 21)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   294
                             )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   295
                            (RadioButtonSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   296
                               label: 'Hierarchy'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   297
                               name: 'ClassHierarchyRadioButton'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   298
                               uuid: 'f136233c-0791-11e8-8563-b8f6b1108e05'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   299
                               translateLabel: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   300
                               model: selectionOfClassPresentation
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   301
                               isTriggerOnDown: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   302
                               lampColor: (Color 0.0 0.0 0.0)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   303
                               select: #'Class Hierarchy'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   304
                               extent: (Point 145 21)
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   305
                             )
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   306
                            )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   307
                          
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   308
                         )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   309
                       )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   310
                      (SequenceViewSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   311
                         name: 'listOfClassesView'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   312
                         layout: (LayoutFrame 0 0.0 23 0.0 0 1.0 -24 1.0)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   313
                         uuid: 'f13624d6-0791-11e8-8563-b8f6b1108e05'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   314
                         tabable: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   315
                         model: indexOfSelectedClassInFlatList
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   316
                         hasHorizontalScrollBar: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   317
                         hasVerticalScrollBar: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   318
                         miniScrollerHorizontal: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   319
                         useIndex: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   320
                         sequenceList: listOfClassNames
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   321
                       )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   322
                      (SelectionInTreeViewSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   323
                         name: 'listOfClassHierarchyView'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   324
                         layout: (LayoutFrame 0 0.0 23 0.0 0 1.0 -24 1.0)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   325
                         uuid: 'f13624d6-0791-11e8-8563-b8f6b1108e05'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   326
                         tabable: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   327
                         model: selectionOfClassHierarchy
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   328
                         hasHorizontalScrollBar: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   329
                         hasVerticalScrollBar: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   330
                         miniScrollerHorizontal: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   331
                         showDirectoryIndicatorForRoot: false
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   332
                         showDirectoryIndicator: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   333
                         valueChangeSelector: classSelected
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   334
                         hierarchicalList: rootOfClassHierarchy
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   335
                         validateDoubleClickSelector: validateDoubleClick:
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   336
                         contentsSelector: treeViewClassHierarchyContents
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   337
                         labelSelector: treeViewClassHierarchyLabel
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   338
                         childrenSelector: treeViewClassHierarchyChildren
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   339
                         iconSelector: treeViewClassHierarchyIcon
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   340
                         highlightMode: line
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   341
                       )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   342
                      (SelectionInTreeViewSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   343
                         name: 'listOfClassCategoriesView'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   344
                         layout: (LayoutFrame 0 0.0 23 0.0 0 1.0 -24 1.0)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   345
                         uuid: 'f13627ba-0791-11e8-8563-b8f6b1108e05'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   346
                         tabable: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   347
                         model: selectionOfClassCategories
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   348
                         hasHorizontalScrollBar: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   349
                         hasVerticalScrollBar: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   350
                         miniScrollerHorizontal: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   351
                         showRoot: false
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   352
                         showDirectoryIndicator: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   353
                         valueChangeSelector: classSelected
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   354
                         hierarchicalList: rootOfClassCategories
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   355
                         validateDoubleClickSelector: validateDoubleClick:
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   356
                         childrenSelector: treeViewClassCategoryChildren
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   357
                         iconSelector: treeViewClassCategoryIcon
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   358
                         highlightMode: line
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   359
                       )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   360
                      (InputFieldSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   361
                         name: 'classNameInputField'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   362
                         layout: (LayoutFrame 2 0.0 -22 1 -1 1.0 0 1)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   363
                         uuid: 'f1362922-0791-11e8-8563-b8f6b1108e05'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   364
                         tabable: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   365
                         model: classNameHolder
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   366
                         acceptOnLeave: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   367
                         acceptOnLostFocus: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   368
                         acceptOnPointerLeave: true
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   369
                       )
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   370
                      )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   371
                    
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   372
                   )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   373
                 )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   374
                (ViewSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   375
                   name: 'Box2'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   376
                   uuid: 'f1362aee-0791-11e8-8563-b8f6b1108e05'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   377
                   component: 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   378
                  (SpecCollection
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   379
                     collection: (
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   380
                      (VariableVerticalPanelSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   381
                         name: 'ResourcePanel'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   382
                         layout: (LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   383
                         uuid: '51c4b91e-07a8-11e8-8563-b8f6b1108e05'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   384
                         component: 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   385
                        (SpecCollection
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   386
                           collection: (
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   387
                            (DataSetSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   388
                               name: 'resourcesDataSetView'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   389
                               uuid: 'f1362bac-0791-11e8-8563-b8f6b1108e05'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   390
                               model: selectionOfResourceMethod
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   391
                               hasHorizontalScrollBar: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   392
                               hasVerticalScrollBar: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   393
                               miniScrollerHorizontal: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   394
                               rowClassName: 'ResourceSelectionBrowser::Row'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   395
                               dataList: listOfResourceMethods
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   396
                               useIndex: false
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   397
                               has3Dseparators: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   398
                               doubleClickSelector: resourceDoubleClicked
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   399
                               columnHolder: resourceMethodColumns
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   400
                               valueChangeSelector: resourceSelected
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   401
                               verticalSpacing: 1
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   402
                             )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   403
                            (ArbitraryComponentSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   404
                               name: 'ImageView'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   405
                               uuid: '51c4bd9c-07a8-11e8-8563-b8f6b1108e05'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   406
                               hasBorder: false
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   407
                               component: ImageView
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   408
                             )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   409
                            )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   410
                          
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   411
                         )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   412
                         handles: (Any 0.98999999999999999 1.0)
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   413
                       )
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   414
                      (InputFieldSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   415
                         name: 'selectorInputField'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   416
                         layout: (LayoutFrame 2 0.0 -22 1 -2 1.0 0 1)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   417
                         uuid: 'f1362db4-0791-11e8-8563-b8f6b1108e05'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   418
                         tabable: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   419
                         model: resourceSelectorHolder
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   420
                         acceptOnLeave: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   421
                         acceptOnLostFocus: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   422
                         acceptOnPointerLeave: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   423
                       )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   424
                      )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   425
                    
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   426
                   )
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   427
                 )
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   428
                )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   429
              
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   430
             )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   431
             handles: (Any 0.5 1.0)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   432
           )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   433
          (HorizontalPanelViewSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   434
             name: 'ButtonPanel'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   435
             layout: (LayoutFrame 2 0.0 -30 1 -18 1.0 -4 1.0)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   436
             uuid: 'f1362f3a-0791-11e8-8563-b8f6b1108e05'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   437
             horizontalLayout: fit
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   438
             verticalLayout: fit
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   439
             reverseOrderIfOKAtLeft: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   440
             component: 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   441
            (SpecCollection
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   442
               collection: (
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   443
                (ActionButtonSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   444
                   label: 'Help'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   445
                   name: 'HelpButton'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   446
                   activeHelpKey: dss
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   447
                   uuid: 'f136303e-0791-11e8-8563-b8f6b1108e05'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   448
                   translateLabel: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   449
                   model: openHTMLDocument:
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   450
                   initiallyDisabled: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   451
                   enableChannel: helpEnabled
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   452
                   actionValue: 'tools/uipainter/ResourceSelectionBrowser.html'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   453
                   extent: (Point 204 26)
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   454
                 )
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   455
                (ActionButtonSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   456
                   label: 'Cancel'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   457
                   name: 'cancelButton'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   458
                   activeHelpKey: commitCancel
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   459
                   uuid: 'f13631ba-0791-11e8-8563-b8f6b1108e05'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   460
                   translateLabel: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   461
                   tabable: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   462
                   model: cancel
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   463
                   extent: (Point 204 26)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   464
                 )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   465
                (ActionButtonSpec
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   466
                   label: 'OK'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   467
                   name: 'okButton'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   468
                   activeHelpKey: commitOK
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   469
                   uuid: 'f1363336-0791-11e8-8563-b8f6b1108e05'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   470
                   translateLabel: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   471
                   tabable: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   472
                   model: accept
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   473
                   isDefault: true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   474
                   extent: (Point 204 26)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   475
                 )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   476
                )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   477
              
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   478
             )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   479
             keepSpaceForOSXResizeHandleH: true
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   480
           )
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   481
          )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   482
        
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   483
       )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   484
     )
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   485
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   486
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   487
!ResourceSelectionBrowser class methodsFor:'list specs'!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   488
822
be574ef48217 checkin from browser
tz
parents: 821
diff changeset
   489
tableColumnsForResourceMethodAttributes
821
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   490
    "This resource specification was automatically generated
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   491
     by the DataSetBuilder of ST/X."
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   492
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   493
    "Do not manually edit this!! If it is corrupted,
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   494
     the DataSetBuilder may not be able to read the specification."
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   495
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   496
    "
822
be574ef48217 checkin from browser
tz
parents: 821
diff changeset
   497
     DataSetBuilder new openOnClass:ResourceSelectionBrowser andSelector:#tableColumnsForResourceMethodAttributes
821
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   498
    "
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   499
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   500
    <resource: #tableColumns>
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   501
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   502
821
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   503
    ^ #(
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   504
        #(#DataSetColumnSpec
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   505
           #width: 20
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   506
           #height: 20
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   507
           #printSelector: #iconOn:
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   508
           #canSelect: false
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   509
       )
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   510
        #(#DataSetColumnSpec
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   511
           #label: ' Selector'
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   512
           #labelAlignment: #left
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   513
           #model: #selector
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   514
           #canSelect: false
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   515
       )
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   516
        #(#DataSetColumnSpec
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   517
           #label: ' Resource Type'
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   518
           #labelAlignment: #left
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   519
           #model: #resourceType
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   520
           #canSelect: false
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   521
       )
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   522
     )
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   523
! !
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   524
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   525
!ResourceSelectionBrowser methodsFor:'accessing'!
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   526
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   527
classFilter:aBlock
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   528
    "aBlock to return true/false, given a class.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   529
     With false, it is not shown in the tree"
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   530
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   531
    classFilter := aBlock.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   532
!
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   533
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   534
existingOnly:something
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   535
    existingOnly := something.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   536
!
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   537
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   538
metaClassOnly:aBoolean
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   539
    "force selection to be limited to the metaclass"
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   540
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   541
    metaClassOnly := aBoolean.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   542
!
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   543
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   544
packageFilter:aBlock
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   545
    "aBlock to return true/false, given a packageID.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   546
     With false, the class is not shown in the tree"
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   547
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   548
    packageFilter := aBlock.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   549
! !
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   550
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   551
!ResourceSelectionBrowser methodsFor:'aspects'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   552
1986
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   553
classNameHolder
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   554
    "returns the value holder for the name of the class"
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   555
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   556
    |holder|
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   557
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   558
    (holder := builder bindingAt:#valueOfClassName) isNil ifTrue:[
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   559
        builder aspectAt:#valueOfClassName put:(holder :=  '' asValue).
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   560
        holder onChangeEvaluate:[self classSelectionUpdate:holder value].
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   561
    ].
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   562
    ^ holder
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   563
!
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   564
773
tz
parents: 771
diff changeset
   565
helpEnabled
tz
parents: 771
diff changeset
   566
    "returns whether there is a documentation file"
tz
parents: 771
diff changeset
   567
tz
parents: 771
diff changeset
   568
    ^true
tz
parents: 771
diff changeset
   569
!
tz
parents: 771
diff changeset
   570
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   571
indexOfSelectedClassInFlatList
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   572
    |holder|
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   573
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   574
    (holder := builder bindingAt:#indexOfSelectedClassInFlatList) isNil ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   575
        builder aspectAt:#indexOfSelectedClassInFlatList put:(holder := nil asValue).
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   576
        holder onChangeEvaluate:[ 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   577
            |clsName|
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   578
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   579
            clsName := self listOfClassNames at:holder value ifAbsent:nil.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   580
            clsName notNil ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   581
                classSelectionBlock value:clsName  
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   582
            ]. 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   583
        ]. 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   584
    ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   585
    ^ holder
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   586
!
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   587
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   588
listOfClassNames
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   589
    "returns the value holder for the flat class list"
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   590
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   591
    |holder|
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   592
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   593
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   594
    (holder := builder bindingAt:#listOfClassNames) isNil ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   595
        builder aspectAt:#listOfClassNames put: (holder := List new).
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   596
    ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   597
    ^ holder
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   598
!
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   599
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   600
listOfResourceMethods
905c3b4ba565 revised
tz
parents: 769
diff changeset
   601
    "returns the value holder for the list of the resource methods"
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   602
1184
c67bdfe67afd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1086
diff changeset
   603
    ^ builder listAspectFor:#listOfResourceMethods
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   604
!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   605
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   606
resourceMethodColumns
905c3b4ba565 revised
tz
parents: 769
diff changeset
   607
    "returns the columns for the table of the resource methods as value holder"
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   608
cf47d420764a initial checkin
tz
parents:
diff changeset
   609
    |holder|
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   610
    (holder := builder bindingAt:#resourceMethodColumns) isNil ifTrue:[
821
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   611
        builder aspectAt:#resourceMethodColumns put:(holder := List new).
822
be574ef48217 checkin from browser
tz
parents: 821
diff changeset
   612
        holder addAll: (self class tableColumnsForResourceMethodAttributes collect: [:i| i decodeAsLiteralArray]).
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   613
    ].
905c3b4ba565 revised
tz
parents: 769
diff changeset
   614
    ^ holder
905c3b4ba565 revised
tz
parents: 769
diff changeset
   615
!
905c3b4ba565 revised
tz
parents: 769
diff changeset
   616
1986
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   617
resourceSelectorHolder
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   618
    "returns the value holder for the name of the selector"
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   619
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   620
    |holder|
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   621
    (holder := builder bindingAt:#valueOfResourceSelector) isNil ifTrue:[
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   622
        builder aspectAt:#valueOfResourceSelector put:(holder :=  '' asValue).
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   623
    ].
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   624
    ^ holder
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   625
!
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   626
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   627
rootOfClassCategories
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   628
    "returns the value holder for the root of the class tree list"
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   629
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   630
    |holder|                                
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   631
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   632
    (holder := builder bindingAt:#rootOfClassCategories) isNil ifTrue:[
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   633
        classPresentation = #'Class Categories' ifTrue: [
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   634
            builder aspectAt:#rootOfClassCategories put: (holder := TreeItem name: 'Categories')
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   635
        ].
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   636
    ].
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   637
    ^ holder
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   638
!
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   639
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   640
rootOfClassHierarchy
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   641
    "returns the value holder for the root of the class tree list"
905c3b4ba565 revised
tz
parents: 769
diff changeset
   642
905c3b4ba565 revised
tz
parents: 769
diff changeset
   643
    |holder|
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   644
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   645
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   646
    (holder := builder bindingAt:#rootOfClassHierarchy) isNil ifTrue:[
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   647
        classPresentation = #'Class Hierarchy' ifTrue: [
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   648
            builder aspectAt:#rootOfClassHierarchy put: (holder := TreeItem new)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   649
        ]
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   650
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   651
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   652
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   653
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   654
selectionOfClassCategories
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   655
    "returns the value holder for the selected class of the class tree list"
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   656
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   657
    |holder|           
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   658
    (holder := builder bindingAt:#selectionOfClassCategories) isNil ifTrue:[
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   659
        builder aspectAt:#selectionOfClassCategories put:(holder :=  ValueHolder new). 
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   660
    ].
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   661
    ^ holder
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   662
!
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   663
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   664
selectionOfClassHierarchy
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   665
    "returns the value holder for the selected class of the class tree list"
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   666
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   667
    |holder|           
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   668
    (holder := builder bindingAt:#selectionOfClassHierarchy) isNil ifTrue:[
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   669
        builder aspectAt:#selectionOfClassHierarchy put:(holder :=  ValueHolder new). 
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   670
    ].
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   671
    ^ holder
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   672
!
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   673
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   674
selectionOfClassPresentation
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   675
    "returns the value holder for the selected class presentation
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   676
     (Flat, Hierarchy or Category)"
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   677
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   678
    |holder|
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   679
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   680
    (holder := builder bindingAt:#selectionOfClassPresentation) isNil ifTrue:[
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   681
        builder 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   682
            aspectAt:#selectionOfClassPresentation 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   683
            put:(holder := RadioButtonGroup with: (classPresentation := classPresentation ? LastClassPresentation ? #'Class Categories')).
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   684
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   685
        holder onChangeEvaluate:[self classPresentationChanged ]. 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   686
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   687
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   688
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   689
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   690
selectionOfResourceMethod
905c3b4ba565 revised
tz
parents: 769
diff changeset
   691
    "returns the value holder for the selected resource method of the resource method list"
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   692
cf47d420764a initial checkin
tz
parents:
diff changeset
   693
    |holder|
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   694
    (holder := builder bindingAt:#selectionOfResourceMethod) isNil ifTrue:[
905c3b4ba565 revised
tz
parents: 769
diff changeset
   695
	builder aspectAt:#selectionOfResourceMethod put:(holder :=  '' asValue).
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   696
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   697
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   698
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   699
467
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   700
valueOfClassName
2309
777065a9ff59 Mark obsolete methods
Stefan Vogel <sv@exept.de>
parents: 2038
diff changeset
   701
    <resource: #obsolete>
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   702
    "returns the value holder for the name of the class"
467
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   703
1986
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   704
    self obsoleteMethodWarning:'stupid name - use #classNameHolder'.
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   705
    ^ self classNameHolder
467
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   706
!
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   707
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   708
valueOfResourceSelector
2309
777065a9ff59 Mark obsolete methods
Stefan Vogel <sv@exept.de>
parents: 2038
diff changeset
   709
    <resource: #obsolete>
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   710
    "returns the value holder for the name of the selector"
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   711
1986
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   712
    self obsoleteMethodWarning:'stupid name - use #resourceSelectorHolder'.
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   713
    ^ self resourceSelectorHolder
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   714
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   715
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   716
!ResourceSelectionBrowser methodsFor:'callbacks-user'!
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   717
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   718
classPresentationChanged
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   719
    "returns the value holder for the selected class presentation
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   720
     (Flat, Hierarchy or Category)"
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   721
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   722
    |comp newRoot|
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   723
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   724
    classPresentation := LastClassPresentation := self selectionOfClassPresentation value.
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   725
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   726
    classPresentation == #'Flat' ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   727
        self listOfClassNames isEmpty ifTrue:[ self updateListOfClasses ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   728
        comp := builder componentAt: #listOfClassesView.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   729
    ] ifFalse:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   730
        classPresentation == #'Class Hierarchy' ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   731
             comp := builder componentAt: #listOfClassHierarchyView.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   732
             newRoot := self rootOfClassHierarchy.  
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   733
        ] ifFalse: [
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   734
            comp := builder componentAt: #listOfClassCategoriesView.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   735
            newRoot := self rootOfClassCategories. 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   736
        ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   737
        comp root:newRoot.
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   738
    ].
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   739
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   740
    comp raise; requestFocus.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   741
    classSelectionBlock value:(self classNameHolder value)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   742
!
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   743
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   744
classSelected
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   745
    "after a class selection, read the allowed resource methods of the selected class"
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   746
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   747
    |sel className|
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   748
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   749
    classPresentation = #'Class Hierarchy'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   750
"/        ifTrue:  [sel := self selectionOfClassHierarchy value]
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   751
        ifFalse: [sel := self selectionOfClassCategories value].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   752
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   753
    resourceClass := nil.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   754
    sel notNil ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   755
        sel contents ~~ #Category ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   756
            className := sel name.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   757
            resourceClass := Smalltalk classNamed:className.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   758
        ]
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   759
    ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   760
    self updateResourceMethodList.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   761
!
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   762
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   763
classSelectionUpdate:clsPattern
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   764
    "called when a new class is selected AND when switching presentation modes"
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   765
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   766
    |foundClass classes|  
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   767
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   768
    "/ because this is also called for presentation switch,
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   769
    "/ we cannot tune it this way...
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   770
    "/ (self classNameHolder value = clsPattern) ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   771
    "/     resourceClass notNil ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   772
    "/         resourceClass name = clsPattern ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   773
    "/             ^ self 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   774
    "/         ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   775
    "/     ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   776
    "/ ].
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   777
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   778
    clsPattern notNil ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   779
        foundClass := Smalltalk classNamed:clsPattern.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   780
    ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   781
    (foundClass isClass not or:[foundClass name ~= clsPattern])
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   782
    ifTrue: [
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   783
        classes := allClasses select: [:cls| cls name size >= clsPattern size].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   784
        1 to: clsPattern size do: [:i|    
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   785
             classes := classes select: [:cls| (cls name at: i) == (clsPattern at: i)].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   786
        ].    
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   787
        foundClass := classes at: 1 ifAbsent:[]. 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   788
    ].          
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   789
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   790
    foundClass notNil ifTrue: [           
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   791
        foundClass := foundClass autoload.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   792
        resourceClass := foundClass.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   793
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   794
        classPresentation = #'Flat' ifTrue: [
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   795
            |index|
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   796
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   797
            index := self listOfClassNames indexOf:resourceClass name.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   798
            self indexOfSelectedClassInFlatList value:index.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   799
        ] ifFalse: [
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   800
            classPresentation = #'Class Hierarchy' ifTrue: [
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   801
                |searchArgs nonSuperclasses hierItem|
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   802
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   803
                false "foundClass isPrivate"
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   804
                    ifFalse: [searchArgs := foundClass withAllSuperclasses reversed]
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   805
                    ifTrue:  [searchArgs := foundClass owningClass withAllSuperclasses reversed. 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   806
                              searchArgs add: foundClass].                                  
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   807
                (nonSuperclasses := self treeViewClassHierarchyContents allSuperclasses) notNil 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   808
                    ifTrue: [searchArgs := searchArgs reject: [:cls| nonSuperclasses includes: cls]].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   809
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   810
                hierItem := self rootOfClassHierarchy detectChild:[:child :arg| child contents == arg] arguments:searchArgs.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   811
                hierItem notNil ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   812
                    self selectionOfClassHierarchy value:hierItem.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   813
                ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   814
            ] ifFalse: [
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   815
                |searchArgs hierItem|
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   816
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   817
                false "foundClass isPrivate"
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   818
                    ifTrue:  [searchArgs := Array with: 'Categories' with: foundClass category with: foundClass owningClass name with: foundClass name]
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   819
                    ifFalse: [searchArgs := Array with: 'Categories' with: foundClass category with: foundClass name].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   820
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   821
                hierItem := self rootOfClassCategories detectChild:[:child :arg| (child name upTo: $ ) = arg] arguments:searchArgs.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   822
                hierItem notNil ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   823
                    self selectionOfClassCategories value: hierItem.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   824
                ].
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   825
            ].
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   826
        ].
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   827
    ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   828
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   829
    self classNameHolder value: clsPattern.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   830
    self updateResourceMethodList.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   831
!
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   832
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   833
resourceDoubleClicked
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   834
    "after a double click on resource method, accept it and close"
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   835
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   836
    accept value: true.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   837
    self closeRequest
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   838
!
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   839
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   840
resourceSelected
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   841
    "after a click on a resource method, set its selector into the field"
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   842
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   843
    |selectedMethodInfo mthd|
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   844
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   845
    selectedMethodInfo := self selectionOfResourceMethod value.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   846
    selectedMethodInfo notNil ifTrue: [
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   847
        self resourceSelectorHolder value:(selectedMethodInfo selector).
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   848
        mthd := selectedMethodInfo method.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   849
        (mthd hasResource:#image) ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   850
            (builder componentAt:#ImageView)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   851
                image:(mthd valueWithReceiver:nil arguments:#())
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   852
        ].
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   853
    ]
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   854
!
2908
178288821f0a changed: #treeViewClassCategoryChildren
Claus Gittinger <cg@exept.de>
parents: 2774
diff changeset
   855
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   856
updateListOfClasses
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   857
    |names|
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   858
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   859
    classPresentation = #'Flat' ifTrue: [
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   860
        self listOfClassNames isEmpty ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   861
            names := (Smalltalk allClasses asOrderedCollection sortBySelector:#name)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   862
                        select:[:cls | self filterClass:cls]
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   863
                        thenCollect:[:cls | cls name].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   864
            self listOfClassNames addAll:names.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   865
        ]
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   866
    ]
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   867
!
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   868
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   869
updateResourceMethodList
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   870
    "read the allowed resource methods of the selected class"
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   871
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   872
    |class className item|
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   873
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   874
    (class := resourceClass) isNil ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   875
        classPresentation = #'Class Hierarchy'
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   876
            ifTrue:  [item := self selectionOfClassHierarchy value ]
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   877
            ifFalse: [item := self selectionOfClassCategories value ].
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   878
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   879
        item notNil ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   880
            item contents ~~ #Category ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   881
                className := item name.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   882
                class := Smalltalk at:className asSymbol.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   883
            ]
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   884
        ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   885
    ] ifFalse:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   886
        class := resourceClass
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   887
    ].
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   888
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   889
    class isNil ifTrue: [
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   890
        self listOfResourceMethods contents:#().
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   891
        ^self
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   892
    ].
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   893
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   894
    className := class name."/class theNonMetaclass name
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   895
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   896
    self withWaitCursorDo:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   897
        |newContents|           
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   898
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   899
        resourceTypes isNil ifTrue: [resourceTypes := Method resourceTypes].
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   900
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   901
        self classNameHolder value: className.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   902
        self class lastSelection: className.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   903
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   904
        newContents := class theMetaclass methodDictionary asOrderedCollection 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   905
                            select:[:m | resourceTypes includes: m resourceType].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   906
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   907
        newContents := newContents sort:[:m1 :m2 | m1 selector < m2 selector].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   908
        newContents := newContents collect:[:m| (ResourceMethod new method:m)].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   909
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   910
        self listOfResourceMethods contents:newContents
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   911
                .
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   912
    ]
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   913
!
905c3b4ba565 revised
tz
parents: 769
diff changeset
   914
905c3b4ba565 revised
tz
parents: 769
diff changeset
   915
validateDoubleClick: aTreeItem
905c3b4ba565 revised
tz
parents: 769
diff changeset
   916
    "returns whether a class may be selected"
905c3b4ba565 revised
tz
parents: 769
diff changeset
   917
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   918
    |cont|
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   919
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   920
    ^ (cont := aTreeItem contents) ~= '' 
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   921
      and: [cont ~~ self treeViewClassHierarchyContents]       
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   922
905c3b4ba565 revised
tz
parents: 769
diff changeset
   923
905c3b4ba565 revised
tz
parents: 769
diff changeset
   924
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   925
! !
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   926
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   927
!ResourceSelectionBrowser methodsFor:'initialization'!
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   928
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   929
initialize
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   930
    "Invoked when a new instance is created."
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   931
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   932
    metaClassOnly := true.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   933
    existingOnly := false.
1732
f6fb9ac10ac5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   934
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   935
    super initialize.
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   936
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   937
cf47d420764a initial checkin
tz
parents:
diff changeset
   938
!ResourceSelectionBrowser methodsFor:'instance creation'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   939
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   940
onSuperclass: aSuperclassOrSymbol andClass:aClassOrClassName andSelector: aSelector withResourceTypes: aResourceTypes
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   941
    "create - but do not yet open
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   942
     a ResourceSelectionBrowser"
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   943
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   944
    |cls|
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   945
517
91ff807d8a23 set resource selection after opening
tz
parents: 504
diff changeset
   946
    resourceMethod := aSelector.
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   947
    resourceTypes := aResourceTypes.
cf47d420764a initial checkin
tz
parents:
diff changeset
   948
    resourceSuperclass := aSuperclassOrSymbol isClass ifTrue: [aSuperclassOrSymbol name] ifFalse: [aSuperclassOrSymbol].
802
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   949
    resourceClass := nil.
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   950
1978
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
   951
    aClassOrClassName notNil ifTrue:[
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
   952
        aClassOrClassName isClass ifTrue: [
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
   953
            cls := aClassOrClassName. 
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
   954
            resourceClass := aClassOrClassName
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
   955
        ] ifFalse: [
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
   956
            cls := Smalltalk classNamed: aClassOrClassName.
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
   957
            cls notNil ifTrue:[
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
   958
                resourceClass := cls
802
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   959
            ]
1978
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
   960
        ]
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
   961
    ].            
1986
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   962
    self resourceSelectorHolder value:(aSelector ? '').
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   963
! !
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   964
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   965
!ResourceSelectionBrowser methodsFor:'startup & release'!
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   966
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   967
openAndLetUserChoose
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   968
    "opens the previously configured receiver;
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   969
     return a Message-object or nil"
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   970
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   971
    |selectedClass enteredClassName className cls|
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
   972
463
947f89198464 return complete message even if not implemented
tz
parents: 436
diff changeset
   973
    self open.
947f89198464 return complete message even if not implemented
tz
parents: 436
diff changeset
   974
1978
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
   975
    (selectedClass := self selectionOfClassHierarchy value) isNil ifTrue:[
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
   976
        (selectedClass := self selectionOfClassCategories value) isNil ifTrue:[
1986
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   977
            (enteredClassName := self classNameHolder value) isNil ifTrue:[
1086
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   978
                accept value ifTrue:[
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   979
                    self warn:'No valid class selected/entered'.
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   980
                ].
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   981
                ^ nil
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   982
            ]
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   983
        ]
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   984
    ].
693
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   985
1978
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
   986
    className := enteredClassName.    
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
   987
    className isNil ifTrue:[
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
   988
        className := selectedClass name
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   989
    ].
1978
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
   990
    cls := Smalltalk classNamed:className.
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
   991
    (cls isClass and:[accept value]) ifTrue:[            
1986
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
   992
        ^ Method::MethodWhoInfo class:cls selector:(self resourceSelectorHolder value)
1086
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   993
    ].
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   994
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   995
    accept value ifTrue:[
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   996
        self warn:'No valid class selected/entered'.
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   997
    ].
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   998
    ^ nil
802
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   999
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
  1000
    "Modified: / 22.4.1998 / 14:51:03 / cg"
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1001
!
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1002
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1003
openOnSuperclass: aSuperclassOrSymbol andClass:aClassOrClassName andSelector: aSelector withResourceTypes: aResourceTypes
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1004
    "opens a ResourceSelectionBrowser; return a Message-object or nil"
425
cf47d420764a initial checkin
tz
parents:
diff changeset
  1005
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1006
    self 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1007
        onSuperclass: aSuperclassOrSymbol 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1008
        andClass:aClassOrClassName andSelector: aSelector 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1009
        withResourceTypes: aResourceTypes.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1010
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1011
    self openAndLetUserChoose
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1012
!
425
cf47d420764a initial checkin
tz
parents:
diff changeset
  1013
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
  1014
postBuildWith:aBuilder
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
  1015
    "after building and before opening,  
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
  1016
     create a class selection block, an entry completion block for the class name field"
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
  1017
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
  1018
    |classSelection classNameInputField|
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1019
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1020
    (resourceTypes notNil and:[(resourceTypes includesAny:#(image programImage))]) ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1021
        (builder componentAt: #resourcesDataSetView)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1022
            origin:0.0@0.0 extent:(1.0 @ 0.7).
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1023
        (builder componentAt: #ImageView) 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1024
            origin:0.0@0.7 extent:(1.0 @ 0.3); beVisible.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1025
        (builder componentAt: #ResourcePanel)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1026
            resizeSubviews; sizeChanged:nil.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1027
    ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1028
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
  1029
    allClasses := self treeViewClassHierarchyContents withAllSubclasses reject: [:cls| cls isPrivate].
1978
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
  1030
    classSelection := resourceClass isNil ifTrue:[nil] ifFalse:[resourceClass name]. 
802
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
  1031
1978
c4334704dc58 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1920
diff changeset
  1032
    (classSelection isNil or:[ (Smalltalk classNamed: classSelection) isNil]) 
689
ff099c344dd6 try to find out convenient class selection
tz
parents: 680
diff changeset
  1033
        ifTrue: [classSelection :=  self class lastSelection].
1732
f6fb9ac10ac5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  1034
"/    (classSelection isNil or:[Smalltalk at: classSelection]) isNil 
f6fb9ac10ac5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  1035
"/        ifTrue: [classSelection :=  self treeViewContents].
802
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
  1036
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  1037
    classSelectionBlock := [:clsPattern | self classSelectionUpdate:clsPattern].
1986
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
  1038
    self classNameHolder value:classSelection.  
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
  1039
1920
9f246ba60c91 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
  1040
    (classNameInputField := builder componentAt: #classNameInputField) 
9f246ba60c91 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
  1041
        entryCompletionBlock:
9f246ba60c91 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
  1042
            [:value|
9f246ba60c91 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
  1043
                |s what m|
9f246ba60c91 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
  1044
9f246ba60c91 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
  1045
                s := classNameInputField contents withoutSpaces.
9f246ba60c91 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
  1046
                what := Smalltalk classnameCompletion:s inEnvironment:Smalltalk.
9f246ba60c91 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
  1047
                classNameInputField contents:what first.
9f246ba60c91 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
  1048
                (what at:2) size ~~ 1 ifTrue:[
3528
f697558c47cd #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
  1049
                    classNameInputField device beepInEditor
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1050
                ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1051
                (Smalltalk classNamed:(what at:1)) notNil ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1052
                    self classNameHolder value:(what at:1)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1053
                ].
1920
9f246ba60c91 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
  1054
"/                |what oldClassName|
9f246ba60c91 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
  1055
"/                oldClassName := classNameInputField contents.
9f246ba60c91 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
  1056
"/                what := Smalltalk classnameCompletion: value withoutSpaces.
9f246ba60c91 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
  1057
"/                classNameInputField contents:what first.
9f246ba60c91 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
  1058
"/                oldClassName = classNameInputField contents ifTrue:[classNameInputField flash].
9f246ba60c91 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
  1059
"/                classSelectionBlock value: classNameInputField contents
9f246ba60c91 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
  1060
            ].
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
  1061
1986
5cb77205ce00 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
  1062
    classSelectionBlock value: self classNameHolder value.
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1063
    "/ self updateResourceMethodList. -- will be done automatically via change
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
  1064
    self selectionOfResourceMethod value: (self listOfResourceMethods detect: [:m| m selector == resourceMethod] ifNone: nil).
909
c0bd0d9103e3 class presentation in categories added (3)
tz
parents: 907
diff changeset
  1065
c0bd0d9103e3 class presentation in categories added (3)
tz
parents: 907
diff changeset
  1066
    ^super postBuildWith:aBuilder
910
7510ea8c9aeb class presentation in categories added (4)
tz
parents: 909
diff changeset
  1067
!
7510ea8c9aeb class presentation in categories added (4)
tz
parents: 909
diff changeset
  1068
7510ea8c9aeb class presentation in categories added (4)
tz
parents: 909
diff changeset
  1069
postOpenWith:aBuilder
7510ea8c9aeb class presentation in categories added (4)
tz
parents: 909
diff changeset
  1070
    "after opening and if turned on make hierarchy view visible"
7510ea8c9aeb class presentation in categories added (4)
tz
parents: 909
diff changeset
  1071
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1072
    classPresentation = #'Class Hierarchy' ifTrue: [
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1073
        (builder componentAt: #listOfClassHierarchyView) raise
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1074
    ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1075
    classPresentation = #'Flat' ifTrue: [
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1076
        self updateListOfClasses.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1077
        (builder componentAt: #listOfClassesView) raise
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1078
    ].
910
7510ea8c9aeb class presentation in categories added (4)
tz
parents: 909
diff changeset
  1079
2026
df5b0b3902de *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  1080
    super postOpenWith:aBuilder
425
cf47d420764a initial checkin
tz
parents:
diff changeset
  1081
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
  1082
3531
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1083
!ResourceSelectionBrowser methodsFor:'tree building - category'!
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1084
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1085
filterClass:cls
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1086
    "true if cls is to be shown"
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1087
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1088
    classFilter notNil ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1089
        (classFilter value:cls) ifFalse:[^ false].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1090
    ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1091
    packageFilter notNil ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1092
        (packageFilter value:cls package) ifFalse:[^ false].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1093
    ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1094
    existingOnly == true ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1095
        ^ cls theMetaclass methodDictionary 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1096
            contains:[:m | 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1097
                resourceTypes includes:m resourceType
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1098
            ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1099
    ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1100
    ^ true
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1101
!
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1102
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1103
treeViewClassCategoryChildren
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1104
    "returns the children for the contents (class) of aTreeItem as a block"
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1105
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1106
    "/ cg: tz's algorithm was very-very slow, 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1107
    "/ (it enumerated classes hundreds of times,
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1108
    "/  leading to a square runtime behavior
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1109
    "/  - i.e. very slow scrolling )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1110
    "/ Speed up things by caching facts while enumerating
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1111
    "/ classes once only.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1112
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1113
    |topClass childrenPerCategory privateClasses|
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1114
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1115
    topClass := self treeViewClassHierarchyContents.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1116
    privateClasses := IdentitySet new.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1117
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1118
    childrenPerCategory := Dictionary new.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1119
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1120
    "/ collect all classes to be inserted into the tree(s)
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1121
    topClass withAllSubclassesDo:[:cls |
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1122
        |shown cat set|
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1123
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1124
        (self filterClass:cls) ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1125
             cls isPrivate ifFalse:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1126
                cat := cls category.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1127
                cat notNil ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1128
                    (childrenPerCategory at:cat ifAbsentPut:[Set new]) add:cls
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1129
                ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1130
            ] ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1131
                privateClasses add:cls
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1132
            ]
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1133
        ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1134
    ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1135
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1136
    "/ need the owningclasses in the tree
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1137
    privateClasses do:[:each |
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1138
        |owner|
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1139
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1140
        owner := each owningClass.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1141
        (childrenPerCategory at:(owner category) ifAbsentPut:[Set new]) add:owner
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1142
    ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1143
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1144
    ^ [:aTreeItem|
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1145
        |cont children initialContents setOfCategories itemCategory setOfClasses|
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1146
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1147
        (cont := aTreeItem contents) isBehavior ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1148
            children := privateClasses select:[:cls | cls owningClass == aTreeItem contents].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1149
            children := children select:[:cls | self filterClass:cls].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1150
            children := children asSortedCollection: [:c1 :c2| c1 name <= c2 name].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1151
            "/ children := children collect: [:child| TreeItem name: child name , ' (', child superclass name, ')' contents: child]
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1152
            children := children collect: [:child| TreeItem name:(child name) contents: child]
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1153
        ] ifFalse:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1154
            cont size == 0 ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1155
                setOfCategories := childrenPerCategory keys.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1156
                children := setOfCategories asSortedCollection.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1157
                children := children collect: [:nm | TreeItem name:nm contents:#Category]
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1158
            ] ifFalse:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1159
                cont == #Category ifTrue:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1160
                    itemCategory := aTreeItem name.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1161
                    setOfClasses := childrenPerCategory at:itemCategory ifAbsent:[Set new].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1162
                    setOfClasses := setOfClasses select:[:cls | self filterClass:cls].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1163
                    children := setOfClasses asOrderedCollection sort:[:c1 :c2 | c1 name <= c2 name].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1164
                    children := children collect:[:child | TreeItem name:child name contents:child].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1165
                ] ifFalse:[
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1166
                    "/ huh ?
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1167
                    children := OrderedCollection new.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1168
                ]
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1169
            ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1170
        ].
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1171
        children
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1172
    ]
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1173
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1174
    "Modified: / 22-08-2012 / 19:44:59 / cg"
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1175
!
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1176
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1177
treeViewClassCategoryIcon
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1178
    "returns the icon for aTreeItem as a block"
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1179
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1180
    ^self treeViewClassHierarchyIcon
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1181
! !
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1182
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1183
!ResourceSelectionBrowser methodsFor:'tree building - hierarchy'!
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1184
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1185
treeViewClassHierarchyChildren
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1186
    "returns the children for the contents (class) of aTreeItem as a block"
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1187
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1188
    "/ cg: tz's algorithm was very-very slow, 
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1189
    "/ (it enumerated classes hundreds of times,
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1190
    "/  leading to a square runtime behavior
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1191
    "/  - i.e. very slow scrolling )
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1192
    "/ Speed up things by caching facts while enumerating
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1193
    "/ classes once only.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1194
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1195
    |subclassesAndPrivateClassesPerClass classesWithResourceOrResourceInAnySubclass|
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1196
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1197
    subclassesAndPrivateClassesPerClass := IdentityDictionary new.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1198
    classesWithResourceOrResourceInAnySubclass := IdentitySet new.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1199
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1200
    Smalltalk allClassesDo:[:cls |
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1201
        |owner superclass info|
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1202
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset
  1203
        superclass := cls superclass.
cf715db898dd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3528
diff changeset