Tools__LintRuleDetail.st
author Stefan Vogel <sv@exept.de>
Fri, 17 May 2019 17:11:44 +0200
changeset 18767 0478d93cdb75
parent 17976 4051d93c0354
permissions -rw-r--r--
#REFACTORING by stefan Sanitize BlockValues class: Tools::Inspector2 changed: #toolbarBackgroundHolder
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17898
f5f921c1e9c1 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 17657
diff changeset
     1
"{ Encoding: utf8 }"
f5f921c1e9c1 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 17657
diff changeset
     2
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
"
10094
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
     4
 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
     5
 Copyright (c) 2009-2010 eXept Software AG
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
10094
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
     7
 Permission is hereby granted, free of charge, to any person
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
     8
 obtaining a copy of this software and associated documentation
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
     9
 files (the 'Software'), to deal in the Software without
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    10
 restriction, including without limitation the rights to use,
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    11
 copy, modify, merge, publish, distribute, sublicense, and/or sell
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    12
 copies of the Software, and to permit persons to whom the
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    13
 Software is furnished to do so, subject to the following
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    14
 conditions:
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    15
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    16
 The above copyright notice and this permission notice shall be
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    17
 included in all copies or substantial portions of the Software.
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    18
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    19
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    20
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    21
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    22
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    23
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    24
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    25
 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
    26
 OTHER DEALINGS IN THE SOFTWARE.
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
"
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
"{ Package: 'stx:libtool' }"
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
"{ NameSpace: Tools }"
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
ApplicationModel subclass:#LintRuleDetail
14898
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
    33
	instanceVariableNames:'ruleHolder rationaleVisibleHolder rationalView
17290
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
    34
		selectedMethodsHolder selectedClassesHolder'
10480
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
    35
	classVariableNames:''
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
    36
	poolDictionaries:''
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
    37
	category:'Interface-Lint'
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
!LintRuleDetail class methodsFor:'documentation'!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
copyright
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
"
10094
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    44
 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
    45
 Copyright (c) 2009-2010 eXept Software AG
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    46
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    47
 Permission is hereby granted, free of charge, to any person
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    48
 obtaining a copy of this software and associated documentation
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    49
 files (the 'Software'), to deal in the Software without
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    50
 restriction, including without limitation the rights to use,
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    51
 copy, modify, merge, publish, distribute, sublicense, and/or sell
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    52
 copies of the Software, and to permit persons to whom the
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    53
 Software is furnished to do so, subject to the following
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    54
 conditions:
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
10094
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    56
 The above copyright notice and this permission notice shall be
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    57
 included in all copies or substantial portions of the Software.
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    58
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    59
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    60
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    61
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    62
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    63
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    64
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
f3ac4623ee59 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9999
diff changeset
    65
 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
    66
 OTHER DEALINGS IN THE SOFTWARE.
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
"
17297
78fd75347bc3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17290
diff changeset
    68
!
78fd75347bc3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17290
diff changeset
    69
78fd75347bc3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17290
diff changeset
    70
documentation
78fd75347bc3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17290
diff changeset
    71
"
78fd75347bc3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17290
diff changeset
    72
    Embeddable list to display affected methods from a selected SmallLint rules.
78fd75347bc3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17290
diff changeset
    73
    (this is embedded in the browser when showing lint check outcomes)
78fd75347bc3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17290
diff changeset
    74
78fd75347bc3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17290
diff changeset
    75
    [author:]
78fd75347bc3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17290
diff changeset
    76
        Jan Vrany <jan.vrany@fit.cvut.cz>
78fd75347bc3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17290
diff changeset
    77
78fd75347bc3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17290
diff changeset
    78
    [instance variables:]
78fd75347bc3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17290
diff changeset
    79
78fd75347bc3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17290
diff changeset
    80
    [class variables:]
78fd75347bc3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17290
diff changeset
    81
78fd75347bc3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17290
diff changeset
    82
    [see also:]
78fd75347bc3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17290
diff changeset
    83
78fd75347bc3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17290
diff changeset
    84
"
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
! !
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    87
!LintRuleDetail class methodsFor:'help specs'!
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    88
17898
f5f921c1e9c1 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 17657
diff changeset
    89
helpSpec
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    90
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    91
     by the UIHelpTool of ST/X."
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    92
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    93
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    94
     the UIHelpTool may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    95
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    96
    "
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    97
     UIHelpTool openOnClass:Tools::LintRuleDetail    
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    98
    "
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
    99
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   100
    <resource: #help>
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   101
17898
f5f921c1e9c1 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 17657
diff changeset
   102
    ^ super helpSpec addPairsFrom:#(
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   103
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   104
#ruleName
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   105
'Click to browse the lint rule'
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   106
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   107
)
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   108
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   109
    "Created: / 07-09-2011 / 04:08:11 / cg"
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   110
! !
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   111
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
!LintRuleDetail class methodsFor:'interface specs'!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
windowSpec
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
    "This resource specification was automatically generated
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
     by the UIPainter of ST/X."
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
    "Do not manually edit this!! If it is corrupted,
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
     the UIPainter may not be able to read the specification."
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
    "
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
     UIPainter new openOnClass:Tools::LintRuleDetail andSelector:#windowSpec
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
     Tools::LintRuleDetail new openInterface:#windowSpec
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
     Tools::LintRuleDetail open
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
    "
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
    <resource: #canvas>
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
10500
vrany
parents: 10480
diff changeset
   129
    ^ 
17976
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   130
    #(FullSpec
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   131
       name: windowSpec
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   132
       uuid: '632f51ca-06ca-11e8-8563-b8f6b1108e05'
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   133
       window: 
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   134
      (WindowSpec
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   135
         label: 'SmalllintRuleDetail'
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   136
         name: 'SmalllintRuleDetail'
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   137
         uuid: '632f54f4-06ca-11e8-8563-b8f6b1108e05'
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   138
         min: (Point 10 10)
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   139
         bounds: (Rectangle 0 0 560 300)
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   140
       )
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   141
       component: 
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   142
      (SpecCollection
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   143
         collection: (
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   144
          (VerticalPanelViewSpec
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   145
             name: 'Panel'
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   146
             layout: (LayoutFrame 0 0 0 0 0 1 0 1)
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   147
             uuid: '632f577e-06ca-11e8-8563-b8f6b1108e05'
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   148
             horizontalLayout: fit
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   149
             verticalLayout: topSpaceFit
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   150
             horizontalSpace: 0
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   151
             verticalSpace: 0
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   152
             ignoreInvisibleComponents: true
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   153
             component: 
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   154
            (SpecCollection
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   155
               collection: (
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   156
                (ViewSpec
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   157
                   name: 'Label'
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   158
                   uuid: '632f5968-06ca-11e8-8563-b8f6b1108e05'
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   159
                   visibilityChannel: false
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   160
                   component: 
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   161
                  (SpecCollection
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   162
                     collection: (
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   163
                      (LinkButtonSpec
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   164
                         name: 'Button1'
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   165
                         layout: (LayoutFrame 0 0 0 0 -150 1 30 0)
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   166
                         activeHelpKey: ruleName
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   167
                         uuid: '632f5a3a-06ca-11e8-8563-b8f6b1108e05'
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   168
                         translateLabel: true
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   169
                         labelChannel: ruleNameAspect
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   170
                         adjust: left
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   171
                         model: browseLintRule
10500
vrany
parents: 10480
diff changeset
   172
                       )
17976
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   173
                      (CheckBoxSpec
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   174
                         label: 'Show Rationale'
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   175
                         name: 'CheckBox1'
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   176
                         layout: (LayoutFrame -150 1 0 0 0 1 30 0)
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   177
                         uuid: '632f5ce2-06ca-11e8-8563-b8f6b1108e05'
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   178
                         model: rationaleVisibleHolder
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   179
                         translateLabel: true
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   180
                       )
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   181
                      )
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   182
                    
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   183
                   )
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   184
                   extent: (Point 560 30)
10500
vrany
parents: 10480
diff changeset
   185
                 )
17976
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   186
                (HTMLViewSpec
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   187
                   name: 'Rationale'
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   188
                   uuid: '632f5ea4-06ca-11e8-8563-b8f6b1108e05'
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   189
                   level: 0
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   190
                   visibilityChannel: rationaleVisibleHolder
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   191
                   hasHorizontalScrollBar: true
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   192
                   hasVerticalScrollBar: true
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   193
                   backgroundColor: (Color 87.0 87.0 87.0)
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   194
                   htmlText: ruleRationaleAspect
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   195
                   extent: (Point 560 270)
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   196
                   postBuildCallback: setupHTMLView:
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   197
                 )
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   198
                )
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   199
              
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   200
             )
10500
vrany
parents: 10480
diff changeset
   201
           )
17976
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   202
          )
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   203
        
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   204
       )
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   205
     )
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
! !
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
!LintRuleDetail class methodsFor:'plugIn spec'!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
aspectSelectors
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
    "This resource specification was automatically generated
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
     by the UIPainter of ST/X."
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
    "Do not manually edit this. If it is corrupted,
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
     the UIPainter may not be able to read the specification."
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
    "Return a description of exported aspects;
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
     these can be connected to aspects of an embedding application
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
     (if this app is embedded in a subCanvas)."
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
    ^ #(
10663
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   222
        #ruleHolder
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   223
        #ruleRationaleAspect
17976
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   224
        #selectedClassesHolder
14898
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   225
        #selectedMethodsHolder
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
      ).
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
! !
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   230
!LintRuleDetail methodsFor:'actions'!
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   231
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   232
browseLintRule
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   233
    |rule ruleClass sel|
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   234
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   235
    rule := self ruleHolder value.
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   236
    rule isNil ifTrue:[^ self].
17290
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   237
    
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   238
    ruleClass := rule class.
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   239
    (ruleClass implements:#rationale) ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   240
        sel := #rationale.
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   241
    ].
17657
26bce9240711 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17521
diff changeset
   242
    SystemBrowser default openInClass:ruleClass selector:sel
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   243
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   244
    "Created: / 07-09-2011 / 04:09:38 / cg"
17657
26bce9240711 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17521
diff changeset
   245
    "Modified: / 01-09-2017 / 14:22:47 / cg"
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   246
! !
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   247
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
!LintRuleDetail methodsFor:'aspects'!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   250
rationaleVisibleHolder
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   251
    "return/create the 'rationaleVisibleHolder' value holder (automatically generated)"
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   252
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   253
    rationaleVisibleHolder isNil ifTrue:[
11299
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   254
        rationaleVisibleHolder := ValueHolder with: true "false".
10500
vrany
parents: 10480
diff changeset
   255
        rationaleVisibleHolder addDependent:self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   256
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   257
    ^ rationaleVisibleHolder
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   258
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   259
    "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
   260
    "Modified: / 01-03-2012 / 08:50:20 / cg"
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   261
!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   262
17290
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   263
rationaleVisibleHolder:aValueHolder
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   264
    "set the 'rationaleVisibleHolder' value holder (automatically generated)"
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   265
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   266
    |oldValue newValue|
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   267
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   268
    rationaleVisibleHolder notNil ifTrue:[
10500
vrany
parents: 10480
diff changeset
   269
        oldValue := rationaleVisibleHolder value.
vrany
parents: 10480
diff changeset
   270
        rationaleVisibleHolder removeDependent:self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   271
    ].
17290
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   272
    rationaleVisibleHolder := aValueHolder.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   273
    rationaleVisibleHolder notNil ifTrue:[
10500
vrany
parents: 10480
diff changeset
   274
        rationaleVisibleHolder addDependent:self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   275
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   276
    newValue := rationaleVisibleHolder value.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   277
    oldValue ~~ newValue ifTrue:[
10500
vrany
parents: 10480
diff changeset
   278
        self update:#value with:newValue from:rationaleVisibleHolder.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   279
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   280
!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   281
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   282
ruleHolder
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   283
    "return/create the 'ruleHolder' value holder (automatically generated)"
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   284
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   285
    ruleHolder isNil ifTrue:[
11299
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   286
        ruleHolder := ValueHolder new.
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   287
    ].
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   288
    ^ ruleHolder
11299
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   289
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   290
    "Modified: / 01-03-2012 / 08:51:03 / cg"
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   291
!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   292
17290
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   293
ruleHolder:aValueHolder
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   294
    "set the 'ruleHolder' value holder (automatically generated)"
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   295
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   296
    |oldValue newValue|
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   297
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   298
    ruleHolder notNil ifTrue:[
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   299
        oldValue := ruleHolder value.
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   300
        ruleHolder removeDependent:self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   301
    ].
17290
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   302
    ruleHolder := aValueHolder.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   303
    ruleHolder notNil ifTrue:[
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   304
        ruleHolder addDependent:self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   305
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   306
    newValue := ruleHolder value.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   307
    oldValue ~~ newValue ifTrue:[
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   308
        self update:#value with:newValue from:ruleHolder.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   309
    ].
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   310
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   311
    "Modified: / 01-03-2012 / 15:29:30 / cg"
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   312
!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   313
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   314
ruleNameAspect
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   315
    <resource: #uiAspect>
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   316
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   317
    |holder|
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   318
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   319
    (holder := builder bindingAt:#ruleNameAspect) isNil ifTrue:[
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   320
        holder := BlockValue
10673
5e23775830ee changed: #ruleNameAspect
Claus Gittinger <cg@exept.de>
parents: 10672
diff changeset
   321
                    with:[:h | 
5e23775830ee changed: #ruleNameAspect
Claus Gittinger <cg@exept.de>
parents: 10672
diff changeset
   322
                        "/ h displayString , ' ' , (('[browse]' actionForAll:[ self browseLintRule]) colorizeAllWith:Color blue) 
16526
1510e5d4c2ad #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 15837
diff changeset
   323
                        (h ? '') displayString asActionLinkTo:[ self browseLintRule ] 
10673
5e23775830ee changed: #ruleNameAspect
Claus Gittinger <cg@exept.de>
parents: 10672
diff changeset
   324
                    ]
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   325
                    argument: self ruleHolder.
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   326
        builder aspectAt:#ruleNameAspect put:holder.
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   327
    ].
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   328
    ^ holder.
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   329
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   330
    "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
   331
    "Modified: / 01-03-2012 / 08:44:23 / cg"
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   332
!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   333
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   334
ruleRationaleAspect
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   335
    <resource: #uiAspect>
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   336
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   337
    |holder|
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   338
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   339
    (holder := builder bindingAt:#ruleRationaleAspect) isNil ifTrue:[
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   340
        "cannot use a BlockValue linked on the ruleHolder for the
17297
78fd75347bc3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17290
diff changeset
   341
         ruleRationaleAspect, because the ruleHolder might be changed dynamically
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   342
         via the aspect-linking mechanism"
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   343
"/        holder := (AspectAdaptor forAspect: #rationale) subjectChannel: self ruleHolder.
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   344
        holder := '' asValue.
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   345
        builder aspectAt:#ruleRationaleAspect put:holder.
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   346
    ].
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   347
    ^ holder.
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   348
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   349
    "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
   350
    "Modified: / 01-03-2012 / 15:29:16 / cg"
14898
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   351
!
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   352
17290
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   353
selectedClassesHolder
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   354
    "return/create the 'selectedClassesHolder' value holder (automatically generated)"
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   355
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   356
    selectedClassesHolder isNil ifTrue:[
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   357
        selectedClassesHolder := #() asValue.
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   358
        selectedClassesHolder addDependent:self.
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   359
    ].
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   360
    ^ selectedClassesHolder
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   361
!
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   362
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   363
selectedClassesHolder:aValueHolder
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   364
    "set the 'selectedClassesHolder' value holder (automatically generated)"
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   365
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   366
    |oldValue newValue|
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   367
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   368
    selectedClassesHolder notNil ifTrue:[
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   369
        oldValue := selectedClassesHolder value.
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   370
        selectedClassesHolder removeDependent:self.
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   371
    ].
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   372
    selectedClassesHolder := aValueHolder.
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   373
    selectedClassesHolder notNil ifTrue:[
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   374
        selectedClassesHolder addDependent:self.
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   375
    ].
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   376
    newValue := selectedClassesHolder value.
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   377
    oldValue ~= newValue ifTrue:[
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   378
        self update:#value with:newValue from:selectedClassesHolder.
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   379
    ].
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   380
!
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   381
14898
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   382
selectedMethodsHolder
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   383
    "return/create the 'selectedMethodsHolder' value holder (automatically generated)"
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   384
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   385
    selectedMethodsHolder isNil ifTrue:[
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   386
        selectedMethodsHolder := #() asValue.
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   387
        selectedMethodsHolder addDependent:self.
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   388
    ].
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   389
    ^ selectedMethodsHolder
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   390
!
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   391
17290
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   392
selectedMethodsHolder:aValueHolder
14898
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   393
    "set the 'selectedMethodsHolder' value holder (automatically generated)"
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   394
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   395
    |oldValue newValue|
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   396
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   397
    selectedMethodsHolder notNil ifTrue:[
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   398
        oldValue := selectedMethodsHolder value.
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   399
        selectedMethodsHolder removeDependent:self.
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   400
    ].
17290
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   401
    selectedMethodsHolder := aValueHolder.
14898
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   402
    selectedMethodsHolder notNil ifTrue:[
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   403
        selectedMethodsHolder addDependent:self.
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   404
    ].
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   405
    newValue := selectedMethodsHolder value.
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   406
    oldValue ~= newValue ifTrue:[
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   407
        self update:#value with:newValue from:selectedMethodsHolder.
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   408
    ].
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   409
! !
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   410
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   411
!LintRuleDetail methodsFor:'change & update'!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   412
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   413
update:something with:aParameter from:changedObject
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   414
    "Invoked when an object that I depend upon sends a change notification."
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   415
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   416
    changedObject == ruleHolder ifTrue:[
10500
vrany
parents: 10480
diff changeset
   417
        self updateVisibility.
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   418
        self updateRule.
10500
vrany
parents: 10480
diff changeset
   419
         ^ self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   420
    ].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   421
    changedObject == rationaleVisibleHolder ifTrue:[
10500
vrany
parents: 10480
diff changeset
   422
        self updateVisibility.
vrany
parents: 10480
diff changeset
   423
         ^ self.
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   424
    ].
14898
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   425
    changedObject == selectedMethodsHolder ifTrue:[
17290
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   426
        "/ cg: preparations to show method-specific text in rationale/detail view
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   427
        "/ Not yet done...
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   428
        self updateRule.
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   429
        ^ self 
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   430
    ].
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   431
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   432
    changedObject == selectedClassesHolder ifTrue:[
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   433
        "/ cg: preparations to show class-specific text in rationale/detail view
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   434
        "/ Not yet done...
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   435
        self updateRule.
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   436
        ^ self 
14898
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   437
    ].
c786afd145ce class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 13014
diff changeset
   438
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   439
    super update:something with:aParameter from:changedObject
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   440
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   441
    "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
   442
    "Modified: / 01-03-2012 / 15:27:38 / cg"
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   443
!
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   444
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   445
updateRule
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   446
    "cannot use a BlockValue linked on the ruleHolder for the
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   447
     ruleRationaleAspect, because the ruleHolder maight be changed dynamically
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   448
     via the aspect-linking mechanism"
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   449
17290
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   450
    |rule text|
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   451
17290
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   452
    text := ''.
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   453
    
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   454
    rule := self ruleHolder value.
17290
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   455
    rule notNil ifTrue:[
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   456
        selectedMethodsHolder value size == 1 ifTrue:[
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   457
            text := rule rationaleWithAnchorForMethod:(selectedMethodsHolder value first).
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   458
        ] ifFalse:[    
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   459
            selectedClassesHolder value size == 1 ifTrue:[
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   460
                text := rule rationaleWithAnchorForClass:(selectedClassesHolder value first).
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   461
            ] ifFalse:[    
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   462
                text := rule rationaleWithAnchor.
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   463
            ]
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   464
        ]    
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   465
    ].
17976
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   466
    rationalView selfInDoitExpressions:rule.
17290
ffe3a898f0a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16526
diff changeset
   467
    self ruleRationaleAspect value:text.
11306
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   468
64efae786a2c added: #updateRule
Claus Gittinger <cg@exept.de>
parents: 11299
diff changeset
   469
    "Created: / 01-03-2012 / 15:28:18 / cg"
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   470
!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   471
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   472
updateVisibility
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   473
10480
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
   474
    self ruleHolder value notNil
10663
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   475
        ifTrue:[self show]
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   476
        ifFalse:[self hide].
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   477
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   478
    "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
   479
    "Modified: / 04-09-2011 / 20:18:48 / cg"
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   480
! !
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   481
10500
vrany
parents: 10480
diff changeset
   482
!LintRuleDetail methodsFor:'initialization'!
vrany
parents: 10480
diff changeset
   483
vrany
parents: 10480
diff changeset
   484
setupHTMLView:aView
17976
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   485
    "callback, when htmlView shoing the rationale is created"
4051d93c0354 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17898
diff changeset
   486
10671
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   487
    rationalView := aView.
15837
95f2b67f68e8 class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 14898
diff changeset
   488
    rationalView linkActionPerformer:self.
10500
vrany
parents: 10480
diff changeset
   489
    aView painter
10671
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   490
        leftMargin:20;
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   491
        topMargin:5.
10500
vrany
parents: 10480
diff changeset
   492
vrany
parents: 10480
diff changeset
   493
    "Created: / 04-08-2011 / 18:00:36 / cg"
vrany
parents: 10480
diff changeset
   494
! !
vrany
parents: 10480
diff changeset
   495
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   496
!LintRuleDetail methodsFor:'private'!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   497
10671
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   498
heightWhenNotShowingRationale
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   499
    ^ 30
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   500
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   501
    "Created: / 07-09-2011 / 04:02:34 / cg"
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   502
!
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   503
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   504
heightWhenShowingRationale
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   505
    ^ 100
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   506
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   507
    "Created: / 07-09-2011 / 04:02:24 / cg"
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   508
!
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   509
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   510
hide
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   511
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   512
    self visibility: false height: 0
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   513
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   514
    "Created: / 11-03-2010 / 09:07:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   515
!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   516
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   517
show
10671
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   518
    self 
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   519
        visibility: true 
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   520
        height: (self rationaleVisibleHolder value 
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   521
                    ifTrue:[ self heightWhenShowingRationale ] 
cfa8293dbe9a class definition
Claus Gittinger <cg@exept.de>
parents: 10663
diff changeset
   522
                    ifFalse:[ self heightWhenNotShowingRationale ])
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   523
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   524
    "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
   525
    "Modified: / 07-09-2011 / 04:03:07 / cg"
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   526
!
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   527
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   528
visibility: visibility height: height
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   529
    | container list detail h |
10663
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   530
17521
e251ed5154bb #DOCUMENTATION by mawalch
mawalch
parents: 17297
diff changeset
   531
"/ cg: the whole container-container access chain below is ugly - use a name to access components.
11299
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   532
"/ 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
   533
"/ I disabled the whole visibility stuff.
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   534
^ self.
3e8397061396 fix: visibility switch and rationale did not work
Claus Gittinger <cg@exept.de>
parents: 10673
diff changeset
   535
10663
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   536
    (container := self window container) isNil ifTrue:[^self].
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   537
    h := visibility ifFalse:[0] ifTrue:[height].
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   538
10663
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   539
    container isVisible == visibility ifFalse: [
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   540
        container isVisible: visibility
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   541
    ].
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   542
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   543
    list := container container subViews first.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   544
    detail := container container subViews second.
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   545
10663
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   546
    (list layout bottomOffset ~= height negated) ifTrue:[
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   547
        list layout: (list layout bottomOffset: height negated; yourself)
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   548
    ].
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   549
    (detail layout topOffset ~= height negated) ifTrue:[
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   550
        detail layout: (detail layout topOffset: height negated; yourself)
32e84728c885 comment/format in: #updateVisibility
Claus Gittinger <cg@exept.de>
parents: 10500
diff changeset
   551
    ].
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   552
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   553
    "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
   554
    "Modified: / 01-03-2012 / 10:35:51 / cg"
17521
e251ed5154bb #DOCUMENTATION by mawalch
mawalch
parents: 17297
diff changeset
   555
    "Modified (format): / 29-05-2017 / 15:53:20 / mawalch"
10480
51d36cce6bbe oops - merge error
Claus Gittinger <cg@exept.de>
parents: 10473
diff changeset
   556
! !
10473
4201cd16dc0b Improvements in SmallLint UI
vrany
parents: 10456
diff changeset
   557
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   558
!LintRuleDetail class methodsFor:'documentation'!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   559
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   560
version
15837
95f2b67f68e8 class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 14898
diff changeset
   561
    ^ '$Header$'
10672
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   562
!
Claus Gittinger <cg@exept.de>
parents: 10671
diff changeset
   563
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   564
version_CVS
15837
95f2b67f68e8 class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 14898
diff changeset
   565
    ^ '$Header$'
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   566
!
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   567
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   568
version_SVN
15837
95f2b67f68e8 class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 14898
diff changeset
   569
    ^ '$Id$'
9999
34dc468e5d27 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   570
! !
13014
64e77f92badd class: Tools::LintRuleDetail
Claus Gittinger <cg@exept.de>
parents: 11314
diff changeset
   571