Commit 3f1da66f authored by Alexander Diewald's avatar Alexander Diewald
Browse files

Merge branch '3820' into 'master'

3820: Remove deprecated type InternalComponent

See merge request af3/af3!236
parents d48c8871 8d9a3e1d
component.ecore 2e8e33839366d816de9ab2a91e88a18a343577f5 GREEN
component.ecore d6dac57ddefa29a5f9fefcc4e386b074fd0b483d GREEN
......@@ -460,11 +460,6 @@
<eParameters name="dest" eType="#//PropagatableSpecification"/>
</eOperations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="InternalComponent" eSuperTypes="#//Component">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="@deprecated"/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ComponentSpecificationsContainer" eSuperTypes="platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IModelElementSpecification platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IModelElement">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Interface implementing methods that allow to get the specifications of a component container."/>
......
......@@ -182,7 +182,6 @@
<genParameters ecoreParameter="component.ecore#//PropagatableSpecification/propagate/dest"/>
</genOperations>
</genClasses>
<genClasses ecoreClass="component.ecore#//InternalComponent"/>
<genClasses ecoreClass="component.ecore#//ComponentSpecificationsContainer"/>
<genClasses ecoreClass="component.ecore#//VerifBehaviourComponentSpecification">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute component.ecore#//VerifBehaviourComponentSpecification/verifBehaviour"/>
......
......@@ -5,4 +5,4 @@ ComponentStaticImpl.java f10f0890a53a96928e493ab58e33827ef4c34dde GREEN
LibraryComponentPackageStaticImpl.java 96613323976f3efc90ac83c116fc094979da7f5d GREEN
LibraryComponentStaticImpl.java 3e00f70f12e14e961f6fd41606176c144ef947ae GREEN
PortSpecificationStaticImpl.java 12806cc91a671460d2c67f72773d850f9ca39cc6 GREEN
PortStaticImpl.java 2fe2b113156c7618a16626a8a0d708369e9fe7bf GREEN
PortStaticImpl.java 5afd40f7859b1fbb0ba7e9d318a3b71b31a27fa7 GREEN
......@@ -16,7 +16,6 @@
package org.fortiss.af3.component.model.impl;
import static org.fortiss.af3.component.utils.ComponentModelElementFactory.createChannelAndAttach;
import static org.fortiss.af3.component.utils.ComponentModelElementFactory.createInternalComponent;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickFirstInstanceOf;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickInstanceOf;
......@@ -24,6 +23,7 @@ import java.util.Map;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.component.model.AF3ComponentFactory;
import org.fortiss.af3.component.model.Channel;
import org.fortiss.af3.component.model.Component;
import org.fortiss.af3.component.model.Port;
......@@ -104,6 +104,20 @@ class PortStaticImpl {
return null;
}
/**
* Creates a "counterpart" {@link Component} for the given {@link Component} (for use in
* {@code copyMap} updated by {@link #obtainComponent(Port, Map)} and
* {@link #obtainParent(Component, Map)}, only).
*/
private static Component createCounterPartComponent(Component component) {
// The counterpart Component is only used in the copyMap. Therefore, we directly
// use the generated factory since we do not need the specifications etc. created by
// ComponentModelElementFactory.
Component compCounterpart = AF3ComponentFactory.eINSTANCE.createComponent();
compCounterpart.setName(component.getName() + "_FAKE_COPY");
return compCounterpart;
}
/**
* Get the containing component, creating it and updating the copy map if necessary.
*/
......@@ -114,7 +128,7 @@ class PortStaticImpl {
if(compCounterpart == null) {
compCounterpart = (Component)copyMap.get(comp);
if(compCounterpart == null) {
compCounterpart = createInternalComponent(comp.getName() + "_FAKE_COPY");
compCounterpart = createCounterPartComponent(comp);
}
compCounterpart.getConnectors().add(portCopy);
}
......@@ -137,7 +151,7 @@ class PortStaticImpl {
}
parentCounterpart = (Component)copyMap.get(parent);
if(parentCounterpart == null) {
parentCounterpart = createInternalComponent(parent.getName() + "_FAKE_COPY");
parentCounterpart = createCounterPartComponent(parent);
copyMap.put(parent, parentCounterpart);
}
compCopy.setContainer(parentCounterpart);
......
......@@ -3,7 +3,7 @@ ComponentArchitectureTransformationBase.java ad6f06093cb813a05d13e87bbd0d620b43d
ComponentArchitectureUtils.java bb7964823a64af71d55a1bdf430c79792ad3edb0 GREEN
ComponentLibraryModelElementFactory.java b6c854e91d431fa3bc42fafdcf618a2040d23ab4 GREEN
ComponentLibraryUtils.java bab1cd340e2e724eedaabb4d2b455cba111b511b GREEN
ComponentModelElementFactory.java 962a6d69ba7d5b45dbbf046e9f51af53a835898a RED
ComponentModelElementFactory.java 7d73764f4ebc3a45bcd2833c68a06213109784a0 GREEN
ComponentProgramUtils.java 71faad6256159ee2d59843fcde83ac6995dff0fe GREEN
ComponentUtils.java d4aa3db08fafafaa937b976c85762f1009fa8dc7 GREEN
FormalAnalysisTransformationUtils.java 9c70f8b562f3861f3554157cc96bf2cd91767c4b GREEN
......
......@@ -34,7 +34,6 @@ import org.fortiss.af3.component.model.ComponentArchitecture;
import org.fortiss.af3.component.model.ComponentSpecificationsContainer;
import org.fortiss.af3.component.model.DataDictionaryRefSpec;
import org.fortiss.af3.component.model.InputPort;
import org.fortiss.af3.component.model.InternalComponent;
import org.fortiss.af3.component.model.OutputPort;
import org.fortiss.af3.component.model.Port;
import org.fortiss.af3.component.model.PortSpecification;
......@@ -242,13 +241,6 @@ public final class ComponentModelElementFactory {
return executionConfiguration;
}
/** Creates an internal component. */
public static Component createInternalComponent(String name) {
InternalComponent res = AF3ComponentFactory.eINSTANCE.createInternalComponent();
res.setName(name);
return res;
}
/** Creates a {@link ComponentSpecificationsContainer}. */
public static ComponentSpecificationsContainer createComponentSpecificationsContainer() {
return AF3ComponentFactory.eINSTANCE.createComponentSpecificationsContainer();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment