Tools__HierarchicalLintRuleList.st
author Claus Gittinger <cg@exept.de>
Mon, 20 Jan 2020 21:02:47 +0100
changeset 19422 c6ca1c3e0fd7
parent 17992 436e9dce9cbe
permissions -rw-r--r--
#REFACTORING by exept class: MultiViewToolApplication added: #askForFile:default:forSave:thenDo: changed: #askForFile:default:thenDo: #askForFile:thenDo: #menuSaveAllAs #menuSaveAs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17992
436e9dce9cbe #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 17362
diff changeset
     1
"{ Encoding: utf8 }"
436e9dce9cbe #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 17362
diff changeset
     2
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
"
10093
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
     4
 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
     5
 Copyright (c) 2009-2010 eXept Software AG
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
10093
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
     7
 Permission is hereby granted, free of charge, to any person
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
     8
 obtaining a copy of this software and associated documentation
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
     9
 files (the 'Software'), to deal in the Software without
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    10
 restriction, including without limitation the rights to use,
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    11
 copy, modify, merge, publish, distribute, sublicense, and/or sell
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    12
 copies of the Software, and to permit persons to whom the
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    13
 Software is furnished to do so, subject to the following
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    14
 conditions:
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    15
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    16
 The above copyright notice and this permission notice shall be
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    17
 included in all copies or substantial portions of the Software.
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    18
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    19
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    20
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    21
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    22
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    23
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    24
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    25
 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
    26
 OTHER DEALINGS IN THE SOFTWARE.
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
"
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
"{ Package: 'stx:libtool' }"
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
"{ NameSpace: Tools }"
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
LintRuleList subclass:#HierarchicalLintRuleList
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
	instanceVariableNames:''
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
	classVariableNames:''
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
	poolDictionaries:''
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
	category:'Interface-Lint'
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
!
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
!HierarchicalLintRuleList class methodsFor:'documentation'!
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
copyright
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
"
10093
fff6d14a5b19 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 10001
diff changeset
    43
 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
    44
 Copyright (c) 2009-2010 eXept Software AG
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
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   107
             emptyFieldReplacementText: 'Rule Search'
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
     )
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   126
! !
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
!HierarchicalLintRuleList class methodsFor:'plugIn spec'!
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
aspectSelectors
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   131
    "This resource specification was automatically generated
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   132
     by the UIPainter of ST/X."
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   133
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   134
    "Do not manually edit this. If it is corrupted,
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   135
     the UIPainter may not be able to read the specification."
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   136
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   137
    "Return a description of exported aspects;
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   138
     these can be connected to aspects of an embedding application
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   139
     (if this app is embedded in a subCanvas)."
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   140
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   141
    ^ #(
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   142
        #environmentHolder
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   143
        #inGeneratorHolder
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   144
        #listSelection
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   145
        #modeHolder
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   146
        #outGeneratorHolder
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   147
        #selectionHolder
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   148
      ).
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   149
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
! !
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
!HierarchicalLintRuleList methodsFor:'aspects'!
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
listHolder
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
    listHolder isNil ifTrue:[
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
        listHolder := (HierarchicalList new)
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
                    showRoot:false;
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
                    application:self;
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
                    yourself
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
    ].
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
    ^ listHolder
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
    "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
   164
! !
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
!HierarchicalLintRuleList methodsFor:'private'!
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
updateList
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
    |inGenerator filterS inRules root|
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
17992
436e9dce9cbe #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 17362
diff changeset
   171
    RBCompositeLintRule isNil ifTrue:[
436e9dce9cbe #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 17362
diff changeset
   172
        ^ self.
436e9dce9cbe #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 17362
diff changeset
   173
    ].
436e9dce9cbe #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 17362
diff changeset
   174
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
    inGenerator := self inGeneratorHolder value.
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
    filterS := self filterHolder value.
10457
c4aee64bfe37 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10093
diff changeset
   177
    filterS notEmptyOrNil ifTrue:[
c4aee64bfe37 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10093
diff changeset
   178
         (filterS startsWith: $*) ifFalse:[filterS := '*' , filterS].
c4aee64bfe37 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10093
diff changeset
   179
         (filterS endsWith:   $*) ifFalse:[filterS := filterS , '*']
c4aee64bfe37 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10093
diff changeset
   180
    ].
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
    (inGenerator isNil and: [self mode == #display])
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
        ifTrue:[inGenerator := RBCompositeLintRule allRules rules ].
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
    inRules := OrderedCollection new.
10457
c4aee64bfe37 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10093
diff changeset
   184
    filterS isEmptyOrNil 
11392
af48cca053c6 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10457
diff changeset
   185
        ifTrue:[
af48cca053c6 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10457
diff changeset
   186
            inGenerator do:[:rule | inRules add:rule ]]
af48cca053c6 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10457
diff changeset
   187
        ifFalse:[
af48cca053c6 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10457
diff changeset
   188
            inGenerator do:[:rule|
af48cca053c6 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10457
diff changeset
   189
                rule flattened do:[:each|
14668
2f6b48f6902a class: Tools::HierarchicalLintRuleList
Claus Gittinger <cg@exept.de>
parents: 14035
diff changeset
   190
                    ((each name matches: filterS caseSensitive: false) 
2f6b48f6902a class: Tools::HierarchicalLintRuleList
Claus Gittinger <cg@exept.de>
parents: 14035
diff changeset
   191
                    or:[ (each class name matches: filterS caseSensitive: false) ])
11392
af48cca053c6 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10457
diff changeset
   192
                        ifTrue: [inRules add: each]]]].
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
    root := (self 
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
                listEntryFor:(RBCompositeLintRule rules:inRules name:'Rules'))
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
                parent:self listHolder;
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
                expand;
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
                yourself.
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
    root children do:[:e | 
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
        e expand
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
    ].
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
    self listHolder root:root.
14854
f7adeb3685e7 class: Tools::HierarchicalLintRuleList
Claus Gittinger <cg@exept.de>
parents: 14668
diff changeset
   202
    self setListValid:true.
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
    "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
   205
    "Modified: / 16-04-2010 / 09:51:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
17362
5b99d2e2a8b9 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16590
diff changeset
   206
    "Modified: / 25-08-2010 / 11:56:39 / Jan Vrany"
11392
af48cca053c6 changed: #updateList
Claus Gittinger <cg@exept.de>
parents: 10457
diff changeset
   207
    "Modified: / 08-03-2012 / 03:11:19 / cg"
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
!HierarchicalLintRuleList class methodsFor:'documentation'!
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
version_CVS
16590
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   213
    ^ '$Header$'
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
!
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
version_SVN
16590
b8eb61d07ba6 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 14854
diff changeset
   217
    ^ '$Id$'
10001
f6cf395b6933 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
! !
13443
7533db07ff7a class: Tools::HierarchicalLintRuleList
Claus Gittinger <cg@exept.de>
parents: 11392
diff changeset
   219