Commit 93bdc29b authored by Tiziano Munaro's avatar Tiziano Munaro

Fix property section labels

Issue-Ref: 3867
Issue-Url: https://af3-developer.fortiss.org/issues/3867Signed-off-by: Tiziano Munaro's avatarTiziano Munaro <munaro@fortiss.org>
parent 3e5128eb
ActuatorDigitsPropertySection.java 2da54b75e713b77b6ccd6c7bb5c7f76913952de5 RED
ActuatorPWMPropertySection.java 33c475007a49e57be43b74c05df9120e491e8b1c RED
ActuatorPWMPropertySection.java f4c1c8285a9c1f234a2bdaad4e91d4487887c4a6 GREEN
BoundedIntPositiveZeroValidator.java dfde0d07d2c3465c9bf6f626b0000c2d049e52b1 GREEN
RaspberryPiExecutionUnitPropertySection.java c97e3904fec75d7d9db352ac18c0f7a04c7efcd0 RED
UIDUnitPropertySection.java e87f36e9d85aa8320b28fd106c746c704be4ec00 RED
RaspberryPiExecutionUnitPropertySection.java f384f091a1681d8e2d352e0b5ad2ed38ab087897 GREEN
UIDUnitPropertySection.java d2f64193f25734f8955f2b3d1d1a681390d0acf3 GREEN
......@@ -40,9 +40,9 @@ public class ActuatorPWMPropertySection extends PropertySectionBase {
@Override
public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
super.createControls(parent, tabbedPropertySheetPage);
// TODO (TM): A decorated text is not displayed, leaving the user without a clue what the
// text field is about. Call the `createFormEntry` method with the following string:
pwmChannelText = createDecoratedText("PWM Channel (0, 1)");
String pwmChannelLabel = "PWM Channel (0, 1)";
pwmChannelText = createDecoratedText(pwmChannelLabel);
createFormEntry(pwmChannelText, pwmChannelLabel);
}
/** {@inheritDoc} */
......
......@@ -54,22 +54,38 @@ public class RaspberryPiExecutionUnitPropertySection extends PropertySectionBase
/** The control center server IP port widget. */
private Text ccPortText;
// TODO(TM) Labels are not shown when adding a decorated text only. Call the `createFormEntry`
// method for all of the UI elements!
/** {@inheritDoc} */
@Override
public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
super.createControls(parent, tabbedPropertySheetPage);
canCoordinationIDText = createDecoratedText("CAN Unit ID");
cycleTimeText = createDecoratedText("Cycle Time (ms)");
String canCoordinationIDLabel = "CAN Unit ID";
String cycleTimeLabel = "Cycle Time (ms)";
String coordinatorFlagLabel = "Coordinator Unit";
String ipAddressLabel = "Unit IP Address";
String cameraServerAddressLabel = "Camera Server IP Address";
String cameraServerPortLabel = "Camera Server IP Port";
String ccAddressLabel = "Control Center IP Address";
String ccPortTextLabel = "Control Center IP Port";
canCoordinationIDText = createDecoratedText(canCoordinationIDLabel);
cycleTimeText = createDecoratedText(cycleTimeLabel);
ipAddressText = createDecoratedText(ipAddressLabel);
cameraServerAddressText = createDecoratedText(cameraServerAddressLabel);
cameraServerPortText = createDecoratedText(cameraServerPortLabel);
ccAddressText = createDecoratedText(ccAddressLabel);
ccPortText = createDecoratedText(ccPortTextLabel);
coordinatorFlagButton = getWidgetFactory().createButton(composite, "", SWT.CHECK);
createFormEntry(coordinatorFlagButton, "Coordinator Unit");
coordinatorFlagButton.setSelection(false);
ipAddressText = createDecoratedText("Unit IP Address");
cameraServerAddressText = createDecoratedText("Camera Server IP Address");
cameraServerPortText = createDecoratedText("Camera Server IP Port");
ccAddressText = createDecoratedText("Control Center IP Address");
ccPortText = createDecoratedText("Control Center IP Port");
createFormEntry(canCoordinationIDText, canCoordinationIDLabel);
createFormEntry(cycleTimeText, cycleTimeLabel);
createFormEntry(coordinatorFlagButton, coordinatorFlagLabel);
createFormEntry(ipAddressText, ipAddressLabel);
createFormEntry(cameraServerAddressText, cameraServerAddressLabel);
createFormEntry(cameraServerPortText, cameraServerPortLabel);
createFormEntry(ccAddressText, ccAddressLabel);
createFormEntry(ccPortText, ccPortTextLabel);
}
/** {@inheritDoc} */
......
......@@ -38,9 +38,9 @@ public class UIDUnitPropertySection extends PropertySectionBase {
@Override
public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
super.createControls(parent, tabbedPropertySheetPage);
// TODO (TM): A decorated text is not displayed, leaving the user without a clue what the
// text field is about. Use the `createFormEntry` instead.
uidText = createDecoratedText("UID");
String uidLabel = "UID";
uidText = createDecoratedText(uidLabel);
createFormEntry(uidText, uidLabel);
}
/** {@inheritDoc} */
......
CanBusCompositor.java b634ad94492dc168cde6a69dce61bee7a53f8e37 GREEN
CanToRaspberryCompositor.java 927a741f55da203b96939f8620c5c9ba5cd3f046 GREEN
RaspberryPiCompositor.java fc4d52f1c2edc550bfb1ed67c4c8efd788fa6eb7 RED
RaspberryPiCompositor.java 5409d9af73a9b72bb34f156854fd4c39ee60b489 RED
RaspberryToCanCompositor.java 7180ea9d371143bdc70ca75170a58d9162289b66 GREEN
......@@ -20,44 +20,16 @@ import static org.conqat.lib.commons.reflect.ReflectionUtils.isInstanceOfAny;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.platform.compose.PlatformArchitectureElementCompositorBase;
import org.fortiss.af3.platform.model.IPlatformArchitectureElement;
import org.fortiss.af3.platform.raspberry.model.ActuatorPWM;
import org.fortiss.af3.platform.raspberry.model.CanConnector;
import org.fortiss.af3.platform.raspberry.model.ConsoleOutput;
import org.fortiss.af3.platform.raspberry.model.RaspberryPi;
import org.fortiss.af3.platform.raspberry.model.brick.AccelerationXSensor;
import org.fortiss.af3.platform.raspberry.model.brick.AccelerationYSensor;
import org.fortiss.af3.platform.raspberry.model.brick.AccelerationZSensor;
import org.fortiss.af3.platform.raspberry.model.brick.ActuatorDigits;
import org.fortiss.af3.platform.raspberry.model.brick.AngularVelocityXSensor;
import org.fortiss.af3.platform.raspberry.model.brick.AngularVelocityYSensor;
import org.fortiss.af3.platform.raspberry.model.brick.AngularVelocityZSensor;
import org.fortiss.af3.platform.raspberry.model.brick.LEDButtonBActuator;
import org.fortiss.af3.platform.raspberry.model.brick.LEDButtonGActuator;
import org.fortiss.af3.platform.raspberry.model.brick.LEDButtonRActuator;
import org.fortiss.af3.platform.raspberry.model.brick.LaserRangeSensor;
import org.fortiss.af3.platform.raspberry.model.brick.UltraSonicSensor;
import org.fortiss.af3.platform.raspberry.model.camera.CameraConnected;
import org.fortiss.af3.platform.raspberry.model.camera.CameraCurveDetected;
import org.fortiss.af3.platform.raspberry.model.camera.CameraCurveRadius;
import org.fortiss.af3.platform.raspberry.model.camera.CameraDetectionStateLeft;
import org.fortiss.af3.platform.raspberry.model.camera.CameraDetectionStateRight;
import org.fortiss.af3.platform.raspberry.model.camera.CameraDistanceLeft;
import org.fortiss.af3.platform.raspberry.model.camera.CameraDistanceRight;
import org.fortiss.af3.platform.raspberry.model.camera.CameraLastUpdate;
import org.fortiss.af3.platform.raspberry.model.camera.CameraRoverDistance;
import org.fortiss.af3.platform.raspberry.model.camera.CameraRoverID;
import org.fortiss.af3.platform.raspberry.model.camera.CameraRoverRecognized;
import org.fortiss.af3.platform.raspberry.model.camera.CameraYawAngle;
import org.fortiss.af3.platform.raspberry.model.controlcenter.ControlCenterDownstreamInput;
import org.fortiss.af3.platform.raspberry.model.controlcenter.ControlCenterUpstreamOutput;
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.motorcontrol.MotorControlInput;
import org.fortiss.af3.platform.raspberry.model.motorcontrol.MotorControlOutput;
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.raspberry.model.v2v.V2VInput;
import org.fortiss.af3.platform.raspberry.model.v2v.V2VOuput;
import org.fortiss.tooling.kernel.extension.data.IElementCompositionContext;
import org.fortiss.tooling.kernel.extension.data.Prototype;
......@@ -82,20 +54,11 @@ public class RaspberryPiCompositor
// TODO (TM): Create a marker interface for all RPi-compatible connectors.
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,
ActuatorPWM.class, ConsoleOutput.class, GamepadReceiverBase.class,
UltraSonicSensor.class, LaserRangeSensor.class, AccelerationXSensor.class,
AccelerationYSensor.class, AccelerationZSensor.class, AngularVelocityXSensor.class,
AngularVelocityYSensor.class, AngularVelocityZSensor.class, ActuatorDigits.class,
LEDButtonRActuator.class, LEDButtonGActuator.class, LEDButtonBActuator.class,
RumblepadReceiverBase.class, RumbleMagnitudeStrong.class, RumbleMagnitudeWeak.class,
MotorControlInput.class, MotorControlOutput.class, CameraConnected.class,
CameraLastUpdate.class, CameraDistanceLeft.class, CameraDistanceRight.class,
CameraYawAngle.class, CameraDetectionStateLeft.class,
CameraDetectionStateRight.class, CameraRoverRecognized.class, CameraRoverID.class,
CameraRoverDistance.class, CameraCurveDetected.class, CameraCurveRadius.class,
ControlCenterDownstreamInput.class, ControlCenterUpstreamOutput.class,
V2VInput.class, V2VOuput.class);
RaspberryPiTransmitterBase.class, GamepadReceiverBase.class, UIDReceiver.class,
UIDTtransmitter.class, RumblepadReceiverBase.class, RumbleMagnitudeStrong.class,
RumbleMagnitudeWeak.class, RaspberryPiReceiverBase.class);
if(container != null) {
final boolean isRaspberryPi = isInstanceOfAny(container, RaspberryPi.class);
return isRaspberryPi && isConnector;
......
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