External/Tools/AS2API/api_loader.rb
# TODO: this structure sucks; responsibility for type resolution should be
#       entirely seperate from aggregation, not shoe-horned into this class
this structure sucks; responsibility for type resolution should be
entirely seperate from aggregation, not shoe-horned into this class
this structure sucks ; responsibility for type resolution should be entirely seperate from aggregation not shoe - horned into this class
def import_packages_into_namespace(type, local_namespace)
    importer = type.import_manager
    importer.each_package do |package_name|
      collect_package_types(package_name.join(".")) do |package_type|
	if local_namespace.has_key?(package_type.unqualified_name)
	  $stderr.puts "#{type.input_filename}: #{package_type.unqualified_name} already refers to #{local_namespace[package_type.unqualified_name].qualified_name}"
	end
	local_namespace[package_type.unqualified_name] = package_type
      end
    end
  end
def import_packages_into_namespace ( type , local_namespace ) importer = type . import_manager importer . each_package do | package_name | collect_package_types ( package_name . join ( "." ) ) do | package_type | if local_namespace . has_key? ( package_type . unqualified_name ) $stderr . puts "#{type.input_filename}: #{package_type.unqualified_name} already refers to #{local_namespace[package_type.unqualified_name].qualified_name}" end local_namespace [ package_type . unqualified_name ] = package_type end end end
TODO: this structure sucks; responsibility for type resolution should be
entirely seperate from aggregation, not shoe-horned into this class
TODO : this structure sucks ; responsibility for type resolution should be entirely seperate from aggregation not shoe - horned into this class
type
<not_specific>
local_namespace
<not_specific>