rtext 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -1,2 +0,0 @@
1
- EPackage "iso-8859-1 umlaut: �", nsPrefix: ""
2
-
@@ -1,18 +0,0 @@
1
- EPackage StatemachineMM {
2
- EClass State, abstract: true {
3
- EAttribute name, eType: /StatemachineMM/StringType
4
- EReference parent, eType: /StatemachineMM/CompositeState, eOpposite: /StatemachineMM/CompositeState/substates
5
- }
6
- EClass SimpleState, eSuperTypes: [/StatemachineMM/State]
7
- EClass CompositeState, eSuperTypes: [/StatemachineMM/State] {
8
- EReference substates, upperBound: -1, containment: true, eType: /StatemachineMM/State, eOpposite: /StatemachineMM/State/parent
9
- }
10
- EClass Transition {
11
- EReference target, upperBound: 1, eType: /StatemachineMM/State
12
- EReference source, upperBound: 1, eType: /StatemachineMM/State
13
- }
14
- EDataType StringType
15
- EAnnotation source: "test" {
16
- EStringToStringMapEntry key: "kind", value: "package"
17
- }
18
- }
@@ -1,18 +0,0 @@
1
- EPackage StatemachineMM {
2
- EClass State, abstract: true {
3
- EAttribute name, eType: /StatemachineMM/StringType
4
- EReference parent, eType: /StatemachineMM/CompositeState, eOpposite: /StatemachineMM/CompositeState/substates
5
- }
6
- EClass SimpleState, eSuperTypes: [/StatemachineMM/State]
7
- EClass CompositeState, eSuperTypes: [/StatemachineMM/State] {
8
- EReference substates, upperBound: -1, containment: true, eType: /StatemachineMM/State, eOpposite: /StatemachineMM/State/parent
9
- }
10
- EClass Transition {
11
- EReference target, upperBound: 1, eType: /StatemachineMM/State
12
- EReference source, upperBound: 1, eType: /StatemachineMM/State
13
- }
14
- EDataType StringType
15
- EAnnotation source: "test" {
16
- EStringToStringMapEntry key: "kind", value: "package"
17
- }
18
- }
File without changes
File without changes
File without changes