Tools__HierarchicalLintRuleList.st
author Jan Vrany <jan.vrany@labware.com>
Wed, 05 Oct 2022 11:57:26 +0100
branchjv
changeset 19637 28f5bfaa093d
parent 19631 7351a219f202
permissions -rw-r--r--
`NewSystemBrowser`: avoid updating package info when changed class is not selected This speeds up loading of packages when browser is open as it does not (needlessly) update package info which may involve scm round-trip.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
10093
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
     2
 Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
     3
 Copyright (c) 2009-2010 eXept Software AG
19630
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
     4
 Copyright (c) 2022 LabWare
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
10093
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
     6
 Permission is hereby granted, free of charge, to any person
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
     7
 obtaining a copy of this software and associated documentation
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
     8
 files (the 'Software'), to deal in the Software without
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
     9
 restriction, including without limitation the rights to use,
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    10
 copy, modify, merge, publish, distribute, sublicense, and/or sell
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    11
 copies of the Software, and to permit persons to whom the
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    12
 Software is furnished to do so, subject to the following
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    13
 conditions:
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    14
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    15
 The above copyright notice and this permission notice shall be
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    16
 included in all copies or substantial portions of the Software.
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    17
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    18
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    19
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    20
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    21
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    22
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    23
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    24
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    25
 OTHER DEALINGS IN THE SOFTWARE.
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
"
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
"{ Package: 'stx:libtool' }"
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
"{ NameSpace: Tools }"
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
LintRuleList subclass:#HierarchicalLintRuleList
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
	instanceVariableNames:''
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
	classVariableNames:''
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
	poolDictionaries:''
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
	category:'Interface-Lint'
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
!
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
!HierarchicalLintRuleList class methodsFor:'documentation'!
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
copyright
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
"
10093
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    42
 Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    43
 Copyright (c) 2009-2010 eXept Software AG
19630
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
    44
 Copyright (c) 2022 LabWare
10093
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    45
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    46
 Permission is hereby granted, free of charge, to any person
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    47
 obtaining a copy of this software and associated documentation
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    48
 files (the 'Software'), to deal in the Software without
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    49
 restriction, including without limitation the rights to use,
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    50
 copy, modify, merge, publish, distribute, sublicense, and/or sell
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    51
 copies of the Software, and to permit persons to whom the
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    52
 Software is furnished to do so, subject to the following
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    53
 conditions:
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
10093
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    55
 The above copyright notice and this permission notice shall be
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    56
 included in all copies or substantial portions of the Software.
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    57
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    58
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    59
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    60
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    61
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    62
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    63
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    64
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    65
 OTHER DEALINGS IN THE SOFTWARE.
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
"
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
! !
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
!HierarchicalLintRuleList class methodsFor:'interface specs'!
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
windowSpec
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
    "This resource specification was automatically generated
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
     by the UIPainter of ST/X."
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
    "Do not manually edit this!! If it is corrupted,
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
     the UIPainter may not be able to read the specification."
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
    "
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
     UIPainter new openOnClass:Tools::HierarchicalLintRuleList andSelector:#windowSpec
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
     Tools::HierarchicalLintRuleList new openInterface:#windowSpec
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
     Tools::HierarchicalLintRuleList open
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
    "
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
    <resource: #canvas>
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
    ^ 
16590
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    87
    #(FullSpec
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    88
       name: windowSpec
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    89
       window: 
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    90
      (WindowSpec
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    91
         label: 'SmallLintRuleList'
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    92
         name: 'SmallLintRuleList'
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    93
         min: (Point 10 10)
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    94
         bounds: (Rectangle 0 0 300 300)
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    95
       )
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    96
       component: 
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    97
      (SpecCollection
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    98
         collection: (
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    99
          (InputFieldSpec
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   100
             name: 'RuleFilter'
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   101
             layout: (LayoutFrame 0 0 0 0 0 1 30 0)
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   102
             model: filterHolder
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   103
             immediateAccept: true
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   104
             acceptOnReturn: true
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   105
             acceptOnTab: true
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   106
             acceptOnPointerLeave: true
19630
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   107
             emptyFieldReplacementText: 'Search pattern, prefix with # to match rule tags'
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
           )
16590
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   109
          (HierarchicalListViewSpec
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   110
             name: 'RuleList'
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   111
             layout: (LayoutFrame 0 0 30 0 0 1 0 1)
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   112
             model: listSelection
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   113
             hasHorizontalScrollBar: true
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   114
             hasVerticalScrollBar: true
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   115
             listModel: listHolder
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   116
             useIndex: false
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   117
             highlightMode: line
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   118
             showLines: false
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   119
             useDefaultIcons: false
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   120
             postBuildCallback: postBuildList:
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   121
           )
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   122
          )
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   123
        
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   124
       )
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   125
     )
19630
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   126
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   127
    "Modified: / 26-07-2022 / 11:47:47 / Jan Vrany <jan.vrany@labware.com>"
16590
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   128
! !
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   129
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   130
!HierarchicalLintRuleList class methodsFor:'plugIn spec'!
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   131
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   132
aspectSelectors
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   133
    "This resource specification was automatically generated
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   134
     by the UIPainter of ST/X."
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   135
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   136
    "Do not manually edit this. If it is corrupted,
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   137
     the UIPainter may not be able to read the specification."
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   138
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   139
    "Return a description of exported aspects;
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   140
     these can be connected to aspects of an embedding application
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   141
     (if this app is embedded in a subCanvas)."
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   142
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   143
    ^ #(
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   144
        #environmentHolder
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   145
        #inGeneratorHolder
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   146
        #listSelection
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   147
        #modeHolder
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   148
        #outGeneratorHolder
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   149
        #selectionHolder
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   150
      ).
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   151
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
! !
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
!HierarchicalLintRuleList methodsFor:'aspects'!
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
listHolder
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
    listHolder isNil ifTrue:[
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
        listHolder := (HierarchicalList new)
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
                    showRoot:false;
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
                    application:self;
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
                    yourself
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
    ].
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
    ^ listHolder
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
    "Created: / 15-04-2010 / 20:32:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
! !
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
!HierarchicalLintRuleList methodsFor:'private'!
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
19630
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   170
updateListUsingFilter: filterBlockOrNil
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   171
    |inGenerator newList root|
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
    inGenerator := self inGeneratorHolder value.
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
    (inGenerator isNil and: [self mode == #display])
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
        ifTrue:[inGenerator := RBCompositeLintRule allRules rules ].
19630
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   176
    newList := OrderedCollection new.
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   177
    filterBlockOrNil isNil ifTrue:[
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   178
        inGenerator do:[:rule | newList add:rule ]
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   179
    ] ifFalse:[
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   180
        inGenerator do:[:rule|
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   181
            rule flattened do:[:each|
19631
7351a219f202 Oops, fix bug in Lint rules filtering introduced in commit fe29ed10a99d
Jan Vrany <jan.vrany@labware.com>
parents: 19630
diff changeset
   182
                (filterBlockOrNil value: each value: 2) ifTrue: [
19630
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   183
                    newList add: each
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   184
                ]
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   185
            ]
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   186
        ].
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   187
    ].
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
    root := (self 
19630
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   189
                listEntryFor:(RBCompositeLintRule rules:newList name:'Rules'))
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
                parent:self listHolder;
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
                expand;
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
                yourself.
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
    root children do:[:e | 
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
        e expand
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
    ].
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
    self listHolder root:root.
14854
f7adeb3685e7 class: Tools::HierarchicalLintRuleList
Claus Gittinger <cg@exept.de>
parents: 14668
diff changeset
   197
    self setListValid:true.
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
19630
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   199
    "Created: / 26-07-2022 / 11:45:09 / Jan Vrany <jan.vrany@labware.com>"
19631
7351a219f202 Oops, fix bug in Lint rules filtering introduced in commit fe29ed10a99d
Jan Vrany <jan.vrany@labware.com>
parents: 19630
diff changeset
   200
    "Modified: / 17-08-2022 / 12:07:20 / Jan Vrany <jan.vrany@labware.com>"
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
! !
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
!HierarchicalLintRuleList class methodsFor:'documentation'!
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
version_CVS
16590
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   206
    ^ '$Header$'
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
!
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
19630
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   209
version_HG
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   210
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   211
    ^ '$Changeset: <not expanded> $'
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   212
!
fe29ed10a99d Allow to filter using lint rule tags
Jan Vrany <jan.vrany@labware.com>
parents: 16596
diff changeset
   213
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
version_SVN
16590
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   215
    ^ '$Id$'
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
! !
13443
7533db07ff7a class: Tools::HierarchicalLintRuleList
Claus Gittinger <cg@exept.de>
parents: 11392
diff changeset
   217