Skip to content

Commit 670a0fb

Browse files
committed
Issue #13 - Resolved.
1 parent 27ba468 commit 670a0fb

File tree

17 files changed

+83391
-83420
lines changed

17 files changed

+83391
-83420
lines changed

org.modeldriven.alf.eclipse.papyrus/src/org/modeldriven/alf/eclipse/papyrus/execution/Alf.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ protected Locus createLocus() {
5555

5656
@Override
5757
protected ElementFactory createElementFactory() {
58-
return new org.modeldriven.alf.eclipse.uml.ElementFactory();
58+
return org.modeldriven.alf.eclipse.uml.Element.FACTORY;
5959
}
6060

6161
@Override

org.modeldriven.alf.eclipse.papyrus/src/org/modeldriven/alf/eclipse/papyrus/execution/Fuml.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,6 @@ protected void println(String message) {
533533

534534
public Fuml() {
535535
this.setUmlLibraryDirectory("Libraries");
536-
new org.modeldriven.alf.eclipse.uml.ElementFactory();
537536

538537
try {
539538
FUMLExecutionEngine.eInstance = new DummyFUMLExecutionEngine();

org.modeldriven.alf.eclipse/UML/_RunTests.uml

Lines changed: 83340 additions & 83340 deletions
Large diffs are not rendered by default.
-9 Bytes
Binary file not shown.

org.modeldriven.alf.eclipse/src/org/modeldriven/alf/eclipse/fuml/execution/AlfCompiler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ protected void setUmlDirectory(String umlDirectory) {
2727

2828
@Override
2929
protected ElementFactory createElementFactory() {
30-
return new org.modeldriven.alf.eclipse.uml.ElementFactory();
30+
return org.modeldriven.alf.eclipse.uml.Element.FACTORY;
3131
}
3232

3333
@Override

org.modeldriven.alf.eclipse/src/org/modeldriven/alf/eclipse/fuml/mapping/FumlMapper.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2011-2013 Data Access Technologies, Inc. (Model Driven Solutions)
2+
* Copyright 2011-2016 Data Access Technologies, Inc. (Model Driven Solutions)
33
* All rights reserved worldwide. This program and the accompanying materials
44
* are made available for use under the terms of the GNU General Public License
55
* (GPL) version 3 that accompanies this distribution and is available at
@@ -8,7 +8,7 @@
88
*******************************************************************************/
99
package org.modeldriven.alf.eclipse.fuml.mapping;
1010

11-
import org.modeldriven.alf.eclipse.uml.ElementFactory;
11+
import org.modeldriven.alf.eclipse.uml.Element;
1212
import org.modeldriven.alf.fuml.mapping.FumlMapping;
1313
import org.modeldriven.alf.fuml.mapping.FumlMappingFactory;
1414
import org.modeldriven.alf.mapping.Mapping;
@@ -25,7 +25,7 @@ public static void main(String[] args) {
2525
}
2626

2727
FumlMapping.setFumlFactory(new FumlMappingFactory());
28-
FumlMapping.setElementFactory(new ElementFactory());
28+
FumlMapping.setElementFactory(Element.FACTORY);
2929
FumlMapping mapping = null;
3030
try {
3131
mapping = FumlMapping.parseAndMap(fileName);

org.modeldriven.alf.eclipse/src/org/modeldriven/alf/eclipse/uml/Element.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,18 @@
1818
import org.eclipse.emf.ecore.EStructuralFeature;
1919
import org.eclipse.emf.ecore.util.EcoreUtil;
2020
import org.eclipse.uml2.uml.UMLFactory;
21+
import org.modeldriven.alf.uml.ElementFactory;
2122
import org.modeldriven.alf.uml.StereotypeApplication;
2223

2324
public class Element implements org.modeldriven.alf.uml.Element {
2425

26+
public static final ElementFactory FACTORY = new ElementFactory(
27+
Element.class,
28+
org.eclipse.uml2.uml.Behavior.class,
29+
org.eclipse.uml2.uml.Class.class,
30+
org.eclipse.uml2.uml.Classifier.class,
31+
org.eclipse.uml2.uml.NamedElement.class);
32+
2533
protected org.eclipse.uml2.uml.Element base;
2634

2735
public Element(org.eclipse.uml2.uml.Element base) {
@@ -33,7 +41,7 @@ public org.eclipse.uml2.uml.Element getBase() {
3341
}
3442

3543
public static Element wrap(org.eclipse.uml2.uml.Element base) {
36-
return (Element)ElementFactory.wrap(base);
44+
return (Element)FACTORY.newInstanceFor(base);
3745
}
3846

3947
@Override

org.modeldriven.alf.eclipse/src/org/modeldriven/alf/eclipse/uml/ElementFactory.java

Lines changed: 0 additions & 21 deletions
This file was deleted.

org.modeldriven.alf.eclipse/src/org/modeldriven/alf/eclipse/uml/Stereotype.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import java.util.Collection;
1313

1414
import org.eclipse.uml2.uml.UMLFactory;
15+
import org.modeldriven.alf.uml.ElementFactory;
1516

1617
public class Stereotype extends Class_ implements org.modeldriven.alf.uml.Stereotype {
1718

org.modeldriven.alf.fuml.impl/src/org/modeldriven/alf/fuml/impl/environment/AlfOpaqueBehaviorExecution.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2013 Ivar Jacobson International SA
2+
* Copyright 2016 Data Access Technologies, Inc. (Model Driven Solutions)
33
* All rights reserved worldwide. This program and the accompanying materials
44
* are made available for use under the terms of the GNU General Public License
55
* (GPL) version 3 that accompanies this distribution and is available at
@@ -12,7 +12,6 @@
1212
import java.util.Collection;
1313
import java.util.List;
1414

15-
import org.modeldriven.alf.fuml.impl.uml.ElementFactory;
1615
import org.modeldriven.alf.fuml.impl.units.RootNamespaceImpl;
1716
import org.modeldriven.alf.fuml.mapping.FumlMapping;
1817
import org.modeldriven.alf.fuml.mapping.FumlMappingFactory;
@@ -52,7 +51,7 @@ private static RootNamespaceImpl getRootScopeImpl() {
5251
if (rootScopeImpl == null) {
5352
rootScopeImpl = new RootNamespaceImpl();
5453
FumlMapping.setFumlFactory(new FumlMappingFactory());
55-
FumlMapping.setElementFactory(new ElementFactory());
54+
FumlMapping.setElementFactory(org.modeldriven.alf.fuml.impl.uml.Element.FACTORY);
5655
}
5756
return rootScopeImpl;
5857
}

0 commit comments

Comments
 (0)