author | Patrik Svestka <patrik.svestka@gmail.com> |
Tue, 09 Nov 2021 13:59:48 +0100 | |
branch | jv |
changeset 19618 | 76c562829409 |
parent 18532 | cccb41254edf |
permissions | -rw-r--r-- |
18532
cccb41254edf
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
12431
diff
changeset
|
1 |
"{ Encoding: utf8 }" |
cccb41254edf
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
12431
diff
changeset
|
2 |
|
9992 | 3 |
" |
10061 | 4 |
COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague |
5 |
All Rights Reserved |
|
9992 | 6 |
|
10061 | 7 |
Permission is hereby granted, free of charge, to any person |
8 |
obtaining a copy of this software and associated documentation |
|
9 |
files (the 'Software'), to deal in the Software without |
|
10 |
restriction, including without limitation the rights to use, |
|
11 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
12 |
copies of the Software, and to permit persons to whom the |
|
13 |
Software is furnished to do so, subject to the following |
|
14 |
conditions: |
|
15 |
||
16 |
The above copyright notice and this permission notice shall be |
|
17 |
included in all copies or substantial portions of the Software. |
|
18 |
||
19 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
20 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
21 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
22 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
23 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
24 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
25 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
26 |
OTHER DEALINGS IN THE SOFTWARE. |
|
9992 | 27 |
" |
28 |
"{ Package: 'stx:libtool' }" |
|
29 |
||
30 |
"{ NameSpace: Tools }" |
|
31 |
||
32 |
Object subclass:#ProfilerInfoBuilder |
|
33 |
instanceVariableNames:'packages percentageCutOff' |
|
34 |
classVariableNames:'' |
|
35 |
poolDictionaries:'' |
|
36 |
category:'Interface-Browsers-New-Profiler' |
|
37 |
! |
|
38 |
||
39 |
ProfilerInfoBuilder subclass:#MethodList |
|
40 |
instanceVariableNames:'methodsToInfoItems' |
|
41 |
classVariableNames:'' |
|
42 |
poolDictionaries:'' |
|
43 |
privateIn:ProfilerInfoBuilder |
|
44 |
! |
|
45 |
||
46 |
!ProfilerInfoBuilder class methodsFor:'documentation'! |
|
47 |
||
48 |
copyright |
|
49 |
" |
|
10061 | 50 |
COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague |
51 |
All Rights Reserved |
|
52 |
||
53 |
Permission is hereby granted, free of charge, to any person |
|
54 |
obtaining a copy of this software and associated documentation |
|
55 |
files (the 'Software'), to deal in the Software without |
|
56 |
restriction, including without limitation the rights to use, |
|
57 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
58 |
copies of the Software, and to permit persons to whom the |
|
59 |
Software is furnished to do so, subject to the following |
|
60 |
conditions: |
|
9992 | 61 |
|
10061 | 62 |
The above copyright notice and this permission notice shall be |
63 |
included in all copies or substantial portions of the Software. |
|
64 |
||
65 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
66 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
67 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
68 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
69 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
70 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
71 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
72 |
OTHER DEALINGS IN THE SOFTWARE. |
|
9992 | 73 |
" |
74 |
! ! |
|
75 |
||
76 |
!ProfilerInfoBuilder class methodsFor:'instance creation'! |
|
77 |
||
78 |
new |
|
79 |
^ self basicNew initialize. |
|
80 |
||
81 |
"Created: / 01-12-2007 / 22:46:19 / janfrog" |
|
82 |
! ! |
|
83 |
||
84 |
!ProfilerInfoBuilder methodsFor:'accessing'! |
|
85 |
||
86 |
items |
|
87 |
||
88 |
^self subclassResponsibility |
|
89 |
||
90 |
"Created: / 01-12-2007 / 23:40:07 / janfrog" |
|
91 |
! |
|
92 |
||
93 |
packages |
|
94 |
^ packages |
|
95 |
||
96 |
"Created: / 01-12-2007 / 22:45:27 / janfrog" |
|
97 |
! |
|
98 |
||
99 |
packages:something |
|
100 |
packages := something. |
|
101 |
||
102 |
"Created: / 01-12-2007 / 22:45:27 / janfrog" |
|
103 |
! |
|
104 |
||
105 |
percentageCutOff |
|
106 |
^ percentageCutOff ? 0 |
|
107 |
||
108 |
"Created: / 01-12-2007 / 22:45:27 / janfrog" |
|
109 |
! |
|
110 |
||
111 |
percentageCutOff:something |
|
112 |
percentageCutOff := something. |
|
113 |
||
114 |
"Created: / 01-12-2007 / 22:45:27 / janfrog" |
|
115 |
! ! |
|
116 |
||
117 |
!ProfilerInfoBuilder methodsFor:'initialization'! |
|
118 |
||
119 |
initialize |
|
120 |
"Invoked when a new instance is created." |
|
121 |
||
122 |
"/ please change as required (and remove this comment) |
|
123 |
"/ packages := nil. |
|
124 |
"/ percentageCutOff := nil. |
|
125 |
||
126 |
"/ super initialize. -- commented since inherited method does nothing |
|
127 |
||
128 |
"Created: / 01-12-2007 / 22:46:19 / janfrog" |
|
129 |
! ! |
|
130 |
||
131 |
!ProfilerInfoBuilder methodsFor:'testing'! |
|
132 |
||
133 |
isFiltered: profileTree |
|
134 |
||
135 |
profileTree totalTally < self percentageCutOff ifTrue:[^true]. |
|
136 |
packages ifNil:[^false]. |
|
137 |
^(packages includes: profileTree package) not |
|
138 |
||
139 |
"Created: / 01-12-2007 / 22:56:49 / janfrog" |
|
140 |
! ! |
|
141 |
||
142 |
!ProfilerInfoBuilder::MethodList class methodsFor:'documentation'! |
|
143 |
||
144 |
version |
|
12128
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12123
diff
changeset
|
145 |
^'$Id: Tools__ProfilerInfoBuilder.st 7854 2012-01-30 17:49:41Z vranyj1 $' |
9992 | 146 |
! ! |
147 |
||
148 |
!ProfilerInfoBuilder::MethodList methodsFor:'accessing'! |
|
149 |
||
150 |
items |
|
151 |
||
152 |
^methodsToInfoItems values asSortedCollection: |
|
153 |
[:a :b|a tally > b tally] |
|
154 |
||
155 |
"Created: / 01-12-2007 / 23:40:34 / janfrog" |
|
156 |
! ! |
|
157 |
||
158 |
!ProfilerInfoBuilder::MethodList methodsFor:'building'! |
|
159 |
||
160 |
build: profileTree |
|
161 |
||
162 |
(self isFiltered: profileTree) ifFalse: |
|
163 |
[(self itemForMethod: profileTree method) tallyAdd: profileTree leafTally]. |
|
164 |
profileTree called ifNotNil: |
|
165 |
[profileTree called do:[:e|self build:e]] |
|
166 |
||
167 |
"Created: / 01-12-2007 / 22:49:55 / janfrog" |
|
168 |
! ! |
|
169 |
||
170 |
!ProfilerInfoBuilder::MethodList methodsFor:'initialization'! |
|
171 |
||
172 |
initialize |
|
173 |
||
174 |
super initialize. |
|
175 |
methodsToInfoItems := Dictionary new |
|
176 |
||
177 |
"Modified: / 01-12-2007 / 22:48:43 / janfrog" |
|
178 |
! ! |
|
179 |
||
180 |
!ProfilerInfoBuilder::MethodList methodsFor:'private'! |
|
181 |
||
182 |
itemForMethod: method |
|
183 |
||
184 |
^methodsToInfoItems |
|
185 |
at: method |
|
186 |
ifAbsentPut:[ProfilerInfoItem new method: method] |
|
187 |
||
188 |
"Created: / 01-12-2007 / 22:52:35 / janfrog" |
|
189 |
! ! |
|
190 |
||
191 |
!ProfilerInfoBuilder class methodsFor:'documentation'! |
|
192 |
||
193 |
version_CVS |
|
18532
cccb41254edf
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
12431
diff
changeset
|
194 |
^ '§Header: /cvs/stx/stx/libtool/Tools__ProfilerInfoBuilder.st,v 1.2 2011/07/03 17:46:45 cg Exp §' |
9992 | 195 |
! |
196 |
||
12431
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12128
diff
changeset
|
197 |
version_HG |
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12128
diff
changeset
|
198 |
|
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12128
diff
changeset
|
199 |
^ '$Changeset: <not expanded> $' |
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12128
diff
changeset
|
200 |
! |
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12128
diff
changeset
|
201 |
|
9992 | 202 |
version_SVN |
12128
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12123
diff
changeset
|
203 |
^ '$Id: Tools__ProfilerInfoBuilder.st 7854 2012-01-30 17:49:41Z vranyj1 $' |
12431
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12128
diff
changeset
|
204 |
! ! |
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12128
diff
changeset
|
205 |