rtext 0.8.0 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +113 -84
  3. data/Project.yaml +14 -0
  4. data/RText_Protocol +47 -4
  5. data/lib/rtext/context_builder.rb +49 -8
  6. data/lib/rtext/default_completer.rb +212 -163
  7. data/lib/rtext/default_service_provider.rb +3 -3
  8. data/lib/rtext/frontend/connector.rb +122 -55
  9. data/lib/rtext/frontend/context.rb +12 -12
  10. data/lib/rtext/instantiator.rb +11 -3
  11. data/lib/rtext/language.rb +5 -5
  12. data/lib/rtext/serializer.rb +1 -1
  13. data/lib/rtext/service.rb +264 -253
  14. data/lib/rtext/tokenizer.rb +1 -1
  15. metadata +18 -43
  16. data/Rakefile +0 -46
  17. data/test/completer_test.rb +0 -606
  18. data/test/context_builder_test.rb +0 -948
  19. data/test/frontend/context_test.rb +0 -205
  20. data/test/instantiator_test.rb +0 -1691
  21. data/test/integration/backend.out +0 -13
  22. data/test/integration/crash_on_request_editor.rb +0 -12
  23. data/test/integration/ecore_editor.rb +0 -50
  24. data/test/integration/frontend.log +0 -36049
  25. data/test/integration/model/invalid_encoding.invenc +0 -2
  26. data/test/integration/model/test.crash_on_request +0 -18
  27. data/test/integration/model/test.crashing_backend +0 -18
  28. data/test/integration/model/test.dont_open_socket +0 -0
  29. data/test/integration/model/test.invalid_cmd_line +0 -0
  30. data/test/integration/model/test.not_in_rtext +0 -0
  31. data/test/integration/model/test_large_with_errors.ect3 +0 -43523
  32. data/test/integration/model/test_metamodel.ect +0 -24
  33. data/test/integration/model/test_metamodel2.ect +0 -5
  34. data/test/integration/model/test_metamodel_error.ect2 +0 -3
  35. data/test/integration/model/test_metamodel_ok.ect2 +0 -18
  36. data/test/integration/test.rb +0 -918
  37. data/test/link_detector_test.rb +0 -287
  38. data/test/message_helper_test.rb +0 -118
  39. data/test/rtext_test.rb +0 -11
  40. data/test/serializer_test.rb +0 -1004
  41. data/test/tokenizer_test.rb +0 -173
@@ -1,13 +0,0 @@
1
- RText service, listening on port 9001
2
- [15:03:31] INFO accepted connection
3
- [15:03:31] DEBUG request: {"command"=>"load_model", "invocation_id"=>1, "type"=>"request"}
4
- [15:03:31] DEBUG response: {"type"=>"response", "invocation_id"=>1, "problems"=>[], "total_problems"=>0}
5
- [15:03:31] INFO request complete (0.013001s)
6
- [15:03:31] DEBUG request: {"command"=>"unknown", "invocation_id"=>2, "type"=>"request"}
7
- [15:03:31] WARN unknown command unknown
8
- [15:03:31] DEBUG response: {"type"=>"unknown_command_error", "invocation_id"=>2, "command"=>"unknown"}
9
- [15:03:31] INFO request complete (0.001s)
10
- [15:03:31] DEBUG request: {"type"=>"request", "command"=>"stop", "invocation_id"=>3}
11
- [15:03:31] INFO RText service, stopping now (stop requested)
12
- [15:03:31] DEBUG response: {"type"=>"response", "invocation_id"=>3}
13
- [15:03:31] INFO request complete (0.001s)
@@ -1,12 +0,0 @@
1
- $:.unshift(File.dirname(__FILE__))
2
- require 'rtext/default_service_provider'
3
-
4
- # monkey patch to produce a crash
5
-
6
- class RText::DefaultServiceProvider
7
- def get_reference_targets(identifier, context)
8
- raise "crash"
9
- end
10
- end
11
-
12
- require 'ecore_editor'
@@ -1,50 +0,0 @@
1
- require 'optparse'
2
- require 'logger'
3
- require 'rgen/ecore/ecore'
4
- require 'rgen/environment'
5
- require 'rgen/fragment/fragmented_model'
6
- require 'rtext/default_loader'
7
- require 'rtext/default_service_provider'
8
- require 'rtext/service'
9
- require 'rtext/language'
10
-
11
- $stdout.sync = true
12
-
13
- parser = OptionParser.new do |opts|
14
- opts.banner = "ecore-editor.rb <file patterns>"
15
- end
16
- begin
17
- parser.parse!
18
- rescue OptionParser::InvalidArgument => e
19
- abort e.to_s
20
- end
21
-
22
- dirs = ARGV
23
- abort "no input dirs" unless dirs.size > 0
24
-
25
- logger = Logger.new($stdout)
26
- class << logger
27
- def format_message(severity, timestamp, progname, msg)
28
- "[#{timestamp.strftime("%H:%M:%S")}] #{severity} #{msg}\n"
29
- end
30
- end
31
-
32
- module RGen::ECore::EModelElement::ClassModule
33
- attr_accessor :line_number, :fragment_ref
34
- end
35
-
36
- mm = RGen::ECore.ecore
37
- lang = RText::Language.new(mm,
38
- :root_classes => [RGen::ECore::EPackage.ecore],
39
- :unlabled_arguments => lambda {|c| ["name"] },
40
- :unquoted_arguments => lambda {|c| ["name"] },
41
- :line_number_attribute => "line_number",
42
- :fragment_ref_attribute => "fragment_ref"
43
- )
44
-
45
- model = RGen::Fragment::FragmentedModel.new(:env => RGen::Environment.new)
46
- loader = RText::DefaultLoader.new(lang, model, :pattern => dirs)
47
- service_provider = RText::DefaultServiceProvider.new(lang, model, loader)
48
-
49
- service = RText::Service.new(service_provider, :logger => logger, :timeout => 3600)
50
- service.run