Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Schaefer2016-02-22 20:14:28 -0500
committerGerrit Code Review @ Eclipse.org2016-02-22 22:55:06 -0500
commitd1dda291d93f569971a3d93634860b816295ea9d (patch)
tree00d8383edb417ae116c56351f44b5a531a7fcd8f /toolchains
parente3f7a7dd7f7b18df601539c79eda689abc600d83 (diff)
downloadorg.eclipse.cdt-d1dda291d93f569971a3d93634860b816295ea9d.tar.gz
org.eclipse.cdt-d1dda291d93f569971a3d93634860b816295ea9d.tar.xz
org.eclipse.cdt-d1dda291d93f569971a3d93634860b816295ea9d.zip
New Qt templates using new templates framework. Arduino fixes.
Diffstat (limited to 'toolchains')
-rw-r--r--toolchains/arduino/org.eclipse.cdt.arduino.core/META-INF/MANIFEST.MF3
-rw-r--r--toolchains/arduino/org.eclipse.cdt.arduino.core/plugin.xml7
-rw-r--r--toolchains/arduino/org.eclipse.cdt.arduino.core/src/org/eclipse/cdt/arduino/core/internal/remote/ArduinoLaunchTargetProvider.java19
-rw-r--r--toolchains/arduino/org.eclipse.cdt.arduino.ui/META-INF/MANIFEST.MF3
-rw-r--r--toolchains/arduino/org.eclipse.cdt.arduino.ui/plugin.xml13
-rw-r--r--toolchains/arduino/org.eclipse.cdt.arduino.ui/src/org/eclipse/cdt/arduino/ui/internal/remote/NewArduinoTargetWizard.java21
6 files changed, 63 insertions, 3 deletions
diff --git a/toolchains/arduino/org.eclipse.cdt.arduino.core/META-INF/MANIFEST.MF b/toolchains/arduino/org.eclipse.cdt.arduino.core/META-INF/MANIFEST.MF
index dab81eed76..7a81a68875 100644
--- a/toolchains/arduino/org.eclipse.cdt.arduino.core/META-INF/MANIFEST.MF
+++ b/toolchains/arduino/org.eclipse.cdt.arduino.core/META-INF/MANIFEST.MF
@@ -15,7 +15,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.remote.serial.core;bundle-version="1.0.0",
com.google.gson;bundle-version="2.2.4",
org.apache.commons.compress;bundle-version="1.6.0",
- org.freemarker;bundle-version="2.3.22"
+ org.freemarker;bundle-version="2.3.22",
+ org.eclipse.launchbar.remote.core;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
diff --git a/toolchains/arduino/org.eclipse.cdt.arduino.core/plugin.xml b/toolchains/arduino/org.eclipse.cdt.arduino.core/plugin.xml
index 676505ab53..8399a090f7 100644
--- a/toolchains/arduino/org.eclipse.cdt.arduino.core/plugin.xml
+++ b/toolchains/arduino/org.eclipse.cdt.arduino.core/plugin.xml
@@ -109,4 +109,11 @@
</adapter>
</factory>
</extension>
+ <extension
+ point="org.eclipse.launchbar.core.launchTargetTypes">
+ <launchTargetType
+ id="org.eclipse.cdt.arduino.core.connectionType"
+ provider="org.eclipse.cdt.arduino.core.internal.remote.ArduinoLaunchTargetProvider">
+ </launchTargetType>
+ </extension>
</plugin>
diff --git a/toolchains/arduino/org.eclipse.cdt.arduino.core/src/org/eclipse/cdt/arduino/core/internal/remote/ArduinoLaunchTargetProvider.java b/toolchains/arduino/org.eclipse.cdt.arduino.core/src/org/eclipse/cdt/arduino/core/internal/remote/ArduinoLaunchTargetProvider.java
new file mode 100644
index 0000000000..b0c6224974
--- /dev/null
+++ b/toolchains/arduino/org.eclipse.cdt.arduino.core/src/org/eclipse/cdt/arduino/core/internal/remote/ArduinoLaunchTargetProvider.java
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2016 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.arduino.core.internal.remote;
+
+import org.eclipse.launchbar.remote.core.RemoteLaunchTargetProvider;
+
+public class ArduinoLaunchTargetProvider extends RemoteLaunchTargetProvider {
+
+ @Override
+ protected String getTypeId() {
+ return ArduinoRemoteConnection.TYPE_ID;
+ }
+
+}
diff --git a/toolchains/arduino/org.eclipse.cdt.arduino.ui/META-INF/MANIFEST.MF b/toolchains/arduino/org.eclipse.cdt.arduino.ui/META-INF/MANIFEST.MF
index 5b648f7d7d..85291e2145 100644
--- a/toolchains/arduino/org.eclipse.cdt.arduino.ui/META-INF/MANIFEST.MF
+++ b/toolchains/arduino/org.eclipse.cdt.arduino.ui/META-INF/MANIFEST.MF
@@ -18,7 +18,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.remote.core;bundle-version="2.0.0",
org.eclipse.remote.ui;bundle-version="2.0.0",
org.eclipse.cdt.core,
- org.eclipse.cdt.native.serial;bundle-version="1.0.0"
+ org.eclipse.cdt.native.serial;bundle-version="1.0.0",
+ org.eclipse.launchbar.remote.ui;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
diff --git a/toolchains/arduino/org.eclipse.cdt.arduino.ui/plugin.xml b/toolchains/arduino/org.eclipse.cdt.arduino.ui/plugin.xml
index 0290e80818..1a6410413b 100644
--- a/toolchains/arduino/org.eclipse.cdt.arduino.ui/plugin.xml
+++ b/toolchains/arduino/org.eclipse.cdt.arduino.ui/plugin.xml
@@ -136,4 +136,17 @@
type="org.eclipse.cdt.arduino.core.launchConfigurationType">
</launchConfigurationTabGroup>
</extension>
+ <extension
+ point="org.eclipse.launchbar.ui.launchTargetTypeUI">
+ <launchTargetTypeUI
+ id="org.eclipse.cdt.arduino.core.connectionType"
+ labelProvider="org.eclipse.launchbar.remote.ui.RemoteLaunchTargetLabelProvider">
+ </launchTargetTypeUI>
+ <wizard
+ class="org.eclipse.cdt.arduino.ui.internal.remote.NewArduinoTargetWizard"
+ icon="icons/arduino.png"
+ id="org.eclipse.cdt.arduino.ui.launchTargetWizard"
+ name="Arduino">
+ </wizard>
+ </extension>
</plugin>
diff --git a/toolchains/arduino/org.eclipse.cdt.arduino.ui/src/org/eclipse/cdt/arduino/ui/internal/remote/NewArduinoTargetWizard.java b/toolchains/arduino/org.eclipse.cdt.arduino.ui/src/org/eclipse/cdt/arduino/ui/internal/remote/NewArduinoTargetWizard.java
index 9d07618a43..023bb14c73 100644
--- a/toolchains/arduino/org.eclipse.cdt.arduino.ui/src/org/eclipse/cdt/arduino/ui/internal/remote/NewArduinoTargetWizard.java
+++ b/toolchains/arduino/org.eclipse.cdt.arduino.ui/src/org/eclipse/cdt/arduino/ui/internal/remote/NewArduinoTargetWizard.java
@@ -11,17 +11,26 @@ import java.util.Set;
import org.eclipse.cdt.arduino.core.internal.remote.ArduinoRemoteConnection;
import org.eclipse.cdt.arduino.ui.internal.Activator;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.remote.core.IRemoteConnectionType;
import org.eclipse.remote.core.IRemoteConnectionWorkingCopy;
import org.eclipse.remote.core.IRemoteServicesManager;
import org.eclipse.remote.core.exception.RemoteConnectionException;
import org.eclipse.remote.ui.IRemoteUIConnectionWizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
-public class NewArduinoTargetWizard extends Wizard implements IRemoteUIConnectionWizard {
+public class NewArduinoTargetWizard extends Wizard implements IRemoteUIConnectionWizard, INewWizard {
private NewArduinoTargetWizardPage page;
private IRemoteConnectionWorkingCopy workingCopy;
+ private boolean isNewWizard;
+
+ @Override
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ isNewWizard = true;
+ }
@Override
public void addPages() {
@@ -36,6 +45,16 @@ public class NewArduinoTargetWizard extends Wizard implements IRemoteUIConnectio
}
page.performFinish(workingCopy);
+
+ if (isNewWizard) {
+ // if called as a new wizard, we need to do the save
+ try {
+ workingCopy.save();
+ } catch (RemoteConnectionException e) {
+ Activator.log(e);
+ return false;
+ }
+ }
return true;
}

Back to the top