ResourceSelectionBrowser.st
author tz
Thu, 19 Feb 1998 19:25:20 +0100
changeset 652 75644c11d619
parent 649 1896945cf5d4
child 664 6ed67e67d321
permissions -rw-r--r--
label 'Filter:' added to avoid using as file name input field
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
425
cf47d420764a initial checkin
tz
parents:
diff changeset
     1
"
504
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
     2
 COPYRIGHT (c) 1997 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
cf47d420764a initial checkin
tz
parents:
diff changeset
    14
SelectionBrowser subclass:#ResourceSelectionBrowser
477
857d4289a2bd improved class name completion routine
tz
parents: 472
diff changeset
    15
	instanceVariableNames:'resourceMethod resourceClass resourceSuperclass resourceTypes
857d4289a2bd improved class name completion routine
tz
parents: 472
diff changeset
    16
		allClasses'
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    17
	classVariableNames:''
cf47d420764a initial checkin
tz
parents:
diff changeset
    18
	poolDictionaries:''
619
36c9d07f7dc3 class category changed
tz
parents: 616
diff changeset
    19
	category:'Interface-Dialogs'
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    20
!
cf47d420764a initial checkin
tz
parents:
diff changeset
    21
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    22
Object subclass:#Row
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    23
	instanceVariableNames:'method icon resourceType selector'
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    24
	classVariableNames:''
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    25
	poolDictionaries:''
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    26
	privateIn:ResourceSelectionBrowser
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    27
!
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
    28
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    29
!ResourceSelectionBrowser class methodsFor:'documentation'!
cf47d420764a initial checkin
tz
parents:
diff changeset
    30
cf47d420764a initial checkin
tz
parents:
diff changeset
    31
copyright
cf47d420764a initial checkin
tz
parents:
diff changeset
    32
"
504
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    33
 COPYRIGHT (c) 1997 by eXept Software AG
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    34
              All Rights Reserved
cf47d420764a initial checkin
tz
parents:
diff changeset
    35
cf47d420764a initial checkin
tz
parents:
diff changeset
    36
 This software is furnished under a license and may be used
cf47d420764a initial checkin
tz
parents:
diff changeset
    37
 only in accordance with the terms of that license and with the
cf47d420764a initial checkin
tz
parents:
diff changeset
    38
 inclusion of the above copyright notice. This software may not
cf47d420764a initial checkin
tz
parents:
diff changeset
    39
 be provided or otherwise made available to, or used by, any
cf47d420764a initial checkin
tz
parents:
diff changeset
    40
 other person. No title to or ownership of the software is
cf47d420764a initial checkin
tz
parents:
diff changeset
    41
 hereby transferred.
cf47d420764a initial checkin
tz
parents:
diff changeset
    42
"
cf47d420764a initial checkin
tz
parents:
diff changeset
    43
cf47d420764a initial checkin
tz
parents:
diff changeset
    44
!
cf47d420764a initial checkin
tz
parents:
diff changeset
    45
cf47d420764a initial checkin
tz
parents:
diff changeset
    46
documentation
cf47d420764a initial checkin
tz
parents:
diff changeset
    47
"
504
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    48
    [start with:]
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    49
        ResourceSelectionBrowser open
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    50
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    51
    [author:]
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    52
        Thomas Zwick
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    53
"
cf47d420764a initial checkin
tz
parents:
diff changeset
    54
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
    55
cf47d420764a initial checkin
tz
parents:
diff changeset
    56
!ResourceSelectionBrowser class methodsFor:'instance creation'!
cf47d420764a initial checkin
tz
parents:
diff changeset
    57
649
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
    58
request: aTitle onSuperclass: aSuperclass andClass: aClass andSelector: aSelector withResourceTypes: resourceTypes
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    59
649
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
    60
    "
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
    61
    ResourceSelectionBrowser
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
    62
        request: 'Select a Resource Selector'
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    63
        onSuperclass: #ApplicationModel 
cf47d420764a initial checkin
tz
parents:
diff changeset
    64
        andClass: #ToolApplicationModel 
cf47d420764a initial checkin
tz
parents:
diff changeset
    65
        andSelector: #saveIcon 
517
91ff807d8a23 set resource selection after opening
tz
parents: 504
diff changeset
    66
        withResourceTypes: #(image) 
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
    ^self new
cf47d420764a initial checkin
tz
parents:
diff changeset
    70
        title: aTitle;
cf47d420764a initial checkin
tz
parents:
diff changeset
    71
        openOnSuperclass: aSuperclass
cf47d420764a initial checkin
tz
parents:
diff changeset
    72
        andClass: aClass
cf47d420764a initial checkin
tz
parents:
diff changeset
    73
        andSelector: aSelector
649
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
    74
        withResourceTypes: resourceTypes
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    75
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
    76
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    77
!ResourceSelectionBrowser class methodsFor:'callbacks - default'!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    78
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    79
treeViewChildren
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    80
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    81
    ^[:aTreeItem| aTreeItem contents subclasses asSortedCollection: [:i1 :i2| i1 name < i2 name]]
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    82
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    83
!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    84
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    85
treeViewContents
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    86
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    87
    ^Smalltalk at: #Object
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    88
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    89
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    90
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    91
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    92
!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    93
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    94
treeViewIcon
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    95
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    96
    ^[:aTreeItem|  
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    97
        aTreeItem contents subclasses notEmpty 
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    98
        ifTrue: 
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    99
        [
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   100
            aTreeItem hide 
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   101
                ifTrue:  [self iconHidingSubclasses] 
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   102
                ifFalse: [self iconShowingSubclasses]] 
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   103
        ifFalse: 
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   104
        [
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   105
            self iconClass
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   106
        ]
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   107
     ]
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   108
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   109
!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   110
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   111
treeViewLabel
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   112
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   113
    ^[:aTreeItem|aTreeItem contents name]
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   114
! !
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   115
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   116
!ResourceSelectionBrowser class methodsFor:'interface specs'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   117
cf47d420764a initial checkin
tz
parents:
diff changeset
   118
windowSpec
cf47d420764a initial checkin
tz
parents:
diff changeset
   119
    "this window spec was automatically generated by the ST/X UIPainter"
cf47d420764a initial checkin
tz
parents:
diff changeset
   120
cf47d420764a initial checkin
tz
parents:
diff changeset
   121
    "do not manually edit this - the painter/builder may not be able to
cf47d420764a initial checkin
tz
parents:
diff changeset
   122
     handle the specification if its corrupted."
cf47d420764a initial checkin
tz
parents:
diff changeset
   123
cf47d420764a initial checkin
tz
parents:
diff changeset
   124
    "
cf47d420764a initial checkin
tz
parents:
diff changeset
   125
     UIPainter new openOnClass:ResourceSelectionBrowser andSelector:#windowSpec
cf47d420764a initial checkin
tz
parents:
diff changeset
   126
     ResourceSelectionBrowser new openInterface:#windowSpec
cf47d420764a initial checkin
tz
parents:
diff changeset
   127
    "
cf47d420764a initial checkin
tz
parents:
diff changeset
   128
    "ResourceSelectionBrowser open"
cf47d420764a initial checkin
tz
parents:
diff changeset
   129
cf47d420764a initial checkin
tz
parents:
diff changeset
   130
    <resource: #canvas>
cf47d420764a initial checkin
tz
parents:
diff changeset
   131
cf47d420764a initial checkin
tz
parents:
diff changeset
   132
    ^
468
bb4e776b9210 levels changed
tz
parents: 467
diff changeset
   133
     
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   134
       #(#FullSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   135
          #window: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   136
           #(#WindowSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   137
              #name: 'Resource Selection Browser'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   138
              #layout: #(#LayoutFrame 65 0 500 0 664 0 849 0)
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   139
              #label: 'Resource Selection Browser'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   140
              #min: #(#Point 400 300)
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   141
              #max: #(#Point 1152 864)
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   142
              #bounds: #(#Rectangle 65 500 665 850)
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   143
              #usePreferredExtent: false
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   144
          )
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   145
          #component: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   146
           #(#SpecCollection
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   147
              #collection: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   148
               #(
cf47d420764a initial checkin
tz
parents:
diff changeset
   149
                 #(#VariableHorizontalPanelSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   150
                    #name: 'variableHorizontalPanel'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   151
                    #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -40 1.0)
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   152
                    #component: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   153
                     #(#SpecCollection
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   154
                        #collection: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   155
                         #(
cf47d420764a initial checkin
tz
parents:
diff changeset
   156
                           #(#ViewSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   157
                              #name: 'view1'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   158
                              #component: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   159
                               #(#SpecCollection
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   160
                                  #collection: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   161
                                   #(
cf47d420764a initial checkin
tz
parents:
diff changeset
   162
                                     #(#SelectionInTreeViewSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   163
                                        #name: 'listOfClassesView'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   164
                                        #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -22 1.0)
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   165
                                        #model: #selectionOfClass
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   166
                                        #hasHorizontalScrollBar: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   167
                                        #hasVerticalScrollBar: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   168
                                        #miniScrollerHorizontal: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   169
                                        #showDirectoryIndicatorForRoot: false
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   170
                                        #showDirectoryIndicator: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   171
                                        #valueChangeSelector: #classSelected:
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   172
                                        #hierarchicalList: #listOfClasses
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   173
                                        #contentsSelector: #treeViewContents
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   174
                                        #labelSelector: #treeViewLabel
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   175
                                        #childrenSelector: #treeViewChildren
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   176
                                        #iconSelector: #treeViewIcon
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   177
                                    )
467
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   178
                                     #(#InputFieldSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   179
                                        #name: 'classNameInputField'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   180
                                        #layout: #(#LayoutFrame 2 0.0 -22 1 -1 1.0 0 1)
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   181
                                        #model: #valueOfClassName
467
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   182
                                    )
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   183
                                  )
cf47d420764a initial checkin
tz
parents:
diff changeset
   184
                              )
cf47d420764a initial checkin
tz
parents:
diff changeset
   185
                          )
cf47d420764a initial checkin
tz
parents:
diff changeset
   186
                           #(#ViewSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   187
                              #name: 'view2'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   188
                              #component: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   189
                               #(#SpecCollection
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   190
                                  #collection: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   191
                                   #(
cf47d420764a initial checkin
tz
parents:
diff changeset
   192
                                     #(#DataSetSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   193
                                        #name: 'resourcesDataSetView'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   194
                                        #layout: #(#LayoutFrame 2 0.0 0 0.0 -2 1.0 -22 1.0)
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   195
                                        #model: #selectionOfResource
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   196
                                        #hasHorizontalScrollBar: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   197
                                        #hasVerticalScrollBar: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   198
                                        #miniScrollerHorizontal: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   199
                                        #rowClassName: 'ResourceSelectionBrowser::Row'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   200
                                        #dataList: #listOfResources
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   201
                                        #useIndex: false
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   202
                                        #has3Dsepartors: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   203
                                        #doubleClickSelector: #resourceDoubleClicked
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   204
                                        #columnHolder: #columnsOfDataSetView
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   205
                                        #valueChangeSelector: #resourceSelected
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   206
                                        #verticalSpacing: 1
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   207
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   208
                                    )
cf47d420764a initial checkin
tz
parents:
diff changeset
   209
                                     #(#InputFieldSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   210
                                        #name: 'selectorInputField'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   211
                                        #layout: #(#LayoutFrame 2 0.0 -22 1 -2 1.0 0 1)
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   212
                                        #model: #valueOfSelector
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   213
                                    )
cf47d420764a initial checkin
tz
parents:
diff changeset
   214
                                  )
cf47d420764a initial checkin
tz
parents:
diff changeset
   215
                              )
cf47d420764a initial checkin
tz
parents:
diff changeset
   216
                          )
cf47d420764a initial checkin
tz
parents:
diff changeset
   217
                        )
cf47d420764a initial checkin
tz
parents:
diff changeset
   218
                    )
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   219
                    #handles: #(#Any 0.5 1.0)
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   220
                )
436
07be1c96bb58 *** empty log message ***
tz
parents: 435
diff changeset
   221
                 #(#UISubSpecification
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   222
                    #name: 'SubSpecification'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   223
                    #layout: #(#LayoutFrame 2 0.0 -32 1 -2 1.0 -8 1.0)
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   224
                    #majorKey: #ToolApplicationModel
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   225
                    #minorKey: #windowSpecForCommitWithoutChannels
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   226
                )
cf47d420764a initial checkin
tz
parents:
diff changeset
   227
              )
cf47d420764a initial checkin
tz
parents:
diff changeset
   228
          )
cf47d420764a initial checkin
tz
parents:
diff changeset
   229
      )
cf47d420764a initial checkin
tz
parents:
diff changeset
   230
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   231
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   232
!ResourceSelectionBrowser class methodsFor:'list specs'!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   233
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   234
columnsOfDataSetView
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   235
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   236
  ^ #(#(#DataSetColumnSpec
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   237
      #width: 20
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   238
      #height: 20
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   239
      #printSelector: #iconOn:
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   240
      #canSelect: false
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   241
  )
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   242
   #(#DataSetColumnSpec
649
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
   243
      #label: ' Selector'
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
   244
      #'labelAlignment:' #left
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   245
      #model: #selector
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   246
      #canSelect: false
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   247
  )
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   248
   (#DataSetColumnSpec
649
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
   249
      #label: ' Resource Type'
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
   250
      #'labelAlignment:' #left
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   251
      #model: #resourceType
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   252
      #canSelect: false
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   253
  ))
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   254
! !
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   255
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   256
!ResourceSelectionBrowser class methodsFor:'resources'!
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   257
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   258
iconClass
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   259
    "Generated by the Image Editor"
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   260
    "
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   261
    ImageEditor openOnClass:self andSelector:#iconClass
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   262
    "
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   263
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   264
    <resource: #image>
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   265
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   266
    ^Icon
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   267
        constantNamed:#'ResourceSelectionBrowser iconClass'
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   268
        ifAbsentPut:[(Depth2Image new) width: 18; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 21 85 85 85 5 26 170 170 170 0 26 170 170 170 0 26 170 170 170 0 26 170 170 170 0 26 170 170 170 0 26 170 170 170 0 26 170 170 170 12 26 170 170 170 5 26 170 170 170 0 26 170 170 170 0 26 170 170 170 0 26 170 170 170 0 0 0 0 0 0 0 0 0 0 0]) ; colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color grey:66.9978); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 18; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[127 255 128 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 127 255 128]) ; yourself); yourself]!
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   269
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   270
iconHidingSubclasses
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   271
    "Generated by the Image Editor"
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   272
    "
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   273
    ImageEditor openOnClass:self andSelector:#iconHidingSubclasses
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   274
    "
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   275
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   276
    <resource: #image>
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   277
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   278
    ^Icon
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   279
        constantNamed:#'ResourceSelectionBrowser iconHidingSubclasses'
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   280
        ifAbsentPut:[(Depth4Image new) width: 18; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 1 17 17 17 17 17 17 17 48 1 51 51 51 51 51 51 51 32 1 48 0 0 0 51 51 51 32 1 48 68 68 64 51 51 51 32 1 48 0 0 0 51 51 51 32 1 51 50 51 51 51 51 51 32 1 51 50 51 0 0 0 3 32 1 51 50 34 2 34 34 3 32 1 51 50 51 0 0 0 3 32 1 51 50 51 51 51 51 51 32 1 51 50 51 0 0 0 3 32 1 51 50 34 2 34 34 3 32 1 51 51 51 0 0 0 3 32 3 34 34 34 34 34 34 34 32 0 0 0 0 0 0 0 0 0]) ; colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color grey:49.9962); add:(Color grey:66.9978); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:49.9962); yourself)); mask:((Depth1Image new) width: 18; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[127 255 128 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 127 255 128]) ; yourself); yourself]!
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   281
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   282
iconShowingSubclasses
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   283
    "Generated by the Image Editor"
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   284
    "
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   285
    ImageEditor openOnClass:self andSelector:#iconShowingSubclasses
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   286
    "
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   287
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   288
    <resource: #image>
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   289
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   290
    ^Icon
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   291
        constantNamed:#'ResourceSelectionBrowser iconShowingSubclasses'
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   292
        ifAbsentPut:[(Depth4Image new) width: 18; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 1 17 17 17 17 17 17 17 48 1 51 51 51 51 51 51 51 32 1 48 0 0 0 51 51 51 32 1 48 68 68 64 51 51 51 32 1 48 0 0 0 51 51 51 32 1 51 50 51 51 51 51 51 32 1 51 50 51 0 0 0 3 32 1 51 50 34 5 85 85 3 32 1 51 50 51 0 0 0 3 32 1 51 50 51 51 51 51 51 32 1 51 50 51 0 0 0 3 32 1 51 50 34 8 136 136 3 32 1 51 51 51 0 0 0 3 32 3 34 34 34 34 34 34 34 32 0 0 0 0 0 0 0 0 0]) ; colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color grey:49.9962); add:(Color grey:66.9978); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:49.9962); yourself)); mask:((Depth1Image new) width: 18; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[127 255 128 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 255 255 192 127 255 128]) ; yourself); yourself]! !
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   293
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   294
!ResourceSelectionBrowser methodsFor:'accessing - views'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   295
467
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   296
classNameInputField
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   297
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   298
    ^builder componentAt: #classNameInputField
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   299
!
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   300
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   301
listOfClassesView
cf47d420764a initial checkin
tz
parents:
diff changeset
   302
cf47d420764a initial checkin
tz
parents:
diff changeset
   303
    ^builder componentAt: #listOfClassesView
cf47d420764a initial checkin
tz
parents:
diff changeset
   304
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   305
cf47d420764a initial checkin
tz
parents:
diff changeset
   306
!ResourceSelectionBrowser methodsFor:'aspects'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   307
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   308
columnsOfDataSetView
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   309
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   310
    |holder|
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   311
    (holder := builder bindingAt:#columnsOfDataSetView) isNil ifTrue:[
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   312
        builder aspectAt:#columnsOfDataSetView put:(holder := List new).
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   313
        holder addAll: (self class columnsOfDataSetView collect: [:i| i decodeAsLiteralArray]).
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   314
    ].
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   315
    ^ holder
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   316
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   317
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   318
!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   319
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   320
listOfClasses
cf47d420764a initial checkin
tz
parents:
diff changeset
   321
cf47d420764a initial checkin
tz
parents:
diff changeset
   322
    |holder|
cf47d420764a initial checkin
tz
parents:
diff changeset
   323
    (holder := builder bindingAt:#listOfClasses) isNil ifTrue:[
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   324
        builder aspectAt:#listOfClasses put: (holder := TreeItem new)
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   325
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   326
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   327
cf47d420764a initial checkin
tz
parents:
diff changeset
   328
cf47d420764a initial checkin
tz
parents:
diff changeset
   329
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   330
cf47d420764a initial checkin
tz
parents:
diff changeset
   331
listOfResources
cf47d420764a initial checkin
tz
parents:
diff changeset
   332
cf47d420764a initial checkin
tz
parents:
diff changeset
   333
    |holder|
cf47d420764a initial checkin
tz
parents:
diff changeset
   334
    (holder := builder bindingAt:#listOfResources) isNil ifTrue:[
cf47d420764a initial checkin
tz
parents:
diff changeset
   335
        builder aspectAt:#listOfResources put:(holder :=  List new).
cf47d420764a initial checkin
tz
parents:
diff changeset
   336
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   337
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   338
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   339
cf47d420764a initial checkin
tz
parents:
diff changeset
   340
selectionOfClass
cf47d420764a initial checkin
tz
parents:
diff changeset
   341
cf47d420764a initial checkin
tz
parents:
diff changeset
   342
    |holder|
cf47d420764a initial checkin
tz
parents:
diff changeset
   343
    (holder := builder bindingAt:#selectionOfClass) isNil ifTrue:[
cf47d420764a initial checkin
tz
parents:
diff changeset
   344
        builder aspectAt:#selectionOfClass put:(holder :=  ValueHolder new).
cf47d420764a initial checkin
tz
parents:
diff changeset
   345
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   346
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   347
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   348
cf47d420764a initial checkin
tz
parents:
diff changeset
   349
selectionOfResource
cf47d420764a initial checkin
tz
parents:
diff changeset
   350
cf47d420764a initial checkin
tz
parents:
diff changeset
   351
    |holder|
cf47d420764a initial checkin
tz
parents:
diff changeset
   352
    (holder := builder bindingAt:#selectionOfResource) isNil ifTrue:[
cf47d420764a initial checkin
tz
parents:
diff changeset
   353
        builder aspectAt:#selectionOfResource put:(holder :=  '' asValue).
cf47d420764a initial checkin
tz
parents:
diff changeset
   354
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   355
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   356
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   357
467
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   358
valueOfClassName
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   359
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   360
    |holder|
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   361
    (holder := builder bindingAt:#valueOfClassName) isNil ifTrue:[
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   362
        builder aspectAt:#valueOfClassName put:(holder :=  '' asValue).
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   363
    ].
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   364
    ^ holder
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   365
!
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   366
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   367
valueOfSelector
cf47d420764a initial checkin
tz
parents:
diff changeset
   368
cf47d420764a initial checkin
tz
parents:
diff changeset
   369
    |holder|
cf47d420764a initial checkin
tz
parents:
diff changeset
   370
    (holder := builder bindingAt:#valueOfSelector) isNil ifTrue:[
cf47d420764a initial checkin
tz
parents:
diff changeset
   371
        builder aspectAt:#valueOfSelector put:(holder :=  '' asValue).
cf47d420764a initial checkin
tz
parents:
diff changeset
   372
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   373
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   374
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   375
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   376
!ResourceSelectionBrowser methodsFor:'callbacks - tree view'!
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   377
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   378
treeViewContents
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   379
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   380
    ^(Smalltalk at: resourceSuperclass) ? self class treeViewContents
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   381
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   382
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   383
!
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   384
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   385
treeViewIcon
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   386
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   387
    ^self class treeViewIcon
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   388
!
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   389
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   390
treeViewLabel
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   391
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   392
    ^self class treeViewLabel
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   393
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   394
! !
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   395
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   396
!ResourceSelectionBrowser methodsFor:'callbacks - user'!
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   397
cf47d420764a initial checkin
tz
parents:
diff changeset
   398
classSelected: anIndex
cf47d420764a initial checkin
tz
parents:
diff changeset
   399
    
cf47d420764a initial checkin
tz
parents:
diff changeset
   400
    self selectionOfClass value isNil ifTrue: [^nil].
cf47d420764a initial checkin
tz
parents:
diff changeset
   401
    self withWaitCursorDo:
cf47d420764a initial checkin
tz
parents:
diff changeset
   402
    [
cf47d420764a initial checkin
tz
parents:
diff changeset
   403
        |clsName|
517
91ff807d8a23 set resource selection after opening
tz
parents: 504
diff changeset
   404
        resourceTypes isNil ifTrue: [resourceTypes := Method resourceTypes].
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   405
        clsName := self listOfClassesView list at: anIndex.
477
857d4289a2bd improved class name completion routine
tz
parents: 472
diff changeset
   406
        self valueOfClassName value: clsName.
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   407
        self class lastSelection: clsName.
cf47d420764a initial checkin
tz
parents:
diff changeset
   408
        self listOfResources contents:
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   409
            ((((Smalltalk at: clsName) 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   410
                class methodDictionary
cf47d420764a initial checkin
tz
parents:
diff changeset
   411
                asOrderedCollection select: 
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   412
                    [:m| m resources notNil and: [resourceTypes includes: m resourceType]]))
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   413
             collect: [:m| Row new method: m]).
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   414
    ]
cf47d420764a initial checkin
tz
parents:
diff changeset
   415
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   416
cf47d420764a initial checkin
tz
parents:
diff changeset
   417
resourceDoubleClicked
cf47d420764a initial checkin
tz
parents:
diff changeset
   418
cf47d420764a initial checkin
tz
parents:
diff changeset
   419
    resourceMethod := self selectionOfResource value.
cf47d420764a initial checkin
tz
parents:
diff changeset
   420
    accept value: true.
cf47d420764a initial checkin
tz
parents:
diff changeset
   421
    self close
cf47d420764a initial checkin
tz
parents:
diff changeset
   422
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   423
cf47d420764a initial checkin
tz
parents:
diff changeset
   424
resourceSelected
cf47d420764a initial checkin
tz
parents:
diff changeset
   425
cf47d420764a initial checkin
tz
parents:
diff changeset
   426
    resourceMethod := self selectionOfResource value.
649
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
   427
    self selectionOfResource value notNil
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
   428
        ifTrue: [self valueOfSelector value: self selectionOfResource value selector]
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   429
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   430
cf47d420764a initial checkin
tz
parents:
diff changeset
   431
!ResourceSelectionBrowser methodsFor:'instance creation'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   432
cf47d420764a initial checkin
tz
parents:
diff changeset
   433
openOnSuperclass: aSuperclassOrSymbol andClass: aClassOrSymbol andSelector: aSelector withResourceTypes: aResourceTypes
cf47d420764a initial checkin
tz
parents:
diff changeset
   434
636
b06bea6cbe1b do return nil if no method was selected even if accepted
tz
parents: 635
diff changeset
   435
    |cls sel|
517
91ff807d8a23 set resource selection after opening
tz
parents: 504
diff changeset
   436
    resourceMethod := aSelector.
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   437
    resourceTypes := aResourceTypes.
cf47d420764a initial checkin
tz
parents:
diff changeset
   438
    resourceSuperclass := aSuperclassOrSymbol isClass ifTrue: [aSuperclassOrSymbol name] ifFalse: [aSuperclassOrSymbol].
cf47d420764a initial checkin
tz
parents:
diff changeset
   439
    resourceClass := aClassOrSymbol isClass ifTrue: [aClassOrSymbol name] ifFalse: [aClassOrSymbol].
481
e2e1ea013229 Take care of nil selectors in #openOnSuperClass:andClass:andSelector:
Stefan Vogel <sv@exept.de>
parents: 477
diff changeset
   440
    self valueOfSelector value:(aSelector ? '').
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   441
463
947f89198464 return complete message even if not implemented
tz
parents: 436
diff changeset
   442
    self open.
947f89198464 return complete message even if not implemented
tz
parents: 436
diff changeset
   443
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   444
    (self selectionOfClass value notNil and:
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   445
    [(cls := Smalltalk at: self selectionOfClass value name) isClass and:
641
06bf664cab3c the same mistake once again
tz
parents: 636
diff changeset
   446
    [accept value]]) 
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   447
    ifTrue:
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   448
    [
641
06bf664cab3c the same mistake once again
tz
parents: 636
diff changeset
   449
        ^cls name, ' ', self valueOfSelector value
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   450
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   451
    ^nil
cf47d420764a initial checkin
tz
parents:
diff changeset
   452
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   453
cf47d420764a initial checkin
tz
parents:
diff changeset
   454
!ResourceSelectionBrowser methodsFor:'startup / release'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   455
cf47d420764a initial checkin
tz
parents:
diff changeset
   456
closeCancel
cf47d420764a initial checkin
tz
parents:
diff changeset
   457
cf47d420764a initial checkin
tz
parents:
diff changeset
   458
    resourceMethod := nil.
cf47d420764a initial checkin
tz
parents:
diff changeset
   459
    super closeCancel
cf47d420764a initial checkin
tz
parents:
diff changeset
   460
cf47d420764a initial checkin
tz
parents:
diff changeset
   461
cf47d420764a initial checkin
tz
parents:
diff changeset
   462
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   463
!
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   464
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   465
postBuildWith:aBuilder
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   466
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   467
    |classSelection classSelectionBlock|
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   468
    allClasses := Object withAllSubclasses.
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   469
    classSelection :=  resourceClass ? self class lastSelection ? #Object.
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   470
    classSelectionBlock := 
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   471
    [:clsPattern|                                  
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   472
        |foundClass classes|         
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   473
        ((foundClass := Smalltalk at: clsPattern printString asSymbol) isClass not or:
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   474
        [foundClass name ~= clsPattern])
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   475
        ifTrue:
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   476
        [
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   477
            classes := allClasses select: [:cls| cls name size >= clsPattern size].
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   478
            1 to: clsPattern size do: 
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   479
            [:i|    
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   480
                 classes := classes select: [:cls| (cls name at: i) == (clsPattern at: i)].
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   481
            ].    
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   482
            foundClass := classes at: 1 ifAbsent: [nil] 
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   483
        ].
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   484
        foundClass notNil
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   485
        ifTrue:
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   486
        [
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   487
            self listOfClassesView 
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   488
                selectFromListOfNames: (foundClass 
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   489
                    withAllSuperclasses reverse collect: [:cls| cls name asString]);
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   490
                selectedNodeExpand: true
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   491
        ].
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   492
        self valueOfClassName value: clsPattern
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   493
    ].
635
47ffd4e4f387 do select method row after opening
tz
parents: 632
diff changeset
   494
    self valueOfClassName value: classSelection.  
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   495
    self classNameInputField entryCompletionBlock:
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   496
    [:value|
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   497
        |what|
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   498
        what := Smalltalk classnameCompletion: value withoutSpaces.
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   499
        self classNameInputField contents:what first.
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   500
        (what at:2) size ~~ 1 ifTrue:[Display beep].
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   501
        classSelectionBlock value: self classNameInputField contents
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   502
    ].
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   503
    self listOfClassesView validateDoubleClickBlock: [:aTreeItem | aTreeItem contents ~~ self treeViewContents].
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   504
    self listOfClassesView selectedNodeExpand: true.
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   505
635
47ffd4e4f387 do select method row after opening
tz
parents: 632
diff changeset
   506
    [[classSelectionBlock value: classSelection] value.
47ffd4e4f387 do select method row after opening
tz
parents: 632
diff changeset
   507
    self selectionOfResource value: (self listOfResources detect: [:m| m selector == resourceMethod] ifNone: nil)]
47ffd4e4f387 do select method row after opening
tz
parents: 632
diff changeset
   508
    forkAt: 4.
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   509
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   510
    ^super postBuildWith:aBuilder
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   511
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   512
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   513
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   514
!ResourceSelectionBrowser::Row methodsFor:'accessing'!
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   515
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   516
iconOn:aGC
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   517
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   518
    icon isNil ifTrue: [icon := method iconOn: aGC].
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   519
    ^icon
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   520
!
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   521
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   522
method: aMethod
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   524
    method := aMethod
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   525
!
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   526
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   527
resourceType
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   528
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   529
    resourceType isNil ifTrue: [resourceType := method resourceType].
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   530
    ^resourceType
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   531
!
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   532
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   533
selector
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   534
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   535
    selector isNil ifTrue: [selector := method who methodSelector].
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   536
    ^selector
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   537
! !
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   538
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   539
!ResourceSelectionBrowser class methodsFor:'documentation'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   540
cf47d420764a initial checkin
tz
parents:
diff changeset
   541
version
cf47d420764a initial checkin
tz
parents:
diff changeset
   542
    ^ '$Header$'
cf47d420764a initial checkin
tz
parents:
diff changeset
   543
! !