Commit 992d5ad5 authored by Alexander Diewald's avatar Alexander Diewald
Browse files

Exploration: YELLOW

Remove outdated methods that are not used any more. Their referencing methods from deprecated EClasses have been modified to return empty lists.
refs 3201
parent 7f073dcc
......@@ -37,14 +37,21 @@
</eAnnotations>
<eOperations name="getAllPlatformEntries" upperBound="-1" eType="#//PlatformEntry">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="return org.fortiss.af3.exploration.model.impl.HistoryStaticImpl.getAllPlatformEntries(this);"/>
<details key="body" value="return new org.eclipse.emf.common.util.BasicEList&lt;>();"/>
<details key="documentation" value="TODO: write documentation (in the model!)"/>
<contents xsi:type="ecore:EOperation" name="getAllPlatformEntries" upperBound="-1"
eType="#//PlatformEntry">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="return new BasicEList&lt;>();"/>
<details key="documentation" value="TODO: write documentation (in the model!)"/>
</eAnnotations>
</contents>
</eAnnotations>
</eOperations>
<eOperations name="getNumberOfDeploymentEntries" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="return org.fortiss.af3.exploration.model.impl.HistoryStaticImpl.getNumberOfDeploymentEntries(this);"/>
<details key="documentation" value="TODO: write documentation (in the model!)"/>
<details key="body" value="return 0;"/>
<details key="documentation" value="@deprecated This method always returns 0."/>
</eAnnotations>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="date" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate">
......@@ -105,7 +112,7 @@
</eAnnotations>
<eOperations name="getAllDeployments" upperBound="-1" eType="#//DeploymentEntry">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="return org.fortiss.af3.exploration.model.impl.PlatformEntryStaticImpl.getAllDeployments(this);"/>
<details key="body" value="return new org.eclipse.emf.common.util.BasicEList&lt;>();"/>
<details key="documentation" value="TODO: write documentation (in the model!)"/>
</eAnnotations>
</eOperations>
......
HistoryStaticImpl.java 892e2e2e47a8e26183813e8380a0aec04cc55132 RED
PlatformEntryStaticImpl.java 9c6bc5f0f56eb4800d523e4943e3a5561940f61b RED
SetStaticImpl.java e30e0d3484070365345d8d6d948d6bfd95d8bc1b YELLOW
HistoryStaticImpl.java edad962cd5620f7dc107ff60317f51c8f45b4f08 YELLOW
SuperSetMapStaticImpl.java 5080580ae8dfb6008fa6189b07fa01c70e612fc3 GREEN
......@@ -26,29 +26,11 @@ import org.fortiss.af3.efficientdeployment.model.PlatformEntry;
* @author eder
*/
// TODO (#3283): Could be removed.
@SuppressWarnings({"javadoc", "deprecation"})
public class HistoryStaticImpl {
/** returns the number of deployments of the given history */
public static int getNumberOfDeploymentEntries(History history) {
int size = 0;
for(PlatformEntry he : history.getGeneratedPlatformEntries()) {
size += he.getAllDeployments().size();
}
if(history.getManualPlatformEntry() != null) {
for(PlatformEntry pe : history.getManualPlatformEntry()) {
size += pe.getGeneratedDeploymentEntries().size();
}
if(!history.getManualPlatformEntry().isEmpty()) {
for(PlatformEntry pe : history.getManualPlatformEntry()) {
if(pe.getManualDeploymentEntry() != null)
size++;
}
}
}
return size;
}
// The method below is called by the schedule synthesis indirectly by the DSE Navigator.
// Removing this method now is too invasive, so delay removal until the release is done. See
// above ticket for tracking this issue.
/** Returns all platform entries of the given history */
public static EList<PlatformEntry> getAllPlatformEntries(History history) {
EList<PlatformEntry> platformEntries = new BasicEList<PlatformEntry>();
......
/*-------------------------------------------------------------------------+
| Copyright 2013 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.exploration.model.impl;
import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
import org.fortiss.af3.efficientdeployment.model.DeploymentEntry;
import org.fortiss.af3.efficientdeployment.model.PlatformEntry;
/**
* Static Impl
*
* @author eder
*/
// TODO (#3283): Could be removed.
public class PlatformEntryStaticImpl {
/**
* Returns all Deployments for a given {@link PlatformEntry}
*
* @param gtaEntry
* corresponds to a {@link PlatformEntry}
* @return EList of {@link DeploymentEntry}
*/
public static EList<DeploymentEntry> getAllDeployments(PlatformEntry gtaEntry) {
EList<DeploymentEntry> historyEntries = new BasicEList<DeploymentEntry>();
historyEntries.addAll(gtaEntry.getGeneratedDeploymentEntries());
if(gtaEntry.getManualDeploymentEntry() != null)
historyEntries.add(gtaEntry.getManualDeploymentEntry());
return historyEntries;
}
}
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