Tools__LintRuleDetail.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 04 Sep 2013 18:00:49 +0100
branchdefault-browser-environment
changeset 13493 dd0651e3bb98
parent 13014 64e77f92badd
child 13178 c9bf900fe729
child 14898 c786afd145ce
permissions -rw-r--r--
Replaced all references to Smalltalk by instvar `environment` in new system browser.
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
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   196
        #ruleRationaleAspect
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
      ).
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   199
    "Modified: / 01-03-2012 / 16:31:04 / cg"
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
! !
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   202
!LintRuleDetail methodsFor:'actions'!
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   203
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   204
browseLintRule
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   205
    |rule ruleClass sel|
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   206
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   207
    rule := self ruleHolder value.
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   208
    rule isNil ifTrue:[^ self].
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   209
    ruleClass := rule class.
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   210
    (ruleClass implements:#rationale) ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   211
        sel := #rationale.
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   212
    ].
13014
64e77f92badd class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 11314
diff changeset
   213
    UserPreferences systemBrowserClass
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   214
       openInClass:ruleClass selector:sel
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   215
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   216
    "Created: / 07-09-2011 / 04:09:38 / cg"
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   217
! !
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   218
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
!LintRuleDetail methodsFor:'aspects'!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   221
rationaleVisibleHolder
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   222
    "return/create the 'rationaleVisibleHolder' value holder (automatically generated)"
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   223
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   224
    rationaleVisibleHolder isNil ifTrue:[
11299
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   225
        rationaleVisibleHolder := ValueHolder with: true "false".
10500
vrany
parents: 10480
diff changeset
   226
        rationaleVisibleHolder addDependent:self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   227
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   228
    ^ rationaleVisibleHolder
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   229
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   230
    "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
   231
    "Modified: / 01-03-2012 / 08:50:20 / cg"
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   232
!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   233
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   234
rationaleVisibleHolder:something
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   235
    "set the 'rationaleVisibleHolder' value holder (automatically generated)"
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   236
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   237
    |oldValue newValue|
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   238
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   239
    rationaleVisibleHolder notNil ifTrue:[
10500
vrany
parents: 10480
diff changeset
   240
        oldValue := rationaleVisibleHolder value.
vrany
parents: 10480
diff changeset
   241
        rationaleVisibleHolder removeDependent:self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   242
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   243
    rationaleVisibleHolder := something.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   244
    rationaleVisibleHolder notNil ifTrue:[
10500
vrany
parents: 10480
diff changeset
   245
        rationaleVisibleHolder addDependent:self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   246
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   247
    newValue := rationaleVisibleHolder value.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   248
    oldValue ~~ newValue ifTrue:[
10500
vrany
parents: 10480
diff changeset
   249
        self update:#value with:newValue from:rationaleVisibleHolder.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   250
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   251
!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   252
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
ruleHolder
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
    "return/create the 'ruleHolder' value holder (automatically generated)"
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
    ruleHolder isNil ifTrue:[
11299
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   257
        ruleHolder := ValueHolder new.
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   258
    ].
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   259
    ^ ruleHolder
11299
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   260
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   261
    "Modified: / 01-03-2012 / 08:51:03 / cg"
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   262
!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   263
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   264
ruleHolder:something
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   265
    "set the 'ruleHolder' value holder (automatically generated)"
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   266
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   267
    |oldValue newValue|
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   268
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   269
    ruleHolder notNil ifTrue:[
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   270
        oldValue := ruleHolder value.
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   271
        ruleHolder removeDependent:self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   272
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   273
    ruleHolder := something.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   274
    ruleHolder notNil ifTrue:[
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   275
        ruleHolder addDependent:self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   276
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   277
    newValue := ruleHolder value.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   278
    oldValue ~~ newValue ifTrue:[
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   279
        self update:#value with:newValue from:ruleHolder.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   280
    ].
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   281
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   282
    "Modified: / 01-03-2012 / 15:29:30 / cg"
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   283
!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   284
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   285
ruleNameAspect
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   286
    <resource: #uiAspect>
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   287
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   288
    |holder|
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   289
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   290
    (holder := builder bindingAt:#ruleNameAspect) isNil ifTrue:[
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   291
        holder := BlockValue
10673
5e23775830ee changed: #ruleNameAspect
Claus Gittinger <cg@exept.de>
parents: 10672
diff changeset
   292
                    with:[:h | 
5e23775830ee changed: #ruleNameAspect
Claus Gittinger <cg@exept.de>
parents: 10672
diff changeset
   293
                        "/ 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
   294
                        (h ? '') displayString actionForAll:[ self browseLintRule ] 
10673
5e23775830ee changed: #ruleNameAspect
Claus Gittinger <cg@exept.de>
parents: 10672
diff changeset
   295
                    ]
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   296
                    argument: self ruleHolder.
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   297
        builder aspectAt:#ruleNameAspect put:holder.
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   298
    ].
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   299
    ^ holder.
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   300
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   301
    "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
   302
    "Modified: / 01-03-2012 / 08:44:23 / cg"
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   303
!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   304
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   305
ruleRationaleAspect
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   306
    <resource: #uiAspect>
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   307
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   308
    |holder|
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 := builder bindingAt:#ruleRationaleAspect) isNil ifTrue:[
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   311
        "cannot use a BlockValue linked on the ruleHolder for the
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   312
         ruleRationaleAspect, because the ruleHolder maight be changed dynamically
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   313
         via the aspect-linking mechanism"
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   314
"/        holder := (AspectAdaptor forAspect: #rationale) subjectChannel: self ruleHolder.
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   315
        holder := '' asValue.
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   316
        builder aspectAt:#ruleRationaleAspect put:holder.
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   317
    ].
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   318
    ^ holder.
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   319
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   320
    "Modified: / 05-02-2010 / 12:51:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   321
    "Modified: / 01-03-2012 / 15:29:16 / cg"
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   322
! !
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   323
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   324
!LintRuleDetail methodsFor:'change & update'!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   325
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   326
update:something with:aParameter from:changedObject
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   327
    "Invoked when an object that I depend upon sends a change notification."
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   328
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   329
    changedObject == ruleHolder ifTrue:[
10500
vrany
parents: 10480
diff changeset
   330
        self updateVisibility.
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   331
        self updateRule.
10500
vrany
parents: 10480
diff changeset
   332
         ^ self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   333
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   334
    changedObject == rationaleVisibleHolder ifTrue:[
10500
vrany
parents: 10480
diff changeset
   335
        self updateVisibility.
vrany
parents: 10480
diff changeset
   336
         ^ self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   337
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   338
    super update:something with:aParameter from:changedObject
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   339
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   340
    "Modified: / 04-08-2011 / 21:31:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   341
    "Modified: / 01-03-2012 / 15:27:38 / cg"
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   342
!
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   343
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   344
updateRule
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   345
    "cannot use a BlockValue linked on the ruleHolder for the
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   346
     ruleRationaleAspect, because the ruleHolder maight be changed dynamically
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   347
     via the aspect-linking mechanism"
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   348
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   349
    |rule|
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   350
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   351
    rule := self ruleHolder value.
11314
2f70adb99ceb changed: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11306
diff changeset
   352
    self ruleRationaleAspect value: (rule isNil ifTrue:[''] ifFalse:[rule rationaleWithAnchor]).
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   353
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   354
    "Created: / 01-03-2012 / 15:28:18 / cg"
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   355
!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   356
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   357
updateVisibility
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   358
10480
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
   359
    self ruleHolder value notNil
10663
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   360
        ifTrue:[self show]
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   361
        ifFalse:[self hide].
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   362
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   363
    "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
   364
    "Modified: / 04-09-2011 / 20:18:48 / cg"
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   365
! !
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   366
10500
vrany
parents: 10480
diff changeset
   367
!LintRuleDetail methodsFor:'initialization'!
vrany
parents: 10480
diff changeset
   368
vrany
parents: 10480
diff changeset
   369
setupHTMLView:aView
10671
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   370
    rationalView := aView.
10500
vrany
parents: 10480
diff changeset
   371
    aView painter
10671
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   372
        leftMargin:20;
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   373
        topMargin:5.
10500
vrany
parents: 10480
diff changeset
   374
vrany
parents: 10480
diff changeset
   375
    "Created: / 04-08-2011 / 18:00:36 / cg"
vrany
parents: 10480
diff changeset
   376
! !
vrany
parents: 10480
diff changeset
   377
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   378
!LintRuleDetail methodsFor:'private'!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   379
10671
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   380
heightWhenNotShowingRationale
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   381
    ^ 30
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   382
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   383
    "Created: / 07-09-2011 / 04:02:34 / cg"
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   384
!
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   385
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   386
heightWhenShowingRationale
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   387
    ^ 100
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   388
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   389
    "Created: / 07-09-2011 / 04:02:24 / cg"
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   390
!
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   391
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   392
hide
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   393
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   394
    self visibility: false height: 0
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   395
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   396
    "Created: / 11-03-2010 / 09:07:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   397
!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   398
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   399
show
10671
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   400
    self 
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   401
        visibility: true 
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   402
        height: (self rationaleVisibleHolder value 
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   403
                    ifTrue:[ self heightWhenShowingRationale ] 
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   404
                    ifFalse:[ self heightWhenNotShowingRationale ])
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   405
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   406
    "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
   407
    "Modified: / 07-09-2011 / 04:03:07 / cg"
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   408
!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   409
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   410
visibility: visibility height: height
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   411
    | container list detail h |
10663
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   412
11299
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   413
"/ 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
   414
"/ 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
   415
"/ I disabled the whole visibility stuff.
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   416
^ self.
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   417
10663
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   418
    (container := self window container) isNil ifTrue:[^self].
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   419
    h := visibility ifFalse:[0] ifTrue:[height].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   420
10663
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   421
    container isVisible == visibility ifFalse: [
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   422
        container isVisible: visibility
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   423
    ].
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   424
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   425
    list := container container subViews first.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   426
    detail := container container subViews second.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   427
10663
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   428
    (list layout bottomOffset ~= height negated) ifTrue:[
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   429
        list layout: (list layout bottomOffset: height negated; yourself)
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   430
    ].
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   431
    (detail layout topOffset ~= height negated) ifTrue:[
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   432
        detail layout: (detail layout topOffset: height negated; yourself)
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   433
    ].
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   434
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   435
    "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
   436
    "Modified: / 01-03-2012 / 10:35:51 / cg"
10480
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
   437
! !
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   438
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   439
!LintRuleDetail class methodsFor:'documentation'!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   440
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   441
version
13014
64e77f92badd class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 11314
diff changeset
   442
    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleDetail.st,v 1.14 2013-06-25 17:12:11 cg Exp $'
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   443
!
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   444
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   445
version_CVS
13014
64e77f92badd class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 11314
diff changeset
   446
    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleDetail.st,v 1.14 2013-06-25 17:12:11 cg Exp $'
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   447
!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   448
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   449
version_SVN
13014
64e77f92badd class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 11314
diff changeset
   450
    ^ '$Id: Tools__LintRuleDetail.st,v 1.14 2013-06-25 17:12:11 cg Exp $'
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   451
! !
13014
64e77f92badd class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 11314
diff changeset
   452