rtext 0.9.0 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +113 -98
  3. data/Project.yaml +14 -0
  4. data/RText_Protocol +1 -1
  5. data/lib/rtext/default_completer.rb +212 -208
  6. data/lib/rtext/frontend/connector.rb +122 -55
  7. data/lib/rtext/instantiator.rb +11 -3
  8. data/lib/rtext/service.rb +264 -260
  9. metadata +18 -44
  10. data/Rakefile +0 -46
  11. data/test/completer_test.rb +0 -607
  12. data/test/context_builder_test.rb +0 -949
  13. data/test/frontend/context_test.rb +0 -302
  14. data/test/instantiator_test.rb +0 -1733
  15. data/test/integration/backend.out +0 -16
  16. data/test/integration/crash_on_request_editor.rb +0 -12
  17. data/test/integration/ecore_editor.rb +0 -50
  18. data/test/integration/frontend.log +0 -40058
  19. data/test/integration/model/invalid_encoding.invenc +0 -2
  20. data/test/integration/model/test.crash_on_request +0 -18
  21. data/test/integration/model/test.crashing_backend +0 -18
  22. data/test/integration/model/test.dont_open_socket +0 -0
  23. data/test/integration/model/test.invalid_cmd_line +0 -0
  24. data/test/integration/model/test.not_in_rtext +0 -0
  25. data/test/integration/model/test_large_with_errors.ect3 +0 -43523
  26. data/test/integration/model/test_metamodel.ect +0 -24
  27. data/test/integration/model/test_metamodel2.ect +0 -5
  28. data/test/integration/model/test_metamodel3.ect4 +0 -7
  29. data/test/integration/model/test_metamodel_error.ect2 +0 -3
  30. data/test/integration/model/test_metamodel_ok.ect2 +0 -18
  31. data/test/integration/test.rb +0 -968
  32. data/test/link_detector_test.rb +0 -288
  33. data/test/message_helper_test.rb +0 -117
  34. data/test/rtext_test.rb +0 -11
  35. data/test/serializer_test.rb +0 -1024
  36. data/test/tokenizer_test.rb +0 -174
@@ -1,16 +0,0 @@
1
- RText service, listening on port 9001
2
- [15:34:36] INFO accepted connection
3
- [15:34:36] DEBUG request: {"command"=>"load_model", "invocation_id"=>1, "type"=>"request"}
4
- [15:34:36] DEBUG response: {"type"=>"response", "invocation_id"=>1, "problems"=>[], "total_problems"=>0}
5
- [15:34:36] INFO request complete (0.014002s)
6
- [15:34:36] DEBUG request: {"command"=>"link_targets", "context"=>[], "column"=>1, "invocation_id"=>2, "type"=>"request"}
7
- C:/Users/mthiede/gitrepos/rtext/lib/rtext/link_detector.rb:20:in `detect': undefined method `concat' for nil:NilClass (NoMethodError)
8
- from C:/Users/mthiede/gitrepos/rtext/lib/rtext/service.rb:196:in `link_targets'
9
- from C:/Users/mthiede/gitrepos/rtext/lib/rtext/service.rb:109:in `message_received'
10
- from C:/Users/mthiede/gitrepos/rtext/lib/rtext/service.rb:80:in `block in run'
11
- from C:/Users/mthiede/gitrepos/rtext/lib/rtext/service.rb:59:in `each'
12
- from C:/Users/mthiede/gitrepos/rtext/lib/rtext/service.rb:59:in `run'
13
- from C:/Users/mthiede/gitrepos/rtext/test/integration/ecore_editor.rb:50:in `<top (required)>'
14
- from c:/tools/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
15
- from c:/tools/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
16
- from ../crash_on_request_editor.rb:12:in `<main>'
@@ -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