Skip to main content
summaryrefslogtreecommitdiffstats
path: root/cross
diff options
context:
space:
mode:
authorDoug Schaefer2017-11-13 15:25:52 -0500
committerDoug Schaefer2017-11-13 15:56:57 -0500
commit15c8bad95d394bef30dda8662e490e78b1afee33 (patch)
tree3d7485741085fcadeb78638fe04e34ebf4ea23bc /cross
parentf1f9ddf0f70bdc5a4960803b47c6137a5d2486d4 (diff)
downloadorg.eclipse.cdt-15c8bad95d394bef30dda8662e490e78b1afee33.tar.gz
org.eclipse.cdt-15c8bad95d394bef30dda8662e490e78b1afee33.tar.xz
org.eclipse.cdt-15c8bad95d394bef30dda8662e490e78b1afee33.zip
Serial Flash Target and Launch. Clean up Generic Launch.
Adds target, launch classes, and launch bar support for targets intended to upload their code to flash using a Serial Port. The port is co-ordinated with the Serial Terminal so that the terminal is paused during the upload. Also cleaned up the Generic Launch so it's not using the External Tools launch which has a number of UX issues. This simplifies the settings and gives us more control. And it's made reusable for the Serial Flash launch. Change-Id: I31e9970243fbf1cf22d027bbdb892fde104dbefe
Diffstat (limited to 'cross')
-rw-r--r--cross/org.eclipse.cdt.launch.serial-feature/.project17
-rw-r--r--cross/org.eclipse.cdt.launch.serial-feature/build.properties1
-rw-r--r--cross/org.eclipse.cdt.launch.serial-feature/feature.xml32
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/.classpath7
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/.project28
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/META-INF/MANIFEST.MF16
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/build.properties5
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/plugin.xml29
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/SerialFlashLaunchTargetProvider.java36
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/Activator.java30
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/Messages.java23
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/SerialFlashLaunch.java67
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/SerialFlashLaunchConfigDelegate.java37
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/SerialFlashLaunchConfigProvider.java32
-rw-r--r--cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/messages.properties9
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/.classpath7
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/.project28
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/META-INF/MANIFEST.MF16
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/build.properties6
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/icons/cdt_logo_16.pngbin0 -> 896 bytes
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/plugin.xml26
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/Activator.java52
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/Messages.java29
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/NewSerialFlashTargetWizard.java53
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/NewSerialFlashTargetWizardPage.java130
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/SerialFlashLaunchConfigTabGroup.java24
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/SerialFlashLaunchTargetLabelProvider.java35
-rw-r--r--cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/messages.properties15
30 files changed, 804 insertions, 0 deletions
diff --git a/cross/org.eclipse.cdt.launch.serial-feature/.project b/cross/org.eclipse.cdt.launch.serial-feature/.project
new file mode 100644
index 0000000000..acb0250e3e
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial-feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.cdt.launch.serial-feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/cross/org.eclipse.cdt.launch.serial-feature/build.properties b/cross/org.eclipse.cdt.launch.serial-feature/build.properties
new file mode 100644
index 0000000000..82ab19c62d
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial-feature/build.properties
@@ -0,0 +1 @@
+bin.includes = feature.xml
diff --git a/cross/org.eclipse.cdt.launch.serial-feature/feature.xml b/cross/org.eclipse.cdt.launch.serial-feature/feature.xml
new file mode 100644
index 0000000000..e5839b48b3
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial-feature/feature.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.cdt.launch.serial.feature"
+ label="Launch over Serial"
+ version="1.0.0.qualifier">
+
+ <description url="http://www.example.com/description">
+ [Enter Feature Description here.]
+ </description>
+
+ <copyright url="http://www.example.com/copyright">
+ [Enter Copyright Description here.]
+ </copyright>
+
+ <license url="http://www.example.com/license">
+ [Enter License Description here.]
+ </license>
+
+ <plugin
+ id="org.eclipse.cdt.launch.serial.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.cdt.launch.serial.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+</feature>
diff --git a/cross/org.eclipse.cdt.launch.serial.core/.classpath b/cross/org.eclipse.cdt.launch.serial.core/.classpath
new file mode 100644
index 0000000000..b862a296d3
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.core/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/cross/org.eclipse.cdt.launch.serial.core/.project b/cross/org.eclipse.cdt.launch.serial.core/.project
new file mode 100644
index 0000000000..0bad6ef6c5
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.cdt.launch.serial.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/cross/org.eclipse.cdt.launch.serial.core/.settings/org.eclipse.jdt.core.prefs b/cross/org.eclipse.cdt.launch.serial.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..295926d964
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.core/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/cross/org.eclipse.cdt.launch.serial.core/META-INF/MANIFEST.MF b/cross/org.eclipse.cdt.launch.serial.core/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..fb7f81b141
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.core/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Launch over Serial Core Plugin
+Bundle-SymbolicName: org.eclipse.cdt.launch.serial.core;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: Eclipse CDT
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.13.0",
+ org.eclipse.debug.core;bundle-version="3.11.0",
+ org.eclipse.launchbar.core;bundle-version="2.2.0",
+ org.eclipse.cdt.core;bundle-version="6.4.0",
+ org.eclipse.cdt.debug.core;bundle-version="8.3.0",
+ org.eclipse.cdt.native.serial;bundle-version="1.1.0"
+Export-Package: org.eclipse.cdt.launch.serial
+Bundle-Activator: org.eclipse.cdt.launch.serial.internal.Activator
+Bundle-ActivationPolicy: lazy
diff --git a/cross/org.eclipse.cdt.launch.serial.core/build.properties b/cross/org.eclipse.cdt.launch.serial.core/build.properties
new file mode 100644
index 0000000000..6f20375d6c
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.core/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
diff --git a/cross/org.eclipse.cdt.launch.serial.core/plugin.xml b/cross/org.eclipse.cdt.launch.serial.core/plugin.xml
new file mode 100644
index 0000000000..537bc36e76
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.core/plugin.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.debug.core.launchConfigurationTypes">
+ <launchConfigurationType
+ delegate="org.eclipse.cdt.launch.serial.internal.SerialFlashLaunchConfigDelegate"
+ id="org.eclipse.cdt.launch.serial.launchConfigurationType"
+ modes="run"
+ name="Launch over Serial">
+ </launchConfigurationType>
+ </extension>
+ <extension
+ point="org.eclipse.launchbar.core.launchTargetTypes">
+ <launchTargetType
+ id="org.eclipse.cdt.launch.serial.core.serialFlashTarget"
+ provider="org.eclipse.cdt.launch.serial.SerialFlashLaunchTargetProvider">
+ </launchTargetType>
+ </extension>
+ <extension
+ point="org.eclipse.launchbar.core.launchBarContributions">
+ <configProvider
+ class="org.eclipse.cdt.launch.serial.internal.SerialFlashLaunchConfigProvider"
+ descriptorType="org.eclipse.cdt.debug.core.coreBuildDescriptorType"
+ priority="10">
+ </configProvider>
+ </extension>
+
+</plugin>
diff --git a/cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/SerialFlashLaunchTargetProvider.java b/cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/SerialFlashLaunchTargetProvider.java
new file mode 100644
index 0000000000..ec3e47f63c
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/SerialFlashLaunchTargetProvider.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2017 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.cdt.launch.serial;
+
+import org.eclipse.launchbar.core.target.ILaunchTarget;
+import org.eclipse.launchbar.core.target.ILaunchTargetManager;
+import org.eclipse.launchbar.core.target.ILaunchTargetProvider;
+import org.eclipse.launchbar.core.target.TargetStatus;
+
+/**
+ * Launch Target used to flash images to a device over a serial port, usually
+ * USB serial.
+ */
+public class SerialFlashLaunchTargetProvider implements ILaunchTargetProvider {
+
+ public static final String TYPE_ID = "org.eclipse.cdt.launch.serial.core.serialFlashTarget"; //$NON-NLS-1$
+
+ public static final String ATTR_SERIAL_PORT = "org.eclipse.cdt.launch.serial.core.serialPort"; //$NON-NLS-1$
+
+ @Override
+ public void init(ILaunchTargetManager targetManager) {
+ // Nothing to do at init time
+ }
+
+ @Override
+ public TargetStatus getStatus(ILaunchTarget target) {
+ // Always OK
+ return TargetStatus.OK_STATUS;
+ }
+
+}
diff --git a/cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/Activator.java b/cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/Activator.java
new file mode 100644
index 0000000000..ca9822e4d2
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/Activator.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2017 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.cdt.launch.serial.internal;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+public class Activator extends Plugin {
+
+ public static final String PLUGIN_ID = "org.eclipse.cdt.launch.serial.core"; //$NON-NLS-1$
+
+ private static Activator plugin;
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ public static void log(IStatus status) {
+ plugin.getLog().log(status);
+ }
+
+}
diff --git a/cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/Messages.java b/cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/Messages.java
new file mode 100644
index 0000000000..3b18b53d8d
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/Messages.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2017 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.cdt.launch.serial.internal;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.cdt.launch.serial.internal.messages"; //$NON-NLS-1$
+ public static String SerialFlashLaunch_Pause;
+ public static String SerialFlashLaunch_Resume;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/SerialFlashLaunch.java b/cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/SerialFlashLaunch.java
new file mode 100644
index 0000000000..e810d708f3
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/SerialFlashLaunch.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2017 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.cdt.launch.serial.internal;
+
+import java.io.IOException;
+
+import org.eclipse.cdt.launch.serial.SerialFlashLaunchTargetProvider;
+import org.eclipse.cdt.serial.SerialPort;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.model.ISourceLocator;
+import org.eclipse.launchbar.core.target.ILaunchTarget;
+import org.eclipse.launchbar.core.target.launch.TargetedLaunch;
+
+public class SerialFlashLaunch extends TargetedLaunch {
+
+ private SerialPort serialPort;
+ private boolean wasOpen;
+
+ public SerialFlashLaunch(ILaunchConfiguration launchConfiguration, String mode, ISourceLocator locator,
+ ILaunchTarget target) {
+ super(launchConfiguration, mode, target, locator);
+ String serialPortName = target.getAttribute(SerialFlashLaunchTargetProvider.ATTR_SERIAL_PORT, ""); //$NON-NLS-1$
+ if (!serialPortName.isEmpty()) {
+ serialPort = SerialPort.get(serialPortName);
+ }
+
+ DebugPlugin.getDefault().addDebugEventListener(this);
+ }
+
+ public void start() {
+ if (serialPort != null) {
+ wasOpen = serialPort.isOpen();
+ if (wasOpen) {
+ try {
+ serialPort.pause();
+ } catch (IOException e) {
+ Activator.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.SerialFlashLaunch_Pause, e));
+ }
+ }
+ } else {
+ wasOpen = false;
+ }
+ }
+
+ @Override
+ public void handleDebugEvents(DebugEvent[] events) {
+ super.handleDebugEvents(events);
+ if (isTerminated() && wasOpen) {
+ try {
+ serialPort.resume();
+ } catch (IOException e) {
+ Activator.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.SerialFlashLaunch_Resume, e));
+ }
+ wasOpen = false;
+ }
+ }
+
+}
diff --git a/cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/SerialFlashLaunchConfigDelegate.java b/cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/SerialFlashLaunchConfigDelegate.java
new file mode 100644
index 0000000000..3473c4296f
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/SerialFlashLaunchConfigDelegate.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2017 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.cdt.launch.serial.internal;
+
+import org.eclipse.cdt.debug.core.launch.CoreBuildGenericLaunchConfigDelegate;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.launchbar.core.target.ILaunchTarget;
+import org.eclipse.launchbar.core.target.launch.ITargetedLaunch;
+
+public class SerialFlashLaunchConfigDelegate extends CoreBuildGenericLaunchConfigDelegate {
+
+ public static final String TYPE_ID = "org.eclipse.cdt.launch.serial.launchConfigurationType"; //$NON-NLS-1$
+
+ @Override
+ public ITargetedLaunch getLaunch(ILaunchConfiguration configuration, String mode, ILaunchTarget target)
+ throws CoreException {
+ return new SerialFlashLaunch(configuration, mode, null, target);
+ }
+
+ @Override
+ public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor)
+ throws CoreException {
+ // Start the launch (pause the serial port)
+ ((SerialFlashLaunch) launch).start();
+
+ super.launch(configuration, mode, launch, monitor);
+ }
+
+}
diff --git a/cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/SerialFlashLaunchConfigProvider.java b/cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/SerialFlashLaunchConfigProvider.java
new file mode 100644
index 0000000000..d1cfb4dff9
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/SerialFlashLaunchConfigProvider.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2017 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.cdt.launch.serial.internal;
+
+import org.eclipse.cdt.debug.core.launch.CoreBuildGenericLaunchConfigProvider;
+import org.eclipse.cdt.launch.serial.SerialFlashLaunchTargetProvider;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.launchbar.core.ILaunchDescriptor;
+import org.eclipse.launchbar.core.target.ILaunchTarget;
+
+public class SerialFlashLaunchConfigProvider extends CoreBuildGenericLaunchConfigProvider {
+
+ @Override
+ public boolean supports(ILaunchDescriptor descriptor, ILaunchTarget target) throws CoreException {
+ return target.getTypeId().equals(SerialFlashLaunchTargetProvider.TYPE_ID);
+ }
+
+ @Override
+ public ILaunchConfigurationType getLaunchConfigurationType(ILaunchDescriptor descriptor, ILaunchTarget target)
+ throws CoreException {
+ return DebugPlugin.getDefault().getLaunchManager()
+ .getLaunchConfigurationType(SerialFlashLaunchConfigDelegate.TYPE_ID);
+ }
+
+}
diff --git a/cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/messages.properties b/cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/messages.properties
new file mode 100644
index 0000000000..02efebb9d0
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.core/src/org/eclipse/cdt/launch/serial/internal/messages.properties
@@ -0,0 +1,9 @@
+################################################################################
+# Copyright (c) 2017 QNX Software Systems and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+################################################################################
+SerialFlashLaunch_Pause=Pausing serial port
+SerialFlashLaunch_Resume=Resuming serial port
diff --git a/cross/org.eclipse.cdt.launch.serial.ui/.classpath b/cross/org.eclipse.cdt.launch.serial.ui/.classpath
new file mode 100644
index 0000000000..b862a296d3
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/cross/org.eclipse.cdt.launch.serial.ui/.project b/cross/org.eclipse.cdt.launch.serial.ui/.project
new file mode 100644
index 0000000000..0977dd1f5e
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.cdt.launch.serial.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/cross/org.eclipse.cdt.launch.serial.ui/.settings/org.eclipse.jdt.core.prefs b/cross/org.eclipse.cdt.launch.serial.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..295926d964
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/cross/org.eclipse.cdt.launch.serial.ui/META-INF/MANIFEST.MF b/cross/org.eclipse.cdt.launch.serial.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..1530f18559
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Ui
+Bundle-SymbolicName: org.eclipse.cdt.launch.serial.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.13.0",
+ org.eclipse.ui;bundle-version="3.109.0",
+ org.eclipse.debug.ui;bundle-version="3.12.50",
+ org.eclipse.launchbar.core;bundle-version="2.2.0",
+ org.eclipse.launchbar.ui;bundle-version="2.2.0",
+ org.eclipse.cdt.launch.serial.core;bundle-version="1.0.0",
+ org.eclipse.cdt.native.serial;bundle-version="1.1.0",
+ org.eclipse.cdt.launch;bundle-version="9.2.0"
+Bundle-Activator: org.eclipse.cdt.launch.serial.ui.internal.Activator
+Bundle-ActivationPolicy: lazy
diff --git a/cross/org.eclipse.cdt.launch.serial.ui/build.properties b/cross/org.eclipse.cdt.launch.serial.ui/build.properties
new file mode 100644
index 0000000000..285b8bf47b
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.ui/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ icons/
diff --git a/cross/org.eclipse.cdt.launch.serial.ui/icons/cdt_logo_16.png b/cross/org.eclipse.cdt.launch.serial.ui/icons/cdt_logo_16.png
new file mode 100644
index 0000000000..fb343a1065
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.ui/icons/cdt_logo_16.png
Binary files differ
diff --git a/cross/org.eclipse.cdt.launch.serial.ui/plugin.xml b/cross/org.eclipse.cdt.launch.serial.ui/plugin.xml
new file mode 100644
index 0000000000..9067c806bd
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.ui/plugin.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.launchbar.ui.launchTargetTypeUI">
+ <launchTargetTypeUI
+ id="org.eclipse.cdt.launch.serial.core.serialFlashTarget"
+ labelProvider="org.eclipse.cdt.launch.serial.ui.internal.SerialFlashLaunchTargetLabelProvider">
+ </launchTargetTypeUI>
+ <wizard2
+ class="org.eclipse.cdt.launch.serial.ui.internal.NewSerialFlashTargetWizard"
+ icon="icons/cdt_logo_16.png"
+ id="org.eclipse.cdt.launch.serial.core.serialFlashTarget"
+ name="Serial Flash Target">
+ </wizard2>
+ </extension>
+ <extension
+ point="org.eclipse.debug.ui.launchConfigurationTabGroups">
+ <launchConfigurationTabGroup
+ class="org.eclipse.cdt.launch.serial.ui.internal.SerialFlashLaunchConfigTabGroup"
+ id="org.eclipse.cdt.launch.serial.ui.launchConfigurationTabGroup"
+ type="org.eclipse.cdt.launch.serial.launchConfigurationType">
+ </launchConfigurationTabGroup>
+ </extension>
+
+</plugin>
diff --git a/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/Activator.java b/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/Activator.java
new file mode 100644
index 0000000000..42ec9d2a6a
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/Activator.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2017 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.cdt.launch.serial.ui.internal;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+public class Activator extends AbstractUIPlugin {
+
+ public static final String PLUGIN_ID = "org.eclipse.cdt.launch.serial.ui"; //$NON-NLS-1$
+
+ public static final String IMG_CDT_LOGO = "org.eclipse.cdt.launch.serial.ui.cdt_logo_16"; //$NON-NLS-1$
+
+ private static AbstractUIPlugin plugin;
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ @Override
+ protected void initializeImageRegistry(ImageRegistry reg) {
+ super.initializeImageRegistry(reg);
+
+ reg.put(IMG_CDT_LOGO, imageDescriptorFromPlugin(PLUGIN_ID, "icons/cdt_logo_16.png")); //$NON-NLS-1$
+ }
+
+ public static Image getImage(String key) {
+ return plugin.getImageRegistry().get(key);
+ }
+
+ public static void log(IStatus status) {
+ plugin.getLog().log(status);
+ }
+
+ public static <T> T getService(Class<T> service) {
+ BundleContext context = plugin.getBundle().getBundleContext();
+ ServiceReference<T> ref = context.getServiceReference(service);
+ return ref != null ? context.getService(ref) : null;
+ }
+
+}
diff --git a/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/Messages.java b/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/Messages.java
new file mode 100644
index 0000000000..716945251e
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/Messages.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2017 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.cdt.launch.serial.ui.internal;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.cdt.launch.serial.ui.internal.messages"; //$NON-NLS-1$
+ public static String NewSerialFlashTargetWizard_Title;
+ public static String NewSerialFlashTargetWizardPage_CPUArchitecture;
+ public static String NewSerialFlashTargetWizardPage_Description;
+ public static String NewSerialFlashTargetWizardPage_Fetching;
+ public static String NewSerialFlashTargetWizardPage_Name;
+ public static String NewSerialFlashTargetWizardPage_OperatingSystem;
+ public static String NewSerialFlashTargetWizardPage_SerialPort;
+ public static String NewSerialFlashTargetWizardPage_Title;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/NewSerialFlashTargetWizard.java b/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/NewSerialFlashTargetWizard.java
new file mode 100644
index 0000000000..b1f2853723
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/NewSerialFlashTargetWizard.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2017 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.cdt.launch.serial.ui.internal;
+
+import org.eclipse.cdt.launch.serial.SerialFlashLaunchTargetProvider;
+import org.eclipse.launchbar.core.target.ILaunchTarget;
+import org.eclipse.launchbar.core.target.ILaunchTargetManager;
+import org.eclipse.launchbar.core.target.ILaunchTargetWorkingCopy;
+import org.eclipse.launchbar.ui.target.LaunchTargetWizard;
+
+public class NewSerialFlashTargetWizard extends LaunchTargetWizard {
+
+ private NewSerialFlashTargetWizardPage page;
+
+ public NewSerialFlashTargetWizard() {
+ setWindowTitle(Messages.NewSerialFlashTargetWizard_Title);
+ }
+
+ @Override
+ public void addPages() {
+ super.addPages();
+
+ page = new NewSerialFlashTargetWizardPage(getLaunchTarget());
+ addPage(page);
+ }
+
+ @Override
+ public boolean performFinish() {
+ ILaunchTargetManager manager = Activator.getService(ILaunchTargetManager.class);
+ String typeId = SerialFlashLaunchTargetProvider.TYPE_ID;
+ String id = page.getTargetName();
+
+ ILaunchTarget target = getLaunchTarget();
+ if (target == null) {
+ target = manager.addLaunchTarget(typeId, id);
+ }
+
+ ILaunchTargetWorkingCopy wc = target.getWorkingCopy();
+ wc.setId(id);
+ wc.setAttribute(ILaunchTarget.ATTR_OS, page.getOS());
+ wc.setAttribute(ILaunchTarget.ATTR_ARCH, page.getArch());
+ wc.setAttribute(SerialFlashLaunchTargetProvider.ATTR_SERIAL_PORT, page.getSerialPortName());
+ wc.save();
+
+ return true;
+ }
+
+}
diff --git a/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/NewSerialFlashTargetWizardPage.java b/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/NewSerialFlashTargetWizardPage.java
new file mode 100644
index 0000000000..58ab4e7660
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/NewSerialFlashTargetWizardPage.java
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * Copyright (c) 2017 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.cdt.launch.serial.ui.internal;
+
+import java.io.IOException;
+
+import org.eclipse.cdt.launch.serial.SerialFlashLaunchTargetProvider;
+import org.eclipse.cdt.serial.SerialPort;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.launchbar.core.target.ILaunchTarget;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+public class NewSerialFlashTargetWizardPage extends WizardPage {
+
+ private ILaunchTarget launchTarget;
+
+ private Text nameText;
+ private Text osText;
+ private Text archText;
+ private Combo serialPortCombo;
+
+ public NewSerialFlashTargetWizardPage(ILaunchTarget launchTarget) {
+ super(NewSerialFlashTargetWizardPage.class.getName());
+ this.launchTarget = launchTarget;
+ setTitle(Messages.NewSerialFlashTargetWizardPage_Title);
+ setDescription(Messages.NewSerialFlashTargetWizardPage_Description);
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ Composite comp = new Composite(parent, SWT.NONE);
+ comp.setLayout(new GridLayout(2, false));
+ setControl(comp);
+
+ Label label = new Label(comp, SWT.NONE);
+ label.setText(Messages.NewSerialFlashTargetWizardPage_Name);
+
+ nameText = new Text(comp, SWT.BORDER);
+ nameText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ if (launchTarget != null) {
+ nameText.setText(launchTarget.getId());
+ }
+
+ label = new Label(comp, SWT.NONE);
+ label.setText(Messages.NewSerialFlashTargetWizardPage_OperatingSystem);
+
+ osText = new Text(comp, SWT.BORDER);
+ osText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ if (launchTarget != null) {
+ String os = launchTarget.getAttribute(ILaunchTarget.ATTR_OS, null);
+ if (os != null) {
+ osText.setText(os);
+ }
+ }
+
+ label = new Label(comp, SWT.NONE);
+ label.setText(Messages.NewSerialFlashTargetWizardPage_CPUArchitecture);
+
+ archText = new Text(comp, SWT.BORDER);
+ archText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ if (launchTarget != null) {
+ String arch = launchTarget.getAttribute(ILaunchTarget.ATTR_ARCH, null);
+ if (arch != null) {
+ archText.setText(arch);
+ }
+ }
+
+ label = new Label(comp, SWT.NONE);
+ label.setText(Messages.NewSerialFlashTargetWizardPage_SerialPort);
+
+ serialPortCombo = new Combo(comp, SWT.NONE);
+ try {
+ String[] ports = SerialPort.list();
+ for (String port : ports) {
+ serialPortCombo.add(port);
+ }
+ if (serialPortCombo.getItemCount() > 0) {
+ if (launchTarget != null) {
+ String targetPort = launchTarget.getAttribute(SerialFlashLaunchTargetProvider.ATTR_SERIAL_PORT,
+ null);
+ if (targetPort != null) {
+ int i = 0;
+ for (String port : ports) {
+ if (port.equals(targetPort)) {
+ serialPortCombo.select(i);
+ break;
+ }
+ }
+ }
+ }
+
+ if (serialPortCombo.getSelectionIndex() < 0) {
+ serialPortCombo.select(0);
+ }
+ }
+ } catch (IOException e) {
+ Activator.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.NewSerialFlashTargetWizardPage_Fetching, e));
+ }
+ }
+
+ public String getTargetName() {
+ return nameText.getText();
+ }
+
+ public String getOS() {
+ return osText.getText();
+ }
+
+ public String getArch() {
+ return archText.getText();
+ }
+
+ public String getSerialPortName() {
+ return serialPortCombo.getText();
+ }
+
+}
diff --git a/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/SerialFlashLaunchConfigTabGroup.java b/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/SerialFlashLaunchConfigTabGroup.java
new file mode 100644
index 0000000000..96f26d4eac
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/SerialFlashLaunchConfigTabGroup.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2017 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.cdt.launch.serial.ui.internal;
+
+import org.eclipse.cdt.launch.ui.corebuild.GenericMainTab;
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
+import org.eclipse.debug.ui.CommonTab;
+import org.eclipse.debug.ui.EnvironmentTab;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+
+public class SerialFlashLaunchConfigTabGroup extends AbstractLaunchConfigurationTabGroup {
+
+ @Override
+ public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
+ setTabs(new ILaunchConfigurationTab[] { new GenericMainTab(), new EnvironmentTab(), new CommonTab() });
+ }
+
+}
diff --git a/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/SerialFlashLaunchTargetLabelProvider.java b/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/SerialFlashLaunchTargetLabelProvider.java
new file mode 100644
index 0000000000..d0060c7e22
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/SerialFlashLaunchTargetLabelProvider.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2017 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.cdt.launch.serial.ui.internal;
+
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.launchbar.core.target.ILaunchTarget;
+import org.eclipse.swt.graphics.Image;
+
+public class SerialFlashLaunchTargetLabelProvider extends LabelProvider {
+
+ @Override
+ public String getText(Object element) {
+ if (element instanceof ILaunchTarget) {
+ return ((ILaunchTarget) element).getId();
+ }
+ return super.getText(element);
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof ILaunchTarget) {
+ Image image = Activator.getImage(Activator.IMG_CDT_LOGO);
+ if (image != null) {
+ return image;
+ }
+ }
+ return super.getImage(element);
+ }
+
+}
diff --git a/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/messages.properties b/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/messages.properties
new file mode 100644
index 0000000000..a250eee1ba
--- /dev/null
+++ b/cross/org.eclipse.cdt.launch.serial.ui/src/org/eclipse/cdt/launch/serial/ui/internal/messages.properties
@@ -0,0 +1,15 @@
+################################################################################
+# Copyright (c) 2017 QNX Software Systems and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+################################################################################
+NewSerialFlashTargetWizard_Title=New Serial Flash Target
+NewSerialFlashTargetWizardPage_CPUArchitecture=CPU Architecture:
+NewSerialFlashTargetWizardPage_Description=Enter name and properties for the target.
+NewSerialFlashTargetWizardPage_Fetching=Fetching serial ports
+NewSerialFlashTargetWizardPage_Name=Name:
+NewSerialFlashTargetWizardPage_OperatingSystem=Operating System:
+NewSerialFlashTargetWizardPage_SerialPort=Serial Port:
+NewSerialFlashTargetWizardPage_Title=Serial Flash Target

Back to the top