glimmer-dsl-swt 4.22.1.1 → 4.22.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (275) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/LICENSE.txt +1 -1
  4. data/README.md +15 -12
  5. data/RUBY_VERSION +1 -1
  6. data/VERSION +1 -1
  7. data/bin/girb +1 -1
  8. data/bin/girb_runner.rb +1 -1
  9. data/bin/glimmer +1 -1
  10. data/bin/glimmer-setup +1 -1
  11. data/docs/reference/GLIMMER_COMMAND.md +20 -6
  12. data/docs/reference/GLIMMER_CONFIGURATION.md +1 -1
  13. data/docs/reference/GLIMMER_GIRB.md +2 -2
  14. data/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md +646 -94
  15. data/docs/reference/GLIMMER_PACKAGING_AND_DISTRIBUTION.md +13 -32
  16. data/docs/reference/GLIMMER_SAMPLES.md +25 -9
  17. data/docs/reference/GLIMMER_STYLE_GUIDE.md +6 -0
  18. data/glimmer-dsl-swt.gemspec +0 -0
  19. data/lib/ext/glimmer/config.rb +1 -1
  20. data/lib/ext/glimmer.rb +4 -4
  21. data/lib/ext/rouge/themes/glimmer.rb +21 -0
  22. data/lib/glimmer/Rakefile +6 -6
  23. data/lib/glimmer/data_binding/list_selection_binding.rb +1 -1
  24. data/lib/glimmer/data_binding/observable_widget.rb +1 -1
  25. data/lib/glimmer/data_binding/table_items_binding.rb +1 -1
  26. data/lib/glimmer/data_binding/tree_items_binding.rb +1 -1
  27. data/lib/glimmer/data_binding/widget_binding.rb +1 -1
  28. data/lib/glimmer/dsl/swt/animation_expression.rb +1 -1
  29. data/lib/glimmer/dsl/swt/async_exec_expression.rb +1 -1
  30. data/lib/glimmer/dsl/swt/auto_exec_expression.rb +1 -1
  31. data/lib/glimmer/dsl/swt/bind_expression.rb +1 -1
  32. data/lib/glimmer/dsl/swt/block_property_expression.rb +1 -1
  33. data/lib/glimmer/dsl/swt/c_tab_item_expression.rb +1 -1
  34. data/lib/glimmer/dsl/swt/checkbox_group_selection_data_binding_expression.rb +1 -1
  35. data/lib/glimmer/dsl/swt/color_expression.rb +1 -1
  36. data/lib/glimmer/dsl/swt/column_properties_expression.rb +1 -1
  37. data/lib/glimmer/dsl/swt/combo_selection_data_binding_expression.rb +1 -1
  38. data/lib/glimmer/dsl/swt/cursor_expression.rb +1 -1
  39. data/lib/glimmer/dsl/swt/custom_shape_expression.rb +1 -1
  40. data/lib/glimmer/dsl/swt/custom_widget_expression.rb +1 -1
  41. data/lib/glimmer/dsl/swt/data_binding_expression.rb +1 -1
  42. data/lib/glimmer/dsl/swt/dialog_expression.rb +1 -1
  43. data/lib/glimmer/dsl/swt/display_expression.rb +1 -1
  44. data/lib/glimmer/dsl/swt/dnd_expression.rb +1 -1
  45. data/lib/glimmer/dsl/swt/dsl.rb +2 -2
  46. data/lib/glimmer/dsl/swt/exec_expression.rb +2 -3
  47. data/lib/glimmer/dsl/swt/expand_item_expression.rb +1 -1
  48. data/lib/glimmer/dsl/swt/font_expression.rb +1 -1
  49. data/lib/glimmer/dsl/swt/image_expression.rb +1 -1
  50. data/lib/glimmer/dsl/swt/layout_data_expression.rb +1 -1
  51. data/lib/glimmer/dsl/swt/layout_expression.rb +1 -1
  52. data/lib/glimmer/dsl/swt/list_selection_data_binding_expression.rb +1 -1
  53. data/lib/glimmer/dsl/swt/listener_expression.rb +1 -1
  54. data/lib/glimmer/dsl/swt/menu_bar_expression.rb +1 -1
  55. data/lib/glimmer/dsl/swt/menu_expression.rb +1 -1
  56. data/lib/glimmer/dsl/swt/message_box_expression.rb +1 -1
  57. data/lib/glimmer/dsl/swt/multiply_expression.rb +1 -1
  58. data/lib/glimmer/dsl/swt/observe_expression.rb +1 -1
  59. data/lib/glimmer/dsl/swt/pixel_expression.rb +1 -1
  60. data/lib/glimmer/dsl/swt/property_expression.rb +1 -1
  61. data/lib/glimmer/dsl/swt/radio_group_selection_data_binding_expression.rb +1 -1
  62. data/lib/glimmer/dsl/swt/rgb_expression.rb +1 -1
  63. data/lib/glimmer/dsl/swt/rgba_expression.rb +1 -1
  64. data/lib/glimmer/dsl/swt/shape_expression.rb +2 -1
  65. data/lib/glimmer/dsl/swt/shell_expression.rb +1 -1
  66. data/lib/glimmer/dsl/swt/shine_data_binding_expression.rb +4 -9
  67. data/lib/glimmer/dsl/swt/swt_expression.rb +1 -1
  68. data/lib/glimmer/dsl/swt/sync_call_expression.rb +1 -1
  69. data/lib/glimmer/dsl/swt/sync_exec_expression.rb +1 -1
  70. data/lib/glimmer/dsl/swt/tab_item_expression.rb +1 -1
  71. data/lib/glimmer/dsl/swt/table_items_data_binding_expression.rb +1 -1
  72. data/lib/glimmer/dsl/swt/timer_exec_expression.rb +1 -1
  73. data/lib/glimmer/dsl/swt/transform_expression.rb +1 -1
  74. data/lib/glimmer/dsl/swt/tray_expression.rb +1 -1
  75. data/lib/glimmer/dsl/swt/tray_item_expression.rb +1 -1
  76. data/lib/glimmer/dsl/swt/tree_items_data_binding_expression.rb +1 -1
  77. data/lib/glimmer/dsl/swt/tree_properties_expression.rb +1 -1
  78. data/lib/glimmer/dsl/swt/widget_expression.rb +1 -1
  79. data/lib/glimmer/launcher.rb +2 -2
  80. data/lib/glimmer/rake_task/list.rb +1 -1
  81. data/lib/glimmer/rake_task/package.rb +1 -1
  82. data/lib/glimmer/rake_task/scaffold.rb +2 -3
  83. data/lib/glimmer/rake_task.rb +1 -1
  84. data/lib/glimmer/swt/c_tab_item_proxy.rb +1 -1
  85. data/lib/glimmer/swt/color_proxy.rb +1 -1
  86. data/lib/glimmer/swt/combo_proxy.rb +1 -1
  87. data/lib/glimmer/swt/cursor_proxy.rb +1 -1
  88. data/lib/glimmer/swt/custom/animation.rb +1 -1
  89. data/lib/glimmer/swt/custom/checkbox_group.rb +1 -1
  90. data/lib/glimmer/swt/custom/code_text.rb +1 -1
  91. data/lib/glimmer/swt/custom/drawable.rb +1 -1
  92. data/lib/glimmer/swt/custom/radio_group.rb +1 -1
  93. data/lib/glimmer/swt/custom/shape/arc.rb +1 -1
  94. data/lib/glimmer/swt/custom/shape/cubic.rb +1 -1
  95. data/lib/glimmer/swt/custom/shape/focus.rb +1 -1
  96. data/lib/glimmer/swt/custom/shape/image.rb +1 -1
  97. data/lib/glimmer/swt/custom/shape/line.rb +1 -1
  98. data/lib/glimmer/swt/custom/shape/oval.rb +1 -1
  99. data/lib/glimmer/swt/custom/shape/path.rb +1 -1
  100. data/lib/glimmer/swt/custom/shape/path_segment.rb +1 -1
  101. data/lib/glimmer/swt/custom/shape/point.rb +1 -1
  102. data/lib/glimmer/swt/custom/shape/polygon.rb +1 -1
  103. data/lib/glimmer/swt/custom/shape/polyline.rb +1 -1
  104. data/lib/glimmer/swt/custom/shape/quad.rb +1 -1
  105. data/lib/glimmer/swt/custom/shape/rectangle.rb +1 -1
  106. data/lib/glimmer/swt/custom/shape/text.rb +1 -1
  107. data/lib/glimmer/swt/custom/shape.rb +2 -1
  108. data/lib/glimmer/swt/date_time_proxy.rb +1 -1
  109. data/lib/glimmer/swt/dialog_proxy.rb +1 -1
  110. data/lib/glimmer/swt/display_proxy.rb +1 -1
  111. data/lib/glimmer/swt/dnd_proxy.rb +1 -1
  112. data/lib/glimmer/swt/expand_item_proxy.rb +1 -1
  113. data/lib/glimmer/swt/font_proxy.rb +1 -1
  114. data/lib/glimmer/swt/image_proxy.rb +1 -1
  115. data/lib/glimmer/swt/layout_data_proxy.rb +1 -1
  116. data/lib/glimmer/swt/layout_proxy.rb +1 -1
  117. data/lib/glimmer/swt/menu_proxy.rb +1 -1
  118. data/lib/glimmer/swt/message_box_proxy.rb +1 -1
  119. data/lib/glimmer/swt/packages.rb +1 -1
  120. data/lib/glimmer/swt/properties.rb +1 -1
  121. data/lib/glimmer/swt/proxy_properties.rb +1 -1
  122. data/lib/glimmer/swt/sash_form_proxy.rb +1 -1
  123. data/lib/glimmer/swt/scrolled_composite_proxy.rb +1 -1
  124. data/lib/glimmer/swt/shape_listener_proxy.rb +1 -1
  125. data/lib/glimmer/swt/shell_proxy.rb +2 -1
  126. data/lib/glimmer/swt/style_constantizable.rb +1 -1
  127. data/lib/glimmer/swt/styled_text_proxy.rb +1 -1
  128. data/lib/glimmer/swt/swt_proxy.rb +1 -1
  129. data/lib/glimmer/swt/tab_folder_proxy.rb +1 -1
  130. data/lib/glimmer/swt/tab_item_proxy.rb +1 -1
  131. data/lib/glimmer/swt/table_column_proxy.rb +1 -1
  132. data/lib/glimmer/swt/table_proxy.rb +1 -1
  133. data/lib/glimmer/swt/tool_bar_proxy.rb +1 -1
  134. data/lib/glimmer/swt/transform_proxy.rb +1 -1
  135. data/lib/glimmer/swt/tray_item_proxy.rb +1 -1
  136. data/lib/glimmer/swt/tray_proxy.rb +1 -1
  137. data/lib/glimmer/swt/tree_proxy.rb +1 -1
  138. data/lib/glimmer/swt/widget_listener_proxy.rb +1 -1
  139. data/lib/glimmer/swt/widget_proxy.rb +1 -1
  140. data/lib/glimmer/ui/custom_shape.rb +1 -1
  141. data/lib/glimmer/ui/custom_shell.rb +1 -1
  142. data/lib/glimmer/ui/custom_widget.rb +1 -1
  143. data/lib/glimmer/ui.rb +21 -0
  144. data/lib/glimmer/util/proc_tracker.rb +4 -4
  145. data/lib/glimmer-dsl-swt.rb +1 -1
  146. data/samples/elaborate/battleship/model/cell.rb +1 -1
  147. data/samples/elaborate/battleship/model/game.rb +1 -1
  148. data/samples/elaborate/battleship/model/grid.rb +1 -1
  149. data/samples/elaborate/battleship/model/ship.rb +1 -1
  150. data/samples/elaborate/battleship/model/ship_collection.rb +1 -1
  151. data/samples/elaborate/battleship/view/action_panel.rb +1 -1
  152. data/samples/elaborate/battleship/view/cell.rb +1 -1
  153. data/samples/elaborate/battleship/view/grid.rb +1 -1
  154. data/samples/elaborate/battleship/view/ship.rb +1 -1
  155. data/samples/elaborate/battleship/view/ship_collection.rb +1 -1
  156. data/samples/elaborate/battleship.rb +1 -1
  157. data/samples/elaborate/calculator.rb +1 -1
  158. data/samples/elaborate/clock.rb +1 -1
  159. data/samples/elaborate/connect4/model/grid.rb +1 -1
  160. data/samples/elaborate/connect4/model/slot.rb +1 -1
  161. data/samples/elaborate/connect4.rb +1 -1
  162. data/samples/elaborate/contact_manager/contact.rb +1 -1
  163. data/samples/elaborate/contact_manager/contact_manager_presenter.rb +1 -1
  164. data/samples/elaborate/contact_manager/contact_repository.rb +1 -1
  165. data/samples/elaborate/contact_manager.rb +1 -1
  166. data/samples/elaborate/game_of_life/model/cell.rb +1 -1
  167. data/samples/elaborate/game_of_life/model/grid.rb +1 -1
  168. data/samples/elaborate/game_of_life.rb +1 -1
  169. data/samples/elaborate/login.rb +1 -1
  170. data/samples/elaborate/mandelbrot_fractal.rb +1 -1
  171. data/samples/elaborate/meta_sample.rb +1 -1
  172. data/samples/elaborate/metronome.rb +1 -1
  173. data/samples/elaborate/parking/model/parking_floor.rb +1 -1
  174. data/samples/elaborate/parking/model/parking_presenter.rb +1 -1
  175. data/samples/elaborate/parking/model/parking_spot.rb +1 -1
  176. data/samples/elaborate/parking.rb +1 -1
  177. data/samples/elaborate/quarto/model/game.rb +1 -1
  178. data/samples/elaborate/quarto/model/piece/cube.rb +1 -1
  179. data/samples/elaborate/quarto/model/piece/cylinder.rb +1 -1
  180. data/samples/elaborate/quarto/model/piece.rb +1 -1
  181. data/samples/elaborate/quarto/view/available_pieces_area.rb +1 -1
  182. data/samples/elaborate/quarto/view/board.rb +1 -1
  183. data/samples/elaborate/quarto/view/cell.rb +1 -1
  184. data/samples/elaborate/quarto/view/cube.rb +1 -1
  185. data/samples/elaborate/quarto/view/cylinder.rb +1 -1
  186. data/samples/elaborate/quarto/view/message_box_panel.rb +1 -1
  187. data/samples/elaborate/quarto/view/piece.rb +1 -1
  188. data/samples/elaborate/quarto/view/selected_piece_area.rb +1 -1
  189. data/samples/elaborate/quarto.rb +1 -3
  190. data/samples/elaborate/snake/model/apple.rb +33 -0
  191. data/samples/elaborate/snake/model/game.rb +68 -0
  192. data/samples/elaborate/snake/model/snake.rb +95 -0
  193. data/samples/elaborate/snake/model/vertebra.rb +22 -0
  194. data/samples/elaborate/snake/presenter/cell.rb +27 -0
  195. data/samples/elaborate/snake/presenter/grid.rb +49 -0
  196. data/samples/elaborate/snake.rb +103 -0
  197. data/samples/elaborate/stock_ticker.rb +1 -1
  198. data/samples/elaborate/tetris/model/block.rb +1 -1
  199. data/samples/elaborate/tetris/model/game.rb +1 -1
  200. data/samples/elaborate/tetris/model/past_game.rb +1 -1
  201. data/samples/elaborate/tetris/model/tetromino.rb +1 -1
  202. data/samples/elaborate/tetris/view/bevel.rb +1 -1
  203. data/samples/elaborate/tetris/view/block.rb +1 -1
  204. data/samples/elaborate/tetris/view/high_score_dialog.rb +1 -1
  205. data/samples/elaborate/tetris/view/playfield.rb +1 -1
  206. data/samples/elaborate/tetris/view/score_lane.rb +1 -1
  207. data/samples/elaborate/tetris/view/tetris_menu_bar.rb +1 -1
  208. data/samples/elaborate/tetris.rb +8 -8
  209. data/samples/elaborate/tic_tac_toe/board.rb +1 -1
  210. data/samples/elaborate/tic_tac_toe/cell.rb +1 -1
  211. data/samples/elaborate/tic_tac_toe.rb +1 -1
  212. data/samples/elaborate/timer.rb +1 -1
  213. data/samples/elaborate/user_profile.rb +1 -1
  214. data/samples/elaborate/weather.rb +1 -1
  215. data/samples/hello/hello_arrow.rb +1 -1
  216. data/samples/hello/hello_browser.rb +1 -1
  217. data/samples/hello/hello_button.rb +1 -1
  218. data/samples/hello/hello_c_combo.rb +1 -1
  219. data/samples/hello/hello_c_tab.rb +1 -1
  220. data/samples/hello/hello_canvas.rb +1 -1
  221. data/samples/hello/hello_canvas_animation.rb +1 -1
  222. data/samples/hello/hello_canvas_animation_multi.rb +1 -1
  223. data/samples/hello/hello_canvas_data_binding.rb +8 -8
  224. data/samples/hello/hello_canvas_path.rb +1 -1
  225. data/samples/hello/hello_canvas_shape_listeners.rb +1 -1
  226. data/samples/hello/hello_checkbox.rb +1 -1
  227. data/samples/hello/hello_checkbox_group.rb +1 -1
  228. data/samples/hello/hello_code_text.rb +1 -1
  229. data/samples/hello/hello_color_dialog.rb +1 -1
  230. data/samples/hello/hello_combo.rb +1 -1
  231. data/samples/hello/hello_composite.rb +1 -1
  232. data/samples/hello/hello_computed.rb +1 -1
  233. data/samples/hello/hello_cool_bar.rb +1 -1
  234. data/samples/hello/hello_cursor.rb +1 -1
  235. data/samples/hello/hello_custom_shape.rb +1 -1
  236. data/samples/hello/hello_custom_shell.rb +1 -1
  237. data/samples/hello/hello_custom_widget.rb +1 -1
  238. data/samples/hello/hello_date_time.rb +1 -1
  239. data/samples/hello/hello_dialog.rb +1 -1
  240. data/samples/hello/hello_directory_dialog.rb +1 -1
  241. data/samples/hello/hello_drag_and_drop.rb +1 -1
  242. data/samples/hello/hello_expand_bar.rb +1 -1
  243. data/samples/hello/hello_file_dialog.rb +1 -1
  244. data/samples/hello/hello_font_dialog.rb +1 -1
  245. data/samples/hello/hello_group.rb +1 -1
  246. data/samples/hello/hello_label.rb +1 -1
  247. data/samples/hello/hello_layout.rb +1 -1
  248. data/samples/hello/hello_link.rb +1 -1
  249. data/samples/hello/hello_list_multi_selection.rb +1 -1
  250. data/samples/hello/hello_list_single_selection.rb +1 -1
  251. data/samples/hello/hello_menu_bar.rb +1 -1
  252. data/samples/hello/hello_message_box.rb +1 -1
  253. data/samples/hello/hello_pop_up_context_menu.rb +1 -1
  254. data/samples/hello/hello_print.rb +1 -1
  255. data/samples/hello/hello_print_dialog.rb +1 -1
  256. data/samples/hello/hello_progress_bar.rb +1 -1
  257. data/samples/hello/hello_radio.rb +1 -1
  258. data/samples/hello/hello_radio_group.rb +1 -1
  259. data/samples/hello/hello_sash_form.rb +1 -1
  260. data/samples/hello/hello_scale.rb +1 -1
  261. data/samples/hello/hello_scrolled_composite.rb +1 -1
  262. data/samples/hello/hello_shape.rb +1 -1
  263. data/samples/hello/hello_shell.rb +1 -1
  264. data/samples/hello/hello_slider.rb +1 -1
  265. data/samples/hello/hello_spinner.rb +1 -1
  266. data/samples/hello/hello_styled_text.rb +1 -1
  267. data/samples/hello/hello_tab.rb +1 -1
  268. data/samples/hello/hello_table.rb +1 -1
  269. data/samples/hello/hello_text.rb +1 -1
  270. data/samples/hello/hello_toggle.rb +1 -1
  271. data/samples/hello/hello_tool_bar.rb +1 -1
  272. data/samples/hello/hello_tray_item.rb +1 -1
  273. data/samples/hello/hello_tree.rb +1 -1
  274. data/samples/hello/hello_world.rb +1 -1
  275. metadata +27 -33
@@ -171,7 +171,7 @@ Afterwards, you may add signing arguments to `jpackage` via `Glimmer::RakeTask::
171
171
 
172
172
  ### Packaging Gotchas
173
173
 
174
- 1. Zsh (Z Shell)
174
+ 1- Zsh (Z Shell)
175
175
 
176
176
  Currently, `Glimmer::RakeTask::Package.jpackage_extra_args` is only honored when packaging from bash, not zsh.
177
177
 
@@ -181,32 +181,7 @@ You can get around that in zsh by running glimmer package commands with `bash -c
181
181
  bash -c 'source ~/.glimmer_source; glimmer package'
182
182
  ```
183
183
 
184
- 2. unsupported Java version "16", defaulting to 1.7
185
-
186
- If you get this error while packaging:
187
-
188
- ```
189
- unsupported Java version "16", defaulting to 1.7
190
- [ERROR] Internal error: org.jruby.exceptions.RaiseException: (LoadError) library `java' could not be loaded: java.lang.reflect.InaccessibleObjectException: Unable to make protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException accessible: module java.base does not "opens java.lang" to unnamed module @138caeca -> [Help 1]
191
- org.apache.maven.InternalErrorException: Internal error: org.jruby.exceptions.RaiseException: (LoadError) library `java' could not be loaded: java.lang.reflect.InaccessibleObjectException: Unable to make protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException accessible: module java.base does not "opens java.lang" to unnamed module @138caeca
192
- at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:121)
193
- at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
194
- at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
195
- at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
196
- at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
197
- at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
198
- at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
199
- at java.base/java.lang.reflect.Method.invoke(Method.java:567)
200
- at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
201
- at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
202
- at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
203
- at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
204
- Caused by: org.jruby.exceptions.RaiseException: (LoadError) library `java' could not be loaded: java.lang.reflect.InaccessibleObjectException: Unable to make protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException accessible: module java.base does not "opens java.lang" to unnamed module @138caeca
205
- [ERROR]
206
- [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
207
- ```
208
-
209
- 3. jpackage missing from PATH on the Mac
184
+ 2- jpackage missing from PATH on the Mac
210
185
 
211
186
  On the Mac, the latest JDK 16 installable DMG/PKG is resulting in `jpackage` to be missing from `PATH`. To include, you might need to add `export PATH="/Library/Java/JavaVirtualMachines/jdk-16.0.2.jdk/Contents/Home/bin:$PATH"` to `~/.zprofile` or `~/.bashrc`
212
187
  ```
@@ -218,7 +193,7 @@ On the Mac, the latest JDK 16 installable DMG/PKG is resulting in `jpackage` to
218
193
 
219
194
  Please ignore. It should be harmless. If you get blocked by it for any reason, please open an Issue about it.
220
195
 
221
- 4. Java on Windows System PATH
196
+ 3- Java on Windows System PATH
222
197
 
223
198
  If you get any errors running Java on Windows, keep in mind that you need to have the Java binaries "C:\Program Files\Java\jdk-16.0.2\bin" on the Windows System PATH environment variable.
224
199
 
@@ -229,7 +204,7 @@ Simply replace it with the simple path mentioned above (`"C:\Program Files\Java\
229
204
 
230
205
  Lastly, reinstall JRuby to ensure it is using Java from the right path.
231
206
 
232
- 5. File paths in app running from packaged JAR file
207
+ 4- File paths in app running from packaged JAR file
233
208
 
234
209
  Glimmer packaged apps always reside within a JAR file before being wrapped by a native executable.
235
210
 
@@ -242,16 +217,22 @@ file_path = file_path.sub(/^uri\:classloader\:/, '').sub(/^\/+/, '')
242
217
  jcl = JRuby.runtime.jruby_class_loader
243
218
  resource = jcl.get_resource_as_stream(file_path)
244
219
  file_input_stream = resource.to_io.to_input_stream
245
- ```
220
+ ```
246
221
 
247
222
  The `image` keyword in Glimmer automatically does that work when passing an image path produced from inside a JAR file.
248
223
 
249
- 6. NAME.app is damaged and can't be opened. You should move it to the trash
224
+ 5- NAME.app is damaged and can't be opened. You should move it to the trash
250
225
 
251
226
  If you package an app for the Mac and an end-user gets the error message above upon installing, note that you probably have a system incompatibility issue between your OS/CPU Architecture and the end-user's OS/CPU Architecture. To resolve the issue, make sure to repackage the app for the Mac on a system perfectly matching the end-user's OS/CPU Architecture (sometimes, packaging on a newer MacOS with the same CPU Architecture also works, but you would have to test that to confirm and ensure full compatibility).
252
227
 
253
- 7. Message about a Mac app for which the developer cannot be verified (Move To Trash or Cancel)
228
+ 6- Message about a Mac app for which the developer cannot be verified (Move To Trash or Cancel)
254
229
 
255
230
  If you get the above message when running a packaged Mac app for the first time, choose cancel and then immediately go to System Preferences -> Security & Privacy -> General Tab -> Choose Open Anyway at the bottom where the app name should be showing.
256
231
 
257
232
  This would not be an issue if the app was [signed by Apple as per Mac Application Distribution instructions](#mac-application-distribution)
233
+
234
+ ## License
235
+
236
+ [MIT](LICENSE.txt)
237
+
238
+ Copyright (c) 2007-2022 - Andy Maleh.
@@ -79,11 +79,13 @@
79
79
  - [Metronome](#metronome)
80
80
  - [Weather](#weather)
81
81
  - [Quarto](#quarto)
82
+ - [Snake](#snake)
82
83
  - [External Samples](#external-samples)
83
84
  - [Glimmer Calculator](#glimmer-calculator)
84
85
  - [Gladiator](#gladiator)
85
86
  - [Timer](#timer)
86
87
  - [Glimmer Klondike Solitaire](#glimmer-klondike-solitaire)
88
+ - [Glimmer Metronome](#glimmer-metronome)
87
89
  - [License](#license)
88
90
 
89
91
  ## Samples
@@ -1054,14 +1056,6 @@ Hello, Tool Bar!
1054
1056
 
1055
1057
  ![Hello Tool Bar](/images/glimmer-hello-tool-bar.png)
1056
1058
 
1057
- ![Hello Tool Bar Cut](/images/glimmer-hello-tool-bar-cut.png)
1058
-
1059
- ![Hello Tool Bar Copy](/images/glimmer-hello-tool-bar-copy.png)
1060
-
1061
- ![Hello Tool Bar Paste](/images/glimmer-hello-tool-bar-paste.png)
1062
-
1063
- ![Hello Tool Bar Font Size](/images/glimmer-hello-tool-bar-font-size.png)
1064
-
1065
1059
  #### Hello, Cool Bar!
1066
1060
 
1067
1061
  This sample demonstrates the use of `cool_bar` that can contain multiple reorganizable `tool_bar` widgets
@@ -1382,6 +1376,20 @@ Quarto
1382
1376
 
1383
1377
  ![Quarto](/images/glimmer-quarto.png)
1384
1378
 
1379
+ #### Snake
1380
+
1381
+ This is the classic Snake game, which demonstrates MVP (Model-View-Presenter) and data-binding written [test-first](/spec/samples/elaborate/snake/model/game_spec.rb).
1382
+
1383
+ Code:
1384
+
1385
+ [samples/elaborate/snake.rb](/samples/elaborate/snake.rb)
1386
+
1387
+ Snake
1388
+
1389
+ ![Snake](/images/glimmer-snake.png)
1390
+
1391
+ ![Snake Video](/images/glimmer-snake.gif)
1392
+
1385
1393
  ### External Samples
1386
1394
 
1387
1395
  #### Glimmer Calculator
@@ -1421,8 +1429,16 @@ This is a souped up version of the Klondike Solitaire elaborate sample, which is
1421
1429
 
1422
1430
  ![Glimmer Klondike Solitaire](https://raw.githubusercontent.com/AndyObtiva/glimmer_klondike_solitaire/master/images/glimmer-klondike-solitaire.png)
1423
1431
 
1432
+ #### Glimmer Metronome
1433
+
1434
+ This is an external enhanced version of [Metronome](#metronome) that can be packaged as an independent native executable.
1435
+
1436
+ [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer_metronome/master/icons/linux/Glimmer%20Metronome.png" height=40 /> Glimmer Metronome](https://github.com/AndyObtiva/glimmer_metronome)
1437
+
1438
+ ![Metronome](https://raw.githubusercontent.com/AndyObtiva/glimmer_metronome/master/screenshots/glimmer-metronome.png)
1439
+
1424
1440
  ## License
1425
1441
 
1426
1442
  [MIT](LICENSE.txt)
1427
1443
 
1428
- Copyright (c) 2007-2021 - Andy Maleh.
1444
+ Copyright (c) 2007-2022 - Andy Maleh.
@@ -13,3 +13,9 @@
13
13
  - Custom widget/shell/shape `before_body` and `after_body` blocks are declared as `do; end` blocks.
14
14
  - Custom widgets receive additional keyword arguments called options, which come after the SWT styles.
15
15
  - Pure logic multi-line blocks that do not constitute GUI DSL view elements (such as `Thread.new`, `loop`, `each` and `observe` blocks) rely on the `do; end` style to clearly separate logic code from view code.
16
+
17
+ ## License
18
+
19
+ [MIT](LICENSE.txt)
20
+
21
+ Copyright (c) 2007-2022 - Andy Maleh.
Binary file
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
data/lib/ext/glimmer.rb CHANGED
@@ -1,5 +1,5 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
2
- #
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
+ #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
5
5
  # "Software"), to deal in the Software without restriction, including
@@ -7,10 +7,10 @@
7
7
  # distribute, sublicense, and/or sell copies of the Software, and to
8
8
  # permit persons to whom the Software is furnished to do so, subject to
9
9
  # the following conditions:
10
- #
10
+ #
11
11
  # The above copyright notice and this permission notice shall be
12
12
  # included in all copies or substantial portions of the Software.
13
- #
13
+ #
14
14
  # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
15
  # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
16
  # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -1,3 +1,24 @@
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining
4
+ # a copy of this software and associated documentation files (the
5
+ # "Software"), to deal in the Software without restriction, including
6
+ # without limitation the rights to use, copy, modify, merge, publish,
7
+ # distribute, sublicense, and/or sell copies of the Software, and to
8
+ # permit persons to whom the Software is furnished to do so, subject to
9
+ # the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be
12
+ # included in all copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
1
22
  module Rouge
2
23
  module Themes
3
24
  # A port of the pastie style from Pygments.
data/lib/glimmer/Rakefile CHANGED
@@ -1,5 +1,5 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
2
- #
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
+ #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
5
5
  # "Software"), to deal in the Software without restriction, including
@@ -7,10 +7,10 @@
7
7
  # distribute, sublicense, and/or sell copies of the Software, and to
8
8
  # permit persons to whom the Software is furnished to do so, subject to
9
9
  # the following conditions:
10
- #
10
+ #
11
11
  # The above copyright notice and this permission notice shall be
12
12
  # included in all copies or substantial portions of the Software.
13
- #
13
+ #
14
14
  # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
15
  # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
16
  # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -19,8 +19,8 @@
19
19
  # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
20
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
21
 
22
- # This Rakefile gets used from Glimmer::Launcher when the current directory for running the `glimmer` command
23
- # does not have a Rakefile (e.g. during scaffolding).
22
+ # This Rakefile gets used from Glimmer::Launcher when the current directory for running the `glimmer` command
23
+ # does not have a Rakefile (e.g. during scaffolding).
24
24
  # It is not needed when running from inside a scaffolded app or gem, or an app with a Rakefile that has
25
25
  # `require 'glimmer/rake_task'`
26
26
  require 'glimmer/rake_task'
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -20,7 +20,7 @@
20
20
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
21
 
22
22
  require 'glimmer/launcher'
23
- require ENV['SWT_JAR_FILE_PATH'] || "#{Glimmer::Launcher.swt_jar_file}#{Glimmer::Launcher.special_cpu_architecture_suffix}"
23
+ require ENV['SWT_JAR_FILE_PATH'] || "#{Glimmer::Launcher.swt_jar_file}"
24
24
  require 'glimmer/dsl/engine'
25
25
  Dir[File.expand_path('../*_expression.rb', __FILE__)].each {|f| require f}
26
26
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -36,8 +36,7 @@ module Glimmer
36
36
 
37
37
  def can_interpret?(parent, keyword, *args, &block)
38
38
  keyword == exec_operation and
39
- block_given? and
40
- args.empty?
39
+ block_given?
41
40
  end
42
41
 
43
42
  def interpret(parent, keyword, *args, &block)
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -32,6 +32,7 @@ module Glimmer
32
32
  include ParentExpression
33
33
 
34
34
  def can_interpret?(parent, keyword, *args, &block)
35
+ # TODO support CustomShape parent as well
35
36
  (parent.is_a?(Glimmer::SWT::Custom::Drawable) or parent.is_a?(Glimmer::SWT::Custom::Shape)) and
36
37
  Glimmer::SWT::Custom::Shape.valid?(parent, keyword, *args, &block)
37
38
  end
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2007-2021 Andy Maleh
1
+ # Copyright (c) 2007-2022 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -19,7 +19,7 @@
19
19
  # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
20
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
21
 
22
- require 'glimmer/dsl/expression'
22
+ require 'glimmer/dsl/shine_data_binding_expression'
23
23
  require 'glimmer/data_binding/model_binding'
24
24
  require 'glimmer/data_binding/widget_binding'
25
25
  require 'glimmer/swt/display_proxy'
@@ -28,22 +28,17 @@ require 'glimmer/data_binding/shine'
28
28
  module Glimmer
29
29
  module DSL
30
30
  module SWT
31
- class ShineDataBindingExpression < Expression
31
+ class ShineDataBindingExpression < Glimmer::DSL::ShineDataBindingExpression
32
32
  include_package 'org.eclipse.swt.widgets'
33
33
 
34
34
  def can_interpret?(parent, keyword, *args, &block)
35
- args.size == 0 and
36
- block.nil? and
35
+ super and
37
36
  (
38
37
  (parent.respond_to?(:has_attribute?) and parent.has_attribute?(keyword)) or
39
38
  (parent.respond_to?(:swt_widget) and (parent.swt_widget.is_a?(Table) or parent.swt_widget.is_a?(Tree)))
40
39
  ) and
41
40
  !(parent.respond_to?(:swt_widget) && parent.swt_widget.class == org.eclipse.swt.widgets.Canvas && keyword == 'image')
42
41
  end
43
-
44
- def interpret(parent, keyword, *args, &block)
45
- Glimmer::DataBinding::Shine.new(parent, keyword)
46
- end
47
42
  end
48
43
  end
49
44
  end