Commit f74d7de1 authored by Simon Barner's avatar Simon Barner
Browse files

Style cleanup (no functional change)

Issue-Ref: 3428
Issue-Url: https://af3-developer.fortiss.org/issues/3428

Signed-off-by: Simon Barner's avatarSimon Barner <barner@fortiss.org>
parent bc9f4550
DeploymentParameterKeyStaticImpl.java 9e45a8b171af4c01f34c3f86665f350b94b5baff GREEN
DeploymentParameterValueStaticImpl.java 18fc585cef27ec7acef9b43ea1af9ed9f8b063f8 GREEN
DeploymentStaticImpl.java 719a416c585146e833a598677fa85ee21ae5e5a5 YELLOW
DeploymentStaticImpl.java 45e9757a01917e024733e28b2a8dd1d380a6a2ae YELLOW
SegmentStaticImpl.java b318f19b71321f44b05bae635c50af4ef7ffeae2 GREEN
TransceiverPortStaticImpl.java 82b7721c45dc9033dec9947b14a7deb5bc46c31e GREEN
......@@ -23,8 +23,11 @@ import static org.fortiss.af3.deployment.utils.DeploymentParameterUtils.getAllDe
import static org.fortiss.af3.deployment.utils.DeploymentParameterUtils.instantiateDeploymentParameterMap;
import static org.fortiss.af3.deployment.utils.DeploymentUtils.getComponentArchitecture;
import static org.fortiss.af3.deployment.utils.DeploymentUtils.getPlatformArchitecture;
import static org.fortiss.af3.project.utils.ProjectUtils.getFileProject;
import static org.fortiss.tooling.base.utils.AnnotationUtils.getAnnotation;
import static org.fortiss.tooling.kernel.utils.KernelModelElementUtils.runAsCommand;
import static org.fortiss.tooling.kernel.utils.LoggingUtils.error;
import static org.fortiss.tooling.kernel.utils.LoggingUtils.warning;
import java.util.ArrayList;
import java.util.Collection;
......@@ -43,14 +46,11 @@ import org.fortiss.af3.deployment.model.DeploymentParameterKey;
import org.fortiss.af3.deployment.model.DeploymentParameterValue;
import org.fortiss.af3.platform.model.ExecutionUnit;
import org.fortiss.af3.project.model.FileProject;
import org.fortiss.af3.project.utils.ProjectUtils;
import org.fortiss.tooling.base.annotation.AnnotationEntry;
import org.fortiss.tooling.base.annotation.IAnnotationValueService;
import org.fortiss.tooling.base.model.element.IAnnotatedSpecification;
import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
import org.fortiss.tooling.kernel.service.IPersistencyService;
import org.fortiss.tooling.kernel.utils.KernelModelElementUtils;
import org.fortiss.tooling.kernel.utils.LoggingUtils;
/**
* Helper methods for {@link EOperation}s of {@link Deployment}.
......@@ -97,7 +97,7 @@ public class DeploymentStaticImpl {
if(parameterValue == null) {
final DeploymentParameterValue newParameterValue =
createDeploymentParameterValue(component, executionUnit);
KernelModelElementUtils.runAsCommand(deployment, new Runnable() {
runAsCommand(deployment, new Runnable() {
@Override
public void run() {
......@@ -367,6 +367,7 @@ public class DeploymentStaticImpl {
Collection<ExecutionUnit> executionUnits =
getAllDeploymentParameterExecutionUnits(getPlatformArchitecture(deployment));
AF3DeploymentActivator plugin = AF3DeploymentActivator.getDefault();
for(Iterator<Entry<DeploymentParameterKey, DeploymentParameterValue>> iter =
deploymentParameterMap.iterator(); iter.hasNext();) {
......@@ -381,7 +382,7 @@ public class DeploymentStaticImpl {
// component / executionUnit might be null if the deployment parameter map is
// updated when deleting an element
if(component != null && executionUnit != null) {
error(AF3DeploymentActivator.getDefault(), getProjectName(deployment) +
error(plugin, getProjectName(deployment) +
": Deployment parameter map contains an invalid entry (Component ID=" +
component.getId() + ", ExecutionUnit ID=" + executionUnit.getId() +
"). Skipped.");
......@@ -393,7 +394,7 @@ public class DeploymentStaticImpl {
// component / executionUnit might be null if the deployment parameter map is
// updated when deleting an element
if(component != null && executionUnit != null) {
error(AF3DeploymentActivator.getDefault(),
error(plugin,
getProjectName(deployment) +
": Deployment parameter map contains a dupliate entry (Component ID=" +
component.getId() + ", ExecutionUnit ID=" +
......@@ -418,15 +419,14 @@ public class DeploymentStaticImpl {
instantiateDeploymentParameterMap(deployment, false);
if(oldSize != deploymentParameterMap.size()) {
LoggingUtils
.warning(AF3DeploymentActivator.getDefault(), getProjectName(deployment) +
": Deployment parameter map was out of sync with component-to-execution unit allocation. Fixed.");
warning(plugin, getProjectName(deployment) +
": Deployment parameter map was out of sync with component-to-execution unit allocation. Fixed.");
}
}
/** Helper to determine project name for {@link Deployment}. */
private static String getProjectName(final Deployment deployment) {
FileProject project = ProjectUtils.getFileProject(deployment);
FileProject project = getFileProject(deployment);
String projectName =
project != null && project.getName() != null ? project.getName()
: "<unnamed project>";
......
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