BookmarkVisitor.st
author Patrik Svestka <patrik.svestka@gmail.com>
Mon, 22 Nov 2021 12:32:59 +0100
branchjv
changeset 19621 1cb1e6ba9f20
parent 18532 cccb41254edf
permissions -rw-r--r--
Reject error in syntax highlighter when it is handled in e.g. tests
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
9966
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
"
10081
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
     4
 Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
     5
 Copyright (c) 2009-2010 eXept Software AG
9966
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
10081
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
     7
 Permission is hereby granted, free of charge, to any person
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
     8
 obtaining a copy of this software and associated documentation
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
     9
 files (the 'Software'), to deal in the Software without
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    10
 restriction, including without limitation the rights to use,
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    11
 copy, modify, merge, publish, distribute, sublicense, and/or sell
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    12
 copies of the Software, and to permit persons to whom the
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    13
 Software is furnished to do so, subject to the following
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    14
 conditions:
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    15
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    16
 The above copyright notice and this permission notice shall be
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    17
 included in all copies or substantial portions of the Software.
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    18
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    19
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    20
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    21
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    22
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    23
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    24
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    25
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    26
 OTHER DEALINGS IN THE SOFTWARE.
9966
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
"
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
"{ Package: 'stx:libtool' }"
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
Object subclass:#BookmarkVisitor
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
	instanceVariableNames:''
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
	classVariableNames:''
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
	poolDictionaries:''
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
	category:'Interface-Bookmarks'
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
!
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
!BookmarkVisitor class methodsFor:'documentation'!
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
copyright
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
"
10081
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    41
 Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    42
 Copyright (c) 2009-2010 eXept Software AG
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    43
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    44
 Permission is hereby granted, free of charge, to any person
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    45
 obtaining a copy of this software and associated documentation
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    46
 files (the 'Software'), to deal in the Software without
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    47
 restriction, including without limitation the rights to use,
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    48
 copy, modify, merge, publish, distribute, sublicense, and/or sell
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    49
 copies of the Software, and to permit persons to whom the
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    50
 Software is furnished to do so, subject to the following
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    51
 conditions:
9966
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
10081
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    53
 The above copyright notice and this permission notice shall be
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    54
 included in all copies or substantial portions of the Software.
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    55
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    56
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    57
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    58
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    59
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    60
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    61
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    62
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
bef38feae7ce copyright
Claus Gittinger <cg@exept.de>
parents: 9966
diff changeset
    63
 OTHER DEALINGS IN THE SOFTWARE.
9966
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
"
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
! !
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
!BookmarkVisitor methodsFor:'visiting'!
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
visit:anObject 
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
    "visit anObject (visitor pattern).
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
     The object should call back one of my visitXXXX methods."
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
    ^ anObject acceptVisitor:self
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
!
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
visitBookmark:anObject 
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
    self subclassResponsibility
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
    "Created: / 23-05-2011 / 10:41:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
!
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
visitBookmarkList:anObject 
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
    "dispatched back from the visited bookmarkList-object (visitor pattern)"
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
    "fall back to general object-case - please change as required"
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
    ^ self visit:anObject root
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
    "Modified: / 02-06-2011 / 21:53:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
!
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
visitClass:anObject 
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
    ^self visitBookmark: anObject
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
    "Modified: / 23-05-2011 / 10:41:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
!
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
visitFile:anObject 
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
    ^ self visitBookmark:anObject
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
!
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
visitFolder:anObject 
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
    ^self visitBookmark: anObject
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
    "Modified: / 23-05-2011 / 10:41:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
!
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
visitMethod:anObject 
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
    ^self visitBookmark: anObject
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
    "Modified: / 23-05-2011 / 10:42:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
!
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
visitRecent:anObject 
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
    ^ self visitFolder:anObject
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
!
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
visitSeparator:anObject 
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
    ^ self visitBookmark:anObject
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
!
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
visitURL:anObject 
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
    ^self visitBookmark: anObject
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
    "Created: / 16-06-2011 / 16:08:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
! !
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
!BookmarkVisitor class methodsFor:'documentation'!
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
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
   136
    ^ '§Header: /cvs/stx/stx/libtool/BookmarkVisitor.st,v 1.2 2011/07/03 18:00:43 cg Exp §'
9966
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
!
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
12431
9f0c59c742d5 Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12128
diff changeset
   139
version_HG
9f0c59c742d5 Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12128
diff changeset
   140
9f0c59c742d5 Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12128
diff changeset
   141
    ^ '$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
   142
!
9f0c59c742d5 Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12128
diff changeset
   143
9966
cd0e10ea0091 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
version_SVN
12128
a7ff7d66ee85 Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   145
    ^ '$Id: BookmarkVisitor.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
   146
! !
9f0c59c742d5 Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12128
diff changeset
   147