Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErnesto Posse2018-02-16 22:21:05 +0000
committerErnesto Posse2018-02-19 16:07:18 +0000
commit390a8b81d6ec011d7663212d7298bc0a7ae65fec (patch)
treebb651a912b5ef34559c29996ef1e99d503dc5e0a
parentfde41ff0ce90757257c029eccd14648ff9481001 (diff)
downloadorg.eclipse.papyrus-rt-390a8b81d6ec011d7663212d7298bc0a7ae65fec.tar.gz
org.eclipse.papyrus-rt-390a8b81d6ec011d7663212d7298bc0a7ae65fec.tar.xz
org.eclipse.papyrus-rt-390a8b81d6ec011d7663212d7298bc0a7ae65fec.zip
Bug 531300 - [core][facade] compilation error in FacadeReference
Fix type issue in the UML-RT façade. Change-Id: Iaac6579e335abbe5200d328dd5c23944634d45c7 Signed-off-by: Ernesto Posse <eposse@gmail.com>
-rw-r--r--plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/FacadeObjectImpl.java2
-rw-r--r--plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/FacadeType.java7
2 files changed, 5 insertions, 4 deletions
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/FacadeObjectImpl.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/FacadeObjectImpl.java
index 2bf697c36..3b730ddbf 100644
--- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/FacadeObjectImpl.java
+++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/FacadeObjectImpl.java
@@ -206,7 +206,7 @@ public abstract class FacadeObjectImpl extends MinimalEObjectImpl.Container impl
* react to changes in the UML (for example, to invalidate cached information
* or to send change events).
*/
- protected static class BasicFacadeAdapter<F extends FacadeObjectImpl> extends AdapterImpl implements FacadeAdapter, Supplier<F> {
+ protected static class BasicFacadeAdapter<F extends FacadeObject> extends AdapterImpl implements FacadeAdapter, Supplier<F> {
private final Supplier<F> facade;
BasicFacadeAdapter(F facade) {
diff --git a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/FacadeType.java b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/FacadeType.java
index a92e4ed52..656445ded 100644
--- a/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/FacadeType.java
+++ b/plugins/umlrt/profile/org.eclipse.papyrusrt.umlrt.uml/src/org/eclipse/papyrusrt/umlrt/uml/internal/facade/impl/FacadeType.java
@@ -33,7 +33,7 @@ import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
/**
* Metadata object describing the type of a façade object.
*/
-class FacadeType<T extends Element, S extends EObject, F extends FacadeObjectImpl> {
+class FacadeType<T extends Element, S extends EObject, F extends FacadeObject> {
static final EClass NO_STEREOTYPE = null;
private final Class<F> instanceClass;
@@ -61,6 +61,7 @@ class FacadeType<T extends Element, S extends EObject, F extends FacadeObjectImp
super();
+ assert FacadeObjectImpl.class.isAssignableFrom(instanceClass);
this.instanceClass = instanceClass;
this.umlMetaclass = umlMetaclass;
this.stereotype = stereotype;
@@ -112,7 +113,7 @@ class FacadeType<T extends Element, S extends EObject, F extends FacadeObjectImp
if (stereotype == NO_STEREOTYPE) {
// There is no stereotype expected
- facade = facadeFactory.apply(element);
+ facade = (FacadeObjectImpl) (facadeFactory.apply(element));
if (facade != null) {
result = facade.createFacadeAdapter();
result.addAdapter(element);
@@ -121,7 +122,7 @@ class FacadeType<T extends Element, S extends EObject, F extends FacadeObjectImp
} else {
S application = getStereotypeApplication(element);
if (application != null) {
- facade = facadeFactory.apply(element);
+ facade = (FacadeObjectImpl) facadeFactory.apply(element);
if (facade != null) {
result = facade.createFacadeAdapter();
result.addAdapter(element);

Back to the top