Commit 2ad85d39 authored by Simon Barner's avatar Simon Barner

Fix generics parameters of RaspBerry model element handlers

* Avoids class cast exceptions

Issue-Ref: 3939
Issue-Url: https://af3-developer.fortiss.org/issues/3939Signed-off-by: Simon Barner's avatarSimon Barner <barner@fortiss.org>
parent 57fbabd7
......@@ -353,6 +353,9 @@
<modelElementClass
modelElementClass="org.fortiss.af3.platform.raspberry.model.rumblepad.Right_StickY_Position">
</modelElementClass>
</modelElementHandler>
<modelElementHandler
handler="org.fortiss.af3.platform.raspberry.ui.handler.RumblepadTransmitterHandler">
<modelElementClass
modelElementClass="org.fortiss.af3.platform.raspberry.model.rumblepad.RumbleMagnitudeStrong">
</modelElementClass>
......
BrickletHandler.java 7ab15d386267566598318cb8e0ef6ef6fe7f396f YELLOW
CameraInputHandler.java 9e2a9af5c50fd1479b1b6d1cc035ef013e90170c YELLOW
CameraInputHandler.java 60472eedd8ed25942e98282add0f8477e0950ae4 YELLOW
CanBusHandler.java 53e77684e286dc391037d11697c3a9c1ec1d630b YELLOW
CanConnectorHandler.java 70b38ae6101c4ca7287cf53b023f591f5270f0ab YELLOW
ConsoleOutputHandler.java cbd2aff4648b90cd3c02f24627ce93ae2b3cfcaf YELLOW
ControlCenterDownstreamInputHandler.java 787c2b0004b00dd72bd9f5236a3a9c75a0ceb53b YELLOW
ControlCenterUpstreamOutputHandler.java 2297194a767d4ea699bd9daa1e7b84dba3f6ad22 YELLOW
GamepadReceiverHandler.java 4f9b092e1eff13308abb1cc722e3f05f4ad5114d YELLOW
MotorControlInputHandler.java a0e486765b66a1aa2f986ed345550fce7b5e20f1 YELLOW
MotorControlOutputHandler.java 12aaed81f400acd87074a279ba5a3061b0bb6abb YELLOW
PWMActuatorHandler.java 3d393e244cc6847fe110abc78d57d8e4a8348bf7 YELLOW
ConsoleOutputHandler.java 90770ab20059f49099d7831684ca49f6e6b8c4e2 YELLOW
ControlCenterDownstreamInputHandler.java 1ac64f3bbe4b6ee61a14525ecb8084fc599b7c4e YELLOW
ControlCenterUpstreamOutputHandler.java 2c9f26139ecedc27f80f64ef87d1bef88fc9554e YELLOW
GamepadReceiverHandler.java 790675dd46dcfaeff159a203343dfce52ac71e15 YELLOW
MotorControlInputHandler.java 7dcacbaf55aca84584d0b16f46b02ddfa9b67dc8 YELLOW
MotorControlOutputHandler.java 4fdc9b470b21fe987098206af2dd1409130e7895 YELLOW
PWMActuatorHandler.java 44bc3b0aa93022360b59c23d1ba0c61c074c8180 YELLOW
RaspberryPiHandler.java ca52c65189230efaa147421f2240028ee814b036 YELLOW
RumblepadReceiverHandler.java 58d5a478d524fc0a4d380955c51543041465e258 YELLOW
V2VInputHandler.java 20e2710779a639f66d3d4a58e0002510f5f05872 YELLOW
V2VOuputHandler.java 9e7acead6b9ea2c1bc771123b1f0df606c7ce950 YELLOW
RumblepadReceiverHandler.java 1febd1d588c99b961c86cfcc03615d9678342459 YELLOW
RumblepadTransmitterHandler.java 21d0ac32fe73908845695d576a1d66d27d3d63ae YELLOW
V2VInputHandler.java 624f2901bf59edbdf6145427049dbfefad055b6b YELLOW
V2VOuputHandler.java bcb53066cc339455786f67e9f50f0c6b8e9130e7 YELLOW
......@@ -17,12 +17,13 @@ package org.fortiss.af3.platform.raspberry.ui.handler;
import static org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator.PLUGIN_ID;
import org.fortiss.af3.platform.raspberry.model.brick.UIDUnit;
import org.fortiss.af3.platform.raspberry.model.RaspberryPiReceiverBase;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHandlerBase;
/** {@link IModelElementHandler} for camera model elements. */
public class CameraInputHandler extends NamedCommentedModelElementHandlerBase<UIDUnit> {
public class CameraInputHandler
extends NamedCommentedModelElementHandlerBase<RaspberryPiReceiverBase> {
/** {@inheritDoc} */
@Override
......@@ -32,7 +33,7 @@ public class CameraInputHandler extends NamedCommentedModelElementHandlerBase<UI
/** {@inheritDoc} */
@Override
protected String getIconPath(UIDUnit element) {
protected String getIconPath(RaspberryPiReceiverBase element) {
return "icons/unknown.png";
}
}
......@@ -18,12 +18,11 @@ package org.fortiss.af3.platform.raspberry.ui.handler;
import static org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator.PLUGIN_ID;
import org.fortiss.af3.platform.raspberry.model.ConsoleOutput;
import org.fortiss.af3.platform.raspberry.model.brick.UIDUnit;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHandlerBase;
/** {@link IModelElementHandler} for {@link ConsoleOutput}s. */
public class ConsoleOutputHandler extends NamedCommentedModelElementHandlerBase<UIDUnit> {
public class ConsoleOutputHandler extends NamedCommentedModelElementHandlerBase<ConsoleOutput> {
/** {@inheritDoc} */
@Override
......@@ -33,7 +32,7 @@ public class ConsoleOutputHandler extends NamedCommentedModelElementHandlerBase<
/** {@inheritDoc} */
@Override
protected String getIconPath(UIDUnit element) {
protected String getIconPath(ConsoleOutput element) {
return "icons/unknown.png";
}
}
......@@ -17,14 +17,13 @@ package org.fortiss.af3.platform.raspberry.ui.handler;
import static org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator.PLUGIN_ID;
import org.fortiss.af3.platform.raspberry.model.brick.UIDUnit;
import org.fortiss.af3.platform.raspberry.model.controlcenter.ControlCenterDownstreamInput;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHandlerBase;
/** {@link IModelElementHandler} for {@link ControlCenterDownstreamInput}s. */
public class ControlCenterDownstreamInputHandler
extends NamedCommentedModelElementHandlerBase<UIDUnit> {
extends NamedCommentedModelElementHandlerBase<ControlCenterDownstreamInput> {
/** {@inheritDoc} */
@Override
......@@ -34,7 +33,7 @@ public class ControlCenterDownstreamInputHandler
/** {@inheritDoc} */
@Override
protected String getIconPath(UIDUnit element) {
protected String getIconPath(ControlCenterDownstreamInput element) {
return "icons/unknown.png";
}
}
......@@ -17,14 +17,13 @@ package org.fortiss.af3.platform.raspberry.ui.handler;
import static org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator.PLUGIN_ID;
import org.fortiss.af3.platform.raspberry.model.brick.UIDUnit;
import org.fortiss.af3.platform.raspberry.model.controlcenter.ControlCenterUpstreamOutput;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHandlerBase;
/** {@link IModelElementHandler} for {@link ControlCenterUpstreamOutput}s. */
public class ControlCenterUpstreamOutputHandler
extends NamedCommentedModelElementHandlerBase<UIDUnit> {
extends NamedCommentedModelElementHandlerBase<ControlCenterUpstreamOutput> {
/** {@inheritDoc} */
@Override
......@@ -34,7 +33,7 @@ public class ControlCenterUpstreamOutputHandler
/** {@inheritDoc} */
@Override
protected String getIconPath(UIDUnit element) {
protected String getIconPath(ControlCenterUpstreamOutput element) {
return "icons/unknown.png";
}
}
......@@ -17,13 +17,13 @@ package org.fortiss.af3.platform.raspberry.ui.handler;
import static org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator.PLUGIN_ID;
import org.fortiss.af3.platform.raspberry.model.brick.UIDUnit;
import org.fortiss.af3.platform.raspberry.model.gamepad.GamepadReceiverBase;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHandlerBase;
/** {@link IModelElementHandler} for {@link GamepadReceiverBase}s. */
public class GamepadReceiverHandler extends NamedCommentedModelElementHandlerBase<UIDUnit> {
public class GamepadReceiverHandler
extends NamedCommentedModelElementHandlerBase<GamepadReceiverBase> {
/** {@inheritDoc} */
@Override
......@@ -33,7 +33,7 @@ public class GamepadReceiverHandler extends NamedCommentedModelElementHandlerBas
/** {@inheritDoc} */
@Override
protected String getIconPath(UIDUnit element) {
protected String getIconPath(GamepadReceiverBase element) {
return "icons/unknown.png";
}
}
......@@ -17,13 +17,13 @@ package org.fortiss.af3.platform.raspberry.ui.handler;
import static org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator.PLUGIN_ID;
import org.fortiss.af3.platform.raspberry.model.brick.UIDUnit;
import org.fortiss.af3.platform.raspberry.model.motorcontrol.MotorControlInput;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHandlerBase;
/** {@link IModelElementHandler} for {@link MotorControlInput}s. */
public class MotorControlInputHandler extends NamedCommentedModelElementHandlerBase<UIDUnit> {
public class MotorControlInputHandler
extends NamedCommentedModelElementHandlerBase<MotorControlInput> {
/** {@inheritDoc} */
@Override
......@@ -33,7 +33,7 @@ public class MotorControlInputHandler extends NamedCommentedModelElementHandlerB
/** {@inheritDoc} */
@Override
protected String getIconPath(UIDUnit element) {
protected String getIconPath(MotorControlInput element) {
return "icons/unknown.png";
}
}
......@@ -17,13 +17,13 @@ package org.fortiss.af3.platform.raspberry.ui.handler;
import static org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator.PLUGIN_ID;
import org.fortiss.af3.platform.raspberry.model.brick.UIDUnit;
import org.fortiss.af3.platform.raspberry.model.motorcontrol.MotorControlOutput;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHandlerBase;
/** {@link IModelElementHandler} for {@link MotorControlOutput}s. */
public class MotorControlOutputHandler extends NamedCommentedModelElementHandlerBase<UIDUnit> {
public class MotorControlOutputHandler
extends NamedCommentedModelElementHandlerBase<MotorControlOutput> {
/** {@inheritDoc} */
@Override
......@@ -33,7 +33,7 @@ public class MotorControlOutputHandler extends NamedCommentedModelElementHandler
/** {@inheritDoc} */
@Override
protected String getIconPath(UIDUnit element) {
protected String getIconPath(MotorControlOutput element) {
return "icons/unknown.png";
}
}
......@@ -18,12 +18,11 @@ package org.fortiss.af3.platform.raspberry.ui.handler;
import static org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator.PLUGIN_ID;
import org.fortiss.af3.platform.raspberry.model.ActuatorPWM;
import org.fortiss.af3.platform.raspberry.model.brick.UIDUnit;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHandlerBase;
/** {@link IModelElementHandler} for {@link ActuatorPWM}s. */
public class PWMActuatorHandler extends NamedCommentedModelElementHandlerBase<UIDUnit> {
public class PWMActuatorHandler extends NamedCommentedModelElementHandlerBase<ActuatorPWM> {
/** {@inheritDoc} */
@Override
......@@ -33,7 +32,7 @@ public class PWMActuatorHandler extends NamedCommentedModelElementHandlerBase<UI
/** {@inheritDoc} */
@Override
protected String getIconPath(UIDUnit element) {
protected String getIconPath(ActuatorPWM element) {
return "icons/unknown.png";
}
}
......@@ -17,13 +17,13 @@ package org.fortiss.af3.platform.raspberry.ui.handler;
import static org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator.PLUGIN_ID;
import org.fortiss.af3.platform.raspberry.model.brick.UIDUnit;
import org.fortiss.af3.platform.raspberry.model.rumblepad.RumblepadReceiverBase;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHandlerBase;
/** {@link IModelElementHandler} for {@link RumblepadReceiverBase}s. */
public class RumblepadReceiverHandler extends NamedCommentedModelElementHandlerBase<UIDUnit> {
public class RumblepadReceiverHandler
extends NamedCommentedModelElementHandlerBase<RumblepadReceiverBase> {
/** {@inheritDoc} */
@Override
......@@ -33,7 +33,7 @@ public class RumblepadReceiverHandler extends NamedCommentedModelElementHandlerB
/** {@inheritDoc} */
@Override
protected String getIconPath(UIDUnit element) {
protected String getIconPath(RumblepadReceiverBase element) {
return "icons/gamepad.png";
}
}
/*-------------------------------------------------------------------------+
| Copyright 2018 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.platform.raspberry.ui.handler;
import static org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator.PLUGIN_ID;
import org.fortiss.af3.platform.model.Transmitter;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHandlerBase;
/** {@link IModelElementHandler} for rumblepad {@link Transmitter}s. */
public class RumblepadTransmitterHandler
extends NamedCommentedModelElementHandlerBase<Transmitter> {
/** {@inheritDoc} */
@Override
protected String getPluginId() {
return PLUGIN_ID;
}
/** {@inheritDoc} */
@Override
protected String getIconPath(Transmitter element) {
return "icons/gamepad.png";
}
}
......@@ -17,7 +17,6 @@ package org.fortiss.af3.platform.raspberry.ui.handler;
import static org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator.PLUGIN_ID;
import org.fortiss.af3.platform.raspberry.model.brick.UIDUnit;
import org.fortiss.af3.platform.raspberry.model.v2v.V2VInput;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHandlerBase;
......@@ -27,7 +26,7 @@ import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHa
*
* @author eder
*/
public class V2VInputHandler extends NamedCommentedModelElementHandlerBase<UIDUnit> {
public class V2VInputHandler extends NamedCommentedModelElementHandlerBase<V2VInput> {
/** {@inheritDoc} */
@Override
......@@ -37,7 +36,7 @@ public class V2VInputHandler extends NamedCommentedModelElementHandlerBase<UIDUn
/** {@inheritDoc} */
@Override
protected String getIconPath(UIDUnit element) {
protected String getIconPath(V2VInput element) {
return "icons/unknown.png";
}
}
......@@ -17,7 +17,6 @@ package org.fortiss.af3.platform.raspberry.ui.handler;
import static org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator.PLUGIN_ID;
import org.fortiss.af3.platform.raspberry.model.brick.UIDUnit;
import org.fortiss.af3.platform.raspberry.model.v2v.V2VOuput;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHandlerBase;
......@@ -27,7 +26,7 @@ import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHa
*
* @author eder
*/
public class V2VOuputHandler extends NamedCommentedModelElementHandlerBase<UIDUnit> {
public class V2VOuputHandler extends NamedCommentedModelElementHandlerBase<V2VOuput> {
/** {@inheritDoc} */
@Override
......@@ -37,7 +36,7 @@ public class V2VOuputHandler extends NamedCommentedModelElementHandlerBase<UIDUn
/** {@inheritDoc} */
@Override
protected String getIconPath(UIDUnit element) {
protected String getIconPath(V2VOuput element) {
return "icons/unknown.png";
}
}
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