diff --git a/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/SimulationController.java b/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/SimulationController.java index 426860d8b..649d88477 100644 --- a/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/SimulationController.java +++ b/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/SimulationController.java @@ -86,7 +86,10 @@ public class SimulationController { final String deviceId = name + i; repository.add(deviceFactory.createSimulatedDevice(deviceId, tenant, protocol, pollDelay, new URL(endpoint), gatewayToken)); - spSenderService.createOrUpdateThing(tenant, deviceId); + + if (protocol == Protocol.DMF_AMQP) { + spSenderService.createOrUpdateThing(tenant, deviceId); + } } return ResponseEntity.ok("Updated " + amount + " DMF connected targets!"); diff --git a/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/SimulatorStartup.java b/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/SimulatorStartup.java index 60f3055bd..b772bae1f 100644 --- a/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/SimulatorStartup.java +++ b/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/SimulatorStartup.java @@ -11,6 +11,7 @@ package org.eclipse.hawkbit.simulator; import java.net.MalformedURLException; import java.net.URL; +import org.eclipse.hawkbit.simulator.AbstractSimulatedDevice.Protocol; import org.eclipse.hawkbit.simulator.amqp.SpSenderService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -52,7 +53,9 @@ public class SimulatorStartup implements ApplicationListener +- Create launch configuration for the SuperDevMode + - The main class to execute should be com.google.gwt.dev.codeserver.CodeServer. + - Add fully-qualified class name of widgetset (org.eclipse.hawkbit.ui.AppWidgetSet) as parameter +- Enable debug in chrome + - Chrome inspector window ▸ Click on settings icon ▸ Scripts ▸ Enable source maps option +- Run the SuperDevMode Code Server with the launch configuration created above +- Open http://localhost:8080/UI/?debug .Click on "SuperDev" button in debug console (Alternatively can directly add ?superdevmode parameter to URL) +- Widgetset is compiled and you can see the java code files loaded in 'Chrome inspector window ▸ Source tab' + + +#### Using SuperDevMode with Eclipse : + +- Install the plugin from http://sdbg.github.io/p2 +- Start the server and Super Dev Mode as mentioned above +- Create a new launch configuration in Eclipse + - Type is "Launch Chrome" + - http://localhost:8080/UI/?superdevmode +- Launch the new configuration in debug mode +- Now breakpoints in eclipse can be set