Tools__LintRuleDetail.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Sun, 29 Jan 2012 15:33:37 +0000
branchjv
changeset 12125 0c49a3b13e43
parent 12123 4bde08cebd48
child 12128 a7ff7d66ee85
permissions -rw-r--r--
Merged with /trunk
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
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
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
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    67
!LintRuleDetail class methodsFor:'help specs'!
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    68
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    69
flyByHelpSpec
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    70
    "This resource specification was automatically generated
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    71
     by the UIHelpTool of ST/X."
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    72
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    73
    "Do not manually edit this!! If it is corrupted,
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    74
     the UIHelpTool may not be able to read the specification."
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    75
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    76
    "
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    77
     UIHelpTool openOnClass:Tools::LintRuleDetail    
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    78
    "
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    79
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    80
    <resource: #help>
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    81
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    82
    ^ super flyByHelpSpec addPairsFrom:#(
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    83
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    84
#ruleName
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    85
'Click to browse the lint rule'
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    86
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    87
)
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    88
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    89
    "Created: / 07-09-2011 / 04:08:11 / cg"
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
    90
! !
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
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
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   129
              ignoreInvisibleComponents: false
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'
vrany
parents: 10480
diff changeset
   135
                    component: 
vrany
parents: 10480
diff changeset
   136
                   (SpecCollection
vrany
parents: 10480
diff changeset
   137
                      collection: (
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   138
                       (LinkButtonSpec
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   139
                          name: 'Button1'
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   140
                          layout: (LayoutFrame 0 0 0 0 -150 1 30 0)
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   141
                          activeHelpKey: ruleName
10500
vrany
parents: 10480
diff changeset
   142
                          translateLabel: true
vrany
parents: 10480
diff changeset
   143
                          labelChannel: ruleNameAspect
vrany
parents: 10480
diff changeset
   144
                          adjust: left
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   145
                          model: browseLintRule
10500
vrany
parents: 10480
diff changeset
   146
                        )
vrany
parents: 10480
diff changeset
   147
                       (CheckBoxSpec
vrany
parents: 10480
diff changeset
   148
                          label: 'Show Rationale'
vrany
parents: 10480
diff changeset
   149
                          name: 'CheckBox1'
vrany
parents: 10480
diff changeset
   150
                          layout: (LayoutFrame -150 1 0 0 0 1 30 0)
vrany
parents: 10480
diff changeset
   151
                          model: rationaleVisibleHolder
vrany
parents: 10480
diff changeset
   152
                          translateLabel: true
vrany
parents: 10480
diff changeset
   153
                        )
vrany
parents: 10480
diff changeset
   154
                       )
vrany
parents: 10480
diff changeset
   155
                     
vrany
parents: 10480
diff changeset
   156
                    )
vrany
parents: 10480
diff changeset
   157
                    extent: (Point 560 30)
vrany
parents: 10480
diff changeset
   158
                  )
vrany
parents: 10480
diff changeset
   159
                 (HTMLViewSpec
vrany
parents: 10480
diff changeset
   160
                    name: 'Rationale'
vrany
parents: 10480
diff changeset
   161
                    level: 0
vrany
parents: 10480
diff changeset
   162
                    visibilityChannel: rationaleVisibleHolder
vrany
parents: 10480
diff changeset
   163
                    hasHorizontalScrollBar: true
vrany
parents: 10480
diff changeset
   164
                    hasVerticalScrollBar: true
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   165
                    backgroundColor: (Color 86.9993133440146 86.9993133440146 86.9993133440146)
10500
vrany
parents: 10480
diff changeset
   166
                    htmlText: ruleRationaleAspect
vrany
parents: 10480
diff changeset
   167
                    extent: (Point 560 270)
vrany
parents: 10480
diff changeset
   168
                    postBuildCallback: setupHTMLView:
vrany
parents: 10480
diff changeset
   169
                  )
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
        )
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
      )
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
!LintRuleDetail class methodsFor:'plugIn spec'!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
aspectSelectors
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
    "This resource specification was automatically generated
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
     by the UIPainter of ST/X."
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
    "Do not manually edit this. If it is corrupted,
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
     the UIPainter may not be able to read the specification."
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
    "Return a description of exported aspects;
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
     these can be connected to aspects of an embedding application
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
     (if this app is embedded in a subCanvas)."
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
    ^ #(
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   194
        #ruleHolder
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
      ).
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
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   199
!LintRuleDetail methodsFor:'actions'!
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   200
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   201
browseLintRule
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   202
    |rule ruleClass sel|
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   203
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   204
    rule := self ruleHolder value.
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   205
    rule isNil ifTrue:[^ self].
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   206
    ruleClass := rule class.
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   207
    (ruleClass implements:#rationale) ifTrue:[
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   208
        sel := #rationale.
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   209
    ].
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   210
    UserPreferences current systemBrowserClass
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   211
       openInClass:ruleClass selector:sel
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   212
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   213
    "Created: / 07-09-2011 / 04:09:38 / cg"
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   214
! !
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   215
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
!LintRuleDetail methodsFor:'aspects'!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   218
rationaleVisibleHolder
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   219
    "return/create the 'rationaleVisibleHolder' value holder (automatically generated)"
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   220
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   221
    rationaleVisibleHolder isNil ifTrue:[
10500
vrany
parents: 10480
diff changeset
   222
        rationaleVisibleHolder := ValueHolder with: false.
vrany
parents: 10480
diff changeset
   223
        rationaleVisibleHolder addDependent:self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   224
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   225
    ^ rationaleVisibleHolder
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   226
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   227
    "Modified: / 04-08-2011 / 21:39:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   228
!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   229
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   230
rationaleVisibleHolder:something
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   231
    "set the 'rationaleVisibleHolder' value holder (automatically generated)"
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   232
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   233
    |oldValue newValue|
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   234
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   235
    rationaleVisibleHolder notNil ifTrue:[
10500
vrany
parents: 10480
diff changeset
   236
        oldValue := rationaleVisibleHolder value.
vrany
parents: 10480
diff changeset
   237
        rationaleVisibleHolder removeDependent:self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   238
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   239
    rationaleVisibleHolder := something.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   240
    rationaleVisibleHolder notNil ifTrue:[
10500
vrany
parents: 10480
diff changeset
   241
        rationaleVisibleHolder addDependent:self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   242
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   243
    newValue := rationaleVisibleHolder value.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   244
    oldValue ~~ newValue ifTrue:[
10500
vrany
parents: 10480
diff changeset
   245
        self update:#value with:newValue from:rationaleVisibleHolder.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   246
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   247
!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   248
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
ruleHolder
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
    "return/create the 'ruleHolder' value holder (automatically generated)"
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
    ruleHolder isNil ifTrue:[
10480
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
   253
	ruleHolder := ValueHolder new.
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
    ].
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
    ^ ruleHolder
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   257
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   258
ruleHolder:something
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   259
    "set the 'ruleHolder' value holder (automatically generated)"
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   260
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   261
    |oldValue newValue|
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   262
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   263
    ruleHolder notNil ifTrue:[
10480
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
   264
	oldValue := ruleHolder value.
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
   265
	ruleHolder removeDependent:self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   266
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   267
    ruleHolder := something.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   268
    ruleHolder notNil ifTrue:[
10480
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
   269
	ruleHolder addDependent:self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   270
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   271
    newValue := ruleHolder value.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   272
    oldValue ~~ newValue ifTrue:[
10480
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
   273
	self update:#value with:newValue from:ruleHolder.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   274
    ].
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   275
!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   276
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   277
ruleNameAspect
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   278
    <resource: #uiAspect>
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   279
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   280
    |holder|
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   281
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   282
    (holder := builder bindingAt:#ruleNameAspect) isNil ifTrue:[
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   283
        holder := BlockValue
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   284
                    with:[:h | 
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   285
                        "/ h displayString , ' ' , (('[browse]' actionForAll:[ self browseLintRule]) colorizeAllWith:Color blue) 
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   286
                        h displayString actionForAll:[ self browseLintRule] 
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   287
                    ]
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   288
                    argument: self ruleHolder.
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   289
        builder aspectAt:#ruleNameAspect put:holder.
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   290
    ].
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   291
    ^ holder.
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   292
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   293
    "Modified: / 05-02-2010 / 12:51:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   294
    "Modified: / 07-09-2011 / 04:54:24 / cg"
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   295
!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   296
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   297
ruleRationaleAspect
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   298
    <resource: #uiAspect>
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   299
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   300
    |holder|
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   301
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   302
    (holder := builder bindingAt:#ruleRationaleAspect) isNil ifTrue:[
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   303
        holder := (AspectAdaptor forAspect: #rationale) subjectChannel: self ruleHolder.
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   304
        builder aspectAt:#ruleRationaleAspect put:holder.
9999
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.
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   307
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   308
    "Modified: / 05-02-2010 / 12:51:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   309
    "Modified (comment): / 07-09-2011 / 04:12:16 / cg"
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   310
! !
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   311
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   312
!LintRuleDetail methodsFor:'change & update'!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   313
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   314
update:something with:aParameter from:changedObject
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   315
    "Invoked when an object that I depend upon sends a change notification."
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   316
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   317
    changedObject == ruleHolder ifTrue:[
10500
vrany
parents: 10480
diff changeset
   318
        self updateVisibility.
vrany
parents: 10480
diff changeset
   319
         ^ self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   320
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   321
    changedObject == rationaleVisibleHolder 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
    super update:something with:aParameter from:changedObject
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   326
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   327
    "Modified: / 04-08-2011 / 21:31:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   328
!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   329
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   330
updateVisibility
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   331
10480
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
   332
    self ruleHolder value notNil
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   333
        ifTrue:[self show]
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   334
        ifFalse:[self hide].
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   335
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   336
    "Created: / 04-08-2011 / 16:39:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   337
    "Modified: / 04-09-2011 / 20:18:48 / cg"
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   338
! !
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   339
10500
vrany
parents: 10480
diff changeset
   340
!LintRuleDetail methodsFor:'initialization'!
vrany
parents: 10480
diff changeset
   341
vrany
parents: 10480
diff changeset
   342
setupHTMLView:aView
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   343
    rationalView := aView.
10500
vrany
parents: 10480
diff changeset
   344
    aView painter
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   345
        leftMargin:20;
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   346
        topMargin:5.
10500
vrany
parents: 10480
diff changeset
   347
vrany
parents: 10480
diff changeset
   348
    "Created: / 04-08-2011 / 18:00:36 / cg"
vrany
parents: 10480
diff changeset
   349
! !
vrany
parents: 10480
diff changeset
   350
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   351
!LintRuleDetail methodsFor:'private'!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   352
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   353
heightWhenNotShowingRationale
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   354
    ^ 30
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   355
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   356
    "Created: / 07-09-2011 / 04:02:34 / cg"
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   357
!
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   358
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   359
heightWhenShowingRationale
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   360
    ^ 100
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   361
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   362
    "Created: / 07-09-2011 / 04:02:24 / cg"
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   363
!
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   364
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   365
hide
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   366
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   367
    self visibility: false height: 0
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   368
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   369
    "Created: / 11-03-2010 / 09:07:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   370
!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   371
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   372
show
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   373
    self 
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   374
        visibility: true 
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   375
        height: (self rationaleVisibleHolder value 
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   376
                    ifTrue:[ self heightWhenShowingRationale ] 
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   377
                    ifFalse:[ self heightWhenNotShowingRationale ])
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   378
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   379
    "Created: / 11-03-2010 / 09:07:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   380
    "Modified: / 07-09-2011 / 04:03:07 / cg"
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   381
!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   382
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   383
visibility: visibility height: height
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   384
    | container list detail h |
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   385
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   386
    (container := self window container) isNil ifTrue:[^self].
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   387
    h := visibility ifFalse:[0] ifTrue:[height].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   388
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   389
    container isVisible == visibility ifFalse: [
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   390
        container isVisible: visibility
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   391
    ].
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   392
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   393
    list := container container subViews first.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   394
    detail := container container subViews second.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   395
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   396
    (list layout bottomOffset ~= height negated) ifTrue:[
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   397
        list layout: (list layout bottomOffset: height negated; yourself)
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   398
    ].
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   399
    (detail layout topOffset ~= height negated) ifTrue:[
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   400
        detail layout: (detail layout topOffset: height negated; yourself)
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   401
    ].
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   402
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   403
    "Created: / 11-03-2010 / 09:51:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   404
    "Modified: / 04-09-2011 / 20:15:40 / cg"
10480
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
   405
! !
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   406
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   407
!LintRuleDetail class methodsFor:'documentation'!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   408
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   409
version
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   410
    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleDetail.st,v 1.10 2011/09/07 02:54:47 cg Exp $'
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   411
!
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   412
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   413
version_CVS
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   414
    ^ '§Header: /cvs/stx/stx/libtool/Tools__LintRuleDetail.st,v 1.10 2011/09/07 02:54:47 cg Exp §'
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   415
!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   416
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   417
version_SVN
12123
4bde08cebd48 trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10673
diff changeset
   418
    ^ '$Id: Tools__LintRuleDetail.st 7617 2010-08-25 12:56:19Z vranyj1 $'
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   419
! !