9969
|
1 |
"
|
10086
|
2 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague
|
|
3 |
Copyright (c) 2009-2010 eXept Software AG
|
9969
|
4 |
|
10086
|
5 |
Permission is hereby granted, free of charge, to any person
|
|
6 |
obtaining a copy of this software and associated documentation
|
|
7 |
files (the 'Software'), to deal in the Software without
|
|
8 |
restriction, including without limitation the rights to use,
|
|
9 |
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10 |
copies of the Software, and to permit persons to whom the
|
|
11 |
Software is furnished to do so, subject to the following
|
|
12 |
conditions:
|
|
13 |
|
|
14 |
The above copyright notice and this permission notice shall be
|
|
15 |
included in all copies or substantial portions of the Software.
|
|
16 |
|
|
17 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
18 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
19 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
20 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
21 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
22 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
23 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
24 |
OTHER DEALINGS IN THE SOFTWARE.
|
9969
|
25 |
"
|
|
26 |
"{ Package: 'stx:libtool' }"
|
|
27 |
|
|
28 |
BookmarkMenuBuilder subclass:#BookmarkAddMenuBuilder
|
|
29 |
instanceVariableNames:''
|
|
30 |
classVariableNames:''
|
|
31 |
poolDictionaries:''
|
|
32 |
category:'Interface-Bookmarks'
|
|
33 |
!
|
|
34 |
|
|
35 |
!BookmarkAddMenuBuilder class methodsFor:'documentation'!
|
|
36 |
|
|
37 |
copyright
|
|
38 |
"
|
10086
|
39 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague
|
|
40 |
Copyright (c) 2009-2010 eXept Software AG
|
|
41 |
|
|
42 |
Permission is hereby granted, free of charge, to any person
|
|
43 |
obtaining a copy of this software and associated documentation
|
|
44 |
files (the 'Software'), to deal in the Software without
|
|
45 |
restriction, including without limitation the rights to use,
|
|
46 |
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
47 |
copies of the Software, and to permit persons to whom the
|
|
48 |
Software is furnished to do so, subject to the following
|
|
49 |
conditions:
|
9969
|
50 |
|
10086
|
51 |
The above copyright notice and this permission notice shall be
|
|
52 |
included in all copies or substantial portions of the Software.
|
|
53 |
|
|
54 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
55 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
56 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
57 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
58 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
59 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
60 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
61 |
OTHER DEALINGS IN THE SOFTWARE.
|
9969
|
62 |
"
|
|
63 |
! !
|
|
64 |
|
|
65 |
!BookmarkAddMenuBuilder methodsFor:'visiting'!
|
|
66 |
|
|
67 |
visitBookmark:anObject
|
|
68 |
|
|
69 |
"Nothing to do"
|
|
70 |
|
|
71 |
"Created: / 02-06-2011 / 21:43:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
72 |
!
|
|
73 |
|
|
74 |
visitFolder:anObject
|
|
75 |
|
|
76 |
| addItem item submenu |
|
|
77 |
|
|
78 |
addItem := self menuItemAddBookmark: anObject.
|
|
79 |
|
|
80 |
anObject parent isNil
|
|
81 |
ifTrue:[
|
|
82 |
stack top addItem: addItem.
|
|
83 |
anObject children ? #() do: [:child|self visit: child].
|
|
84 |
] ifFalse:[
|
13437
|
85 |
item := MenuItem label: anObject label.
|
9969
|
86 |
stack top addItem: item.
|
|
87 |
submenu := Menu new.
|
|
88 |
item submenu: submenu.
|
|
89 |
stack push: submenu.
|
|
90 |
stack top addItem: addItem.
|
|
91 |
anObject children ? #() do: [:child|self visit: child].
|
|
92 |
stack pop
|
|
93 |
].
|
|
94 |
|
|
95 |
"Created: / 02-06-2011 / 21:50:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
96 |
"Modified: / 21-06-2011 / 08:00:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
97 |
!
|
|
98 |
|
|
99 |
visitSeparator:anObject
|
|
100 |
|
|
101 |
"Created: / 03-06-2011 / 17:12:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
102 |
! !
|
|
103 |
|
|
104 |
!BookmarkAddMenuBuilder class methodsFor:'documentation'!
|
|
105 |
|
|
106 |
version_CVS
|
13437
|
107 |
^ '$Header: /cvs/stx/stx/libtool/BookmarkAddMenuBuilder.st,v 1.3 2013-08-31 17:41:47 cg Exp $'
|
9969
|
108 |
!
|
|
109 |
|
|
110 |
version_SVN
|
13437
|
111 |
^ '$Id: BookmarkAddMenuBuilder.st,v 1.3 2013-08-31 17:41:47 cg Exp $'
|
9969
|
112 |
! !
|
13437
|
113 |
|