ResourceSelectionBrowser.st
author ca
Thu, 09 Apr 1998 13:35:35 +0200
changeset 769 bb413a70f479
parent 746 8b3532f50ea9
child 771 905c3b4ba565
permissions -rw-r--r--
get node to be selected from model
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
733
6454aaabda51 take care for those who do close very quickly
tz
parents: 730
diff changeset
    16
		allClasses classSelectionBlock classAndResourceSelectionProcess'
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
"
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
    48
    The ResourceSelectionBrowser allows you to browse in class hierarchies
8b3532f50ea9 comment
tz
parents: 733
diff changeset
    49
    and to select resource methods in order to load method contents or to save
8b3532f50ea9 comment
tz
parents: 733
diff changeset
    50
    something to methods.
8b3532f50ea9 comment
tz
parents: 733
diff changeset
    51
504
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    52
    [start with:]
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    53
        ResourceSelectionBrowser open
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    54
1ff52096d1d3 copyright changed
tz
parents: 481
diff changeset
    55
    [author:]
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
    56
        Thomas Zwick, eXept Software AG
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    57
"
cf47d420764a initial checkin
tz
parents:
diff changeset
    58
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
    59
cf47d420764a initial checkin
tz
parents:
diff changeset
    60
!ResourceSelectionBrowser class methodsFor:'instance creation'!
cf47d420764a initial checkin
tz
parents:
diff changeset
    61
649
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
    62
request: aTitle onSuperclass: aSuperclass andClass: aClass andSelector: aSelector withResourceTypes: resourceTypes
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    63
649
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
    64
    "
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
    65
    ResourceSelectionBrowser
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
    66
        request: 'Select a Resource Selector'
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    67
        onSuperclass: #ApplicationModel 
cf47d420764a initial checkin
tz
parents:
diff changeset
    68
        andClass: #ToolApplicationModel 
cf47d420764a initial checkin
tz
parents:
diff changeset
    69
        andSelector: #saveIcon 
517
91ff807d8a23 set resource selection after opening
tz
parents: 504
diff changeset
    70
        withResourceTypes: #(image) 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    71
    "
cf47d420764a initial checkin
tz
parents:
diff changeset
    72
cf47d420764a initial checkin
tz
parents:
diff changeset
    73
    ^self new
cf47d420764a initial checkin
tz
parents:
diff changeset
    74
        title: aTitle;
cf47d420764a initial checkin
tz
parents:
diff changeset
    75
        openOnSuperclass: aSuperclass
cf47d420764a initial checkin
tz
parents:
diff changeset
    76
        andClass: aClass
cf47d420764a initial checkin
tz
parents:
diff changeset
    77
        andSelector: aSelector
649
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
    78
        withResourceTypes: resourceTypes
425
cf47d420764a initial checkin
tz
parents:
diff changeset
    79
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
    80
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    81
!ResourceSelectionBrowser class methodsFor:'callbacks - default'!
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
treeViewChildren
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    84
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
    85
    ^[:aTreeItem|
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
    86
        |classes|
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
    87
        classes := OrderedCollection new.    
718
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
    88
        classes addAll: ((aTreeItem contents subclasses reject: [:cls| cls isPrivate]) asSortedCollection: [:i1 :i2| i1 name < i2 name]).
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
    89
        classes addAll: (aTreeItem contents privateClasses asSortedCollection: [:i1 :i2| i1 name < i2 name]).
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
    90
        classes
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
    91
     ]
648
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
treeViewContents
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
    ^Smalltalk at: #Object
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    97
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
    98
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
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   101
!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   102
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   103
treeViewIcon
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   104
718
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   105
    ^[:aTreeItem|
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   106
        |icon|
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   107
        icon := self iconClass.
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   108
        aTreeItem contents isPrivate 
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   109
        ifTrue:
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   110
        [
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   111
           icon := self iconPrivateClass
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   112
        ].
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   113
    icon]
648
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
!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   116
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   117
treeViewLabel
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   118
718
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   119
    ^[:aTreeItem|
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   120
        |label superCls|
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   121
        label := aTreeItem contents name.
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   122
        (aTreeItem contents isPrivate and: [aTreeItem parent contents ~~ (superCls := aTreeItem contents superclass)])
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   123
            ifTrue: [label := label, ' (', superCls name, ')'].
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   124
        label
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   125
     ]
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   126
c2e814032029 show private classes only for their owning classes
tz
parents: 693
diff changeset
   127
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   128
! !
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   129
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   130
!ResourceSelectionBrowser class methodsFor:'image specs'!
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   131
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   132
iconClass
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   133
    "This resource specification was automatically generated
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   134
     by the ImageEditor of ST/X."
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   135
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   136
    "Do not manually edit this!! If it is corrupted,
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   137
     the ImageEditor may not be able to read the specification."
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   138
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   139
    "
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   140
     ImageEditor openOnClass:self andSelector:#iconClass
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   141
    "
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   142
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   143
    <resource: #image>
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   144
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   145
    ^Icon
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   146
        constantNamed:#'ResourceSelectionBrowser iconClass'
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   147
        ifAbsentPut:[(Depth2Image new) width: 18; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@UUUUUAQ****(@F**** @Z****@A****(@F**** @Z****@A****(LF**** TZ****@A****(@F**** @Z****@@@@@@@@@@@@@@@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]!
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   148
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   149
iconPrivateClass
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   150
    "This resource specification was automatically generated
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   151
     by the ImageEditor of ST/X."
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   152
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   153
    "Do not manually edit this!! If it is corrupted,
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   154
     the ImageEditor may not be able to read the specification."
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   155
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   156
    "
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   157
     ImageEditor openOnClass:self andSelector:#iconPrivateClass
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   158
    "
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   159
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   160
    <resource: #image>
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   161
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   162
    ^Icon
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   163
        constantNamed:#'ResourceSelectionBrowser iconPrivateClass'
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   164
        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****C0@@@@@@@@@@@@@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]! !
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   165
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   166
!ResourceSelectionBrowser class methodsFor:'interface specs'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   167
cf47d420764a initial checkin
tz
parents:
diff changeset
   168
windowSpec
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   169
    "This resource specification was automatically generated
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   170
     by the UIPainter of ST/X."
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   171
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   172
    "Do not manually edit this!! If it is corrupted,
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   173
     the UIPainter may not be able to read the specification."
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   174
cf47d420764a initial checkin
tz
parents:
diff changeset
   175
    "
cf47d420764a initial checkin
tz
parents:
diff changeset
   176
     UIPainter new openOnClass:ResourceSelectionBrowser andSelector:#windowSpec
cf47d420764a initial checkin
tz
parents:
diff changeset
   177
     ResourceSelectionBrowser new openInterface:#windowSpec
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   178
     ResourceSelectionBrowser open
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   179
    "
cf47d420764a initial checkin
tz
parents:
diff changeset
   180
cf47d420764a initial checkin
tz
parents:
diff changeset
   181
    <resource: #canvas>
cf47d420764a initial checkin
tz
parents:
diff changeset
   182
cf47d420764a initial checkin
tz
parents:
diff changeset
   183
    ^
468
bb4e776b9210 levels changed
tz
parents: 467
diff changeset
   184
     
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   185
       #(#FullSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   186
          #window: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   187
           #(#WindowSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   188
              #name: 'Resource Selection Browser'
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   189
              #layout: #(#LayoutFrame 433 0 242 0 1032 0 591 0)
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   190
              #label: 'Resource Selection Browser'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   191
              #min: #(#Point 400 300)
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   192
              #max: #(#Point 1152 864)
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   193
              #bounds: #(#Rectangle 433 242 1033 592)
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   194
              #usePreferredExtent: false
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   195
          )
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   196
          #component: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   197
           #(#SpecCollection
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   198
              #collection: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   199
               #(
cf47d420764a initial checkin
tz
parents:
diff changeset
   200
                 #(#VariableHorizontalPanelSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   201
                    #name: 'variableHorizontalPanel'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   202
                    #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
   203
                    #component: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   204
                     #(#SpecCollection
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   205
                        #collection: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   206
                         #(
cf47d420764a initial checkin
tz
parents:
diff changeset
   207
                           #(#ViewSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   208
                              #name: 'view1'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   209
                              #component: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   210
                               #(#SpecCollection
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   211
                                  #collection: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   212
                                   #(
cf47d420764a initial checkin
tz
parents:
diff changeset
   213
                                     #(#SelectionInTreeViewSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   214
                                        #name: 'listOfClassesView'
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   215
                                        #layout: #(#LayoutFrame 0 0.0 23 0.0 0 1.0 -22 1.0)
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   216
                                        #model: #selectionOfClass
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   217
                                        #hasHorizontalScrollBar: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   218
                                        #hasVerticalScrollBar: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   219
                                        #miniScrollerHorizontal: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   220
                                        #showDirectoryIndicatorForRoot: false
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   221
                                        #showDirectoryIndicator: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   222
                                        #valueChangeSelector: #classSelected:
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   223
                                        #hierarchicalList: #listOfClasses
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   224
                                        #contentsSelector: #treeViewContents
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   225
                                        #labelSelector: #treeViewLabel
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   226
                                        #childrenSelector: #treeViewChildren
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   227
                                        #iconSelector: #treeViewIcon
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   228
                                    )
467
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   229
                                     #(#InputFieldSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   230
                                        #name: 'classNameInputField'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   231
                                        #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
   232
                                        #model: #valueOfClassName
467
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   233
                                    )
664
6ed67e67d321 label for class tree added
tz
parents: 649
diff changeset
   234
                                     #(#LabelSpec
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   235
                                        #name: 'ClassHierarchyLabel'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   236
                                        #layout: #(#LayoutFrame 0 0 2 0 297 0 23 0)
664
6ed67e67d321 label for class tree added
tz
parents: 649
diff changeset
   237
                                        #label: ' Class Hierarchy'
6ed67e67d321 label for class tree added
tz
parents: 649
diff changeset
   238
                                        #level: 1
6ed67e67d321 label for class tree added
tz
parents: 649
diff changeset
   239
                                        #adjust: #left
6ed67e67d321 label for class tree added
tz
parents: 649
diff changeset
   240
                                    )
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   241
                                  )
cf47d420764a initial checkin
tz
parents:
diff changeset
   242
                              )
cf47d420764a initial checkin
tz
parents:
diff changeset
   243
                          )
cf47d420764a initial checkin
tz
parents:
diff changeset
   244
                           #(#ViewSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   245
                              #name: 'view2'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   246
                              #component: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   247
                               #(#SpecCollection
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   248
                                  #collection: 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   249
                                   #(
cf47d420764a initial checkin
tz
parents:
diff changeset
   250
                                     #(#DataSetSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   251
                                        #name: 'resourcesDataSetView'
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   252
                                        #layout: #(#LayoutFrame 2 0.0 2 0.0 -2 1.0 -22 1.0)
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   253
                                        #model: #selectionOfResource
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   254
                                        #hasHorizontalScrollBar: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   255
                                        #hasVerticalScrollBar: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   256
                                        #miniScrollerHorizontal: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   257
                                        #rowClassName: 'ResourceSelectionBrowser::Row'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   258
                                        #dataList: #listOfResources
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   259
                                        #useIndex: false
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   260
                                        #has3Dsepartors: true
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   261
                                        #doubleClickSelector: #resourceDoubleClicked
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   262
                                        #columnHolder: #columnsOfDataSetView
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   263
                                        #valueChangeSelector: #resourceSelected
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   264
                                        #verticalSpacing: 1
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   265
                                    )
cf47d420764a initial checkin
tz
parents:
diff changeset
   266
                                     #(#InputFieldSpec
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   267
                                        #name: 'selectorInputField'
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   268
                                        #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
   269
                                        #model: #valueOfSelector
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   270
                                    )
cf47d420764a initial checkin
tz
parents:
diff changeset
   271
                                  )
cf47d420764a initial checkin
tz
parents:
diff changeset
   272
                              )
cf47d420764a initial checkin
tz
parents:
diff changeset
   273
                          )
cf47d420764a initial checkin
tz
parents:
diff changeset
   274
                        )
cf47d420764a initial checkin
tz
parents:
diff changeset
   275
                    )
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   276
                    #handles: #(#Any 0.5 1.0)
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   277
                )
436
07be1c96bb58 *** empty log message ***
tz
parents: 435
diff changeset
   278
                 #(#UISubSpecification
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   279
                    #name: 'SubSpecification'
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   280
                    #layout: #(#LayoutFrame 301 0.0 -32 1 -2 1.0 -8 1.0)
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   281
                    #majorKey: #ToolApplicationModel
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   282
                    #minorKey: #windowSpecForCommitWithoutChannels
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   283
                )
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   284
                 #(#HorizontalPanelViewSpec
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   285
                    #name: 'HorizontalPanelView1'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   286
                    #layout: #(#LayoutFrame 3 0 76 0.691429 300 0 0 0.977143)
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   287
                    #component: 
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   288
                     #(#SpecCollection
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   289
                        #collection: 
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   290
                         #(
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   291
                           #(#LabelSpec
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   292
                              #name: 'Label2'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   293
                              #label: 'Create: '
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   294
                              #adjust: #right
746
8b3532f50ea9 comment
tz
parents: 733
diff changeset
   295
                              #extent: #(#Point 72 24)
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   296
                          )
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   297
                           #(#ActionButtonSpec
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   298
                              #name: 'CreateClassButton'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   299
                              #activeHelpKey: #dss
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   300
                              #label: 'Class'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   301
                              #model: #createClass:
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   302
                              #actionValue: 'class'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   303
                              #extent: #(#Point 72 24)
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   304
                          )
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   305
                           #(#ActionButtonSpec
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   306
                              #name: 'CreateSubclassButton'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   307
                              #activeHelpKey: #dss
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   308
                              #label: 'Subclass'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   309
                              #model: #createClass:
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   310
                              #actionValue: 'subclass'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   311
                              #extent: #(#Point 72 24)
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   312
                          )
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   313
                           #(#ActionButtonSpec
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   314
                              #name: 'CreatePrivateClassButton'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   315
                              #activeHelpKey: #dss
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   316
                              #label: 'Private'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   317
                              #model: #createClass:
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   318
                              #actionValue: 'private'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   319
                              #extent: #(#Point 72 24)
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   320
                          )
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   321
                        )
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   322
                    )
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   323
                    #horizontalLayout: #fit
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   324
                    #verticalLayout: #fit
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   325
                )
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   326
              )
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
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   331
!ResourceSelectionBrowser class methodsFor:'list specs'!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   332
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   333
columnsOfDataSetView
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   334
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   335
  ^ #(#(#DataSetColumnSpec
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   336
      #width: 20
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   337
      #height: 20
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   338
      #printSelector: #iconOn:
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   339
      #canSelect: false
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   340
  )
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   341
   #(#DataSetColumnSpec
649
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
   342
      #label: ' Selector'
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
   343
      #'labelAlignment:' #left
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   344
      #model: #selector
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   345
      #canSelect: false
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   346
  )
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   347
   (#DataSetColumnSpec
649
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
   348
      #label: ' Resource Type'
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
   349
      #'labelAlignment:' #left
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   350
      #model: #resourceType
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   351
      #canSelect: false
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   352
  ))
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   353
! !
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   354
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   355
!ResourceSelectionBrowser methodsFor:'accessing - views'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   356
467
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   357
classNameInputField
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   358
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   359
    ^builder componentAt: #classNameInputField
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   360
!
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   361
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   362
listOfClassesView
cf47d420764a initial checkin
tz
parents:
diff changeset
   363
cf47d420764a initial checkin
tz
parents:
diff changeset
   364
    ^builder componentAt: #listOfClassesView
cf47d420764a initial checkin
tz
parents:
diff changeset
   365
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   366
cf47d420764a initial checkin
tz
parents:
diff changeset
   367
!ResourceSelectionBrowser methodsFor:'aspects'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   368
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   369
columnsOfDataSetView
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   370
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   371
    |holder|
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   372
    (holder := builder bindingAt:#columnsOfDataSetView) isNil ifTrue:[
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   373
        builder aspectAt:#columnsOfDataSetView put:(holder := List new).
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   374
        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
   375
    ].
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   376
    ^ holder
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   377
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   378
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   379
!
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   380
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   381
listOfClasses
cf47d420764a initial checkin
tz
parents:
diff changeset
   382
cf47d420764a initial checkin
tz
parents:
diff changeset
   383
    |holder|
cf47d420764a initial checkin
tz
parents:
diff changeset
   384
    (holder := builder bindingAt:#listOfClasses) isNil ifTrue:[
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   385
        builder aspectAt:#listOfClasses put: (holder := TreeItem new)
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   386
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   387
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   388
cf47d420764a initial checkin
tz
parents:
diff changeset
   389
cf47d420764a initial checkin
tz
parents:
diff changeset
   390
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   391
cf47d420764a initial checkin
tz
parents:
diff changeset
   392
listOfResources
cf47d420764a initial checkin
tz
parents:
diff changeset
   393
cf47d420764a initial checkin
tz
parents:
diff changeset
   394
    |holder|
cf47d420764a initial checkin
tz
parents:
diff changeset
   395
    (holder := builder bindingAt:#listOfResources) isNil ifTrue:[
cf47d420764a initial checkin
tz
parents:
diff changeset
   396
        builder aspectAt:#listOfResources put:(holder :=  List new).
cf47d420764a initial checkin
tz
parents:
diff changeset
   397
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   398
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   399
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   400
cf47d420764a initial checkin
tz
parents:
diff changeset
   401
selectionOfClass
cf47d420764a initial checkin
tz
parents:
diff changeset
   402
cf47d420764a initial checkin
tz
parents:
diff changeset
   403
    |holder|
cf47d420764a initial checkin
tz
parents:
diff changeset
   404
    (holder := builder bindingAt:#selectionOfClass) isNil ifTrue:[
cf47d420764a initial checkin
tz
parents:
diff changeset
   405
        builder aspectAt:#selectionOfClass put:(holder :=  ValueHolder new).
cf47d420764a initial checkin
tz
parents:
diff changeset
   406
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   407
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   408
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   409
cf47d420764a initial checkin
tz
parents:
diff changeset
   410
selectionOfResource
cf47d420764a initial checkin
tz
parents:
diff changeset
   411
cf47d420764a initial checkin
tz
parents:
diff changeset
   412
    |holder|
cf47d420764a initial checkin
tz
parents:
diff changeset
   413
    (holder := builder bindingAt:#selectionOfResource) isNil ifTrue:[
cf47d420764a initial checkin
tz
parents:
diff changeset
   414
        builder aspectAt:#selectionOfResource put:(holder :=  '' asValue).
cf47d420764a initial checkin
tz
parents:
diff changeset
   415
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   416
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   417
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   418
467
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   419
valueOfClassName
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   420
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   421
    |holder|
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   422
    (holder := builder bindingAt:#valueOfClassName) isNil ifTrue:[
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   423
        builder aspectAt:#valueOfClassName put:(holder :=  '' asValue).
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   424
    ].
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   425
    ^ holder
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   426
!
ddb605aaf94a class retrieval support added
tz
parents: 463
diff changeset
   427
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   428
valueOfSelector
cf47d420764a initial checkin
tz
parents:
diff changeset
   429
cf47d420764a initial checkin
tz
parents:
diff changeset
   430
    |holder|
cf47d420764a initial checkin
tz
parents:
diff changeset
   431
    (holder := builder bindingAt:#valueOfSelector) isNil ifTrue:[
cf47d420764a initial checkin
tz
parents:
diff changeset
   432
        builder aspectAt:#valueOfSelector put:(holder :=  '' asValue).
cf47d420764a initial checkin
tz
parents:
diff changeset
   433
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   434
    ^ holder
cf47d420764a initial checkin
tz
parents:
diff changeset
   435
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   436
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   437
!ResourceSelectionBrowser methodsFor:'callbacks - tree view'!
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   438
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   439
treeViewContents
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   440
648
d0724edba450 some changes for the lib builder and for its new subclass
tz
parents: 641
diff changeset
   441
    ^(Smalltalk at: resourceSuperclass) ? self class treeViewContents
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   442
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   443
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   444
! !
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   445
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   446
!ResourceSelectionBrowser methodsFor:'callbacks - user'!
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   447
cf47d420764a initial checkin
tz
parents:
diff changeset
   448
classSelected: anIndex
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   449
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   450
    self selectionOfClass value isNil ifTrue: [^nil].
cf47d420764a initial checkin
tz
parents:
diff changeset
   451
    self withWaitCursorDo:
cf47d420764a initial checkin
tz
parents:
diff changeset
   452
    [
cf47d420764a initial checkin
tz
parents:
diff changeset
   453
        |clsName|
517
91ff807d8a23 set resource selection after opening
tz
parents: 504
diff changeset
   454
        resourceTypes isNil ifTrue: [resourceTypes := Method resourceTypes].
769
bb413a70f479 get node to be selected from model
ca
parents: 746
diff changeset
   455
        clsName := ((self listOfClassesView list at: anIndex) printString upTo: $ ) asSymbol.
477
857d4289a2bd improved class name completion routine
tz
parents: 472
diff changeset
   456
        self valueOfClassName value: clsName.
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   457
        self class lastSelection: clsName.
cf47d420764a initial checkin
tz
parents:
diff changeset
   458
        self listOfResources contents:
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   459
            ((((Smalltalk at: clsName) 
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   460
                class methodDictionary
cf47d420764a initial checkin
tz
parents:
diff changeset
   461
                asOrderedCollection select: 
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   462
                    [:m| m resources notNil and: [resourceTypes includes: m resourceType]]))
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   463
             collect: [:m| Row new method: m]).
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   464
    ]
cf47d420764a initial checkin
tz
parents:
diff changeset
   465
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   466
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   467
createClass: what
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   468
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   469
    |clsCandidat cls|
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   470
    clsCandidat := self valueOfClassName value asSymbol.
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   471
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   472
    (Smalltalk at: clsCandidat) notNil 
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   473
        ifTrue: [^self warn: 'Cannot create class ', clsCandidat asBoldText,
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   474
                '!!\Key with that name in dictionary ' withCRs, 'Smalltalk' asBoldText, ' detected.'].
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   475
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   476
    cls := self selectionOfClass value contents.
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   477
    what = 'class' ifTrue: [cls := cls superclass].
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   478
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   479
    cls isNil ifTrue: [^self warn: 'May not create class with superclass ', 'nil' asBoldText, '!!'].
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   480
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   481
    what = 'private' 
693
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   482
    ifFalse: 
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   483
    [
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   484
        cls subclass: clsCandidat
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   485
            instanceVariableNames:''
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   486
            classVariableNames:''
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   487
            poolDictionaries:''
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   488
            category: cls category
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   489
    ]
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   490
    ifTrue:
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   491
    [
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   492
        |superClsCandidate|
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   493
        superClsCandidate := (Dialog 
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   494
                request: 'Enter name of superclass of private class.'
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   495
                initialAnswer: 'Object') asSymbol.
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   496
        (Smalltalk at: superClsCandidate) isNil ifTrue: [^self warn: 'Class ', superClsCandidate asBoldText, ' does not exist!!'].
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   497
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   498
        ((superClsCandidate := Smalltalk at: superClsCandidate) isClass and: [superClsCandidate isPrivate not])
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   499
            ifFalse: [^self warn: 'May not create private class with superclass ', superClsCandidate asBoldText, '!!'].
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   500
        superClsCandidate subclass: clsCandidat
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   501
            instanceVariableNames:''
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   502
            classVariableNames:''
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   503
            poolDictionaries:''
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   504
            privateIn: cls
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   505
    ].
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   506
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   507
    allClasses := Object withAllSubclasses.
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   508
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   509
    what = 'class' 
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   510
        ifTrue:  [self selectionOfClass value parent changed: #children]
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   511
        ifFalse: [self selectionOfClass value changed: #children].
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   512
693
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   513
    classSelectionBlock value: self valueOfClassName value 
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   514
!
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   515
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   516
resourceDoubleClicked
cf47d420764a initial checkin
tz
parents:
diff changeset
   517
cf47d420764a initial checkin
tz
parents:
diff changeset
   518
    resourceMethod := self selectionOfResource value.
cf47d420764a initial checkin
tz
parents:
diff changeset
   519
    accept value: true.
cf47d420764a initial checkin
tz
parents:
diff changeset
   520
    self close
cf47d420764a initial checkin
tz
parents:
diff changeset
   521
!
cf47d420764a initial checkin
tz
parents:
diff changeset
   522
cf47d420764a initial checkin
tz
parents:
diff changeset
   523
resourceSelected
cf47d420764a initial checkin
tz
parents:
diff changeset
   524
cf47d420764a initial checkin
tz
parents:
diff changeset
   525
    resourceMethod := self selectionOfResource value.
649
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
   526
    self selectionOfResource value notNil
1896945cf5d4 some cleans
tz
parents: 648
diff changeset
   527
        ifTrue: [self valueOfSelector value: self selectionOfResource value selector]
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   528
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   529
cf47d420764a initial checkin
tz
parents:
diff changeset
   530
!ResourceSelectionBrowser methodsFor:'instance creation'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   531
cf47d420764a initial checkin
tz
parents:
diff changeset
   532
openOnSuperclass: aSuperclassOrSymbol andClass: aClassOrSymbol andSelector: aSelector withResourceTypes: aResourceTypes
cf47d420764a initial checkin
tz
parents:
diff changeset
   533
733
6454aaabda51 take care for those who do close very quickly
tz
parents: 730
diff changeset
   534
    |clsName|
517
91ff807d8a23 set resource selection after opening
tz
parents: 504
diff changeset
   535
    resourceMethod := aSelector.
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   536
    resourceTypes := aResourceTypes.
cf47d420764a initial checkin
tz
parents:
diff changeset
   537
    resourceSuperclass := aSuperclassOrSymbol isClass ifTrue: [aSuperclassOrSymbol name] ifFalse: [aSuperclassOrSymbol].
689
ff099c344dd6 try to find out convenient class selection
tz
parents: 680
diff changeset
   538
    resourceClass := aClassOrSymbol isClass 
ff099c344dd6 try to find out convenient class selection
tz
parents: 680
diff changeset
   539
        ifTrue: [aClassOrSymbol name] 
727
bbe063ccf4a3 class selection after opening
tz
parents: 718
diff changeset
   540
        ifFalse: [(Smalltalk at: aClassOrSymbol) notNil
bbe063ccf4a3 class selection after opening
tz
parents: 718
diff changeset
   541
            ifTrue: [aClassOrSymbol]
689
ff099c344dd6 try to find out convenient class selection
tz
parents: 680
diff changeset
   542
            ifFalse: [nil]].      
481
e2e1ea013229 Take care of nil selectors in #openOnSuperClass:andClass:andSelector:
Stefan Vogel <sv@exept.de>
parents: 477
diff changeset
   543
    self valueOfSelector value:(aSelector ? '').
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   544
463
947f89198464 return complete message even if not implemented
tz
parents: 436
diff changeset
   545
    self open.
947f89198464 return complete message even if not implemented
tz
parents: 436
diff changeset
   546
733
6454aaabda51 take care for those who do close very quickly
tz
parents: 730
diff changeset
   547
    (clsName := self selectionOfClass value) isNil ifTrue: [^nil].
6454aaabda51 take care for those who do close very quickly
tz
parents: 730
diff changeset
   548
    clsName := (clsName name upTo: $ ) asSymbol.
693
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   549
733
6454aaabda51 take care for those who do close very quickly
tz
parents: 730
diff changeset
   550
    ((Smalltalk at: clsName) isClass and: [accept value]) 
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   551
    ifTrue:
693
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   552
    [            
bb247cc428c3 also return resource selectors from private classes
tz
parents: 689
diff changeset
   553
        ^clsName, ' ', self valueOfSelector value
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   554
    ].
cf47d420764a initial checkin
tz
parents:
diff changeset
   555
    ^nil
cf47d420764a initial checkin
tz
parents:
diff changeset
   556
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   557
cf47d420764a initial checkin
tz
parents:
diff changeset
   558
!ResourceSelectionBrowser methodsFor:'startup / release'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   559
cf47d420764a initial checkin
tz
parents:
diff changeset
   560
closeCancel
cf47d420764a initial checkin
tz
parents:
diff changeset
   561
cf47d420764a initial checkin
tz
parents:
diff changeset
   562
    resourceMethod := nil.
733
6454aaabda51 take care for those who do close very quickly
tz
parents: 730
diff changeset
   563
    classAndResourceSelectionProcess notNil ifTrue: [classAndResourceSelectionProcess terminate].
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   564
    super closeCancel
cf47d420764a initial checkin
tz
parents:
diff changeset
   565
cf47d420764a initial checkin
tz
parents:
diff changeset
   566
cf47d420764a initial checkin
tz
parents:
diff changeset
   567
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   568
!
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   569
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   570
postBuildWith:aBuilder
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   571
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   572
    |classSelection|
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   573
    allClasses := Object withAllSubclasses.
689
ff099c344dd6 try to find out convenient class selection
tz
parents: 680
diff changeset
   574
    classSelection :=  resourceClass. 
ff099c344dd6 try to find out convenient class selection
tz
parents: 680
diff changeset
   575
    (Smalltalk at: classSelection) isNil 
ff099c344dd6 try to find out convenient class selection
tz
parents: 680
diff changeset
   576
        ifTrue: [classSelection :=  self class lastSelection].
ff099c344dd6 try to find out convenient class selection
tz
parents: 680
diff changeset
   577
    (Smalltalk at: classSelection) isNil 
ff099c344dd6 try to find out convenient class selection
tz
parents: 680
diff changeset
   578
        ifTrue: [classSelection :=  #Object].
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   579
    classSelectionBlock := 
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   580
    [:clsPattern|                                  
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   581
        |foundClass classes|         
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   582
        ((foundClass := Smalltalk at: clsPattern printString asSymbol) isClass not or:
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   583
        [foundClass name ~= clsPattern])
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   584
        ifTrue:
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   585
        [
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   586
            classes := allClasses select: [:cls| cls name size >= clsPattern size].
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   587
            1 to: clsPattern size do: 
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   588
            [:i|    
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   589
                 classes := classes select: [:cls| (cls name at: i) == (clsPattern at: i)].
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   590
            ].    
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   591
            foundClass := classes at: 1 ifAbsent: [nil] 
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   592
        ].
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   593
        foundClass notNil
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   594
        ifTrue:
769
bb413a70f479 get node to be selected from model
ca
parents: 746
diff changeset
   595
        [|item|
bb413a70f479 get node to be selected from model
ca
parents: 746
diff changeset
   596
            item := self listOfClasses
bb413a70f479 get node to be selected from model
ca
parents: 746
diff changeset
   597
                        detectChild:[:child :arg| child contents == arg ]
bb413a70f479 get node to be selected from model
ca
parents: 746
diff changeset
   598
                          arguments:(foundClass withAllSuperclasses reverse).
bb413a70f479 get node to be selected from model
ca
parents: 746
diff changeset
   599
            item notNil ifTrue:[
bb413a70f479 get node to be selected from model
ca
parents: 746
diff changeset
   600
                self selectionOfClass value:item
bb413a70f479 get node to be selected from model
ca
parents: 746
diff changeset
   601
            ]
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   602
        ].
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   603
        self valueOfClassName value: clsPattern
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   604
    ].
635
47ffd4e4f387 do select method row after opening
tz
parents: 632
diff changeset
   605
    self valueOfClassName value: classSelection.  
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   606
    self classNameInputField entryCompletionBlock:
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   607
    [:value|
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   608
        |what|
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   609
        what := Smalltalk classnameCompletion: value withoutSpaces.
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   610
        self classNameInputField contents:what first.
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   611
        (what at:2) size ~~ 1 ifTrue:[Display beep].
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   612
        classSelectionBlock value: self classNameInputField contents
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   613
    ].
632
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   614
    self listOfClassesView validateDoubleClickBlock: [:aTreeItem | aTreeItem contents ~~ self treeViewContents].
930b778d5e28 uses now dynamic tree items
tz
parents: 623
diff changeset
   615
    self listOfClassesView selectedNodeExpand: true.
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   616
733
6454aaabda51 take care for those who do close very quickly
tz
parents: 730
diff changeset
   617
    classAndResourceSelectionProcess := 
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   618
    [
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   619
        [classSelectionBlock value: classSelection] value.
733
6454aaabda51 take care for those who do close very quickly
tz
parents: 730
diff changeset
   620
        self selectionOfResource value: (self listOfResources detect: [:m| m selector == resourceMethod] ifNone: nil).
6454aaabda51 take care for those who do close very quickly
tz
parents: 730
diff changeset
   621
        classAndResourceSelectionProcess := nil
680
49c81e9cc6f7 create class support added
tz
parents: 664
diff changeset
   622
    ]
635
47ffd4e4f387 do select method row after opening
tz
parents: 632
diff changeset
   623
    forkAt: 4.
623
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   624
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   625
    ^super postBuildWith:aBuilder
c8a99cea56f7 expand selected class node after opening
tz
parents: 619
diff changeset
   626
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   627
! !
cf47d420764a initial checkin
tz
parents:
diff changeset
   628
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   629
!ResourceSelectionBrowser::Row methodsFor:'accessing'!
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   630
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   631
iconOn:aGC
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   632
    "register and answer an icon indicating the resource type."
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   633
730
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   634
    self resourceType isNil ifTrue: [^nil].
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   635
    icon isNil 
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   636
    ifTrue: 
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   637
    [
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   638
        |cls sel image imageKey|
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   639
        ((self resourceType = #image) or: [resourceType = #fileImage])
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   640
        ifTrue: 
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   641
        [  
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   642
            cls := method who methodClass soleInstance.
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   643
            sel := method who methodSelector.
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   644
        ]
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   645
        ifFalse:
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   646
        [
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   647
            cls := BrowserView.
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   648
            sel := (resourceType, 'Icon') asSymbol.
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   649
        ].
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   650
        imageKey := (cls name, sel) asSymbol.
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   651
        (icon := aGC registeredImageAt: imageKey) isNil
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   652
        ifTrue:
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   653
        [       
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   654
            image := cls perform: sel.
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   655
            image extent y > 18
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   656
            ifTrue:
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   657
            [         
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   658
                image := image magnifiedBy: 18/image extent y
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   659
            ].
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   660
            aGC registerImage: image key: imageKey.
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   661
            icon := aGC registeredImageAt: imageKey.
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   662
        ].
238d796c5da0 own #iconOn: method implememted
tz
parents: 727
diff changeset
   663
    ].
523
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   664
    ^icon
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   665
!
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   666
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   667
method: aMethod
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   668
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   669
    method := aMethod
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   670
!
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   671
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   672
resourceType
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   673
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   674
    resourceType isNil ifTrue: [resourceType := method resourceType].
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   675
    ^resourceType
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   676
!
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   677
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   678
selector
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   679
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   680
    selector isNil ifTrue: [selector := method who methodSelector].
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   681
    ^selector
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   682
! !
eec155f1b037 resource methods are now put own rows
tz
parents: 517
diff changeset
   683
425
cf47d420764a initial checkin
tz
parents:
diff changeset
   684
!ResourceSelectionBrowser class methodsFor:'documentation'!
cf47d420764a initial checkin
tz
parents:
diff changeset
   685
cf47d420764a initial checkin
tz
parents:
diff changeset
   686
version
cf47d420764a initial checkin
tz
parents:
diff changeset
   687
    ^ '$Header$'
cf47d420764a initial checkin
tz
parents:
diff changeset
   688
! !