Tools__HierarchicalLintRuleList.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 19 Jul 2017 09:42:32 +0200
branchjv
changeset 17619 edb119820fcb
parent 16596 f111c3082dd1
child 19630 fe29ed10a99d
permissions -rw-r--r--
Issue #154: Set window style using `#beToolWindow` to indicate that the minirunner window is kind of support tool rather than some X11 specific code (which does not work on Windows of course) See https://swing.fit.cvut.cz/projects/stx-jv/ticket/154
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
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
10093
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
     5
 Permission is hereby granted, free of charge, to any person
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
     6
 obtaining a copy of this software and associated documentation
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
     7
 files (the 'Software'), to deal in the Software without
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
     8
 restriction, including without limitation the rights to use,
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
     9
 copy, modify, merge, publish, distribute, sublicense, and/or sell
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    10
 copies of the Software, and to permit persons to whom the
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    11
 Software is furnished to do so, subject to the following
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    12
 conditions:
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    13
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    14
 The above copyright notice and this permission notice shall be
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    15
 included in all copies or substantial portions of the Software.
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    16
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    17
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    18
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    19
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    20
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    21
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    22
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    23
 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
    24
 OTHER DEALINGS IN THE SOFTWARE.
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
"
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
"{ Package: 'stx:libtool' }"
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
"{ NameSpace: Tools }"
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
LintRuleList subclass:#HierarchicalLintRuleList
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
	instanceVariableNames:''
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
	classVariableNames:''
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
	poolDictionaries:''
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
	category:'Interface-Lint'
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
!
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
!HierarchicalLintRuleList class methodsFor:'documentation'!
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
copyright
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
"
10093
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    41
 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
    42
 Copyright (c) 2009-2010 eXept Software AG
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    43
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    44
 Permission is hereby granted, free of charge, to any person
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    45
 obtaining a copy of this software and associated documentation
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    46
 files (the 'Software'), to deal in the Software without
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    47
 restriction, including without limitation the rights to use,
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    48
 copy, modify, merge, publish, distribute, sublicense, and/or sell
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    49
 copies of the Software, and to permit persons to whom the
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    50
 Software is furnished to do so, subject to the following
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    51
 conditions:
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
10093
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    53
 The above copyright notice and this permission notice shall be
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    54
 included in all copies or substantial portions of the Software.
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    55
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    56
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    57
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    58
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    59
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    60
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    61
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    62
 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
    63
 OTHER DEALINGS IN THE SOFTWARE.
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
"
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
! !
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
!HierarchicalLintRuleList class methodsFor:'interface specs'!
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
windowSpec
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
    "This resource specification was automatically generated
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
     by the UIPainter of ST/X."
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
    "Do not manually edit this!! If it is corrupted,
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
     the UIPainter may not be able to read the specification."
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
    "
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
     UIPainter new openOnClass:Tools::HierarchicalLintRuleList andSelector:#windowSpec
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
     Tools::HierarchicalLintRuleList new openInterface:#windowSpec
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
     Tools::HierarchicalLintRuleList open
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
    "
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
    <resource: #canvas>
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
    ^ 
16590
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    85
    #(FullSpec
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    86
       name: windowSpec
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    87
       window: 
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    88
      (WindowSpec
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    89
         label: 'SmallLintRuleList'
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    90
         name: 'SmallLintRuleList'
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    91
         min: (Point 10 10)
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    92
         bounds: (Rectangle 0 0 300 300)
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    93
       )
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    94
       component: 
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    95
      (SpecCollection
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    96
         collection: (
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    97
          (InputFieldSpec
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    98
             name: 'RuleFilter'
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
    99
             layout: (LayoutFrame 0 0 0 0 0 1 30 0)
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   100
             model: filterHolder
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   101
             immediateAccept: true
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   102
             acceptOnReturn: true
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   103
             acceptOnTab: true
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   104
             acceptOnPointerLeave: true
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   105
             emptyFieldReplacementText: 'Rule Search'
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
           )
16590
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   107
          (HierarchicalListViewSpec
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   108
             name: 'RuleList'
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   109
             layout: (LayoutFrame 0 0 30 0 0 1 0 1)
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   110
             model: listSelection
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   111
             hasHorizontalScrollBar: true
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   112
             hasVerticalScrollBar: true
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   113
             listModel: listHolder
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   114
             useIndex: false
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   115
             highlightMode: line
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   116
             showLines: false
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   117
             useDefaultIcons: false
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   118
             postBuildCallback: postBuildList:
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   119
           )
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   120
          )
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
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   126
!HierarchicalLintRuleList class methodsFor:'plugIn spec'!
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   127
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   128
aspectSelectors
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   129
    "This resource specification was automatically generated
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   130
     by the UIPainter of ST/X."
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
    "Do not manually edit this. If it is corrupted,
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   133
     the UIPainter may not be able to read the specification."
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   134
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   135
    "Return a description of exported aspects;
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   136
     these can be connected to aspects of an embedding application
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   137
     (if this app is embedded in a subCanvas)."
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
    ^ #(
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   140
        #environmentHolder
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   141
        #inGeneratorHolder
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   142
        #listSelection
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   143
        #modeHolder
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   144
        #outGeneratorHolder
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   145
        #selectionHolder
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   146
      ).
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   147
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
! !
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
!HierarchicalLintRuleList methodsFor:'aspects'!
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
listHolder
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
    listHolder isNil ifTrue:[
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
        listHolder := (HierarchicalList new)
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
                    showRoot:false;
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
                    application:self;
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
                    yourself
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
    ].
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
    ^ listHolder
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
    "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
   162
! !
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
!HierarchicalLintRuleList methodsFor:'private'!
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
updateList
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
    |inGenerator filterS inRules root|
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
    inGenerator := self inGeneratorHolder value.
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
    filterS := self filterHolder value.
10457
c4aee64bfe37 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10093
diff changeset
   171
    filterS notEmptyOrNil ifTrue:[
c4aee64bfe37 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10093
diff changeset
   172
         (filterS startsWith: $*) ifFalse:[filterS := '*' , filterS].
c4aee64bfe37 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10093
diff changeset
   173
         (filterS endsWith:   $*) ifFalse:[filterS := filterS , '*']
c4aee64bfe37 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10093
diff changeset
   174
    ].
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
    (inGenerator isNil and: [self mode == #display])
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
        ifTrue:[inGenerator := RBCompositeLintRule allRules rules ].
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
    inRules := OrderedCollection new.
10457
c4aee64bfe37 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10093
diff changeset
   178
    filterS isEmptyOrNil 
11392
af48cca053c6 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10457
diff changeset
   179
        ifTrue:[
af48cca053c6 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10457
diff changeset
   180
            inGenerator do:[:rule | inRules add:rule ]]
af48cca053c6 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10457
diff changeset
   181
        ifFalse:[
af48cca053c6 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10457
diff changeset
   182
            inGenerator do:[:rule|
af48cca053c6 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10457
diff changeset
   183
                rule flattened do:[:each|
14668
2f6b48f6902a class: Tools::HierarchicalLintRuleList
Claus Gittinger <cg@exept.de>
parents: 14035
diff changeset
   184
                    ((each name matches: filterS caseSensitive: false) 
2f6b48f6902a class: Tools::HierarchicalLintRuleList
Claus Gittinger <cg@exept.de>
parents: 14035
diff changeset
   185
                    or:[ (each class name matches: filterS caseSensitive: false) ])
11392
af48cca053c6 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10457
diff changeset
   186
                        ifTrue: [inRules add: each]]]].
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
    root := (self 
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
                listEntryFor:(RBCompositeLintRule rules:inRules name:'Rules'))
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
                parent:self listHolder;
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
                expand;
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
                yourself.
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
    root children do:[:e | 
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
        e expand
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
    ].
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
    self listHolder root:root.
14854
f7adeb3685e7 class: Tools::HierarchicalLintRuleList
Claus Gittinger <cg@exept.de>
parents: 14668
diff changeset
   196
    self setListValid:true.
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
    "Created: / 15-04-2010 / 20:39:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
    "Modified: / 16-04-2010 / 09:51:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
    "Modified: / 25-08-2010 / 11:56:39 / Jan Vrany <enter your email here>"
11392
af48cca053c6 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10457
diff changeset
   201
    "Modified: / 08-03-2012 / 03:11:19 / cg"
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
! !
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
!HierarchicalLintRuleList class methodsFor:'documentation'!
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
version_CVS
16590
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   207
    ^ '$Header$'
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
!
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
version_SVN
16590
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   211
    ^ '$Id$'
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
! !
13443
7533db07ff7a class: Tools::HierarchicalLintRuleList
Claus Gittinger <cg@exept.de>
parents: 11392
diff changeset
   213