Tools__LintRuleDetail.st
author Claus Gittinger <cg@exept.de>
Thu, 01 Mar 2012 10:56:50 +0100
changeset 11299 3e8397061396
parent 10673 5e23775830ee
child 11306 64efae786a2c
permissions -rw-r--r--
fix: visibility switch and rationale did not work
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
10094
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
     2
 Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
     3
 Copyright (c) 2009-2010 eXept Software AG
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
10094
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
     5
 Permission is hereby granted, free of charge, to any person
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
     6
 obtaining a copy of this software and associated documentation
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
     7
 files (the 'Software'), to deal in the Software without
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
     8
 restriction, including without limitation the rights to use,
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
     9
 copy, modify, merge, publish, distribute, sublicense, and/or sell
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    10
 copies of the Software, and to permit persons to whom the
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    11
 Software is furnished to do so, subject to the following
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    12
 conditions:
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    13
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    14
 The above copyright notice and this permission notice shall be
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    15
 included in all copies or substantial portions of the Software.
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    16
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    17
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    18
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    19
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    20
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    21
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    22
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    23
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    24
 OTHER DEALINGS IN THE SOFTWARE.
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
"
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
"{ Package: 'stx:libtool' }"
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
"{ NameSpace: Tools }"
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
ApplicationModel subclass:#LintRuleDetail
10671
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
    31
	instanceVariableNames:'ruleHolder rationaleVisibleHolder rationalView'
10480
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
    32
	classVariableNames:''
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
    33
	poolDictionaries:''
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
    34
	category:'Interface-Lint'
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
!LintRuleDetail class methodsFor:'documentation'!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
copyright
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
"
10094
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    41
 Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    42
 Copyright (c) 2009-2010 eXept Software AG
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    43
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    44
 Permission is hereby granted, free of charge, to any person
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    45
 obtaining a copy of this software and associated documentation
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    46
 files (the 'Software'), to deal in the Software without
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    47
 restriction, including without limitation the rights to use,
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    48
 copy, modify, merge, publish, distribute, sublicense, and/or sell
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    49
 copies of the Software, and to permit persons to whom the
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    50
 Software is furnished to do so, subject to the following
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    51
 conditions:
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
10094
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    53
 The above copyright notice and this permission notice shall be
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    54
 included in all copies or substantial portions of the Software.
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    55
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    56
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    57
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    58
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    59
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    60
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    61
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    62
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    63
 OTHER DEALINGS IN THE SOFTWARE.
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
"
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
! !
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    67
!LintRuleDetail class methodsFor:'help specs'!
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    68
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    69
flyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    70
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    71
     by the UIHelpTool of ST/X."
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    72
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    73
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    74
     the UIHelpTool may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    75
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    76
    "
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    77
     UIHelpTool openOnClass:Tools::LintRuleDetail    
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    78
    "
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    79
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    80
    <resource: #help>
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    81
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    82
    ^ super flyByHelpSpec addPairsFrom:#(
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    83
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    84
#ruleName
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    85
'Click to browse the lint rule'
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    86
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    87
)
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    88
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    89
    "Created: / 07-09-2011 / 04:08:11 / cg"
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    90
! !
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    91
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
!LintRuleDetail class methodsFor:'interface specs'!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
windowSpec
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
    "This resource specification was automatically generated
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
     by the UIPainter of ST/X."
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
    "Do not manually edit this!! If it is corrupted,
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
     the UIPainter may not be able to read the specification."
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
    "
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
     UIPainter new openOnClass:Tools::LintRuleDetail andSelector:#windowSpec
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
     Tools::LintRuleDetail new openInterface:#windowSpec
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
     Tools::LintRuleDetail open
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
    "
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
    <resource: #canvas>
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
10500
vrany
parents: 10480
diff changeset
   109
    ^ 
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
     #(FullSpec
10500
vrany
parents: 10480
diff changeset
   111
        name: windowSpec
vrany
parents: 10480
diff changeset
   112
        window: 
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
       (WindowSpec
10500
vrany
parents: 10480
diff changeset
   114
          label: 'SmalllintRuleDetail'
vrany
parents: 10480
diff changeset
   115
          name: 'SmalllintRuleDetail'
vrany
parents: 10480
diff changeset
   116
          min: (Point 10 10)
vrany
parents: 10480
diff changeset
   117
          bounds: (Rectangle 0 0 560 300)
vrany
parents: 10480
diff changeset
   118
        )
vrany
parents: 10480
diff changeset
   119
        component: 
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
       (SpecCollection
10500
vrany
parents: 10480
diff changeset
   121
          collection: (
vrany
parents: 10480
diff changeset
   122
           (VerticalPanelViewSpec
vrany
parents: 10480
diff changeset
   123
              name: 'Panel'
vrany
parents: 10480
diff changeset
   124
              layout: (LayoutFrame 0 0 0 0 0 1 0 1)
vrany
parents: 10480
diff changeset
   125
              horizontalLayout: fit
vrany
parents: 10480
diff changeset
   126
              verticalLayout: topSpaceFit
vrany
parents: 10480
diff changeset
   127
              horizontalSpace: 0
vrany
parents: 10480
diff changeset
   128
              verticalSpace: 0
11299
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   129
              ignoreInvisibleComponents: true
10500
vrany
parents: 10480
diff changeset
   130
              component: 
vrany
parents: 10480
diff changeset
   131
             (SpecCollection
vrany
parents: 10480
diff changeset
   132
                collection: (
vrany
parents: 10480
diff changeset
   133
                 (ViewSpec
vrany
parents: 10480
diff changeset
   134
                    name: 'Label'
11299
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   135
                    visibilityChannel: false
10500
vrany
parents: 10480
diff changeset
   136
                    component: 
vrany
parents: 10480
diff changeset
   137
                   (SpecCollection
vrany
parents: 10480
diff changeset
   138
                      collection: (
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   139
                       (LinkButtonSpec
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   140
                          name: 'Button1'
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   141
                          layout: (LayoutFrame 0 0 0 0 -150 1 30 0)
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   142
                          activeHelpKey: ruleName
10500
vrany
parents: 10480
diff changeset
   143
                          translateLabel: true
vrany
parents: 10480
diff changeset
   144
                          labelChannel: ruleNameAspect
vrany
parents: 10480
diff changeset
   145
                          adjust: left
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   146
                          model: browseLintRule
10500
vrany
parents: 10480
diff changeset
   147
                        )
vrany
parents: 10480
diff changeset
   148
                       (CheckBoxSpec
vrany
parents: 10480
diff changeset
   149
                          label: 'Show Rationale'
vrany
parents: 10480
diff changeset
   150
                          name: 'CheckBox1'
vrany
parents: 10480
diff changeset
   151
                          layout: (LayoutFrame -150 1 0 0 0 1 30 0)
vrany
parents: 10480
diff changeset
   152
                          model: rationaleVisibleHolder
vrany
parents: 10480
diff changeset
   153
                          translateLabel: true
vrany
parents: 10480
diff changeset
   154
                        )
vrany
parents: 10480
diff changeset
   155
                       )
vrany
parents: 10480
diff changeset
   156
                     
vrany
parents: 10480
diff changeset
   157
                    )
vrany
parents: 10480
diff changeset
   158
                    extent: (Point 560 30)
vrany
parents: 10480
diff changeset
   159
                  )
vrany
parents: 10480
diff changeset
   160
                 (HTMLViewSpec
vrany
parents: 10480
diff changeset
   161
                    name: 'Rationale'
vrany
parents: 10480
diff changeset
   162
                    level: 0
vrany
parents: 10480
diff changeset
   163
                    visibilityChannel: rationaleVisibleHolder
vrany
parents: 10480
diff changeset
   164
                    hasHorizontalScrollBar: true
vrany
parents: 10480
diff changeset
   165
                    hasVerticalScrollBar: true
11299
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   166
                    backgroundColor: (Color 86.9993133440147 86.9993133440147 86.9993133440147)
10500
vrany
parents: 10480
diff changeset
   167
                    htmlText: ruleRationaleAspect
vrany
parents: 10480
diff changeset
   168
                    extent: (Point 560 270)
vrany
parents: 10480
diff changeset
   169
                    postBuildCallback: setupHTMLView:
vrany
parents: 10480
diff changeset
   170
                  )
vrany
parents: 10480
diff changeset
   171
                 )
vrany
parents: 10480
diff changeset
   172
               
vrany
parents: 10480
diff changeset
   173
              )
vrany
parents: 10480
diff changeset
   174
            )
vrany
parents: 10480
diff changeset
   175
           )
vrany
parents: 10480
diff changeset
   176
         
vrany
parents: 10480
diff changeset
   177
        )
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
      )
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
! !
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
!LintRuleDetail class methodsFor:'plugIn spec'!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
aspectSelectors
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
    "This resource specification was automatically generated
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
     by the UIPainter of ST/X."
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
    "Do not manually edit this. If it is corrupted,
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
     the UIPainter may not be able to read the specification."
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
    "Return a description of exported aspects;
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
     these can be connected to aspects of an embedding application
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
     (if this app is embedded in a subCanvas)."
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
    ^ #(
10663
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   195
        #ruleHolder
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
      ).
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
! !
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   200
!LintRuleDetail methodsFor:'actions'!
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   201
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   202
browseLintRule
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   203
    |rule ruleClass sel|
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   204
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   205
    rule := self ruleHolder value.
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   206
    rule isNil ifTrue:[^ self].
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   207
    ruleClass := rule class.
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   208
    (ruleClass implements:#rationale) ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   209
        sel := #rationale.
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   210
    ].
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   211
    UserPreferences current systemBrowserClass
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   212
       openInClass:ruleClass selector:sel
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   213
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   214
    "Created: / 07-09-2011 / 04:09:38 / cg"
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   215
! !
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   216
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
!LintRuleDetail methodsFor:'aspects'!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   219
rationaleVisibleHolder
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   220
    "return/create the 'rationaleVisibleHolder' value holder (automatically generated)"
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   221
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   222
    rationaleVisibleHolder isNil ifTrue:[
11299
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   223
        rationaleVisibleHolder := ValueHolder with: true "false".
10500
vrany
parents: 10480
diff changeset
   224
        rationaleVisibleHolder addDependent:self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   225
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   226
    ^ rationaleVisibleHolder
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   227
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   228
    "Modified: / 04-08-2011 / 21:39:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
11299
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   229
    "Modified: / 01-03-2012 / 08:50:20 / cg"
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   230
!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   231
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   232
rationaleVisibleHolder:something
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   233
    "set the 'rationaleVisibleHolder' value holder (automatically generated)"
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   234
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   235
    |oldValue newValue|
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   236
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   237
    rationaleVisibleHolder notNil ifTrue:[
10500
vrany
parents: 10480
diff changeset
   238
        oldValue := rationaleVisibleHolder value.
vrany
parents: 10480
diff changeset
   239
        rationaleVisibleHolder removeDependent:self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   240
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   241
    rationaleVisibleHolder := something.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   242
    rationaleVisibleHolder notNil ifTrue:[
10500
vrany
parents: 10480
diff changeset
   243
        rationaleVisibleHolder addDependent:self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   244
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   245
    newValue := rationaleVisibleHolder value.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   246
    oldValue ~~ newValue ifTrue:[
10500
vrany
parents: 10480
diff changeset
   247
        self update:#value with:newValue from:rationaleVisibleHolder.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   248
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   249
!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   250
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
ruleHolder
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
    "return/create the 'ruleHolder' value holder (automatically generated)"
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
    ruleHolder isNil ifTrue:[
11299
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   255
        ruleHolder := ValueHolder new.
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
    ].
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   257
    ^ ruleHolder
11299
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   258
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   259
    "Modified: / 01-03-2012 / 08:51:03 / cg"
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   260
!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   261
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   262
ruleHolder:something
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   263
    "set the 'ruleHolder' value holder (automatically generated)"
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   264
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   265
    |oldValue newValue|
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   266
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   267
    ruleHolder notNil ifTrue:[
10480
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
   268
	oldValue := ruleHolder value.
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
   269
	ruleHolder removeDependent:self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   270
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   271
    ruleHolder := something.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   272
    ruleHolder notNil ifTrue:[
10480
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
   273
	ruleHolder addDependent:self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   274
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   275
    newValue := ruleHolder value.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   276
    oldValue ~~ newValue ifTrue:[
10480
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
   277
	self update:#value with:newValue from:ruleHolder.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   278
    ].
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   279
!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   280
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   281
ruleNameAspect
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   282
    <resource: #uiAspect>
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   283
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   284
    |holder|
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   285
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   286
    (holder := builder bindingAt:#ruleNameAspect) isNil ifTrue:[
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   287
        holder := BlockValue
10673
5e23775830ee changed: #ruleNameAspect
Claus Gittinger <cg@exept.de>
parents: 10672
diff changeset
   288
                    with:[:h | 
5e23775830ee changed: #ruleNameAspect
Claus Gittinger <cg@exept.de>
parents: 10672
diff changeset
   289
                        "/ h displayString , ' ' , (('[browse]' actionForAll:[ self browseLintRule]) colorizeAllWith:Color blue) 
11299
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   290
                        (h ? '') displayString actionForAll:[ self browseLintRule ] 
10673
5e23775830ee changed: #ruleNameAspect
Claus Gittinger <cg@exept.de>
parents: 10672
diff changeset
   291
                    ]
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   292
                    argument: self ruleHolder.
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   293
        builder aspectAt:#ruleNameAspect put:holder.
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   294
    ].
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   295
    ^ holder.
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   296
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   297
    "Modified: / 05-02-2010 / 12:51:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
11299
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   298
    "Modified: / 01-03-2012 / 08:44:23 / cg"
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   299
!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   300
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   301
ruleRationaleAspect
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   302
    <resource: #uiAspect>
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   303
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   304
    |holder|
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   305
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   306
    (holder := builder bindingAt:#ruleRationaleAspect) isNil ifTrue:[
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   307
        holder := (AspectAdaptor forAspect: #rationale) subjectChannel: self ruleHolder.
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   308
        builder aspectAt:#ruleRationaleAspect put:holder.
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   309
    ].
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   310
    ^ holder.
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   311
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   312
    "Modified: / 05-02-2010 / 12:51:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   313
    "Modified (comment): / 07-09-2011 / 04:12:16 / cg"
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   314
! !
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   315
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   316
!LintRuleDetail methodsFor:'change & update'!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   317
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   318
update:something with:aParameter from:changedObject
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   319
    "Invoked when an object that I depend upon sends a change notification."
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   320
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   321
    changedObject == ruleHolder ifTrue:[
10500
vrany
parents: 10480
diff changeset
   322
        self updateVisibility.
vrany
parents: 10480
diff changeset
   323
         ^ self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   324
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   325
    changedObject == rationaleVisibleHolder ifTrue:[
10500
vrany
parents: 10480
diff changeset
   326
        self updateVisibility.
vrany
parents: 10480
diff changeset
   327
         ^ self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   328
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   329
    super update:something with:aParameter from:changedObject
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   330
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   331
    "Modified: / 04-08-2011 / 21:31:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   332
!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   333
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   334
updateVisibility
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   335
10480
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
   336
    self ruleHolder value notNil
10663
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   337
        ifTrue:[self show]
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   338
        ifFalse:[self hide].
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   339
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   340
    "Created: / 04-08-2011 / 16:39:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10663
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   341
    "Modified: / 04-09-2011 / 20:18:48 / cg"
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   342
! !
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   343
10500
vrany
parents: 10480
diff changeset
   344
!LintRuleDetail methodsFor:'initialization'!
vrany
parents: 10480
diff changeset
   345
vrany
parents: 10480
diff changeset
   346
setupHTMLView:aView
10671
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   347
    rationalView := aView.
10500
vrany
parents: 10480
diff changeset
   348
    aView painter
10671
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   349
        leftMargin:20;
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   350
        topMargin:5.
10500
vrany
parents: 10480
diff changeset
   351
vrany
parents: 10480
diff changeset
   352
    "Created: / 04-08-2011 / 18:00:36 / cg"
vrany
parents: 10480
diff changeset
   353
! !
vrany
parents: 10480
diff changeset
   354
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   355
!LintRuleDetail methodsFor:'private'!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   356
10671
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   357
heightWhenNotShowingRationale
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   358
    ^ 30
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   359
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   360
    "Created: / 07-09-2011 / 04:02:34 / cg"
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   361
!
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   362
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   363
heightWhenShowingRationale
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   364
    ^ 100
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   365
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   366
    "Created: / 07-09-2011 / 04:02:24 / cg"
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   367
!
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   368
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   369
hide
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   370
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   371
    self visibility: false height: 0
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   372
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   373
    "Created: / 11-03-2010 / 09:07:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   374
!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   375
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   376
show
10671
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   377
    self 
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   378
        visibility: true 
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   379
        height: (self rationaleVisibleHolder value 
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   380
                    ifTrue:[ self heightWhenShowingRationale ] 
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   381
                    ifFalse:[ self heightWhenNotShowingRationale ])
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   382
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   383
    "Created: / 11-03-2010 / 09:07:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10671
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   384
    "Modified: / 07-09-2011 / 04:03:07 / cg"
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   385
!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   386
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   387
visibility: visibility height: height
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   388
    | container list detail h |
10663
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   389
11299
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   390
"/ cg: the whole conatiner-container access chains below is ugly - use a name to access components.
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   391
"/ and also: there is no layout in list, so the code does crash.
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   392
"/ I disabled the whole visibility stuff.
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   393
^ self.
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   394
10663
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   395
    (container := self window container) isNil ifTrue:[^self].
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   396
    h := visibility ifFalse:[0] ifTrue:[height].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   397
10663
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   398
    container isVisible == visibility ifFalse: [
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   399
        container isVisible: visibility
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   400
    ].
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   401
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   402
    list := container container subViews first.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   403
    detail := container container subViews second.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   404
10663
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   405
    (list layout bottomOffset ~= height negated) ifTrue:[
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   406
        list layout: (list layout bottomOffset: height negated; yourself)
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   407
    ].
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   408
    (detail layout topOffset ~= height negated) ifTrue:[
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   409
        detail layout: (detail layout topOffset: height negated; yourself)
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   410
    ].
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   411
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   412
    "Created: / 11-03-2010 / 09:51:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
11299
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   413
    "Modified: / 01-03-2012 / 10:35:51 / cg"
10480
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
   414
! !
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   415
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   416
!LintRuleDetail class methodsFor:'documentation'!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   417
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   418
version
11299
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   419
    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleDetail.st,v 1.11 2012-03-01 09:56:50 cg Exp $'
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   420
!
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   421
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   422
version_CVS
11299
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   423
    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleDetail.st,v 1.11 2012-03-01 09:56:50 cg Exp $'
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   424
!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   425
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   426
version_SVN
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   427
    ^ '§Id: Tools__LintRuleDetail.st 7617 2010-08-25 12:56:19Z vranyj1 §'
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   428
! !