<commit_before>module Domgen
  module Generator
    module GWT
      TEMPLATE_DIRECTORY = "#{File.dirname(__FILE__)}/templates"
      FACETS = [:gwt]
      HELPERS = [Domgen::Java::Helper]
    end
  end
end
Domgen.template_set(:gwt_shared_service) do |template_set|
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :service,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/rpc_service.java.erb",
                        'main/java/#{service.gwt.qualified_service_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :exception,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/exception.java.erb",
                        'main/java/#{exception.gwt.qualified_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :service,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/async_rpc_service.java.erb",
                        'main/java/#{service.gwt.qualified_async_rpc_service_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
end

Domgen.template_set(:gwt_client_service) do |template_set|
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :repository,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/rpc_services_module.java.erb",
                        'main/java/#{repository.gwt.qualified_rpc_services_module_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :message,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/event.java.erb",
                        'main/java/#{message.gwt.qualified_event_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :message,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/event_handler.java.erb",
                        'main/java/#{message.gwt.qualified_event_handler_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :struct,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/struct_interface.java.erb",
                        'main/java/#{struct.gwt.qualified_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :struct,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/java_struct.java.erb",
                        'main/java/#{struct.gwt.qualified_java_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS + [:json],
                        :struct,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/struct_factory.java.erb",
                        'main/java/#{struct.gwt.qualified_factory_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS + [:json],
                        :struct,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/jso_struct.java.erb",
                        'main/java/#{struct.gwt.qualified_jso_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :enumeration,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/enumeration.java.erb",
                        'main/java/#{enumeration.gwt.qualified_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :service,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/facade_service.java.erb",
                        'main/java/#{service.gwt.qualified_facade_service_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :service,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/proxy.java.erb",
                        'main/java/#{service.gwt.qualified_proxy_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :repository,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/services_module.java.erb",
                        'main/java/#{repository.gwt.qualified_services_module_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
end
Domgen.template_set(:gwt_client_service_test) do |template_set|
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :repository,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/mock_services_module.java.erb",
                        'test/java/#{repository.gwt.qualified_mock_services_module_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
end

Domgen.template_set(:gwt_server_service) do |template_set|
  template_set.template(Domgen::Generator::GWT::FACETS + [:ejb],
                        :service,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/servlet.java.erb",
                        'main/java/#{service.gwt.qualified_servlet_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
end
<commit_msg>Add some simplified template sets for gwt facet<commit_after>module Domgen
  module Generator
    module GWT
      TEMPLATE_DIRECTORY = "#{File.dirname(__FILE__)}/templates"
      FACETS = [:gwt]
      HELPERS = [Domgen::Java::Helper]
    end
  end
end
Domgen.template_set(:gwt_shared_service) do |template_set|
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :service,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/rpc_service.java.erb",
                        'main/java/#{service.gwt.qualified_service_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :exception,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/exception.java.erb",
                        'main/java/#{exception.gwt.qualified_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :service,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/async_rpc_service.java.erb",
                        'main/java/#{service.gwt.qualified_async_rpc_service_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
end

Domgen.template_set(:gwt_client_service) do |template_set|
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :repository,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/rpc_services_module.java.erb",
                        'main/java/#{repository.gwt.qualified_rpc_services_module_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :message,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/event.java.erb",
                        'main/java/#{message.gwt.qualified_event_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :message,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/event_handler.java.erb",
                        'main/java/#{message.gwt.qualified_event_handler_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :struct,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/struct_interface.java.erb",
                        'main/java/#{struct.gwt.qualified_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :struct,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/java_struct.java.erb",
                        'main/java/#{struct.gwt.qualified_java_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS + [:json],
                        :struct,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/struct_factory.java.erb",
                        'main/java/#{struct.gwt.qualified_factory_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS + [:json],
                        :struct,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/jso_struct.java.erb",
                        'main/java/#{struct.gwt.qualified_jso_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :enumeration,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/enumeration.java.erb",
                        'main/java/#{enumeration.gwt.qualified_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :service,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/facade_service.java.erb",
                        'main/java/#{service.gwt.qualified_facade_service_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :service,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/proxy.java.erb",
                        'main/java/#{service.gwt.qualified_proxy_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :repository,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/services_module.java.erb",
                        'main/java/#{repository.gwt.qualified_services_module_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
end
Domgen.template_set(:gwt_client_service_test) do |template_set|
  template_set.template(Domgen::Generator::GWT::FACETS,
                        :repository,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/mock_services_module.java.erb",
                        'test/java/#{repository.gwt.qualified_mock_services_module_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
end

Domgen.template_set(:gwt_server_service) do |template_set|
  template_set.template(Domgen::Generator::GWT::FACETS + [:ejb],
                        :service,
                        "#{Domgen::Generator::GWT::TEMPLATE_DIRECTORY}/servlet.java.erb",
                        'main/java/#{service.gwt.qualified_servlet_name.gsub(".","/")}.java',
                        Domgen::Generator::GWT::HELPERS)
end

Domgen.template_set(:gwt_shared => [:gwt_shared_service])
Domgen.template_set(:gwt_client => [:gwt_client_service, :gwt_client_service_test])
Domgen.template_set(:gwt_server => [:gwt_server_service])
Domgen.template_set(:gwt => [:gwt_shared, :gwt_client, :gwt_server])

{'fraction_non_alphanumeric': 0.15535097813578827, 'fraction_numerical': 0.0, 'mean_word_length': 2.1488095238095237, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6171865', 'n_tokens_mistral': 3794, 'n_tokens_neox': 3587, 'n_words': 246}