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