diff options
author | 2019-05-12 22:27:13 -0400 | |
---|---|---|
committer | 2020-06-07 19:41:17 -0400 | |
commit | 627db28682230cd2894ac4f9eb3746fda473e3bc (patch) | |
tree | d0dd684e5afb28a565335bffc024a197bbd95ac4 /Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl | |
parent | VAMPIRE: fixed MANY bugs in containment and scope. #40 is good for now (diff) | |
download | VIATRA-Generator-627db28682230cd2894ac4f9eb3746fda473e3bc.tar.gz VIATRA-Generator-627db28682230cd2894ac4f9eb3746fda473e3bc.tar.zst VIATRA-Generator-627db28682230cd2894ac4f9eb3746fda473e3bc.zip |
Pre-realisticBranchCreation Commit
Diffstat (limited to 'Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl')
7 files changed, 0 insertions, 1283 deletions
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/DirImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/DirImpl.java deleted file mode 100644 index 2e2fbcba..00000000 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/DirImpl.java +++ /dev/null | |||
@@ -1,165 +0,0 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject; | ||
7 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage; | ||
8 | |||
9 | import java.util.Collection; | ||
10 | |||
11 | import org.eclipse.emf.common.notify.NotificationChain; | ||
12 | |||
13 | import org.eclipse.emf.common.util.EList; | ||
14 | |||
15 | import org.eclipse.emf.ecore.EClass; | ||
16 | import org.eclipse.emf.ecore.InternalEObject; | ||
17 | |||
18 | import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; | ||
19 | import org.eclipse.emf.ecore.util.InternalEList; | ||
20 | |||
21 | /** | ||
22 | * <!-- begin-user-doc --> | ||
23 | * An implementation of the model object '<em><b>Dir</b></em>'. | ||
24 | * <!-- end-user-doc --> | ||
25 | * <p> | ||
26 | * The following features are implemented: | ||
27 | * </p> | ||
28 | * <ul> | ||
29 | * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.DirImpl#getContents <em>Contents</em>}</li> | ||
30 | * </ul> | ||
31 | * | ||
32 | * @generated | ||
33 | */ | ||
34 | public class DirImpl extends FSObjectImpl implements Dir { | ||
35 | /** | ||
36 | * The cached value of the '{@link #getContents() <em>Contents</em>}' containment reference list. | ||
37 | * <!-- begin-user-doc --> | ||
38 | * <!-- end-user-doc --> | ||
39 | * @see #getContents() | ||
40 | * @generated | ||
41 | * @ordered | ||
42 | */ | ||
43 | protected EList<FSObject> contents; | ||
44 | |||
45 | /** | ||
46 | * <!-- begin-user-doc --> | ||
47 | * <!-- end-user-doc --> | ||
48 | * @generated | ||
49 | */ | ||
50 | protected DirImpl() { | ||
51 | super(); | ||
52 | } | ||
53 | |||
54 | /** | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @generated | ||
58 | */ | ||
59 | @Override | ||
60 | protected EClass eStaticClass() { | ||
61 | return filesystemPackage.Literals.DIR; | ||
62 | } | ||
63 | |||
64 | /** | ||
65 | * <!-- begin-user-doc --> | ||
66 | * <!-- end-user-doc --> | ||
67 | * @generated | ||
68 | */ | ||
69 | public EList<FSObject> getContents() { | ||
70 | if (contents == null) { | ||
71 | contents = new EObjectContainmentWithInverseEList<FSObject>(FSObject.class, this, filesystemPackage.DIR__CONTENTS, filesystemPackage.FS_OBJECT__PARENT); | ||
72 | } | ||
73 | return contents; | ||
74 | } | ||
75 | |||
76 | /** | ||
77 | * <!-- begin-user-doc --> | ||
78 | * <!-- end-user-doc --> | ||
79 | * @generated | ||
80 | */ | ||
81 | @SuppressWarnings("unchecked") | ||
82 | @Override | ||
83 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
84 | switch (featureID) { | ||
85 | case filesystemPackage.DIR__CONTENTS: | ||
86 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getContents()).basicAdd(otherEnd, msgs); | ||
87 | } | ||
88 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * <!-- begin-user-doc --> | ||
93 | * <!-- end-user-doc --> | ||
94 | * @generated | ||
95 | */ | ||
96 | @Override | ||
97 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
98 | switch (featureID) { | ||
99 | case filesystemPackage.DIR__CONTENTS: | ||
100 | return ((InternalEList<?>)getContents()).basicRemove(otherEnd, msgs); | ||
101 | } | ||
102 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
103 | } | ||
104 | |||
105 | /** | ||
106 | * <!-- begin-user-doc --> | ||
107 | * <!-- end-user-doc --> | ||
108 | * @generated | ||
109 | */ | ||
110 | @Override | ||
111 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
112 | switch (featureID) { | ||
113 | case filesystemPackage.DIR__CONTENTS: | ||
114 | return getContents(); | ||
115 | } | ||
116 | return super.eGet(featureID, resolve, coreType); | ||
117 | } | ||
118 | |||
119 | /** | ||
120 | * <!-- begin-user-doc --> | ||
121 | * <!-- end-user-doc --> | ||
122 | * @generated | ||
123 | */ | ||
124 | @SuppressWarnings("unchecked") | ||
125 | @Override | ||
126 | public void eSet(int featureID, Object newValue) { | ||
127 | switch (featureID) { | ||
128 | case filesystemPackage.DIR__CONTENTS: | ||
129 | getContents().clear(); | ||
130 | getContents().addAll((Collection<? extends FSObject>)newValue); | ||
131 | return; | ||
132 | } | ||
133 | super.eSet(featureID, newValue); | ||
134 | } | ||
135 | |||
136 | /** | ||
137 | * <!-- begin-user-doc --> | ||
138 | * <!-- end-user-doc --> | ||
139 | * @generated | ||
140 | */ | ||
141 | @Override | ||
142 | public void eUnset(int featureID) { | ||
143 | switch (featureID) { | ||
144 | case filesystemPackage.DIR__CONTENTS: | ||
145 | getContents().clear(); | ||
146 | return; | ||
147 | } | ||
148 | super.eUnset(featureID); | ||
149 | } | ||
150 | |||
151 | /** | ||
152 | * <!-- begin-user-doc --> | ||
153 | * <!-- end-user-doc --> | ||
154 | * @generated | ||
155 | */ | ||
156 | @Override | ||
157 | public boolean eIsSet(int featureID) { | ||
158 | switch (featureID) { | ||
159 | case filesystemPackage.DIR__CONTENTS: | ||
160 | return contents != null && !contents.isEmpty(); | ||
161 | } | ||
162 | return super.eIsSet(featureID); | ||
163 | } | ||
164 | |||
165 | } //DirImpl | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FSObjectImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FSObjectImpl.java deleted file mode 100644 index 25ea1fbb..00000000 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FSObjectImpl.java +++ /dev/null | |||
@@ -1,196 +0,0 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject; | ||
7 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage; | ||
8 | |||
9 | import org.eclipse.emf.common.notify.Notification; | ||
10 | import org.eclipse.emf.common.notify.NotificationChain; | ||
11 | |||
12 | import org.eclipse.emf.ecore.EClass; | ||
13 | import org.eclipse.emf.ecore.InternalEObject; | ||
14 | |||
15 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
16 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
17 | |||
18 | import org.eclipse.emf.ecore.util.EcoreUtil; | ||
19 | |||
20 | /** | ||
21 | * <!-- begin-user-doc --> | ||
22 | * An implementation of the model object '<em><b>FS Object</b></em>'. | ||
23 | * <!-- end-user-doc --> | ||
24 | * <p> | ||
25 | * The following features are implemented: | ||
26 | * </p> | ||
27 | * <ul> | ||
28 | * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FSObjectImpl#getParent <em>Parent</em>}</li> | ||
29 | * </ul> | ||
30 | * | ||
31 | * @generated | ||
32 | */ | ||
33 | public abstract class FSObjectImpl extends MinimalEObjectImpl.Container implements FSObject { | ||
34 | /** | ||
35 | * <!-- begin-user-doc --> | ||
36 | * <!-- end-user-doc --> | ||
37 | * @generated | ||
38 | */ | ||
39 | protected FSObjectImpl() { | ||
40 | super(); | ||
41 | } | ||
42 | |||
43 | /** | ||
44 | * <!-- begin-user-doc --> | ||
45 | * <!-- end-user-doc --> | ||
46 | * @generated | ||
47 | */ | ||
48 | @Override | ||
49 | protected EClass eStaticClass() { | ||
50 | return filesystemPackage.Literals.FS_OBJECT; | ||
51 | } | ||
52 | |||
53 | /** | ||
54 | * <!-- begin-user-doc --> | ||
55 | * <!-- end-user-doc --> | ||
56 | * @generated | ||
57 | */ | ||
58 | public Dir getParent() { | ||
59 | if (eContainerFeatureID() != filesystemPackage.FS_OBJECT__PARENT) return null; | ||
60 | return (Dir)eInternalContainer(); | ||
61 | } | ||
62 | |||
63 | /** | ||
64 | * <!-- begin-user-doc --> | ||
65 | * <!-- end-user-doc --> | ||
66 | * @generated | ||
67 | */ | ||
68 | public NotificationChain basicSetParent(Dir newParent, NotificationChain msgs) { | ||
69 | msgs = eBasicSetContainer((InternalEObject)newParent, filesystemPackage.FS_OBJECT__PARENT, msgs); | ||
70 | return msgs; | ||
71 | } | ||
72 | |||
73 | /** | ||
74 | * <!-- begin-user-doc --> | ||
75 | * <!-- end-user-doc --> | ||
76 | * @generated | ||
77 | */ | ||
78 | public void setParent(Dir newParent) { | ||
79 | if (newParent != eInternalContainer() || (eContainerFeatureID() != filesystemPackage.FS_OBJECT__PARENT && newParent != null)) { | ||
80 | if (EcoreUtil.isAncestor(this, newParent)) | ||
81 | throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); | ||
82 | NotificationChain msgs = null; | ||
83 | if (eInternalContainer() != null) | ||
84 | msgs = eBasicRemoveFromContainer(msgs); | ||
85 | if (newParent != null) | ||
86 | msgs = ((InternalEObject)newParent).eInverseAdd(this, filesystemPackage.DIR__CONTENTS, Dir.class, msgs); | ||
87 | msgs = basicSetParent(newParent, msgs); | ||
88 | if (msgs != null) msgs.dispatch(); | ||
89 | } | ||
90 | else if (eNotificationRequired()) | ||
91 | eNotify(new ENotificationImpl(this, Notification.SET, filesystemPackage.FS_OBJECT__PARENT, newParent, newParent)); | ||
92 | } | ||
93 | |||
94 | /** | ||
95 | * <!-- begin-user-doc --> | ||
96 | * <!-- end-user-doc --> | ||
97 | * @generated | ||
98 | */ | ||
99 | @Override | ||
100 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
101 | switch (featureID) { | ||
102 | case filesystemPackage.FS_OBJECT__PARENT: | ||
103 | if (eInternalContainer() != null) | ||
104 | msgs = eBasicRemoveFromContainer(msgs); | ||
105 | return basicSetParent((Dir)otherEnd, msgs); | ||
106 | } | ||
107 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
108 | } | ||
109 | |||
110 | /** | ||
111 | * <!-- begin-user-doc --> | ||
112 | * <!-- end-user-doc --> | ||
113 | * @generated | ||
114 | */ | ||
115 | @Override | ||
116 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
117 | switch (featureID) { | ||
118 | case filesystemPackage.FS_OBJECT__PARENT: | ||
119 | return basicSetParent(null, msgs); | ||
120 | } | ||
121 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
122 | } | ||
123 | |||
124 | /** | ||
125 | * <!-- begin-user-doc --> | ||
126 | * <!-- end-user-doc --> | ||
127 | * @generated | ||
128 | */ | ||
129 | @Override | ||
130 | public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { | ||
131 | switch (eContainerFeatureID()) { | ||
132 | case filesystemPackage.FS_OBJECT__PARENT: | ||
133 | return eInternalContainer().eInverseRemove(this, filesystemPackage.DIR__CONTENTS, Dir.class, msgs); | ||
134 | } | ||
135 | return super.eBasicRemoveFromContainerFeature(msgs); | ||
136 | } | ||
137 | |||
138 | /** | ||
139 | * <!-- begin-user-doc --> | ||
140 | * <!-- end-user-doc --> | ||
141 | * @generated | ||
142 | */ | ||
143 | @Override | ||
144 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
145 | switch (featureID) { | ||
146 | case filesystemPackage.FS_OBJECT__PARENT: | ||
147 | return getParent(); | ||
148 | } | ||
149 | return super.eGet(featureID, resolve, coreType); | ||
150 | } | ||
151 | |||
152 | /** | ||
153 | * <!-- begin-user-doc --> | ||
154 | * <!-- end-user-doc --> | ||
155 | * @generated | ||
156 | */ | ||
157 | @Override | ||
158 | public void eSet(int featureID, Object newValue) { | ||
159 | switch (featureID) { | ||
160 | case filesystemPackage.FS_OBJECT__PARENT: | ||
161 | setParent((Dir)newValue); | ||
162 | return; | ||
163 | } | ||
164 | super.eSet(featureID, newValue); | ||
165 | } | ||
166 | |||
167 | /** | ||
168 | * <!-- begin-user-doc --> | ||
169 | * <!-- end-user-doc --> | ||
170 | * @generated | ||
171 | */ | ||
172 | @Override | ||
173 | public void eUnset(int featureID) { | ||
174 | switch (featureID) { | ||
175 | case filesystemPackage.FS_OBJECT__PARENT: | ||
176 | setParent((Dir)null); | ||
177 | return; | ||
178 | } | ||
179 | super.eUnset(featureID); | ||
180 | } | ||
181 | |||
182 | /** | ||
183 | * <!-- begin-user-doc --> | ||
184 | * <!-- end-user-doc --> | ||
185 | * @generated | ||
186 | */ | ||
187 | @Override | ||
188 | public boolean eIsSet(int featureID) { | ||
189 | switch (featureID) { | ||
190 | case filesystemPackage.FS_OBJECT__PARENT: | ||
191 | return getParent() != null; | ||
192 | } | ||
193 | return super.eIsSet(featureID); | ||
194 | } | ||
195 | |||
196 | } //FSObjectImpl | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileImpl.java deleted file mode 100644 index 29eb47fd..00000000 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileImpl.java +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.File; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | |||
10 | /** | ||
11 | * <!-- begin-user-doc --> | ||
12 | * An implementation of the model object '<em><b>File</b></em>'. | ||
13 | * <!-- end-user-doc --> | ||
14 | * | ||
15 | * @generated | ||
16 | */ | ||
17 | public class FileImpl extends FSObjectImpl implements File { | ||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * <!-- end-user-doc --> | ||
21 | * @generated | ||
22 | */ | ||
23 | protected FileImpl() { | ||
24 | super(); | ||
25 | } | ||
26 | |||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <!-- end-user-doc --> | ||
30 | * @generated | ||
31 | */ | ||
32 | @Override | ||
33 | protected EClass eStaticClass() { | ||
34 | return filesystemPackage.Literals.FILE; | ||
35 | } | ||
36 | |||
37 | } //FileImpl | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileSystemImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileSystemImpl.java deleted file mode 100644 index b5ef2b66..00000000 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileSystemImpl.java +++ /dev/null | |||
@@ -1,198 +0,0 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject; | ||
7 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem; | ||
8 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage; | ||
9 | |||
10 | import org.eclipse.emf.common.notify.Notification; | ||
11 | import org.eclipse.emf.common.notify.NotificationChain; | ||
12 | |||
13 | import org.eclipse.emf.common.util.EList; | ||
14 | |||
15 | import org.eclipse.emf.ecore.EClass; | ||
16 | import org.eclipse.emf.ecore.InternalEObject; | ||
17 | |||
18 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
19 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
20 | |||
21 | /** | ||
22 | * <!-- begin-user-doc --> | ||
23 | * An implementation of the model object '<em><b>File System</b></em>'. | ||
24 | * <!-- end-user-doc --> | ||
25 | * <p> | ||
26 | * The following features are implemented: | ||
27 | * </p> | ||
28 | * <ul> | ||
29 | * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileSystemImpl#getRoot <em>Root</em>}</li> | ||
30 | * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileSystemImpl#getLive <em>Live</em>}</li> | ||
31 | * </ul> | ||
32 | * | ||
33 | * @generated | ||
34 | */ | ||
35 | public class FileSystemImpl extends MinimalEObjectImpl.Container implements FileSystem { | ||
36 | /** | ||
37 | * The cached value of the '{@link #getRoot() <em>Root</em>}' containment reference. | ||
38 | * <!-- begin-user-doc --> | ||
39 | * <!-- end-user-doc --> | ||
40 | * @see #getRoot() | ||
41 | * @generated | ||
42 | * @ordered | ||
43 | */ | ||
44 | protected Dir root; | ||
45 | |||
46 | /** | ||
47 | * <!-- begin-user-doc --> | ||
48 | * <!-- end-user-doc --> | ||
49 | * @generated | ||
50 | */ | ||
51 | protected FileSystemImpl() { | ||
52 | super(); | ||
53 | } | ||
54 | |||
55 | /** | ||
56 | * <!-- begin-user-doc --> | ||
57 | * <!-- end-user-doc --> | ||
58 | * @generated | ||
59 | */ | ||
60 | @Override | ||
61 | protected EClass eStaticClass() { | ||
62 | return filesystemPackage.Literals.FILE_SYSTEM; | ||
63 | } | ||
64 | |||
65 | /** | ||
66 | * <!-- begin-user-doc --> | ||
67 | * <!-- end-user-doc --> | ||
68 | * @generated | ||
69 | */ | ||
70 | public Dir getRoot() { | ||
71 | return root; | ||
72 | } | ||
73 | |||
74 | /** | ||
75 | * <!-- begin-user-doc --> | ||
76 | * <!-- end-user-doc --> | ||
77 | * @generated | ||
78 | */ | ||
79 | public NotificationChain basicSetRoot(Dir newRoot, NotificationChain msgs) { | ||
80 | Dir oldRoot = root; | ||
81 | root = newRoot; | ||
82 | if (eNotificationRequired()) { | ||
83 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, filesystemPackage.FILE_SYSTEM__ROOT, oldRoot, newRoot); | ||
84 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
85 | } | ||
86 | return msgs; | ||
87 | } | ||
88 | |||
89 | /** | ||
90 | * <!-- begin-user-doc --> | ||
91 | * <!-- end-user-doc --> | ||
92 | * @generated | ||
93 | */ | ||
94 | public void setRoot(Dir newRoot) { | ||
95 | if (newRoot != root) { | ||
96 | NotificationChain msgs = null; | ||
97 | if (root != null) | ||
98 | msgs = ((InternalEObject)root).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - filesystemPackage.FILE_SYSTEM__ROOT, null, msgs); | ||
99 | if (newRoot != null) | ||
100 | msgs = ((InternalEObject)newRoot).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - filesystemPackage.FILE_SYSTEM__ROOT, null, msgs); | ||
101 | msgs = basicSetRoot(newRoot, msgs); | ||
102 | if (msgs != null) msgs.dispatch(); | ||
103 | } | ||
104 | else if (eNotificationRequired()) | ||
105 | eNotify(new ENotificationImpl(this, Notification.SET, filesystemPackage.FILE_SYSTEM__ROOT, newRoot, newRoot)); | ||
106 | } | ||
107 | |||
108 | /** | ||
109 | * <!-- begin-user-doc --> | ||
110 | * <!-- end-user-doc --> | ||
111 | * @generated | ||
112 | */ | ||
113 | @SuppressWarnings("unchecked") | ||
114 | public EList<FSObject> getLive() { | ||
115 | // TODO: implement this method to return the 'Live' reference list | ||
116 | // Ensure that you remove @generated or mark it @generated NOT | ||
117 | // The list is expected to implement org.eclipse.emf.ecore.util.InternalEList and org.eclipse.emf.ecore.EStructuralFeature.Setting | ||
118 | // so it's likely that an appropriate subclass of org.eclipse.emf.ecore.util.EcoreEList should be used. | ||
119 | throw new UnsupportedOperationException(); | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * <!-- begin-user-doc --> | ||
124 | * <!-- end-user-doc --> | ||
125 | * @generated | ||
126 | */ | ||
127 | @Override | ||
128 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
129 | switch (featureID) { | ||
130 | case filesystemPackage.FILE_SYSTEM__ROOT: | ||
131 | return basicSetRoot(null, msgs); | ||
132 | } | ||
133 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
134 | } | ||
135 | |||
136 | /** | ||
137 | * <!-- begin-user-doc --> | ||
138 | * <!-- end-user-doc --> | ||
139 | * @generated | ||
140 | */ | ||
141 | @Override | ||
142 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
143 | switch (featureID) { | ||
144 | case filesystemPackage.FILE_SYSTEM__ROOT: | ||
145 | return getRoot(); | ||
146 | case filesystemPackage.FILE_SYSTEM__LIVE: | ||
147 | return getLive(); | ||
148 | } | ||
149 | return super.eGet(featureID, resolve, coreType); | ||
150 | } | ||
151 | |||
152 | /** | ||
153 | * <!-- begin-user-doc --> | ||
154 | * <!-- end-user-doc --> | ||
155 | * @generated | ||
156 | */ | ||
157 | @Override | ||
158 | public void eSet(int featureID, Object newValue) { | ||
159 | switch (featureID) { | ||
160 | case filesystemPackage.FILE_SYSTEM__ROOT: | ||
161 | setRoot((Dir)newValue); | ||
162 | return; | ||
163 | } | ||
164 | super.eSet(featureID, newValue); | ||
165 | } | ||
166 | |||
167 | /** | ||
168 | * <!-- begin-user-doc --> | ||
169 | * <!-- end-user-doc --> | ||
170 | * @generated | ||
171 | */ | ||
172 | @Override | ||
173 | public void eUnset(int featureID) { | ||
174 | switch (featureID) { | ||
175 | case filesystemPackage.FILE_SYSTEM__ROOT: | ||
176 | setRoot((Dir)null); | ||
177 | return; | ||
178 | } | ||
179 | super.eUnset(featureID); | ||
180 | } | ||
181 | |||
182 | /** | ||
183 | * <!-- begin-user-doc --> | ||
184 | * <!-- end-user-doc --> | ||
185 | * @generated | ||
186 | */ | ||
187 | @Override | ||
188 | public boolean eIsSet(int featureID) { | ||
189 | switch (featureID) { | ||
190 | case filesystemPackage.FILE_SYSTEM__ROOT: | ||
191 | return root != null; | ||
192 | case filesystemPackage.FILE_SYSTEM__LIVE: | ||
193 | return !getLive().isEmpty(); | ||
194 | } | ||
195 | return super.eIsSet(featureID); | ||
196 | } | ||
197 | |||
198 | } //FileSystemImpl | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/ModelImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/ModelImpl.java deleted file mode 100644 index a21f5b6e..00000000 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/ModelImpl.java +++ /dev/null | |||
@@ -1,221 +0,0 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem; | ||
7 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Model; | ||
8 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage; | ||
9 | |||
10 | import java.util.Collection; | ||
11 | |||
12 | import org.eclipse.emf.common.notify.Notification; | ||
13 | import org.eclipse.emf.common.notify.NotificationChain; | ||
14 | |||
15 | import org.eclipse.emf.common.util.EList; | ||
16 | |||
17 | import org.eclipse.emf.ecore.EClass; | ||
18 | import org.eclipse.emf.ecore.InternalEObject; | ||
19 | |||
20 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
21 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
22 | |||
23 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
24 | import org.eclipse.emf.ecore.util.InternalEList; | ||
25 | |||
26 | /** | ||
27 | * <!-- begin-user-doc --> | ||
28 | * An implementation of the model object '<em><b>Model</b></em>'. | ||
29 | * <!-- end-user-doc --> | ||
30 | * <p> | ||
31 | * The following features are implemented: | ||
32 | * </p> | ||
33 | * <ul> | ||
34 | * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.ModelImpl#getFilesystems <em>Filesystems</em>}</li> | ||
35 | * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.ModelImpl#getOtherFSObjects <em>Other FS Objects</em>}</li> | ||
36 | * </ul> | ||
37 | * | ||
38 | * @generated | ||
39 | */ | ||
40 | public class ModelImpl extends MinimalEObjectImpl.Container implements Model { | ||
41 | /** | ||
42 | * The cached value of the '{@link #getFilesystems() <em>Filesystems</em>}' containment reference. | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @see #getFilesystems() | ||
46 | * @generated | ||
47 | * @ordered | ||
48 | */ | ||
49 | protected FileSystem filesystems; | ||
50 | |||
51 | /** | ||
52 | * The cached value of the '{@link #getOtherFSObjects() <em>Other FS Objects</em>}' containment reference list. | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <!-- end-user-doc --> | ||
55 | * @see #getOtherFSObjects() | ||
56 | * @generated | ||
57 | * @ordered | ||
58 | */ | ||
59 | protected EList<FSObject> otherFSObjects; | ||
60 | |||
61 | /** | ||
62 | * <!-- begin-user-doc --> | ||
63 | * <!-- end-user-doc --> | ||
64 | * @generated | ||
65 | */ | ||
66 | protected ModelImpl() { | ||
67 | super(); | ||
68 | } | ||
69 | |||
70 | /** | ||
71 | * <!-- begin-user-doc --> | ||
72 | * <!-- end-user-doc --> | ||
73 | * @generated | ||
74 | */ | ||
75 | @Override | ||
76 | protected EClass eStaticClass() { | ||
77 | return filesystemPackage.Literals.MODEL; | ||
78 | } | ||
79 | |||
80 | /** | ||
81 | * <!-- begin-user-doc --> | ||
82 | * <!-- end-user-doc --> | ||
83 | * @generated | ||
84 | */ | ||
85 | public FileSystem getFilesystems() { | ||
86 | return filesystems; | ||
87 | } | ||
88 | |||
89 | /** | ||
90 | * <!-- begin-user-doc --> | ||
91 | * <!-- end-user-doc --> | ||
92 | * @generated | ||
93 | */ | ||
94 | public NotificationChain basicSetFilesystems(FileSystem newFilesystems, NotificationChain msgs) { | ||
95 | FileSystem oldFilesystems = filesystems; | ||
96 | filesystems = newFilesystems; | ||
97 | if (eNotificationRequired()) { | ||
98 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, filesystemPackage.MODEL__FILESYSTEMS, oldFilesystems, newFilesystems); | ||
99 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
100 | } | ||
101 | return msgs; | ||
102 | } | ||
103 | |||
104 | /** | ||
105 | * <!-- begin-user-doc --> | ||
106 | * <!-- end-user-doc --> | ||
107 | * @generated | ||
108 | */ | ||
109 | public void setFilesystems(FileSystem newFilesystems) { | ||
110 | if (newFilesystems != filesystems) { | ||
111 | NotificationChain msgs = null; | ||
112 | if (filesystems != null) | ||
113 | msgs = ((InternalEObject)filesystems).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - filesystemPackage.MODEL__FILESYSTEMS, null, msgs); | ||
114 | if (newFilesystems != null) | ||
115 | msgs = ((InternalEObject)newFilesystems).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - filesystemPackage.MODEL__FILESYSTEMS, null, msgs); | ||
116 | msgs = basicSetFilesystems(newFilesystems, msgs); | ||
117 | if (msgs != null) msgs.dispatch(); | ||
118 | } | ||
119 | else if (eNotificationRequired()) | ||
120 | eNotify(new ENotificationImpl(this, Notification.SET, filesystemPackage.MODEL__FILESYSTEMS, newFilesystems, newFilesystems)); | ||
121 | } | ||
122 | |||
123 | /** | ||
124 | * <!-- begin-user-doc --> | ||
125 | * <!-- end-user-doc --> | ||
126 | * @generated | ||
127 | */ | ||
128 | public EList<FSObject> getOtherFSObjects() { | ||
129 | if (otherFSObjects == null) { | ||
130 | otherFSObjects = new EObjectContainmentEList<FSObject>(FSObject.class, this, filesystemPackage.MODEL__OTHER_FS_OBJECTS); | ||
131 | } | ||
132 | return otherFSObjects; | ||
133 | } | ||
134 | |||
135 | /** | ||
136 | * <!-- begin-user-doc --> | ||
137 | * <!-- end-user-doc --> | ||
138 | * @generated | ||
139 | */ | ||
140 | @Override | ||
141 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
142 | switch (featureID) { | ||
143 | case filesystemPackage.MODEL__FILESYSTEMS: | ||
144 | return basicSetFilesystems(null, msgs); | ||
145 | case filesystemPackage.MODEL__OTHER_FS_OBJECTS: | ||
146 | return ((InternalEList<?>)getOtherFSObjects()).basicRemove(otherEnd, msgs); | ||
147 | } | ||
148 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
149 | } | ||
150 | |||
151 | /** | ||
152 | * <!-- begin-user-doc --> | ||
153 | * <!-- end-user-doc --> | ||
154 | * @generated | ||
155 | */ | ||
156 | @Override | ||
157 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
158 | switch (featureID) { | ||
159 | case filesystemPackage.MODEL__FILESYSTEMS: | ||
160 | return getFilesystems(); | ||
161 | case filesystemPackage.MODEL__OTHER_FS_OBJECTS: | ||
162 | return getOtherFSObjects(); | ||
163 | } | ||
164 | return super.eGet(featureID, resolve, coreType); | ||
165 | } | ||
166 | |||
167 | /** | ||
168 | * <!-- begin-user-doc --> | ||
169 | * <!-- end-user-doc --> | ||
170 | * @generated | ||
171 | */ | ||
172 | @SuppressWarnings("unchecked") | ||
173 | @Override | ||
174 | public void eSet(int featureID, Object newValue) { | ||
175 | switch (featureID) { | ||
176 | case filesystemPackage.MODEL__FILESYSTEMS: | ||
177 | setFilesystems((FileSystem)newValue); | ||
178 | return; | ||
179 | case filesystemPackage.MODEL__OTHER_FS_OBJECTS: | ||
180 | getOtherFSObjects().clear(); | ||
181 | getOtherFSObjects().addAll((Collection<? extends FSObject>)newValue); | ||
182 | return; | ||
183 | } | ||
184 | super.eSet(featureID, newValue); | ||
185 | } | ||
186 | |||
187 | /** | ||
188 | * <!-- begin-user-doc --> | ||
189 | * <!-- end-user-doc --> | ||
190 | * @generated | ||
191 | */ | ||
192 | @Override | ||
193 | public void eUnset(int featureID) { | ||
194 | switch (featureID) { | ||
195 | case filesystemPackage.MODEL__FILESYSTEMS: | ||
196 | setFilesystems((FileSystem)null); | ||
197 | return; | ||
198 | case filesystemPackage.MODEL__OTHER_FS_OBJECTS: | ||
199 | getOtherFSObjects().clear(); | ||
200 | return; | ||
201 | } | ||
202 | super.eUnset(featureID); | ||
203 | } | ||
204 | |||
205 | /** | ||
206 | * <!-- begin-user-doc --> | ||
207 | * <!-- end-user-doc --> | ||
208 | * @generated | ||
209 | */ | ||
210 | @Override | ||
211 | public boolean eIsSet(int featureID) { | ||
212 | switch (featureID) { | ||
213 | case filesystemPackage.MODEL__FILESYSTEMS: | ||
214 | return filesystems != null; | ||
215 | case filesystemPackage.MODEL__OTHER_FS_OBJECTS: | ||
216 | return otherFSObjects != null && !otherFSObjects.isEmpty(); | ||
217 | } | ||
218 | return super.eIsSet(featureID); | ||
219 | } | ||
220 | |||
221 | } //ModelImpl | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemFactoryImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemFactoryImpl.java deleted file mode 100644 index a3526e36..00000000 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemFactoryImpl.java +++ /dev/null | |||
@@ -1,128 +0,0 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.*; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EClass; | ||
8 | import org.eclipse.emf.ecore.EObject; | ||
9 | import org.eclipse.emf.ecore.EPackage; | ||
10 | |||
11 | import org.eclipse.emf.ecore.impl.EFactoryImpl; | ||
12 | |||
13 | import org.eclipse.emf.ecore.plugin.EcorePlugin; | ||
14 | |||
15 | /** | ||
16 | * <!-- begin-user-doc --> | ||
17 | * An implementation of the model <b>Factory</b>. | ||
18 | * <!-- end-user-doc --> | ||
19 | * @generated | ||
20 | */ | ||
21 | public class filesystemFactoryImpl extends EFactoryImpl implements filesystemFactory { | ||
22 | /** | ||
23 | * Creates the default factory implementation. | ||
24 | * <!-- begin-user-doc --> | ||
25 | * <!-- end-user-doc --> | ||
26 | * @generated | ||
27 | */ | ||
28 | public static filesystemFactory init() { | ||
29 | try { | ||
30 | filesystemFactory thefilesystemFactory = (filesystemFactory)EPackage.Registry.INSTANCE.getEFactory(filesystemPackage.eNS_URI); | ||
31 | if (thefilesystemFactory != null) { | ||
32 | return thefilesystemFactory; | ||
33 | } | ||
34 | } | ||
35 | catch (Exception exception) { | ||
36 | EcorePlugin.INSTANCE.log(exception); | ||
37 | } | ||
38 | return new filesystemFactoryImpl(); | ||
39 | } | ||
40 | |||
41 | /** | ||
42 | * Creates an instance of the factory. | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @generated | ||
46 | */ | ||
47 | public filesystemFactoryImpl() { | ||
48 | super(); | ||
49 | } | ||
50 | |||
51 | /** | ||
52 | * <!-- begin-user-doc --> | ||
53 | * <!-- end-user-doc --> | ||
54 | * @generated | ||
55 | */ | ||
56 | @Override | ||
57 | public EObject create(EClass eClass) { | ||
58 | switch (eClass.getClassifierID()) { | ||
59 | case filesystemPackage.FILE_SYSTEM: return createFileSystem(); | ||
60 | case filesystemPackage.DIR: return createDir(); | ||
61 | case filesystemPackage.FILE: return createFile(); | ||
62 | case filesystemPackage.MODEL: return createModel(); | ||
63 | default: | ||
64 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); | ||
65 | } | ||
66 | } | ||
67 | |||
68 | /** | ||
69 | * <!-- begin-user-doc --> | ||
70 | * <!-- end-user-doc --> | ||
71 | * @generated | ||
72 | */ | ||
73 | public FileSystem createFileSystem() { | ||
74 | FileSystemImpl fileSystem = new FileSystemImpl(); | ||
75 | return fileSystem; | ||
76 | } | ||
77 | |||
78 | /** | ||
79 | * <!-- begin-user-doc --> | ||
80 | * <!-- end-user-doc --> | ||
81 | * @generated | ||
82 | */ | ||
83 | public Dir createDir() { | ||
84 | DirImpl dir = new DirImpl(); | ||
85 | return dir; | ||
86 | } | ||
87 | |||
88 | /** | ||
89 | * <!-- begin-user-doc --> | ||
90 | * <!-- end-user-doc --> | ||
91 | * @generated | ||
92 | */ | ||
93 | public File createFile() { | ||
94 | FileImpl file = new FileImpl(); | ||
95 | return file; | ||
96 | } | ||
97 | |||
98 | /** | ||
99 | * <!-- begin-user-doc --> | ||
100 | * <!-- end-user-doc --> | ||
101 | * @generated | ||
102 | */ | ||
103 | public Model createModel() { | ||
104 | ModelImpl model = new ModelImpl(); | ||
105 | return model; | ||
106 | } | ||
107 | |||
108 | /** | ||
109 | * <!-- begin-user-doc --> | ||
110 | * <!-- end-user-doc --> | ||
111 | * @generated | ||
112 | */ | ||
113 | public filesystemPackage getfilesystemPackage() { | ||
114 | return (filesystemPackage)getEPackage(); | ||
115 | } | ||
116 | |||
117 | /** | ||
118 | * <!-- begin-user-doc --> | ||
119 | * <!-- end-user-doc --> | ||
120 | * @deprecated | ||
121 | * @generated | ||
122 | */ | ||
123 | @Deprecated | ||
124 | public static filesystemPackage getPackage() { | ||
125 | return filesystemPackage.eINSTANCE; | ||
126 | } | ||
127 | |||
128 | } //filesystemFactoryImpl | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemPackageImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemPackageImpl.java deleted file mode 100644 index 5bd41020..00000000 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemPackageImpl.java +++ /dev/null | |||
@@ -1,338 +0,0 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject; | ||
7 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.File; | ||
8 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem; | ||
9 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Model; | ||
10 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemFactory; | ||
11 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage; | ||
12 | |||
13 | import org.eclipse.emf.ecore.EClass; | ||
14 | import org.eclipse.emf.ecore.EPackage; | ||
15 | import org.eclipse.emf.ecore.EReference; | ||
16 | |||
17 | import org.eclipse.emf.ecore.impl.EPackageImpl; | ||
18 | |||
19 | /** | ||
20 | * <!-- begin-user-doc --> | ||
21 | * An implementation of the model <b>Package</b>. | ||
22 | * <!-- end-user-doc --> | ||
23 | * @generated | ||
24 | */ | ||
25 | public class filesystemPackageImpl extends EPackageImpl implements filesystemPackage { | ||
26 | /** | ||
27 | * <!-- begin-user-doc --> | ||
28 | * <!-- end-user-doc --> | ||
29 | * @generated | ||
30 | */ | ||
31 | private EClass fileSystemEClass = null; | ||
32 | |||
33 | /** | ||
34 | * <!-- begin-user-doc --> | ||
35 | * <!-- end-user-doc --> | ||
36 | * @generated | ||
37 | */ | ||
38 | private EClass fsObjectEClass = null; | ||
39 | |||
40 | /** | ||
41 | * <!-- begin-user-doc --> | ||
42 | * <!-- end-user-doc --> | ||
43 | * @generated | ||
44 | */ | ||
45 | private EClass dirEClass = null; | ||
46 | |||
47 | /** | ||
48 | * <!-- begin-user-doc --> | ||
49 | * <!-- end-user-doc --> | ||
50 | * @generated | ||
51 | */ | ||
52 | private EClass fileEClass = null; | ||
53 | |||
54 | /** | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @generated | ||
58 | */ | ||
59 | private EClass modelEClass = null; | ||
60 | |||
61 | /** | ||
62 | * Creates an instance of the model <b>Package</b>, registered with | ||
63 | * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package | ||
64 | * package URI value. | ||
65 | * <p>Note: the correct way to create the package is via the static | ||
66 | * factory method {@link #init init()}, which also performs | ||
67 | * initialization of the package, or returns the registered package, | ||
68 | * if one already exists. | ||
69 | * <!-- begin-user-doc --> | ||
70 | * <!-- end-user-doc --> | ||
71 | * @see org.eclipse.emf.ecore.EPackage.Registry | ||
72 | * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage#eNS_URI | ||
73 | * @see #init() | ||
74 | * @generated | ||
75 | */ | ||
76 | private filesystemPackageImpl() { | ||
77 | super(eNS_URI, filesystemFactory.eINSTANCE); | ||
78 | } | ||
79 | |||
80 | /** | ||
81 | * <!-- begin-user-doc --> | ||
82 | * <!-- end-user-doc --> | ||
83 | * @generated | ||
84 | */ | ||
85 | private static boolean isInited = false; | ||
86 | |||
87 | /** | ||
88 | * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. | ||
89 | * | ||
90 | * <p>This method is used to initialize {@link filesystemPackage#eINSTANCE} when that field is accessed. | ||
91 | * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. | ||
92 | * <!-- begin-user-doc --> | ||
93 | * <!-- end-user-doc --> | ||
94 | * @see #eNS_URI | ||
95 | * @see #createPackageContents() | ||
96 | * @see #initializePackageContents() | ||
97 | * @generated | ||
98 | */ | ||
99 | public static filesystemPackage init() { | ||
100 | if (isInited) return (filesystemPackage)EPackage.Registry.INSTANCE.getEPackage(filesystemPackage.eNS_URI); | ||
101 | |||
102 | // Obtain or create and register package | ||
103 | filesystemPackageImpl thefilesystemPackage = (filesystemPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof filesystemPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new filesystemPackageImpl()); | ||
104 | |||
105 | isInited = true; | ||
106 | |||
107 | // Create package meta-data objects | ||
108 | thefilesystemPackage.createPackageContents(); | ||
109 | |||
110 | // Initialize created meta-data | ||
111 | thefilesystemPackage.initializePackageContents(); | ||
112 | |||
113 | // Mark meta-data to indicate it can't be changed | ||
114 | thefilesystemPackage.freeze(); | ||
115 | |||
116 | |||
117 | // Update the registry and return the package | ||
118 | EPackage.Registry.INSTANCE.put(filesystemPackage.eNS_URI, thefilesystemPackage); | ||
119 | return thefilesystemPackage; | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * <!-- begin-user-doc --> | ||
124 | * <!-- end-user-doc --> | ||
125 | * @generated | ||
126 | */ | ||
127 | public EClass getFileSystem() { | ||
128 | return fileSystemEClass; | ||
129 | } | ||
130 | |||
131 | /** | ||
132 | * <!-- begin-user-doc --> | ||
133 | * <!-- end-user-doc --> | ||
134 | * @generated | ||
135 | */ | ||
136 | public EReference getFileSystem_Root() { | ||
137 | return (EReference)fileSystemEClass.getEStructuralFeatures().get(0); | ||
138 | } | ||
139 | |||
140 | /** | ||
141 | * <!-- begin-user-doc --> | ||
142 | * <!-- end-user-doc --> | ||
143 | * @generated | ||
144 | */ | ||
145 | public EReference getFileSystem_Live() { | ||
146 | return (EReference)fileSystemEClass.getEStructuralFeatures().get(1); | ||
147 | } | ||
148 | |||
149 | /** | ||
150 | * <!-- begin-user-doc --> | ||
151 | * <!-- end-user-doc --> | ||
152 | * @generated | ||
153 | */ | ||
154 | public EClass getFSObject() { | ||
155 | return fsObjectEClass; | ||
156 | } | ||
157 | |||
158 | /** | ||
159 | * <!-- begin-user-doc --> | ||
160 | * <!-- end-user-doc --> | ||
161 | * @generated | ||
162 | */ | ||
163 | public EReference getFSObject_Parent() { | ||
164 | return (EReference)fsObjectEClass.getEStructuralFeatures().get(0); | ||
165 | } | ||
166 | |||
167 | /** | ||
168 | * <!-- begin-user-doc --> | ||
169 | * <!-- end-user-doc --> | ||
170 | * @generated | ||
171 | */ | ||
172 | public EClass getDir() { | ||
173 | return dirEClass; | ||
174 | } | ||
175 | |||
176 | /** | ||
177 | * <!-- begin-user-doc --> | ||
178 | * <!-- end-user-doc --> | ||
179 | * @generated | ||
180 | */ | ||
181 | public EReference getDir_Contents() { | ||
182 | return (EReference)dirEClass.getEStructuralFeatures().get(0); | ||
183 | } | ||
184 | |||
185 | /** | ||
186 | * <!-- begin-user-doc --> | ||
187 | * <!-- end-user-doc --> | ||
188 | * @generated | ||
189 | */ | ||
190 | public EClass getFile() { | ||
191 | return fileEClass; | ||
192 | } | ||
193 | |||
194 | /** | ||
195 | * <!-- begin-user-doc --> | ||
196 | * <!-- end-user-doc --> | ||
197 | * @generated | ||
198 | */ | ||
199 | public EClass getModel() { | ||
200 | return modelEClass; | ||
201 | } | ||
202 | |||
203 | /** | ||
204 | * <!-- begin-user-doc --> | ||
205 | * <!-- end-user-doc --> | ||
206 | * @generated | ||
207 | */ | ||
208 | public EReference getModel_Filesystems() { | ||
209 | return (EReference)modelEClass.getEStructuralFeatures().get(0); | ||
210 | } | ||
211 | |||
212 | /** | ||
213 | * <!-- begin-user-doc --> | ||
214 | * <!-- end-user-doc --> | ||
215 | * @generated | ||
216 | */ | ||
217 | public EReference getModel_OtherFSObjects() { | ||
218 | return (EReference)modelEClass.getEStructuralFeatures().get(1); | ||
219 | } | ||
220 | |||
221 | /** | ||
222 | * <!-- begin-user-doc --> | ||
223 | * <!-- end-user-doc --> | ||
224 | * @generated | ||
225 | */ | ||
226 | public filesystemFactory getfilesystemFactory() { | ||
227 | return (filesystemFactory)getEFactoryInstance(); | ||
228 | } | ||
229 | |||
230 | /** | ||
231 | * <!-- begin-user-doc --> | ||
232 | * <!-- end-user-doc --> | ||
233 | * @generated | ||
234 | */ | ||
235 | private boolean isCreated = false; | ||
236 | |||
237 | /** | ||
238 | * Creates the meta-model objects for the package. This method is | ||
239 | * guarded to have no affect on any invocation but its first. | ||
240 | * <!-- begin-user-doc --> | ||
241 | * <!-- end-user-doc --> | ||
242 | * @generated | ||
243 | */ | ||
244 | public void createPackageContents() { | ||
245 | if (isCreated) return; | ||
246 | isCreated = true; | ||
247 | |||
248 | // Create classes and their features | ||
249 | fileSystemEClass = createEClass(FILE_SYSTEM); | ||
250 | createEReference(fileSystemEClass, FILE_SYSTEM__ROOT); | ||
251 | createEReference(fileSystemEClass, FILE_SYSTEM__LIVE); | ||
252 | |||
253 | fsObjectEClass = createEClass(FS_OBJECT); | ||
254 | createEReference(fsObjectEClass, FS_OBJECT__PARENT); | ||
255 | |||
256 | dirEClass = createEClass(DIR); | ||
257 | createEReference(dirEClass, DIR__CONTENTS); | ||
258 | |||
259 | fileEClass = createEClass(FILE); | ||
260 | |||
261 | modelEClass = createEClass(MODEL); | ||
262 | createEReference(modelEClass, MODEL__FILESYSTEMS); | ||
263 | createEReference(modelEClass, MODEL__OTHER_FS_OBJECTS); | ||
264 | } | ||
265 | |||
266 | /** | ||
267 | * <!-- begin-user-doc --> | ||
268 | * <!-- end-user-doc --> | ||
269 | * @generated | ||
270 | */ | ||
271 | private boolean isInitialized = false; | ||
272 | |||
273 | /** | ||
274 | * Complete the initialization of the package and its meta-model. This | ||
275 | * method is guarded to have no affect on any invocation but its first. | ||
276 | * <!-- begin-user-doc --> | ||
277 | * <!-- end-user-doc --> | ||
278 | * @generated | ||
279 | */ | ||
280 | public void initializePackageContents() { | ||
281 | if (isInitialized) return; | ||
282 | isInitialized = true; | ||
283 | |||
284 | // Initialize package | ||
285 | setName(eNAME); | ||
286 | setNsPrefix(eNS_PREFIX); | ||
287 | setNsURI(eNS_URI); | ||
288 | |||
289 | // Create type parameters | ||
290 | |||
291 | // Set bounds for type parameters | ||
292 | |||
293 | // Add supertypes to classes | ||
294 | dirEClass.getESuperTypes().add(this.getFSObject()); | ||
295 | fileEClass.getESuperTypes().add(this.getFSObject()); | ||
296 | |||
297 | // Initialize classes, features, and operations; add parameters | ||
298 | initEClass(fileSystemEClass, FileSystem.class, "FileSystem", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
299 | initEReference(getFileSystem_Root(), this.getDir(), null, "root", null, 1, 1, FileSystem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
300 | initEReference(getFileSystem_Live(), this.getFSObject(), null, "live", null, 0, -1, FileSystem.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); | ||
301 | |||
302 | initEClass(fsObjectEClass, FSObject.class, "FSObject", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
303 | initEReference(getFSObject_Parent(), this.getDir(), this.getDir_Contents(), "parent", null, 0, 1, FSObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
304 | |||
305 | initEClass(dirEClass, Dir.class, "Dir", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
306 | initEReference(getDir_Contents(), this.getFSObject(), this.getFSObject_Parent(), "contents", null, 0, -1, Dir.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
307 | |||
308 | initEClass(fileEClass, File.class, "File", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
309 | |||
310 | initEClass(modelEClass, Model.class, "Model", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
311 | initEReference(getModel_Filesystems(), this.getFileSystem(), null, "filesystems", null, 1, 1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
312 | initEReference(getModel_OtherFSObjects(), this.getFSObject(), null, "otherFSObjects", null, 0, -1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
313 | |||
314 | // Create resource | ||
315 | createResource(eNS_URI); | ||
316 | |||
317 | // Create annotations | ||
318 | // http://www.eclipse.org/emf/2002/Ecore | ||
319 | createEcoreAnnotations(); | ||
320 | } | ||
321 | |||
322 | /** | ||
323 | * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>. | ||
324 | * <!-- begin-user-doc --> | ||
325 | * <!-- end-user-doc --> | ||
326 | * @generated | ||
327 | */ | ||
328 | protected void createEcoreAnnotations() { | ||
329 | String source = "http://www.eclipse.org/emf/2002/Ecore"; | ||
330 | addAnnotation | ||
331 | (this, | ||
332 | source, | ||
333 | new String[] { | ||
334 | "settingDelegates", "org.eclipse.viatra.query.querybasedfeature" | ||
335 | }); | ||
336 | } | ||
337 | |||
338 | } //filesystemPackageImpl | ||