Commit 78cb92fa authored by Tiziano Munaro's avatar Tiziano Munaro

GREEN

Issue-Ref: 3867
Issue-Url: https://af3-developer.fortiss.org/issues/3867Signed-off-by: Tiziano Munaro's avatarTiziano Munaro <munaro@fortiss.org>
parent 577901ab
LightRunnerEditPartFactory.java a6f30775f03a3ba63e4294b0f978dcee8c58a097 RED
RaspberryPiEditPartFactory.java 889014d935acc48c36f082444927b4c0331542e6 RED
LightRunnerEditPartFactory.java 002983253defbb00c16ae9652d5767869afa567b GREEN
RaspberryPiEditPartFactory.java 5f30ffa740b2553b511e657fddb533d9f8810485 GREEN
......@@ -17,6 +17,10 @@ package org.fortiss.af3.platform.raspberry.ui.editpart;
import org.eclipse.gef.EditPart;
import org.fortiss.af3.platform.model.PlatformConnectorUnit;
import org.fortiss.af3.platform.raspberry.model.modelsconference.Button;
import org.fortiss.af3.platform.raspberry.model.modelsconference.LCD;
import org.fortiss.af3.platform.raspberry.model.modelsconference.LED;
import org.fortiss.af3.platform.raspberry.model.modelsconference.Poti;
import org.fortiss.af3.platform.ui.editpart.generic.StickyPlatformConnectorUnitEditPart;
import org.fortiss.tooling.kernel.ui.extension.IEditPartFactory;
......@@ -25,11 +29,11 @@ public class LightRunnerEditPartFactory implements IEditPartFactory {
/** {@inheritDoc} */
@Override
public EditPart createEditPart(EditPart context, Object model) {
// TODO (TM): Is it OK to replace the distinct classes with the PlatformConnectionUnit
// interface?
if(model instanceof PlatformConnectorUnit) {
if(model instanceof Button || model instanceof LCD || model instanceof LED ||
model instanceof Poti) {
return new StickyPlatformConnectorUnitEditPart((PlatformConnectorUnit)model);
}
return null;
}
}
......@@ -15,11 +15,22 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.ui.editpart;
import static org.conqat.lib.commons.reflect.ReflectionUtils.isInstanceOfAny;
import org.eclipse.gef.EditPart;
import org.eclipse.swt.graphics.Color;
import org.fortiss.af3.platform.model.PlatformConnectorUnit;
import org.fortiss.af3.platform.raspberry.model.CanBus;
import org.fortiss.af3.platform.raspberry.model.CanConnector;
import org.fortiss.af3.platform.raspberry.model.RaspberryPi;
import org.fortiss.af3.platform.raspberry.model.RaspberryPiReceiverBase;
import org.fortiss.af3.platform.raspberry.model.RaspberryPiTransmitterBase;
import org.fortiss.af3.platform.raspberry.model.brick.UIDReceiver;
import org.fortiss.af3.platform.raspberry.model.brick.UIDTtransmitter;
import org.fortiss.af3.platform.raspberry.model.gamepad.GamepadReceiverBase;
import org.fortiss.af3.platform.raspberry.model.rumblepad.RumbleMagnitudeStrong;
import org.fortiss.af3.platform.raspberry.model.rumblepad.RumbleMagnitudeWeak;
import org.fortiss.af3.platform.raspberry.model.rumblepad.RumblepadReceiverBase;
import org.fortiss.af3.platform.ui.DefaultStyle;
import org.fortiss.af3.platform.ui.editpart.generic.ExecutionUnitEditPart;
import org.fortiss.af3.platform.ui.editpart.generic.StickyPlatformConnectorUnitEditPart;
......@@ -47,9 +58,10 @@ public class RaspberryPiEditPartFactory implements IEditPartFactory {
};
} else if(model instanceof CanBus) {
return new TransmissionUnitDefaultEditPart((CanBus)model);
} else if(model instanceof PlatformConnectorUnit) {
// TODO (TM): Is it OK to replace the distinct classes with the PlatformConnectionUnit
// interface?
} else if(isInstanceOfAny(model, CanConnector.class, RaspberryPiTransmitterBase.class,
GamepadReceiverBase.class, UIDReceiver.class, UIDTtransmitter.class,
RumblepadReceiverBase.class, RumbleMagnitudeStrong.class, RumbleMagnitudeWeak.class,
RaspberryPiReceiverBase.class)) {
return new StickyPlatformConnectorUnitEditPart((PlatformConnectorUnit)model);
}
return null;
......
ActuatorDigitsPropertySection.java 2da54b75e713b77b6ccd6c7bb5c7f76913952de5 RED
ActuatorDigitsPropertySection.java 75be0be45a1bc462e1f6fe2d84f63c60b95360a0 GREEN
ActuatorPWMPropertySection.java f4c1c8285a9c1f234a2bdaad4e91d4487887c4a6 GREEN
BoundedIntPositiveZeroValidator.java dfde0d07d2c3465c9bf6f626b0000c2d049e52b1 GREEN
RaspberryPiExecutionUnitPropertySection.java f384f091a1681d8e2d352e0b5ad2ed38ab087897 GREEN
......
......@@ -27,7 +27,6 @@ import org.fortiss.af3.platform.raspberry.model.brick.ActuatorDigits;
import org.fortiss.af3.platform.raspberry.model.brick.BrickPackage;
import org.fortiss.tooling.kernel.ui.extension.base.PropertySectionBase;
// TODO (TM): How is some hexagonal output linked to being a coordinator unit? Clarify connection!
/** {@link PropertySectionBase} for {@link ActuatorDigits}s. */
public class ActuatorDigitsPropertySection extends PropertySectionBase {
/** The actuator model element. */
......@@ -40,7 +39,7 @@ public class ActuatorDigitsPropertySection extends PropertySectionBase {
public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
super.createControls(parent, tabbedPropertySheetPage);
hexOutputFlagButton = getWidgetFactory().createButton(composite, "", CHECK);
createFormEntry(hexOutputFlagButton, "Coordinator Unit");
createFormEntry(hexOutputFlagButton, "Show Hexadecimal Output");
hexOutputFlagButton.setSelection(false);
}
......
CanBusCompositor.java b634ad94492dc168cde6a69dce61bee7a53f8e37 GREEN
CanToRaspberryCompositor.java 927a741f55da203b96939f8620c5c9ba5cd3f046 GREEN
RaspberryPiCompositor.java ce2ba52a85a88fcba11366a08f0b426a0e866ee2 RED
RaspberryPiCompositor.java abe58f512a93fc7fc6d9a112423fb9091ea6fe9b GREEN
RaspberryToCanCompositor.java 7180ea9d371143bdc70ca75170a58d9162289b66 GREEN
......@@ -53,7 +53,6 @@ public class RaspberryPiCompositor
@Override
protected boolean isCorrectElementClass(IPlatformArchitectureElement container,
EObject contained) {
// TODO (TM): Is it OK to replace the distinct classes with the respective interfaces?
final boolean isConnector = isInstanceOfAny(contained, CanConnector.class,
RaspberryPiTransmitterBase.class, GamepadReceiverBase.class, UIDReceiver.class,
UIDTtransmitter.class, RumblepadReceiverBase.class, RumbleMagnitudeStrong.class,
......
......@@ -5,7 +5,7 @@ CameraDetectionStateLeftGeneratorExtension.java 1e16e08fbaf5174d6c72e370a05ebe61
CameraDetectionStateRightGeneratorExtension.java 51c7a9ac1b32957ba8ff95d40cd6c47ae8658ec0 GREEN
CameraDistanceLeftGeneratorExtension.java 717d1b1a242ea3d3b770d82713d8bf6b7ebdf938 GREEN
CameraDistanceRightGeneratorExtension.java 240fab2e83c0879be35def0347f260f6e98d7310 GREEN
CameraGeneratorExtensionBase.java c31f40ee7a8558c61160973b70f5c0f505881fbd RED
CameraGeneratorExtensionBase.java 9085f4e6cde84f5e2452f90df29ed10dcedf4224 GREEN
CameraLastUpdateGeneratorExtension.java 256cc4883dab48247a5a094f16268a75e06f2042 GREEN
CameraRoverDistanceGeneratorExtension.java d77c275bd2b74ed0cba3e00c33ed5738ccc2db47 GREEN
CameraRoverIDGeneratorExtension.java f03bf8ebe9ae77ebcd42d5c8534437171a7532b2 GREEN
......
......@@ -51,8 +51,7 @@ abstract class CameraGeneratorExtensionBase<T extends EObject>
sb.append("camera_client_initialize(camera_host, camera_port);\n");
return sb.toString();
}
// TODO (TM): Can this happen? If so, an error should be thrown.
return "FIXME(\"eContainer() of model element " + modelElement + " is not a RasPi\"";
return "Container of model element " + modelElement + " is not a RaspberryPi";
}
/** {@inheritDoc} */
......
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