Commit 26ce6c8d authored by Tiziano Munaro's avatar Tiziano Munaro

GREEN/RED

* The generate & deploy option has been removed from the context menu.
* The Models Conference Board has been renamed to Light Runner Board.

Issue-Ref: 3867
Issue-Url: https://af3-developer.fortiss.org/issues/3867Signed-off-by: Tiziano Munaro's avatarTiziano Munaro <munaro@fortiss.org>
parent f162e24d
......@@ -14,7 +14,7 @@
provider="org.fortiss.af3.platform.raspberry.ui.prototype.ProtoypeProvider">
</modelPrototypeProvider>
<modelPrototypeProvider
provider="org.fortiss.af3.platform.raspberry.ui.prototype.MCBProtoypeProvider">
provider="org.fortiss.af3.platform.raspberry.ui.prototype.LightRunnerBoardProtoypeProvider">
</modelPrototypeProvider>
</extension>
<extension
......@@ -400,7 +400,7 @@
modelElementClass="org.fortiss.af3.platform.raspberry.model.camera.CameraRoverID"/>
</modelElementHandler>
<modelElementHandler
handler="org.fortiss.af3.platform.raspberry.ui.prototype.MCBElementsHandler">
handler="org.fortiss.af3.platform.raspberry.ui.prototype.LightRunnerBoardElementsHandler">
<modelElementClass
modelElementClass="org.fortiss.af3.platform.raspberry.model.modelsconference.Button"/>
<modelElementClass
......@@ -462,14 +462,5 @@
<contextMenuContribution
contributor="org.fortiss.af3.platform.raspberry.ui.export.ComponentArchitectureExporter">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.platform.raspberry.ui.generator.SSHBareMetalGeneratorEasyStartMenu">
</contextMenuContribution>
</extension>
<extension
point="org.fortiss.af3.project.executionTarget">
<executionTarget
target="org.fortiss.af3.platform.raspberry.ui.generator.SSHBareMetalGeneratorExecutionTarget">
</executionTarget>
</extension>
</plugin>
AF3PlatformModelsConferencUIActivator.java 77e93104f1c3886112d8dab3738198349c6a5dbf YELLOW
AF3PlatformRaspberryUIActivator.java 8aca38b5286c51301a00a73074c54b380af33ffa YELLOW
MCBElementsHandler.java b1da771643a13a8e163f4f6325711813a84bda3b YELLOW
MCBProtoypeProvider.java 2b12f6d036bf8c9e8edac187b5540212a3a3aac8 YELLOW
ModelsConferenceBoardEditPartFactory.java 95b8408cd3ab33d5ab2e266278bd683e73732c7f YELLOW
AF3PlatformRaspberryUIActivator.java a3d12b6e170661f0eb5edb09c087f9a95ddfcc1d GREEN
......@@ -15,6 +15,8 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.ui;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
......@@ -54,6 +56,6 @@ public class AF3PlatformRaspberryUIActivator extends AbstractUIPlugin {
/** Returns the image descriptor for the given icon file. */
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
return imageDescriptorFromBundle(PLUGIN_ID, path).orElse(null);
}
}
ModelsConferenceBoardEditPartFactory.java bb702737e6bbfc046a0cf1c08b63cd5ef56a1762 YELLOW
RaspberryPiEditPartFactory.java 2a32df869a8f793dd49e42bc74007b7890f31ce6 YELLOW
LightRunnerEditPartFactory.java a6f30775f03a3ba63e4294b0f978dcee8c58a097 RED
RaspberryPiEditPartFactory.java 889014d935acc48c36f082444927b4c0331542e6 RED
......@@ -17,20 +17,17 @@ 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;
/** {@link IEditPartFactory} for models conference. */
public class ModelsConferenceBoardEditPartFactory implements IEditPartFactory {
/** {@link IEditPartFactory} for the light runner boards. */
public class LightRunnerEditPartFactory implements IEditPartFactory {
/** {@inheritDoc} */
@Override
public EditPart createEditPart(EditPart context, Object model) {
if(model instanceof Button || model instanceof LCD || model instanceof LED ||
model instanceof Poti) {
// TODO (TM): Is it OK to replace the distinct classes with the PlatformConnectionUnit
// interface?
if(model instanceof PlatformConnectorUnit) {
return new StickyPlatformConnectorUnitEditPart((PlatformConnectorUnit)model);
}
return null;
......
......@@ -18,34 +18,8 @@ package org.fortiss.af3.platform.raspberry.ui.editpart;
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.ActuatorPWM;
import org.fortiss.af3.platform.raspberry.model.CanBus;
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.UIDUnit;
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.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.af3.platform.ui.DefaultStyle;
import org.fortiss.af3.platform.ui.editpart.generic.ExecutionUnitEditPart;
import org.fortiss.af3.platform.ui.editpart.generic.StickyPlatformConnectorUnitEditPart;
......@@ -73,21 +47,9 @@ public class RaspberryPiEditPartFactory implements IEditPartFactory {
};
} else if(model instanceof CanBus) {
return new TransmissionUnitDefaultEditPart((CanBus)model);
} else if(model instanceof CanConnector || model instanceof ActuatorPWM ||
model instanceof ConsoleOutput || model instanceof GamepadReceiverBase ||
model instanceof RumblepadReceiverBase || model instanceof RumbleMagnitudeWeak ||
model instanceof RumbleMagnitudeStrong || model instanceof UIDUnit ||
model instanceof MotorControlInput || model instanceof MotorControlOutput ||
model instanceof CameraConnected || model instanceof CameraLastUpdate ||
model instanceof CameraDistanceLeft || model instanceof CameraDistanceRight ||
model instanceof CameraYawAngle || model instanceof CameraDetectionStateLeft ||
model instanceof CameraDetectionStateRight ||
model instanceof CameraRoverRecognized || model instanceof CameraRoverID ||
model instanceof CameraRoverDistance || model instanceof CameraCurveDetected ||
model instanceof CameraCurveRadius ||
model instanceof ControlCenterUpstreamOutput ||
model instanceof ControlCenterDownstreamInput || model instanceof V2VInput ||
model instanceof V2VOuput) {
} else if(model instanceof PlatformConnectorUnit) {
// TODO (TM): Is it OK to replace the distinct classes with the PlatformConnectionUnit
// interface?
return new StickyPlatformConnectorUnitEditPart((PlatformConnectorUnit)model);
}
return null;
......
ComponentArchitectureExporter.java 0688b39fe192422a6f7a7d8a271e70096f0a6880 YELLOW
ComponentArchitectureExporter.java 0688b39fe192422a6f7a7d8a271e70096f0a6880 GREEN
SSHBareMetalGeneratorEasyStartMenu.java c4dbb4c29d6695359a75b424c417b4972656c5b9 YELLOW
SSHBareMetalGeneratorExecutionTarget.java 7f04bfa6c620ae47856f7d056b5a1c23c02cd187 YELLOW
/*-------------------------------------------------------------------------+
| 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.generator;
import static org.fortiss.af3.project.ui.AF3ProjectUIActivator.getImageDescriptor;
import org.eclipse.jface.resource.ImageDescriptor;
import org.fortiss.af3.platform.model.allocation.ComponentToExecutionUnitAllocationTable;
import org.fortiss.af3.project.extension.IExecutionTarget;
import org.fortiss.af3.project.services.IExecutionService;
import org.fortiss.af3.project.ui.execution.EasyStartMenuBase;
import org.fortiss.tooling.kernel.model.INamedElement;
import org.fortiss.tooling.kernel.ui.extension.data.ContextMenuContextProvider;
import org.fortiss.tooling.kernel.ui.service.IContextMenuService;
import org.fortiss.tooling.kernel.ui.service.INavigatorService;
/**
* {@link EasyStartMenuBase} for the {@link SSHBareMetalGeneratorExecutionTarget}.
*
* @author hoelzl
* @author bayha
*/
public class SSHBareMetalGeneratorEasyStartMenu extends EasyStartMenuBase {
/** Constructor. */
public SSHBareMetalGeneratorEasyStartMenu() {
super(getDeploymentGeneratorTargetFromExecutionService());
}
/** Returns the simulator execution target. */
private static IExecutionTarget getDeploymentGeneratorTargetFromExecutionService() {
return IExecutionService.INSTANCE
.getSpecificExecutionTarget(SSHBareMetalGeneratorExecutionTarget.class);
}
/** {@inheritDoc} */
@Override
public String getMenuSectionID() {
return IContextMenuService.BOTTOM_MOST_MENU_SECTION_ID;
}
/** {@inheritDoc} */
@Override
protected boolean acceptSelection(INamedElement selection,
ContextMenuContextProvider contextProvider) {
return (selection instanceof ComponentToExecutionUnitAllocationTable) &&
INavigatorService.getInstance().isNavigatorView(contextProvider);
}
/** {@inheritDoc} */
@Override
protected String getActionName() {
return "Run DeploymentGenerator and deploy";
}
/** {@inheritDoc} */
@Override
protected ImageDescriptor getActionIcon() {
return getImageDescriptor("icons/execution_configuration.gif");
}
/** {@inheritDoc} */
@Override
protected String getStartupFailureMessage(Exception e) {
return "Starting the code generator failed. Please check if your model is free of error markers and every component has a defined behavior. Please consult the error log for detailed error information.";
}
}
/*-------------------------------------------------------------------------+
| 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.generator;
import static org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator.getDefault;
import static org.fortiss.tooling.kernel.utils.LoggingUtils.error;
import java.io.IOException;
import java.util.Optional;
import org.eclipse.emf.common.util.EList;
import org.eclipse.swt.widgets.Display;
import org.fortiss.af3.platform.model.PlatformArchitecture;
import org.fortiss.af3.platform.model.allocation.ComponentToExecutionUnitAllocationTable;
import org.fortiss.af3.platform.raspberry.model.RaspberryPi;
import org.fortiss.af3.platform.raspberry.model.modelsconference.Poti;
import org.fortiss.af3.platform.ui.generator.BareMetalGeneratorExecutionTarget;
import org.fortiss.af3.project.extension.data.Executable;
import org.fortiss.tooling.base.model.element.IHierarchicElement;
/**
* ExecutionTarget for deployment generator extended with a call of a deploy script.
*
* @author bayha
*/
public class SSHBareMetalGeneratorExecutionTarget extends BareMetalGeneratorExecutionTarget {
/** {@inheritDoc} */
@Override
protected void doExecute(Executable executable) {
super.doExecute(executable);
Runtime r = Runtime.getRuntime();
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
int retCode = -1;
try {
Object source = executable.getSource();
ComponentToExecutionUnitAllocationTable ca2ta =
(ComponentToExecutionUnitAllocationTable)source;
PlatformArchitecture platform = ca2ta.getPlatformArchitecture();
EList<IHierarchicElement> containedElements = platform.getContainedElements();
if(containedElements.isEmpty()) {
return;
}
// check if it is the board or the ff1, if the architecture contains a poti.
// contained elements cannot be empty at this point. checked above.
if(containedElements.get(0).getConnectors().stream()
.anyMatch(o -> o instanceof Poti)) {
r.exec("deploy");
} else {
Optional<IHierarchicElement> findFirst = containedElements.stream()
.filter(e -> e instanceof RaspberryPi).findFirst();
RaspberryPi pi = (RaspberryPi)findFirst.get();
r.exec("deploy_ff1 " + pi.getIpAddress());
}
// retCode = p.waitFor();
} catch(IOException e) {
error(getDefault(), "IOException when deploying:\n" + e);
}
if(retCode != 0) {
error(getDefault(), "Generated code could not be deployed.");
}
}
});
}
}
BrickletHandler.java b3154bd30ccad9ab5aceb6ed3e60feeff911fe89 YELLOW
CameraInputHandler.java fd5eb60cc1b56cb8f3662c2207dc0ba37e20cb5f YELLOW
CanBusHandler.java 5d4dbf229daec81e5eecc4ebfb8f8bc2680f2992 YELLOW
CanConnectorHandler.java 3eb2adf8ec6336269d66395025b7ac2050876a79 YELLOW
ConsoleOutputHandler.java 364124b954ab0429425e9de71dbe0f7a99e499f9 YELLOW
ControlCenterDownstreamInputHandler.java 7f303923b702a79a4b74b41e639c07a2d2faa47e YELLOW
ControlCenterUpstreamOutputHandler.java c474ce456c8fbb92513269b598a5fe1b8221c429 YELLOW
GamepadReceiverHandler.java ff81c9f3e941ba8a2b880b3982f63f71f698569b YELLOW
IconModelElementHandlerBase.java aebefe9688e284fa1ac7fe4e098a75eac3966fbd YELLOW
MotorControlInputHandler.java b5d0f0627c7c14c1ed4cc1e36a761e938a5a4c9e YELLOW
MotorControlOutputHandler.java e837a92a595a90adb375f2fe906eb8531c71c4d8 YELLOW
PWMActuatorHandler.java e1bc705e0a57ec11109d309be50ec5ac7ab6cad1 YELLOW
RaspberryPiHandler.java d503b2bd802ff3ff4ced8391e83fb39452546d86 YELLOW
RumblepadReceiverHandler.java 337e65150193a7d66bd69669c7dd5977010259d3 YELLOW
RumblepadSimpleRumbleFeatureHandler.java de79f4f4fea01d8ba3683cbb6dfd91948621c6af YELLOW
V2VInputHandler.java 3fd16a688ccc97cd75aa78381f6419488f44a31d YELLOW
V2VOuputHandler.java b319a3de5cd75a81008bd43ea92db76225205478 YELLOW
BrickletHandler.java b6cde359fada87574eb13c36f25156d9462666fd GREEN
CameraInputHandler.java 67475aca10a7a6667cb2f6c060dfa4a0586f441a GREEN
CanBusHandler.java 8e6d767ed74a05fd40fe775890d28cf42c8c261a GREEN
CanConnectorHandler.java 569e9dd0ebd79ba9e71662c3a262c397e849d1e3 GREEN
ConsoleOutputHandler.java b0d1619021f53b8e0cd3889e274680765d6ce4b2 GREEN
ControlCenterDownstreamInputHandler.java baf54e50519afa93082490a0c96c6ced27b563f4 GREEN
ControlCenterUpstreamOutputHandler.java 163d378db0d5323104818578751e8de338613a81 GREEN
GamepadReceiverHandler.java 3b9b89e4dfbc4e27c9d2bfdc6eb90829f1473d93 GREEN
MotorControlInputHandler.java 198071db6a97e0742916d4f8bcd64cfcc2223187 GREEN
MotorControlOutputHandler.java bb944bce67761d2e89c5865a75d652dc790a7da3 GREEN
PWMActuatorHandler.java a1b0d87122b846b97b73007926eb940e949aea0d GREEN
RaspberryPiHandler.java d503b2bd802ff3ff4ced8391e83fb39452546d86 GREEN
RumblepadReceiverHandler.java 699bb9f21d32201e829f7e8ab07634e7bbca834f GREEN
V2VInputHandler.java 2ec71691162b5bdf57a52352e29da125e1e8cde9 GREEN
V2VOuputHandler.java 6abaecef646fc535d47a32f52350b1c0c4e2558f GREEN
......@@ -15,12 +15,19 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.ui.handler;
import static org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator.getImageDescriptor;
import org.eclipse.jface.resource.ImageDescriptor;
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 UIDUnit}s. */
public class BrickletHandler extends NamedCommentedModelElementHandlerBase<UIDUnit> {
/** Handler for {@link UIDUnit}s. */
public class BrickletHandler extends IconModelElementHandlerBase<UIDUnit> {
/** Constructor. */
public BrickletHandler() {
super("icons/unknown.png");
/** {@inheritDoc} */
@Override
public final ImageDescriptor getIconImageDescriptor() {
return getImageDescriptor("icons/unknown.png");
}
}
......@@ -15,12 +15,19 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.ui.handler;
import org.fortiss.af3.platform.raspberry.model.RaspberryPiReceiverBase;
import static org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator.getImageDescriptor;
/** Model element handler for camera model elements. */
public class CameraInputHandler extends IconModelElementHandlerBase<RaspberryPiReceiverBase> {
/** Constructor. */
public CameraInputHandler() {
super("icons/unknown.png");
import org.eclipse.jface.resource.ImageDescriptor;
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 camera model elements. */
public class CameraInputHandler extends NamedCommentedModelElementHandlerBase<UIDUnit> {
/** {@inheritDoc} */
@Override
public final ImageDescriptor getIconImageDescriptor() {
return getImageDescriptor("icons/unknown.png");
}
}
......@@ -25,7 +25,7 @@ import org.fortiss.af3.platform.raspberry.model.CanBus;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.ModelElementHandlerBase;
/** {@link IModelElementHandler} for {@link CanBus}. */
/** {@link IModelElementHandler} for {@link CanBus}es. */
@SuppressWarnings({"unchecked", "rawtypes"})
public class CanBusHandler extends ModelElementHandlerBase<CanBus> {
/** {@inheritDoc} */
......
......@@ -24,11 +24,6 @@ import org.fortiss.tooling.kernel.ui.extension.base.ModelElementHandlerBase;
/** {@link IModelElementHandler} for {@link CanConnector}. */
public class CanConnectorHandler extends ModelElementHandlerBase<CanConnector> {
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
return getImageDescriptor("icons/unknown.png");
}
/** {@inheritDoc} */
@Override
......@@ -36,4 +31,10 @@ public class CanConnectorHandler extends ModelElementHandlerBase<CanConnector> {
String name = element.getName();
return name != null ? name : "CanConnector";
}
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
return getImageDescriptor("icons/unknown.png");
}
}
......@@ -15,13 +15,20 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.ui.handler;
import static org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator.getImageDescriptor;
import org.eclipse.jface.resource.ImageDescriptor;
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 IconModelElementHandlerBase<ConsoleOutput> {
/** Constructor. */
public ConsoleOutputHandler() {
super("icons/console.png");
public class ConsoleOutputHandler extends NamedCommentedModelElementHandlerBase<UIDUnit> {
/** {@inheritDoc} */
@Override
public final ImageDescriptor getIconImageDescriptor() {
return getImageDescriptor("icons/unknown.png");
}
}
......@@ -15,13 +15,21 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.ui.handler;
import static org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator.getImageDescriptor;
import org.eclipse.jface.resource.ImageDescriptor;
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 IconModelElementHandlerBase} for {@link ControlCenterDownstreamInput}s. */
/** {@link IModelElementHandler} for {@link ControlCenterDownstreamInput}s. */
public class ControlCenterDownstreamInputHandler
extends IconModelElementHandlerBase<ControlCenterDownstreamInput> {
/** Constructor. */
public ControlCenterDownstreamInputHandler() {
super("icons/unknown.png");
extends NamedCommentedModelElementHandlerBase<UIDUnit> {
/** {@inheritDoc} */
@Override
public final ImageDescriptor getIconImageDescriptor() {
return getImageDescriptor("icons/unknown.png");
}
}
......@@ -15,13 +15,21 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.ui.handler;
import static org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator.getImageDescriptor;
import org.eclipse.jface.resource.ImageDescriptor;
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 IconModelElementHandlerBase} for {@link ControlCenterUpstreamOutput}s. */
/** {@link IModelElementHandler} for {@link ControlCenterUpstreamOutput}s. */
public class ControlCenterUpstreamOutputHandler
extends IconModelElementHandlerBase<ControlCenterUpstreamOutput> {
/** Constructor. */
public ControlCenterUpstreamOutputHandler() {
super("icons/unknown.png");
extends NamedCommentedModelElementHandlerBase<UIDUnit> {
/** {@inheritDoc} */
@Override
public final ImageDescriptor getIconImageDescriptor() {
return getImageDescriptor("icons/unknown.png");
}
}
......@@ -15,12 +15,20 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.ui.handler;
import static org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator.getImageDescriptor;
import org.eclipse.jface.resource.ImageDescriptor;
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> {
/** Handler for {@link GamepadReceiverBase}s. */
public class GamepadReceiverHandler extends IconModelElementHandlerBase<GamepadReceiverBase> {
/** Constructor. */
public GamepadReceiverHandler() {
super("icons/gamepad.png");
/** {@inheritDoc} */
@Override
public final ImageDescriptor getIconImageDescriptor() {
return getImageDescriptor("icons/unknown.png");
}
}
......@@ -15,12 +15,20 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.ui.handler;
import static org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator.getImageDescriptor;
import org.eclipse.jface.resource.ImageDescriptor;
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> {
/** {@link IconModelElementHandlerBase} for {@link MotorControlInput}s. */
public class MotorControlInputHandler extends IconModelElementHandlerBase<MotorControlInput> {
/** Constructor. */
public MotorControlInputHandler() {
super("icons/unknown.png");
/** {@inheritDoc} */
@Override
public final ImageDescriptor getIconImageDescriptor() {
return getImageDescriptor("icons/unknown.png");
}
}
......@@ -15,12 +15,20 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.ui.handler;
import static org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator.getImageDescriptor;
import org.eclipse.jface.resource.ImageDescriptor;
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> {
/** {@link IconModelElementHandlerBase} for {@link MotorControlOutput}s. */
public class MotorControlOutputHandler extends IconModelElementHandlerBase<MotorControlOutput> {
/** Constructor. */
public MotorControlOutputHandler() {
super("icons/unknown.png");
/** {@inheritDoc} */
@Override
public final ImageDescriptor getIconImageDescriptor() {
<