emf_jruby 0.2.0-java → 0.2.1-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/emf/emf_nav.rb +13 -13
- data/lib/emf/rgen_ext.rb +0 -2
- metadata +19 -23
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e8e713a0aa61b88d3aa9a8e509e716b1f68f88c5
|
4
|
+
data.tar.gz: e22dee2786146cb18fb4a9695e5f4ccf4b94401a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8d61f10493087b9f1acd73ee91693dfd8c178c8f586e46715d3d086ddad6049c0e12f4fa523f00cbc58890d32c9f82cdf982f1fdfce40756531ee58d16cce5d1
|
7
|
+
data.tar.gz: e8961391a63d44654a60b85678689c0fed10940772bd8564ab33aec46dec2cc315c6115bc30443967edc05b9cdfbe08f4d699bd8df10c8b706a59a6c0d86ed28
|
data/lib/emf/emf_nav.rb
CHANGED
@@ -1,30 +1,30 @@
|
|
1
1
|
# Utils methods to naviate real EMF objects
|
2
2
|
|
3
3
|
java_import org.eclipse.emf.ecore.EObject
|
4
|
+
java_import org.eclipse.emf.ecore.util.EContentsEList
|
5
|
+
java_import org.eclipse.emf.common.util.BasicEList
|
4
6
|
|
5
7
|
module Java::OrgEclipseEmfEcore::EObject
|
6
8
|
|
7
9
|
module NavigationMethods
|
8
10
|
|
9
|
-
|
10
|
-
|
11
|
-
def contents
|
11
|
+
def children
|
12
12
|
method = nil
|
13
13
|
method = :eContents if respond_to?(:eContents)
|
14
14
|
method = :old_contents if respond_to?(:old_contents)
|
15
15
|
method = :getContents if respond_to?(:getContents)
|
16
16
|
raise "No method for getting contents, class: #{self.class}" unless method!=nil
|
17
|
-
send method
|
17
|
+
res = (send method)
|
18
|
+
obj = self
|
19
|
+
res
|
18
20
|
end
|
19
21
|
|
20
|
-
|
21
|
-
|
22
|
-
def contents_deep
|
22
|
+
def children_deep
|
23
23
|
l = []
|
24
|
-
|
24
|
+
children.each do |c|
|
25
25
|
l << c
|
26
26
|
begin
|
27
|
-
grand_children = c.
|
27
|
+
grand_children = c.children_deep
|
28
28
|
rescue Exception => e
|
29
29
|
raise "Problem getting children of #{c} (#{c.class}): #{e}"
|
30
30
|
end
|
@@ -35,12 +35,12 @@ module Java::OrgEclipseEmfEcore::EObject
|
|
35
35
|
l
|
36
36
|
end
|
37
37
|
|
38
|
-
def
|
39
|
-
Java::OrgEclipseEmfEcore::EObject::NavigationMethods.only_of_class(
|
38
|
+
def only_child_of_eclass(eclass)
|
39
|
+
Java::OrgEclipseEmfEcore::EObject::NavigationMethods.only_of_class(children,eclass)
|
40
40
|
end
|
41
41
|
|
42
|
-
def
|
43
|
-
Java::OrgEclipseEmfEcore::EObject::NavigationMethods.only_of_class(
|
42
|
+
def only_child_deep_of_eclass(eclass)
|
43
|
+
Java::OrgEclipseEmfEcore::EObject::NavigationMethods.only_of_class(children_deep,eclass)
|
44
44
|
end
|
45
45
|
|
46
46
|
def self.only_of_class(collection,eclass)
|
data/lib/emf/rgen_ext.rb
CHANGED
@@ -61,8 +61,6 @@ class RGen::MetamodelBuilder::MMBase
|
|
61
61
|
self_value = self.get(ref)
|
62
62
|
other_value = other.get(ref)
|
63
63
|
to_ignore = ref.getEOpposite and ref.getEOpposite.containment
|
64
|
-
#puts "ignore #{self.class.name}.#{ref.name}" if to_ignore
|
65
|
-
#puts "returning false on #{attrib.name}" unless self_value.eql?(other_value)
|
66
64
|
unless to_ignore
|
67
65
|
if ref.containment
|
68
66
|
return false unless self_value == other_value
|
metadata
CHANGED
@@ -1,52 +1,50 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: emf_jruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.1
|
6
5
|
platform: java
|
7
6
|
authors:
|
8
7
|
- Federico Tomassetti
|
9
|
-
autorequire:
|
8
|
+
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-30 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: json
|
16
|
-
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
17
16
|
requirements:
|
18
17
|
- - '>='
|
19
18
|
- !ruby/object:Gem::Version
|
20
19
|
version: '0'
|
21
|
-
|
22
|
-
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
|
28
|
-
prerelease: false
|
29
|
-
type: :runtime
|
30
|
-
description: EMF support for JRuby. Support for loading and saving models in JSon.
|
27
|
+
description: EMF support for JRuby
|
31
28
|
email: f.tomassetti@gmail.com
|
32
29
|
executables: []
|
33
30
|
extensions: []
|
34
31
|
extra_rdoc_files: []
|
35
32
|
files:
|
36
33
|
- lib/emf_jruby.rb
|
37
|
-
- ./lib/emf/xmi.rb
|
38
|
-
- ./lib/emf/rgen_to_emf.rb
|
39
34
|
- ./lib/emf/emf_nav.rb
|
40
|
-
- ./lib/emf/exceptions.rb
|
41
35
|
- ./lib/emf/emf_utils.rb
|
36
|
+
- ./lib/emf/exceptions.rb
|
42
37
|
- ./lib/emf/rgen_ext.rb
|
43
|
-
- ./lib/
|
44
|
-
- ./lib/
|
38
|
+
- ./lib/emf/rgen_to_emf.rb
|
39
|
+
- ./lib/emf/xmi.rb
|
45
40
|
- ./lib/jars/org.antlr.runtime_3.0.0.v200803061811.jar
|
46
41
|
- ./lib/jars/org.eclipse.emf.common_2.8.0.v20130125-0546.jar
|
42
|
+
- ./lib/jars/org.eclipse.emf.ecore.xmi_2.8.1.v20130125-0546.jar
|
43
|
+
- ./lib/jars/org.eclipse.emf.ecore_2.8.3.v20130125-0546.jar
|
47
44
|
homepage: http://federico-tomassetti.it
|
48
45
|
licenses: []
|
49
|
-
|
46
|
+
metadata: {}
|
47
|
+
post_install_message:
|
50
48
|
rdoc_options: []
|
51
49
|
require_paths:
|
52
50
|
- lib
|
@@ -55,17 +53,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
55
53
|
- - '>='
|
56
54
|
- !ruby/object:Gem::Version
|
57
55
|
version: '0'
|
58
|
-
none: false
|
59
56
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
57
|
requirements:
|
61
58
|
- - '>='
|
62
59
|
- !ruby/object:Gem::Version
|
63
60
|
version: '0'
|
64
|
-
none: false
|
65
61
|
requirements: []
|
66
|
-
rubyforge_project:
|
67
|
-
rubygems_version:
|
68
|
-
signing_key:
|
69
|
-
specification_version:
|
62
|
+
rubyforge_project:
|
63
|
+
rubygems_version: 2.0.3
|
64
|
+
signing_key:
|
65
|
+
specification_version: 4
|
70
66
|
summary: EMF support for JRuby
|
71
67
|
test_files: []
|