rtext 0.8.0 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +113 -84
- data/Project.yaml +14 -0
- data/RText_Protocol +47 -4
- data/lib/rtext/context_builder.rb +49 -8
- data/lib/rtext/default_completer.rb +212 -163
- data/lib/rtext/default_service_provider.rb +3 -3
- data/lib/rtext/frontend/connector.rb +122 -55
- data/lib/rtext/frontend/context.rb +12 -12
- data/lib/rtext/instantiator.rb +11 -3
- data/lib/rtext/language.rb +5 -5
- data/lib/rtext/serializer.rb +1 -1
- data/lib/rtext/service.rb +264 -253
- data/lib/rtext/tokenizer.rb +1 -1
- metadata +18 -43
- data/Rakefile +0 -46
- data/test/completer_test.rb +0 -606
- data/test/context_builder_test.rb +0 -948
- data/test/frontend/context_test.rb +0 -205
- data/test/instantiator_test.rb +0 -1691
- data/test/integration/backend.out +0 -13
- data/test/integration/crash_on_request_editor.rb +0 -12
- data/test/integration/ecore_editor.rb +0 -50
- data/test/integration/frontend.log +0 -36049
- data/test/integration/model/invalid_encoding.invenc +0 -2
- data/test/integration/model/test.crash_on_request +0 -18
- data/test/integration/model/test.crashing_backend +0 -18
- data/test/integration/model/test.dont_open_socket +0 -0
- data/test/integration/model/test.invalid_cmd_line +0 -0
- data/test/integration/model/test.not_in_rtext +0 -0
- data/test/integration/model/test_large_with_errors.ect3 +0 -43523
- data/test/integration/model/test_metamodel.ect +0 -24
- data/test/integration/model/test_metamodel2.ect +0 -5
- data/test/integration/model/test_metamodel_error.ect2 +0 -3
- data/test/integration/model/test_metamodel_ok.ect2 +0 -18
- data/test/integration/test.rb +0 -918
- data/test/link_detector_test.rb +0 -287
- data/test/message_helper_test.rb +0 -118
- data/test/rtext_test.rb +0 -11
- data/test/serializer_test.rb +0 -1004
- 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
|