lib/ext/glimmer/config.rb in glimmer-dsl-swt-0.6.7 vs lib/ext/glimmer/config.rb in glimmer-dsl-swt-0.6.8

- old
+ new

@@ -1,5 +1,7 @@ +require 'glimmer/config' + module Glimmer module Config DEFAULT_IMPORT_SWT_PACKAGES = [ 'org.eclipse.swt', 'org.eclipse.swt.widgets', @@ -7,10 +9,15 @@ 'org.eclipse.swt.graphics', 'org.eclipse.swt.browser', 'org.eclipse.swt.custom', 'org.eclipse.swt.dnd', ] + + # This may be configured with extra sample directories from custom widget/shell gems + # following the convention of a `samples/subdirectory` where subdirectory is the + # custom widget/shell name or something representative of a group of samples (e.g. c_date_time). + SAMPLE_DIRECTORIES = [] class << self # Tells Glimmer to import SWT packages into including class (default: true) def import_swt_packages=(value) @@import_swt_packages = value @@ -101,20 +108,21 @@ end end -Glimmer::Config.reset_logger! +Glimmer::Config.reset_logger! unless ENV['GLIMMER_LOGGER_ENABLED'].to_s.downcase == 'false' if ENV['GLIMMER_LOGGER_LEVEL'] # if glimmer log level is being overridden for debugging purposes, then disable async logging making logging immediate Glimmer::Config.logging_appender_options = Glimmer::Config.logging_appender_options.merge(async: false, auto_flushing: 1) Glimmer::Config.logging_devices = [:stdout] begin Glimmer::Config.logger.level = ENV['GLIMMER_LOGGER_LEVEL'].strip rescue => e puts e.message end end + Glimmer::Config.excluded_keyword_checkers << lambda do |method_symbol, *args| method = method_symbol.to_s result = false result ||= method == 'dispose' && is_a?(Glimmer::UI::CustomWidget) && respond_to?(method) result ||= ['drag_source_proxy', 'drop_target_proxy'].include?(method) && is_a?(Glimmer::UI::CustomWidget)