ResourceSelectionBrowser.st
author james
Tue, 06 Nov 2001 16:42:51 +0100
changeset 1526 8e62e3f56402
parent 1524 4efbd088b787
child 1605 8aab97d1f5fe
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
425
cf47d420764a initial checkin
tz
parents:
diff changeset
     1
"
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
     2
 COPYRIGHT (c) 1997-1998 by eXept Software AG
425
cf47d420764a initial checkin
tz
parents:
diff changeset
     3
              All Rights Reserved
cf47d420764a initial checkin
tz
parents:
diff changeset
     4
cf47d420764a initial checkin
tz
parents:
diff changeset
     5
 This software is furnished under a license and may be used
cf47d420764a initial checkin
tz
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
cf47d420764a initial checkin
tz
parents:
diff changeset
     7
 inclusion of the above copyright notice. This software may not
cf47d420764a initial checkin
tz
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
cf47d420764a initial checkin
tz
parents:
diff changeset
     9
 other person. No title to or ownership of the software is
cf47d420764a initial checkin
tz
parents:
diff changeset
    10
 hereby transferred.
cf47d420764a initial checkin
tz
parents:
diff changeset
    11
"
cf47d420764a initial checkin
tz
parents:
diff changeset
    12
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
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    16
SelectionBrowser subclass:#ResourceSelectionBrowser
477
857d4289a2bd improved class name completion routine
tz
parents: 472
diff changeset
    17
	instanceVariableNames:'resourceMethod resourceClass resourceSuperclass resourceTypes
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
    18
		allClasses classSelectionBlock'
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
    19
	classVariableNames:'ClassPresentation'
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    20
	poolDictionaries:''
619
36c9d07f7dc3 class category changed
tz
parents: 616
diff changeset
    21
	category:'Interface-Dialogs'
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    22
!
cf47d420764a initial checkin
tz
parents:
diff changeset
    23
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
    24
Object subclass:#ResourceMethod
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    25
	instanceVariableNames:'method icon resourceType selector'
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    26
	classVariableNames:''
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    27
	poolDictionaries:''
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    28
	privateIn:ResourceSelectionBrowser
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    29
!
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    30
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    31
!ResourceSelectionBrowser class methodsFor:'documentation'!
cf47d420764a initial checkin
tz
parents:
diff changeset
    32
cf47d420764a initial checkin
tz
parents:
diff changeset
    33
copyright
cf47d420764a initial checkin
tz
parents:
diff changeset
    34
"
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
    35
 COPYRIGHT (c) 1997-1998 by eXept Software AG
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    36
              All Rights Reserved
cf47d420764a initial checkin
tz
parents:
diff changeset
    37
cf47d420764a initial checkin
tz
parents:
diff changeset
    38
 This software is furnished under a license and may be used
cf47d420764a initial checkin
tz
parents:
diff changeset
    39
 only in accordance with the terms of that license and with the
cf47d420764a initial checkin
tz
parents:
diff changeset
    40
 inclusion of the above copyright notice. This software may not
cf47d420764a initial checkin
tz
parents:
diff changeset
    41
 be provided or otherwise made available to, or used by, any
cf47d420764a initial checkin
tz
parents:
diff changeset
    42
 other person. No title to or ownership of the software is
cf47d420764a initial checkin
tz
parents:
diff changeset
    43
 hereby transferred.
cf47d420764a initial checkin
tz
parents:
diff changeset
    44
"
cf47d420764a initial checkin
tz
parents:
diff changeset
    45
cf47d420764a initial checkin
tz
parents:
diff changeset
    46
!
cf47d420764a initial checkin
tz
parents:
diff changeset
    47
cf47d420764a initial checkin
tz
parents:
diff changeset
    48
documentation
cf47d420764a initial checkin
tz
parents:
diff changeset
    49
"
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
    50
    The ResourceSelectionBrowser allows you to browse in class hierarchies
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
    51
    and to select resource methods for loading or to saving resource 
905c3b4ba565 revised
tz
parents: 769
diff changeset
    52
    specifications (#canvas, #menu, etc.).
905c3b4ba565 revised
tz
parents: 769
diff changeset
    53
905c3b4ba565 revised
tz
parents: 769
diff changeset
    54
    [instance variables:]
907
393a5860fc7d class presentation in categories added (2)
tz
parents: 906
diff changeset
    55
        resourceMethod          <Symbol>        selector of the resource spec
393a5860fc7d class presentation in categories added (2)
tz
parents: 906
diff changeset
    56
        resourceClass           <Symbol>        class of the resource spec
393a5860fc7d class presentation in categories added (2)
tz
parents: 906
diff changeset
    57
        resourceSuperclass      <Symbol>        root class of the tree list
393a5860fc7d class presentation in categories added (2)
tz
parents: 906
diff changeset
    58
        resourceTypes           <Array>         allowed resource types
393a5860fc7d class presentation in categories added (2)
tz
parents: 906
diff changeset
    59
        allClasses              <Array>         list of the subclasses of resourceSuperclass
393a5860fc7d class presentation in categories added (2)
tz
parents: 906
diff changeset
    60
        classSelectionBlock     <Block>         by evaluating this block the class selection is done
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
    61
504
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    62
    [start with:]
907
393a5860fc7d class presentation in categories added (2)
tz
parents: 906
diff changeset
    63
        ResourceSelectionBrowser open
504
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    64
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    65
    [author:]
907
393a5860fc7d class presentation in categories added (2)
tz
parents: 906
diff changeset
    66
        Thomas Zwick, eXept Software AG
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    67
"
cf47d420764a initial checkin
tz
parents:
diff changeset
    68
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
    69
cf47d420764a initial checkin
tz
parents:
diff changeset
    70
!ResourceSelectionBrowser class methodsFor:'instance creation'!
cf47d420764a initial checkin
tz
parents:
diff changeset
    71
649
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
    72
request: aTitle onSuperclass: aSuperclass andClass: aClass andSelector: aSelector withResourceTypes: resourceTypes
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
    73
    "opens a ResourceSelectionBrowser 
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
    74
        with aTitle
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
    75
        on aSuperclassOrSymbol, 
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
    76
        and aClassOrSymbol, 
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
    77
        and aSelector,
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
    78
        with allowed aResourceTypes"
649
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
    79
    "
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
    80
    ResourceSelectionBrowser
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
    81
        request: 'Select a Resource Selector'
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
    82
        onSuperclass: #ApplicationModel 
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
    83
        andClass: #MenuEditor 
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
    84
        andSelector: #menuItemImage 
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
    85
        withResourceTypes: #(image) 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    86
    "
cf47d420764a initial checkin
tz
parents:
diff changeset
    87
cf47d420764a initial checkin
tz
parents:
diff changeset
    88
    ^self new
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
    89
        title: aTitle;
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
    90
        openOnSuperclass: aSuperclass
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
    91
        andClass: aClass
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
    92
        andSelector: aSelector
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
    93
        withResourceTypes: resourceTypes
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    94
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
    95
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    96
!ResourceSelectionBrowser class methodsFor:'callbacks - default'!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    97
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
    98
treeViewClassHierarchyChildren
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
    99
    "returns the children for the contents (class) of aTreeItem as a block"
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   100
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   101
    "/ cg: tz's algorithm was very-very slow, 
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   102
    "/ (it enumerated classes hundreds of times,
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   103
    "/  leading to a square runtime behavior
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   104
    "/  - i.e. very slow scrolling )
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   105
    "/ Speed up things by caching facts while enumerating
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   106
    "/ classes once only.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   107
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   108
    |subclassesAndPrivateClassesPerClass|
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   109
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   110
    subclassesAndPrivateClassesPerClass := IdentityDictionary new.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   111
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   112
    Smalltalk allClassesDo:[:cls |
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   113
        |owner superclass info|
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   114
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   115
        (owner := cls owningClass) notNil ifTrue:[
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   116
            info := subclassesAndPrivateClassesPerClass at:owner ifAbsent:nil.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   117
            info isNil ifTrue:[
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   118
                subclassesAndPrivateClassesPerClass at:owner put:(info := Array with:IdentitySet new 
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   119
                                                                                with:IdentitySet new).
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   120
            ].
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   121
            (info at:2) add:cls
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   122
        ] ifFalse:[
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   123
            superclass := cls superclass.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   124
            superclass notNil ifTrue:[
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   125
                info := subclassesAndPrivateClassesPerClass at:superclass ifAbsent:nil.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   126
                info isNil ifTrue:[
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   127
                    subclassesAndPrivateClassesPerClass at:superclass put:(info := Array with:IdentitySet new 
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   128
                                                                                         with:IdentitySet new).
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   129
                ].
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   130
                (info at:1) add:cls
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   131
            ]
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   132
        ]
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   133
    ].
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   134
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   135
    ^ [:aTreeItem|
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   136
        |classes itemClass info|
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   137
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   138
        classes := OrderedCollection new. 
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   139
        itemClass := aTreeItem contents.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   140
        info := subclassesAndPrivateClassesPerClass at:itemClass ifAbsent:nil.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   141
        info notNil ifTrue:[
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   142
            classes addAll:((info at:1) asSortedCollection: [:cls1 :cls2| cls1 name < cls2 name]).
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   143
            classes addAll:((info at:2) asSortedCollection: [:cls1 :cls2| cls1 name < cls2 name]).
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   144
        ].
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   145
        classes
718
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   146
     ]
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   147
!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   148
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   149
treeViewClassHierarchyContents
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   150
    "returns the default contents of the root of the class tree list"
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   151
802
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   152
    ^ Object
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   153
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   154
!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   155
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   156
treeViewClassHierarchyIcon
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   157
    "returns the icon for aTreeItem as a block"
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   158
718
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   159
    ^[:aTreeItem|
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   160
        |icon|
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   161
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   162
        aTreeItem contents isClass ifTrue:[
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   163
            icon := self iconClass.
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   164
            aTreeItem contents isPrivate ifTrue:[
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   165
               icon := self iconPrivateClass
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   166
            ].
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   167
            icon
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   168
        ] ifFalse:[
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   169
            self iconCategory
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   170
        ]
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   171
    ]
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   172
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   173
!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   174
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   175
treeViewClassHierarchyLabel
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   176
    "returns the label for aTreeItem as a block"
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   177
718
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   178
    ^[:aTreeItem|
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   179
        |label superCls itemContents|
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   180
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   181
        itemContents := aTreeItem contents.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   182
        label := itemContents name.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   183
        (itemContents isPrivate 
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   184
        and:[aTreeItem parent contents ~~ (superCls := itemContents superclass)])
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   185
            ifTrue: [label := label, ' (', superCls name, ')'].
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   186
        label
718
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   187
     ]
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   188
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   189
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   190
! !
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   191
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   192
!ResourceSelectionBrowser class methodsFor:'image specs'!
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   193
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   194
iconCategory
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   195
    "This resource specification was automatically generated
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   196
     by the ImageEditor of ST/X."
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   197
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   198
    "Do not manually edit this!! If it is corrupted,
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   199
     the ImageEditor may not be able to read the specification."
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   200
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   201
    "
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   202
     self iconCategory inspect
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   203
     ImageEditor openOnClass:self andSelector:#iconCategory
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   204
    "
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   205
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   206
    <resource: #image>
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   207
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   208
    ^Icon
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   209
        constantNamed:#'ResourceSelectionBrowser iconCategory'
1493
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   210
        ifAbsentPut:[(Depth4Image new) width: 18; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray 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') ; 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]; mask:((Depth1Image new) width: 18; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'<@O@8@G@3?3@7?;@7?;@7?;@7?;@7?;@7?;@7?;@7?;@7?;@7?;@3?3@8@G@<@O@') ; yourself); yourself]
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   211
!
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   212
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   213
iconClass
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   214
    "This resource specification was automatically generated
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   215
     by the ImageEditor of ST/X."
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   216
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   217
    "Do not manually edit this!! If it is corrupted,
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   218
     the ImageEditor may not be able to read the specification."
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   219
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   220
    "
1404
f088630ac860 images compactified
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
   221
     self iconClass inspect
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   222
     ImageEditor openOnClass:self andSelector:#iconClass
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   223
    "
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   224
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   225
    <resource: #image>
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   226
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   227
    ^Icon
1404
f088630ac860 images compactified
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
   228
        constantNamed:#'ResourceSelectionBrowser iconClass'
1493
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   229
        ifAbsentPut:[(Depth2Image new) width: 18; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@*****ABUUUUT@IUUUUP@%UUUU@BUUUUT@IUUUUP@%UUUU@BUUUUT@IUUUUP@%UUUU@BUUUUT@IUUUUP@%UUUU@A@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 170 170 170 255 255 255]; mask:((Depth1Image new) width: 18; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?>@???@???@???@???@???@???@???@???@???@???@???@???@???@???@_?>@') ; yourself); yourself]
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   230
!
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   231
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   232
iconPrivateClass
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   233
    "This resource specification was automatically generated
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   234
     by the ImageEditor of ST/X."
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   235
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   236
    "Do not manually edit this!! If it is corrupted,
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   237
     the ImageEditor may not be able to read the specification."
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   238
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   239
    "
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   240
     ImageEditor openOnClass:self andSelector:#iconPrivateClass
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   241
    "
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   242
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   243
    <resource: #image>
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   244
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   245
    ^Icon
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   246
	constantNamed:#'ResourceSelectionBrowser iconPrivateClass'
1493
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   247
	ifAbsentPut:[(Depth2Image new) width: 18; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@PUUUUU A****(@F*??* @Z+??*@A*/*>(OF*>+: @Z+??*@A*/?:(DF*>** @Z+:**@A*/**(@F*>** @Z****C2@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 255 0 0]; mask:((Depth1Image new) width: 18; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?>@???@???@???@???@???@???@???@???@???@???@???@???@???@???@_?>@') ; yourself); yourself]
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   248
! !
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   249
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   250
!ResourceSelectionBrowser class methodsFor:'interface specs'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   251
cf47d420764a initial checkin
tz
parents:
diff changeset
   252
windowSpec
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   253
    "This resource specification was automatically generated
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   254
     by the UIPainter of ST/X."
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   255
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   256
    "Do not manually edit this!! If it is corrupted,
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   257
     the UIPainter may not be able to read the specification."
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   258
cf47d420764a initial checkin
tz
parents:
diff changeset
   259
    "
cf47d420764a initial checkin
tz
parents:
diff changeset
   260
     UIPainter new openOnClass:ResourceSelectionBrowser andSelector:#windowSpec
cf47d420764a initial checkin
tz
parents:
diff changeset
   261
     ResourceSelectionBrowser new openInterface:#windowSpec
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   262
     ResourceSelectionBrowser open
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   263
    "
cf47d420764a initial checkin
tz
parents:
diff changeset
   264
cf47d420764a initial checkin
tz
parents:
diff changeset
   265
    <resource: #canvas>
cf47d420764a initial checkin
tz
parents:
diff changeset
   266
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   267
    ^ 
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   268
     #(#FullSpec
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   269
        #name: #windowSpec
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   270
        #window: 
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   271
       #(#WindowSpec
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   272
          #label: 'Resource Selection Browser'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   273
          #name: 'Resource Selection Browser'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   274
          #min: #(#Point 400 300)
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   275
          #max: #(#Point 1152 864)
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   276
          #bounds: #(#Rectangle 145 206 745 556)
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   277
        )
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   278
        #component: 
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   279
       #(#SpecCollection
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   280
          #collection: #(
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   281
           #(#VariableHorizontalPanelSpec
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   282
              #name: 'VariableHorizontalPanel'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   283
              #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -36 1.0)
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   284
              #component: 
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   285
             #(#SpecCollection
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   286
                #collection: #(
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   287
                 #(#ViewSpec
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   288
                    #name: 'Box1'
773
tz
parents: 771
diff changeset
   289
                    #component: 
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   290
                   #(#SpecCollection
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   291
                      #collection: #(
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   292
                       #(#HorizontalPanelViewSpec
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   293
                          #name: 'HorizontalPanel2'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   294
                          #layout: #(#LayoutFrame 0 0 2 0 297 0 23 0)
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   295
                          #horizontalLayout: #leftSpace
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   296
                          #verticalLayout: #fit
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   297
                          #horizontalSpace: 3
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   298
                          #verticalSpace: 3
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   299
                          #component: 
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   300
                         #(#SpecCollection
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   301
                            #collection: #(
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   302
                             #(#RadioButtonSpec
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   303
                                #label: 'Categories'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   304
                                #name: 'ClassCategoriesRadioButton'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   305
                                #translateLabel: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   306
                                #model: #selectionOfClassPresentation
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   307
                                #isTriggerOnDown: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   308
                                #lampColor: #(#Color 0.0 0.0 0.0)
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   309
                                #select: #'Class Categories'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   310
                                #extent: #(#Point 124 21)
773
tz
parents: 771
diff changeset
   311
                              )
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   312
                             #(#RadioButtonSpec
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   313
                                #label: 'Hierarchy'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   314
                                #name: 'ClassHierarchyRadioButton'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   315
                                #translateLabel: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   316
                                #model: #selectionOfClassPresentation
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   317
                                #isTriggerOnDown: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   318
                                #lampColor: #(#Color 0.0 0.0 0.0)
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   319
                                #select: #'Class Hierarchy'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   320
                                #extent: #(#Point 145 21)
773
tz
parents: 771
diff changeset
   321
                              )
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   322
                             )
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   323
                           
773
tz
parents: 771
diff changeset
   324
                          )
tz
parents: 771
diff changeset
   325
                        )
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   326
                       #(#SelectionInTreeViewSpec
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   327
                          #name: 'listOfClassHierarchyView'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   328
                          #layout: #(#LayoutFrame 0 0.0 23 0.0 0 1.0 -24 1.0)
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   329
                          #tabable: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   330
                          #model: #selectionOfClassHierarchy
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   331
                          #hasHorizontalScrollBar: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   332
                          #hasVerticalScrollBar: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   333
                          #miniScrollerHorizontal: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   334
                          #showDirectoryIndicatorForRoot: false
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   335
                          #showDirectoryIndicator: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   336
                          #valueChangeSelector: #classSelected
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   337
                          #hierarchicalList: #rootOfClassHierarchy
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   338
                          #validateDoubleClickSelector: #validateDoubleClick:
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   339
                          #contentsSelector: #treeViewClassHierarchyContents
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   340
                          #labelSelector: #treeViewClassHierarchyLabel
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   341
                          #childrenSelector: #treeViewClassHierarchyChildren
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   342
                          #iconSelector: #treeViewClassHierarchyIcon
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   343
                          #highlightMode: #line
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   344
                        )
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   345
                       #(#SelectionInTreeViewSpec
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   346
                          #name: 'listOfClassCategoriesView'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   347
                          #layout: #(#LayoutFrame 0 0.0 23 0.0 0 1.0 -24 1.0)
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   348
                          #tabable: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   349
                          #model: #selectionOfClassCategories
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   350
                          #hasHorizontalScrollBar: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   351
                          #hasVerticalScrollBar: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   352
                          #miniScrollerHorizontal: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   353
                          #showRoot: false
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   354
                          #showDirectoryIndicator: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   355
                          #valueChangeSelector: #classSelected
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   356
                          #hierarchicalList: #rootOfClassCategories
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   357
                          #validateDoubleClickSelector: #validateDoubleClick:
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   358
                          #childrenSelector: #treeViewClassCategoryChildren
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   359
                          #iconSelector: #treeViewClassCategoryIcon
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   360
                          #highlightMode: #line
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   361
                        )
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   362
                       #(#InputFieldSpec
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   363
                          #name: 'classNameInputField'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   364
                          #layout: #(#LayoutFrame 2 0.0 -22 1 -1 1.0 0 1)
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   365
                          #tabable: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   366
                          #model: #valueOfClassName
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   367
                          #acceptOnLeave: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   368
                          #acceptOnLostFocus: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   369
                          #acceptOnPointerLeave: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   370
                        )
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   371
                       )
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   372
                     
773
tz
parents: 771
diff changeset
   373
                    )
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   374
                  )
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   375
                 #(#ViewSpec
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   376
                    #name: 'Box2'
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   377
                    #component: 
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   378
                   #(#SpecCollection
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   379
                      #collection: #(
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   380
                       #(#DataSetSpec
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   381
                          #name: 'resourcesDataSetView'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   382
                          #layout: #(#LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0)
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   383
                          #model: #selectionOfResourceMethod
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   384
                          #hasHorizontalScrollBar: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   385
                          #hasVerticalScrollBar: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   386
                          #miniScrollerHorizontal: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   387
                          #rowClassName: 'ResourceSelectionBrowser::Row'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   388
                          #dataList: #listOfResourceMethods
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   389
                          #useIndex: false
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   390
                          #has3Dsepartors: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   391
                          #has3Dseparators: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   392
                          #doubleClickSelector: #resourceDoubleClicked
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   393
                          #columnHolder: #resourceMethodColumns
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   394
                          #valueChangeSelector: #resourceSelected
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   395
                          #verticalSpacing: 1
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   396
                        )
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   397
                       #(#InputFieldSpec
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   398
                          #name: 'selectorInputField'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   399
                          #layout: #(#LayoutFrame 2 0.0 -22 1 -2 1.0 0 1)
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   400
                          #tabable: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   401
                          #model: #valueOfResourceSelector
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   402
                          #acceptOnLeave: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   403
                          #acceptOnLostFocus: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   404
                          #acceptOnPointerLeave: true
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   405
                        )
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   406
                       )
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   407
                     
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   408
                    )
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   409
                  )
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   410
                 )
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   411
               
773
tz
parents: 771
diff changeset
   412
              )
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   413
              #handles: #(#Any 0.5 1.0)
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   414
            )
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   415
           #(#HorizontalPanelViewSpec
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   416
              #name: 'HorizontalPanel1'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   417
              #layout: #(#LayoutFrame 2 0.0 -30 1 -2 1.0 -4 1.0)
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   418
              #horizontalLayout: #fit
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   419
              #verticalLayout: #fit
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   420
              #component: 
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   421
             #(#SpecCollection
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   422
                #collection: #(
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   423
                 #(#ActionButtonSpec
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   424
                    #label: 'Help'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   425
                    #name: 'HelpButton'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   426
                    #activeHelpKey: #dss
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   427
                    #model: #openHTMLDocument:
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   428
                    #initiallyDisabled: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   429
                    #enableChannel: #helpEnabled
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   430
                    #actionValue: 'tools/uipainter/ResourceSelectionBrowser.html'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   431
                    #extent: #(#Point 196 26)
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   432
                  )
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   433
                 #(#ActionButtonSpec
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   434
                    #label: 'Cancel'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   435
                    #name: 'cancelButton'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   436
                    #activeHelpKey: #commitCancel
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   437
                    #tabable: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   438
                    #model: #cancel
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   439
                    #extent: #(#Point 196 26)
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   440
                  )
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   441
                 #(#ActionButtonSpec
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   442
                    #label: 'OK'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   443
                    #name: 'okButton'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   444
                    #activeHelpKey: #commitOK
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   445
                    #tabable: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   446
                    #model: #accept
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   447
                    #isDefault: true
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   448
                    #extent: #(#Point 196 24)
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   449
                  )
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   450
                 )
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   451
               
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   452
              )
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   453
            )
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   454
           )
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   455
         
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   456
        )
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   457
      )
cf47d420764a initial checkin
tz
parents:
diff changeset
   458
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   459
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   460
!ResourceSelectionBrowser class methodsFor:'list specs'!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   461
822
be574ef48217 checkin from browser
tz
parents: 821
diff changeset
   462
tableColumnsForResourceMethodAttributes
821
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   463
    "This resource specification was automatically generated
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   464
     by the DataSetBuilder of ST/X."
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   465
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   466
    "Do not manually edit this!! If it is corrupted,
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   467
     the DataSetBuilder may not be able to read the specification."
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   468
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   469
    "
822
be574ef48217 checkin from browser
tz
parents: 821
diff changeset
   470
     DataSetBuilder new openOnClass:ResourceSelectionBrowser andSelector:#tableColumnsForResourceMethodAttributes
821
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   471
    "
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   472
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   473
    <resource: #tableColumns>
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   474
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   475
821
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   476
    ^ #(
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   477
        #(#DataSetColumnSpec
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   478
           #width: 20
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   479
           #height: 20
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   480
           #printSelector: #iconOn:
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   481
           #canSelect: false
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   482
       )
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   483
        #(#DataSetColumnSpec
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   484
           #label: ' Selector'
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   485
           #labelAlignment: #left
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   486
           #model: #selector
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   487
           #canSelect: false
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   488
       )
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   489
        #(#DataSetColumnSpec
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   490
           #label: ' Resource Type'
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   491
           #labelAlignment: #left
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   492
           #model: #resourceType
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   493
           #canSelect: false
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   494
       )
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   495
     )
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   496
! !
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   497
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   498
!ResourceSelectionBrowser methodsFor:'aspects'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   499
773
tz
parents: 771
diff changeset
   500
helpEnabled
tz
parents: 771
diff changeset
   501
    "returns whether there is a documentation file"
tz
parents: 771
diff changeset
   502
tz
parents: 771
diff changeset
   503
    ^true
tz
parents: 771
diff changeset
   504
!
tz
parents: 771
diff changeset
   505
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   506
listOfResourceMethods
905c3b4ba565 revised
tz
parents: 769
diff changeset
   507
    "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
   508
1184
c67bdfe67afd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1086
diff changeset
   509
    ^ builder listAspectFor:#listOfResourceMethods
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   510
!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   511
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   512
resourceMethodColumns
905c3b4ba565 revised
tz
parents: 769
diff changeset
   513
    "returns the columns for the table of the resource methods as value holder"
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   514
cf47d420764a initial checkin
tz
parents:
diff changeset
   515
    |holder|
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   516
    (holder := builder bindingAt:#resourceMethodColumns) isNil ifTrue:[
821
950e6fbbc1f0 table columns formatted
tz
parents: 812
diff changeset
   517
        builder aspectAt:#resourceMethodColumns put:(holder := List new).
822
be574ef48217 checkin from browser
tz
parents: 821
diff changeset
   518
        holder addAll: (self class tableColumnsForResourceMethodAttributes collect: [:i| i decodeAsLiteralArray]).
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   519
    ].
905c3b4ba565 revised
tz
parents: 769
diff changeset
   520
    ^ holder
905c3b4ba565 revised
tz
parents: 769
diff changeset
   521
!
905c3b4ba565 revised
tz
parents: 769
diff changeset
   522
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   523
rootOfClassCategories
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   524
    "returns the value holder for the root of the class tree list"
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   525
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   526
    |holder|                                
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   527
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   528
    (holder := builder bindingAt:#rootOfClassCategories) isNil ifTrue:[
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   529
        ClassPresentation = #'Class Categories' ifTrue: [
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   530
        builder aspectAt:#rootOfClassCategories put: (holder := TreeItem name: 'Categories')].
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   531
    ].
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   532
    ^ holder
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   533
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   534
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   535
!
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   536
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   537
rootOfClassHierarchy
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   538
    "returns the value holder for the root of the class tree list"
905c3b4ba565 revised
tz
parents: 769
diff changeset
   539
905c3b4ba565 revised
tz
parents: 769
diff changeset
   540
    |holder|
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   541
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   542
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   543
    (holder := builder bindingAt:#rootOfClassHierarchy) isNil ifTrue:[
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   544
        ClassPresentation = #'Class Hierarchy' ifTrue: [
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   545
        builder aspectAt:#rootOfClassHierarchy put: (holder := TreeItem new)]
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   546
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   547
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   548
cf47d420764a initial checkin
tz
parents:
diff changeset
   549
cf47d420764a initial checkin
tz
parents:
diff changeset
   550
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   551
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   552
selectionOfClassCategories
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   553
    "returns the value holder for the selected class of the class tree list"
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   554
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   555
    |holder|           
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   556
    (holder := builder bindingAt:#selectionOfClassCategories) isNil ifTrue:[
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   557
        builder aspectAt:#selectionOfClassCategories put:(holder :=  ValueHolder new). 
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   558
    ].
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   559
    ^ holder
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   560
!
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   561
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   562
selectionOfClassHierarchy
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   563
    "returns the value holder for the selected class of the class tree list"
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   564
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   565
    |holder|           
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   566
    (holder := builder bindingAt:#selectionOfClassHierarchy) isNil ifTrue:[
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   567
        builder aspectAt:#selectionOfClassHierarchy put:(holder :=  ValueHolder new). 
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   568
    ].
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   569
    ^ holder
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   570
!
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   571
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   572
selectionOfClassPresentation
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   573
    "returns the value holder for the selected class presentation"
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   574
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   575
    |holder|
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   576
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   577
    (holder := builder bindingAt:#selectionOfClassPresentation) isNil ifTrue:[
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   578
        builder aspectAt:#selectionOfClassPresentation put:(holder :=  RadioButtonGroup with: (ClassPresentation := ClassPresentation ? #'Class Categories')).
1329
a38c2e29d1fb use onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 1184
diff changeset
   579
        holder onChangeEvaluate: 
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   580
            [
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   581
                 |hv comp newRoot|
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   582
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   583
                 hv := holder value.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   584
                 ClassPresentation := hv.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   585
                 hv = #'Class Hierarchy' ifTrue:[
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   586
                      comp := builder componentAt: #listOfClassHierarchyView.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   587
                      newRoot := self rootOfClassHierarchy.  
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   588
                 ] ifFalse: [
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   589
                      comp := builder componentAt: #listOfClassCategoriesView.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   590
                      newRoot := self rootOfClassCategories. 
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   591
                 ].
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   592
                 comp root:newRoot.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   593
                 comp raise. 
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   594
                 classSelectionBlock value: self valueOfClassName value
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   595
            ]
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   596
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   597
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   598
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   599
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   600
selectionOfResourceMethod
905c3b4ba565 revised
tz
parents: 769
diff changeset
   601
    "returns the value holder for the selected resource method of the resource method list"
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   602
cf47d420764a initial checkin
tz
parents:
diff changeset
   603
    |holder|
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   604
    (holder := builder bindingAt:#selectionOfResourceMethod) isNil ifTrue:[
905c3b4ba565 revised
tz
parents: 769
diff changeset
   605
	builder aspectAt:#selectionOfResourceMethod put:(holder :=  '' asValue).
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   606
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   607
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   608
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   609
467
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   610
valueOfClassName
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   611
    "returns the value holder for the name of the class"
467
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   612
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   613
    |holder|                   
467
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   614
    (holder := builder bindingAt:#valueOfClassName) isNil ifTrue:[
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   615
        builder aspectAt:#valueOfClassName put:(holder :=  '' asValue).
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   616
        holder onChangeEvaluate:[self classSelectionUpdate:holder value].
467
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   617
    ].
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   618
    ^ holder
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   619
!
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   620
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   621
valueOfResourceSelector
905c3b4ba565 revised
tz
parents: 769
diff changeset
   622
    "returns the value holder for the name of the selector"
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   623
cf47d420764a initial checkin
tz
parents:
diff changeset
   624
    |holder|
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   625
    (holder := builder bindingAt:#valueOfResourceSelector) isNil ifTrue:[
905c3b4ba565 revised
tz
parents: 769
diff changeset
   626
	builder aspectAt:#valueOfResourceSelector put:(holder :=  '' asValue).
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   627
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   628
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   629
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   630
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   631
!ResourceSelectionBrowser methodsFor:'callbacks - class list'!
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   632
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   633
treeViewClassCategoryChildren
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   634
    "returns the children for the contents (class) of aTreeItem as a block"
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   635
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   636
    "/ cg: tz's algorithm was very-very slow, 
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   637
    "/ (it enumerated classes hundreds of times,
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   638
    "/  leading to a square runtime behavior
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   639
    "/  - i.e. very slow scrolling )
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   640
    "/ Speed up things by caching facts while enumerating
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   641
    "/ classes once only.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   642
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   643
    |allClasses topClass childrenPerCategory privateClasses|
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   644
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   645
    topClass := self treeViewClassHierarchyContents.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   646
    allClasses := topClass withAllSubclasses.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   647
    privateClasses := IdentitySet new.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   648
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   649
    childrenPerCategory := Dictionary new.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   650
    allClasses do:[:cls |
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   651
        |cat set|
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   652
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   653
        cls isPrivate ifFalse:[
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   654
            cat := cls category.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   655
            set := childrenPerCategory at:cat ifAbsent:nil.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   656
            set isNil ifTrue:[
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   657
                childrenPerCategory at:cat put:(set := IdentitySet new).
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   658
            ].
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   659
            set add:cls
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   660
        ] ifTrue:[
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   661
            privateClasses add:cls
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   662
        ]
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   663
    ].
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   664
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   665
    ^ [:aTreeItem|
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   666
        |cont children initialContents setOfCategories itemCategory setOfClasses|
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   667
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   668
        (cont := aTreeItem contents) isBehavior ifTrue:[
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   669
           children := privateClasses select:[:cls | cls owningClass == aTreeItem contents].
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   670
           children := children asSortedCollection: [:c1 :c2| c1 name <= c2 name].
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   671
           children := children collect: [:child| TreeItem name: child name , ' (', child superclass name, ')' contents: child]
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   672
        ] ifFalse:[
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   673
            cont size == 0 ifTrue:[
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   674
                setOfCategories := childrenPerCategory keys.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   675
                children := setOfCategories asSortedCollection.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   676
                children := children collect: [:nm | TreeItem name:nm contents:#Category]
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   677
            ] ifFalse:[
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   678
                cont == #Category ifTrue:[
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   679
                    itemCategory := aTreeItem name.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   680
                    setOfClasses := childrenPerCategory at:itemCategory ifAbsent:[Set new].
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   681
                    children := setOfClasses asOrderedCollection sort:[:c1 :c2 | c1 name <= c2 name].
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   682
                    children := children collect:[:child | TreeItem name:child name contents:child].
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   683
                ] ifFalse:[
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   684
                    "/ huh ?
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   685
                    children := OrderedCollection new.
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   686
                ]
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   687
            ].
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   688
        ].
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   689
        children
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   690
    ]
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   691
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   692
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   693
!
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   694
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   695
treeViewClassCategoryIcon
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   696
    "returns the icon for aTreeItem as a block"
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   697
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   698
    ^self class treeViewClassHierarchyIcon
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   699
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   700
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   701
!
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   702
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   703
treeViewClassHierarchyContents
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   704
    "returns the contents of the root of the class tree list"
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   705
802
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   706
    |cls|
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   707
802
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   708
    resourceSuperclass notNil ifTrue:[
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   709
        cls := Smalltalk at: resourceSuperclass.
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   710
    ].
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   711
    cls notNil ifTrue:[^ cls].
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   712
    ^ self class treeViewClassHierarchyContents
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   713
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   714
!
905c3b4ba565 revised
tz
parents: 769
diff changeset
   715
905c3b4ba565 revised
tz
parents: 769
diff changeset
   716
validateDoubleClick: aTreeItem
905c3b4ba565 revised
tz
parents: 769
diff changeset
   717
    "returns whether a class may be selected"
905c3b4ba565 revised
tz
parents: 769
diff changeset
   718
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   719
    |cont|
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   720
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   721
    ^ (cont := aTreeItem contents) ~= '' 
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   722
      and: [cont ~~ self treeViewClassHierarchyContents]       
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   723
905c3b4ba565 revised
tz
parents: 769
diff changeset
   724
905c3b4ba565 revised
tz
parents: 769
diff changeset
   725
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   726
! !
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   727
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   728
!ResourceSelectionBrowser methodsFor:'callbacks - user'!
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   729
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   730
classSelected
905c3b4ba565 revised
tz
parents: 769
diff changeset
   731
    "after a class selection, read the allowed resource methods of the selected class"
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   732
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   733
    ClassPresentation = #'Class Hierarchy'
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   734
        ifTrue:  [self selectionOfClassHierarchy  value isNil ifTrue: [^nil]]
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   735
        ifFalse: [self selectionOfClassCategories value isNil ifTrue: [^nil]].
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   736
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   737
    self withWaitCursorDo:
cf47d420764a initial checkin
tz
parents:
diff changeset
   738
    [
1493
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   739
        |clsName newContents class|           
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   740
517
91ff807d8a23 set resource selection after opening
tz
parents: 504
diff changeset
   741
        resourceTypes isNil ifTrue: [resourceTypes := Method resourceTypes].
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   742
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   743
        ClassPresentation = #'Class Hierarchy'
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   744
            ifTrue:  [clsName := (self selectionOfClassHierarchy  value name upTo: $ ) asSymbol]
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   745
            ifFalse: [clsName := (self selectionOfClassCategories value name upTo: $ ) asSymbol].
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   746
477
857d4289a2bd improved class name completion routine
tz
parents: 472
diff changeset
   747
        self valueOfClassName value: clsName.
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   748
        self class lastSelection: clsName.
1493
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   749
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   750
        class := Smalltalk at: clsName.
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   751
        newContents := class class methodDictionary asOrderedCollection 
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   752
                       select: [:m | m resources notNil 
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   753
                                     and: [resourceTypes includes: m resourceType]
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   754
                               ].
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   755
        newContents := newContents sort:[:m1 :m2 | m1 selector < m2 selector].
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   756
        newContents := newContents collect:[:m| (ResourceMethod new method:m)].
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   757
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   758
        self listOfResourceMethods contents:newContents
844c2ed1208d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
   759
                .
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   760
    ]
cf47d420764a initial checkin
tz
parents:
diff changeset
   761
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   762
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   763
classSelectionUpdate:clsPattern
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   764
    |foundClass classes|  
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   765
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   766
    clsPattern notNil ifTrue:[
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   767
        foundClass := Smalltalk at:(clsPattern printString asSymbol).
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   768
    ].
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   769
    (foundClass isClass not or:[foundClass name ~= clsPattern])
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   770
    ifTrue:
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   771
    [
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   772
        classes := allClasses select: [:cls| cls name size >= clsPattern size].
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   773
        1 to: clsPattern size do: 
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   774
        [:i|    
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   775
             classes := classes select: [:cls| (cls name at: i) == (clsPattern at: i)].
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   776
        ].    
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   777
        foundClass := classes at: 1 ifAbsent: [nil] 
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   778
    ].          
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   779
    foundClass notNil
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   780
    ifTrue:
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   781
    [           
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   782
        ClassPresentation = #'Class Hierarchy'
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   783
        ifTrue:  
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   784
        [
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   785
            |searchArgs nonSuperclasses|
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   786
            foundClass isPrivate
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   787
                ifFalse: [searchArgs := foundClass withAllSuperclasses reverse]
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   788
                ifTrue:  [searchArgs := foundClass owningClass withAllSuperclasses reverse. searchArgs add: foundClass]
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   789
.                                  
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   790
            (nonSuperclasses := self treeViewClassHierarchyContents allSuperclasses) notNil 
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   791
                ifTrue: [searchArgs := searchArgs reject: [:cls| nonSuperclasses includes: cls]].
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   792
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   793
            self selectionOfClassHierarchy value: (self rootOfClassHierarchy detectChild:[:child :arg| child contents == arg] arguments:searchArgs).
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   794
        ]
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   795
        ifFalse: 
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   796
        [
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   797
            |searchArgs|
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   798
            foundClass isPrivate
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   799
                ifTrue:  [searchArgs := Array with: 'Categories' with: foundClass category with: foundClass owningClass name with: foundClass name]
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   800
                ifFalse: [searchArgs := Array with: 'Categories' with: foundClass category with: foundClass name].
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   801
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   802
            self selectionOfClassCategories value: (self rootOfClassCategories detectChild:[:child :arg| (child name upTo: $ ) = arg] arguments:searchArgs).
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   803
        ].
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   804
    ].
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   805
    self valueOfClassName value: clsPattern
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   806
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   807
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   808
!
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   809
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   810
resourceDoubleClicked
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   811
    "after a double click on resource method, accept it and close"
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   812
cf47d420764a initial checkin
tz
parents:
diff changeset
   813
    accept value: true.
1034
3cb196044804 fixed stupid class-enumeration code.
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   814
    self closeRequest
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   815
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   816
cf47d420764a initial checkin
tz
parents:
diff changeset
   817
resourceSelected
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   818
    "after a click on a resource method, set its selector into the field"
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   819
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   820
    self selectionOfResourceMethod value notNil
905c3b4ba565 revised
tz
parents: 769
diff changeset
   821
	ifTrue: [self valueOfResourceSelector value: self selectionOfResourceMethod value selector]
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   822
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   823
cf47d420764a initial checkin
tz
parents:
diff changeset
   824
!ResourceSelectionBrowser methodsFor:'instance creation'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   825
cf47d420764a initial checkin
tz
parents:
diff changeset
   826
openOnSuperclass: aSuperclassOrSymbol andClass: aClassOrSymbol andSelector: aSelector withResourceTypes: aResourceTypes
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   827
    "opens a ResourceSelectionBrowser on 
802
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   828
        aSuperclassOrSymbol, 
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   829
        and aClassOrSymbol, 
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   830
        and aSelector,
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   831
        with allowed aResourceTypes"
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   832
1086
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   833
    |clsName clsNameString|
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   834
517
91ff807d8a23 set resource selection after opening
tz
parents: 504
diff changeset
   835
    resourceMethod := aSelector.
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   836
    resourceTypes := aResourceTypes.
cf47d420764a initial checkin
tz
parents:
diff changeset
   837
    resourceSuperclass := aSuperclassOrSymbol isClass ifTrue: [aSuperclassOrSymbol name] ifFalse: [aSuperclassOrSymbol].
802
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   838
    resourceClass := nil.
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   839
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   840
    aClassOrSymbol isClass 
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   841
        ifTrue: [resourceClass := aClassOrSymbol name] 
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   842
        ifFalse: [
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   843
            aClassOrSymbol notNil ifTrue:[
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   844
                (Smalltalk at: aClassOrSymbol) notNil
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   845
                ifTrue: [resourceClass := aClassOrSymbol]
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   846
            ]
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   847
        ].            
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   848
    self valueOfResourceSelector value:(aSelector ? '').
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   849
463
947f89198464 return complete message even if not implemented
tz
parents: 436
diff changeset
   850
    self open.
947f89198464 return complete message even if not implemented
tz
parents: 436
diff changeset
   851
1086
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   852
    (clsName := self selectionOfClassHierarchy value) isNil ifTrue:[
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   853
        (clsName := self selectionOfClassCategories value) isNil ifTrue:[
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   854
            (clsNameString := self valueOfClassName value) isNil ifTrue:[
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   855
                accept value ifTrue:[
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   856
                    self warn:'No valid class selected/entered'.
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   857
                ].
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   858
                ^ nil
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   859
            ]
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   860
        ]
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   861
    ].
693
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   862
1086
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   863
    clsNameString isNil ifTrue:[
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   864
        clsNameString := clsName name upTo:Character space
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   865
    ].
1086
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   866
    clsNameString := clsNameString asSymbol.
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   867
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   868
    ((Smalltalk at: clsNameString) isClass and:[accept value]) ifTrue:[            
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   869
        ^ clsNameString, ' ', self valueOfResourceSelector value
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   870
    ].
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   871
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   872
    accept value ifTrue:[
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   873
        self warn:'No valid class selected/entered'.
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   874
    ].
592f0177687e did not look at className in enterField
Claus Gittinger <cg@exept.de>
parents: 1034
diff changeset
   875
    ^ nil
802
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   876
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   877
    "Modified: / 22.4.1998 / 14:51:03 / cg"
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   878
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   879
cf47d420764a initial checkin
tz
parents:
diff changeset
   880
!ResourceSelectionBrowser methodsFor:'startup / release'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   881
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   882
postBuildWith:aBuilder
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   883
    "after building and before opening,  
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   884
     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
   885
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   886
    |classSelection classNameInputField|
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   887
     
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   888
    allClasses := self treeViewClassHierarchyContents withAllSubclasses reject: [:cls| cls isPrivate].
689
ff099c344dd6 try to find out convenient class selection
tz
parents: 680
diff changeset
   889
    classSelection :=  resourceClass. 
802
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   890
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   891
    (classSelection isNil or:[Smalltalk at: classSelection]) isNil 
689
ff099c344dd6 try to find out convenient class selection
tz
parents: 680
diff changeset
   892
        ifTrue: [classSelection :=  self class lastSelection].
802
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   893
    (classSelection isNil or:[Smalltalk at: classSelection]) isNil 
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   894
        ifTrue: [classSelection :=  self treeViewContents].
802
460dc3bb9cf9 dont send 'Smalltalk at:nil'
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   895
1384
ff417bf5f8d8 bug fix - update tree-selection when entering a className
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
   896
    classSelectionBlock := [:clsPattern | self classSelectionUpdate:clsPattern].
635
47ffd4e4f387 do select method row after opening
tz
parents: 632
diff changeset
   897
    self valueOfClassName value: classSelection.  
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   898
905c3b4ba565 revised
tz
parents: 769
diff changeset
   899
    (classNameInputField := builder componentAt: #classNameInputField) entryCompletionBlock:
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   900
    [:value|
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   901
        |what oldClassName|
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   902
        oldClassName := classNameInputField contents.
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   903
        what := Smalltalk classnameCompletion: value withoutSpaces.
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   904
        classNameInputField contents:what first.
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   905
        oldClassName = classNameInputField contents ifTrue:[classNameInputField flash].
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   906
        classSelectionBlock value: classNameInputField contents
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   907
    ].
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   908
906
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   909
    classSelectionBlock value: self valueOfClassName value.
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   910
    self classSelected.
8be0b8d1a2fd class presentation in categories added
tz
parents: 867
diff changeset
   911
    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
   912
c0bd0d9103e3 class presentation in categories added (3)
tz
parents: 907
diff changeset
   913
    ^super postBuildWith:aBuilder
c0bd0d9103e3 class presentation in categories added (3)
tz
parents: 907
diff changeset
   914
910
7510ea8c9aeb class presentation in categories added (4)
tz
parents: 909
diff changeset
   915
!
7510ea8c9aeb class presentation in categories added (4)
tz
parents: 909
diff changeset
   916
7510ea8c9aeb class presentation in categories added (4)
tz
parents: 909
diff changeset
   917
postOpenWith:aBuilder
7510ea8c9aeb class presentation in categories added (4)
tz
parents: 909
diff changeset
   918
    "after opening and if turned on make hierarchy view visible"
7510ea8c9aeb class presentation in categories added (4)
tz
parents: 909
diff changeset
   919
7510ea8c9aeb class presentation in categories added (4)
tz
parents: 909
diff changeset
   920
    ClassPresentation = #'Class Hierarchy'
7510ea8c9aeb class presentation in categories added (4)
tz
parents: 909
diff changeset
   921
        ifTrue: [(builder componentAt: #listOfClassHierarchyView) raise].
7510ea8c9aeb class presentation in categories added (4)
tz
parents: 909
diff changeset
   922
7510ea8c9aeb class presentation in categories added (4)
tz
parents: 909
diff changeset
   923
    ^super postOpenWith:aBuilder
7510ea8c9aeb class presentation in categories added (4)
tz
parents: 909
diff changeset
   924
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   925
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   926
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   927
!ResourceSelectionBrowser::ResourceMethod methodsFor:'accessing'!
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   928
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   929
iconOn:aGC
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   930
    "registers and returns an icon indicating the resource type"
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   931
1524
4efbd088b787 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 1493
diff changeset
   932
    |cls sel image imageKey|
4efbd088b787 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 1493
diff changeset
   933
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   934
    self resourceType isNil ifTrue: [^nil].
1524
4efbd088b787 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 1493
diff changeset
   935
4efbd088b787 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 1493
diff changeset
   936
    icon isNil ifTrue:[
1412
61f02e883f48 checkin from browser
frank
parents: 1404
diff changeset
   937
        ((self resourceType = #image) or: [resourceType = #fileImage])
1524
4efbd088b787 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 1493
diff changeset
   938
        ifTrue:[  
4efbd088b787 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 1493
diff changeset
   939
            cls := method mclass theNonMetaclass.
4efbd088b787 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 1493
diff changeset
   940
            sel := method selector.
4efbd088b787 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 1493
diff changeset
   941
        ] ifFalse: [
1412
61f02e883f48 checkin from browser
frank
parents: 1404
diff changeset
   942
            cls := SystemBrowser.
61f02e883f48 checkin from browser
frank
parents: 1404
diff changeset
   943
            sel := (resourceType, 'Icon') asSymbol.
61f02e883f48 checkin from browser
frank
parents: 1404
diff changeset
   944
        ].
61f02e883f48 checkin from browser
frank
parents: 1404
diff changeset
   945
        imageKey := (cls name, sel) asSymbol.
61f02e883f48 checkin from browser
frank
parents: 1404
diff changeset
   946
        (icon := aGC registeredImageAt: imageKey) isNil
1524
4efbd088b787 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 1493
diff changeset
   947
        ifTrue: [       
1412
61f02e883f48 checkin from browser
frank
parents: 1404
diff changeset
   948
            image := cls perform: sel.
1524
4efbd088b787 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 1493
diff changeset
   949
            (image extent y > 18) ifTrue: [         
1412
61f02e883f48 checkin from browser
frank
parents: 1404
diff changeset
   950
                image := image magnifiedBy: 18/image extent y
61f02e883f48 checkin from browser
frank
parents: 1404
diff changeset
   951
            ].
61f02e883f48 checkin from browser
frank
parents: 1404
diff changeset
   952
            aGC registerImage: image key: imageKey.
61f02e883f48 checkin from browser
frank
parents: 1404
diff changeset
   953
            icon := aGC registeredImageAt: imageKey.
61f02e883f48 checkin from browser
frank
parents: 1404
diff changeset
   954
        ].
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   955
    ].
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   956
    ^icon
1524
4efbd088b787 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 1493
diff changeset
   957
4efbd088b787 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 1493
diff changeset
   958
    "Modified: / 5.11.2001 / 16:48:35 / cg"
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   959
!
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   960
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   961
method: aMethod
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   962
    "sets aMethod"
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   963
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   964
    method := aMethod
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   965
!
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   966
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   967
resourceType
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   968
    "returns resourceType"
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   969
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   970
    resourceType isNil ifTrue: [resourceType := method resourceType].
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   971
    ^resourceType
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   972
!
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   973
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   974
selector
771
905c3b4ba565 revised
tz
parents: 769
diff changeset
   975
    "returns selector"
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   976
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   977
    selector isNil ifTrue: [selector := method who methodSelector].
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   978
    ^selector
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   979
! !
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   980
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   981
!ResourceSelectionBrowser class methodsFor:'documentation'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   982
cf47d420764a initial checkin
tz
parents:
diff changeset
   983
version
cf47d420764a initial checkin
tz
parents:
diff changeset
   984
    ^ '$Header$'
cf47d420764a initial checkin
tz
parents:
diff changeset
   985
! !