Tools__FullMethodCategoryList.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 19 Jul 2017 09:42:32 +0200
branchjv
changeset 17619 edb119820fcb
parent 13530 2269bce1636d
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:
10006
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
12123
4bde08cebd48 trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10038
diff changeset
     2
 COPYRIGHT (c) 2004 by eXept Software AG
4bde08cebd48 trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10038
diff changeset
     3
              All Rights Reserved
10006
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
12123
4bde08cebd48 trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10038
diff changeset
     5
 This software is furnished under a license and may be used
4bde08cebd48 trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10038
diff changeset
     6
 only in accordance with the terms of that license and with the
4bde08cebd48 trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10038
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
4bde08cebd48 trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10038
diff changeset
     8
 be provided or otherwise made available to, or used by, any
4bde08cebd48 trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10038
diff changeset
     9
 other person.  No title to or ownership of the software is
4bde08cebd48 trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10038
diff changeset
    10
 hereby transferred.
10006
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
"
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
"{ Package: 'stx:libtool' }"
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
"{ NameSpace: Tools }"
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
MethodCategoryList subclass:#FullMethodCategoryList
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	instanceVariableNames:''
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	classVariableNames:''
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	poolDictionaries:''
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
	category:'Interface-Browsers-New'
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
!FullMethodCategoryList class methodsFor:'documentation'!
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
copyright
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
"
12123
4bde08cebd48 trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10038
diff changeset
    27
 COPYRIGHT (c) 2004 by eXept Software AG
4bde08cebd48 trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10038
diff changeset
    28
              All Rights Reserved
10006
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
12123
4bde08cebd48 trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10038
diff changeset
    30
 This software is furnished under a license and may be used
4bde08cebd48 trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10038
diff changeset
    31
 only in accordance with the terms of that license and with the
4bde08cebd48 trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10038
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
4bde08cebd48 trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10038
diff changeset
    33
 be provided or otherwise made available to, or used by, any
4bde08cebd48 trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10038
diff changeset
    34
 other person.  No title to or ownership of the software is
4bde08cebd48 trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10038
diff changeset
    35
 hereby transferred.
10006
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
"
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
!
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
documentation
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
"
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
    embeddable application displaying the classes as listed by
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
    the inputGenerator.
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
    Provides an outputGenerator, which enumerates the classes and
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
    their protocols (method-categories) in the selected classes.
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
    [author:]
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
	Claus Gittinger (cg@exept.de)
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
"
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
! !
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
!FullMethodCategoryList methodsFor:'generators'!
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
makeGenerator
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
    "return a generator which enumerates the methods from the selected protocol;
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
     that generator generates 4-element elements (includes the class and protocol), 
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
     in order to make the consumers only depend on one input 
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
     (i.e. to pass multiple-class and multiple-protocol info
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
      without a need for another classHolder/protocolHolder in the methodList)."
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
    ^ Iterator on:[:whatToDo |
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
                        |protocols all packages theProtocol|
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
                        protocols := self selectedProtocols value ? #().
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
                        all := protocols includes:(self class nameListEntryForALL).
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
                        packages := packageFilter value value.
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
                        protocols size > 0 ifTrue:[
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
                            protocols size == 1 ifTrue:[
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
                                theProtocol := protocols first.
13530
2269bce1636d Merged 4e89429bee91 and a713e18cbbdb (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12431
diff changeset
    73
                                environment allClassesDo:[:eachClass |
10006
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
                                    eachClass instAndClassSelectorsAndMethodsDo:[:sel :eachMethod |
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
                                        |cat|
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
                                        cat := eachMethod category.
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
                                        (all 
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
                                        or:[theProtocol = cat]) ifTrue:[
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
                                            (packages isNil
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
                                            or:[packages includes:eachMethod package])
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
                                            ifTrue:[
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
                                                whatToDo value:eachClass value:cat value:sel value:eachMethod.
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
                                            ].
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
                                        ].
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
                                    ].
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
                                ]
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
                            ] ifFalse:[
13530
2269bce1636d Merged 4e89429bee91 and a713e18cbbdb (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12431
diff changeset
    89
                                environment allClassesDo:[:eachClass |
10006
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
                                    eachClass instAndClassSelectorsAndMethodsDo:[:sel :eachMethod |
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
                                        |cat|
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
                                        cat := eachMethod category.
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
                                        (all 
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
                                        or:[protocols includes:cat]) ifTrue:[
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
                                            (packages isNil
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
                                            or:[packages includes:eachMethod package])
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
                                            ifTrue:[
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
                                                whatToDo value:eachClass value:cat value:sel value:eachMethod.
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
                                            ].
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
                                        ].
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
                                    ].
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
                                ]
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
                            ]
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
                        ]
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
                  ]
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
! !
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
!FullMethodCategoryList methodsFor:'private'!
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
listOfMethodCategories
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
    |categories|
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
    categories := Set new.
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
    categories addAll:MethodCategoryCache new allMethodCategories.    
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
    categories := categories asOrderedCollection sort.
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
    categories addFirst:(self class nameListEntryForALL).
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
    ^ categories
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
! !
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
!FullMethodCategoryList class methodsFor:'documentation'!
a2c0bba204fb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
12123
4bde08cebd48 trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10038
diff changeset
   125
version
13530
2269bce1636d Merged 4e89429bee91 and a713e18cbbdb (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12431
diff changeset
   126
    ^ '$Header: /cvs/stx/stx/libtool/Tools_FullMethodCategoryList.st,v 1.6 2013-09-05 10:46:11 vrany Exp $'
12128
a7ff7d66ee85 Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12125
diff changeset
   127
!
a7ff7d66ee85 Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12125
diff changeset
   128
12431
9f0c59c742d5 Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12314
diff changeset
   129
version_HG
9f0c59c742d5 Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12314
diff changeset
   130
9f0c59c742d5 Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12314
diff changeset
   131
    ^ '$Changeset: <not expanded> $'
9f0c59c742d5 Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12314
diff changeset
   132
!
9f0c59c742d5 Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12314
diff changeset
   133
12128
a7ff7d66ee85 Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12125
diff changeset
   134
version_SVN
12314
0cbf76168690 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12308
diff changeset
   135
    ^ '$Id: Tools__FullMethodCategoryList.st 8083 2013-01-14 11:48:37Z vranyj1 $'
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   136
! !
12431
9f0c59c742d5 Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12314
diff changeset
   137