diff options
Diffstat (limited to 'cross')
33 files changed, 929 insertions, 929 deletions
diff --git a/cross/org.eclipse.cdt.build.crossgcc/.classpath b/cross/org.eclipse.cdt.build.crossgcc/.classpath index b862a296d38..eca7bdba8f0 100644 --- a/cross/org.eclipse.cdt.build.crossgcc/.classpath +++ b/cross/org.eclipse.cdt.build.crossgcc/.classpath @@ -1,7 +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>
+<?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.build.crossgcc/.settings/org.eclipse.jdt.core.prefs b/cross/org.eclipse.cdt.build.crossgcc/.settings/org.eclipse.jdt.core.prefs index 2eed35de4b7..86a6dab55c4 100644 --- a/cross/org.eclipse.cdt.build.crossgcc/.settings/org.eclipse.jdt.core.prefs +++ b/cross/org.eclipse.cdt.build.crossgcc/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,8 @@ -#Wed Nov 16 18:18:23 EST 2011
-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
+#Wed Nov 16 18:18:23 EST 2011 +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.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/Messages.java b/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/Messages.java index 7dc2f139283..52a652e5ed6 100644 --- a/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/Messages.java +++ b/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/Messages.java @@ -1,30 +1,30 @@ -/*******************************************************************************
- * Copyright (c) 2011, 2014 Marc-Andre Laperle 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
- *
- * Contributors:
- * Marc-Andre Laperle - initial API and implementation
+/******************************************************************************* + * Copyright (c) 2011, 2014 Marc-Andre Laperle 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 + * + * Contributors: + * Marc-Andre Laperle - initial API and implementation *******************************************************************************/ -package org.eclipse.cdt.internal.build.crossgcc;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- public static String SetCrossCommandWizardPage_browse;
- public static String SetCrossCommandWizardPage_description;
- public static String SetCrossCommandWizardPage_name;
- public static String SetCrossCommandWizardPage_path;
- public static String SetCrossCommandWizardPage_prefix;
- public static String SetCrossCommandWizardPage_title;
-
- static {
- // Initialize resource bundle.
- NLS.initializeMessages(Messages.class.getName(), Messages.class);
- }
-
- private Messages() {
- }
-}
+package org.eclipse.cdt.internal.build.crossgcc; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS { + public static String SetCrossCommandWizardPage_browse; + public static String SetCrossCommandWizardPage_description; + public static String SetCrossCommandWizardPage_name; + public static String SetCrossCommandWizardPage_path; + public static String SetCrossCommandWizardPage_prefix; + public static String SetCrossCommandWizardPage_title; + + static { + // Initialize resource bundle. + NLS.initializeMessages(Messages.class.getName(), Messages.class); + } + + private Messages() { + } +} diff --git a/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/Messages.properties b/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/Messages.properties index aed22f3dc2a..bd386dc7a89 100644 --- a/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/Messages.properties +++ b/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/Messages.properties @@ -1,16 +1,16 @@ -###############################################################################
-# Copyright (c) 2011, 2012 Marc-Andre Laperle
-# 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
-#
-# Contributors:
-# Marc-Andre Laperle - initial API and implementation
-###############################################################################
-SetCrossCommandWizardPage_browse=Browse...
-SetCrossCommandWizardPage_description=Configure the Cross GCC path and prefix
-SetCrossCommandWizardPage_name=Cross GCC Command Wizard Page
-SetCrossCommandWizardPage_path=Cross compiler path:
-SetCrossCommandWizardPage_prefix=Cross compiler prefix:
-SetCrossCommandWizardPage_title=Cross GCC Command
+############################################################################### +# Copyright (c) 2011, 2012 Marc-Andre Laperle +# 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 +# +# Contributors: +# Marc-Andre Laperle - initial API and implementation +############################################################################### +SetCrossCommandWizardPage_browse=Browse... +SetCrossCommandWizardPage_description=Configure the Cross GCC path and prefix +SetCrossCommandWizardPage_name=Cross GCC Command Wizard Page +SetCrossCommandWizardPage_path=Cross compiler path: +SetCrossCommandWizardPage_prefix=Cross compiler prefix: +SetCrossCommandWizardPage_title=Cross GCC Command diff --git a/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/SetCrossCommandOperation.java b/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/SetCrossCommandOperation.java index 89aaf7d8f6a..52e999b02f1 100644 --- a/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/SetCrossCommandOperation.java +++ b/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/SetCrossCommandOperation.java @@ -1,66 +1,66 @@ -/*******************************************************************************
- * Copyright (c) 2009, 2013 Wind River Systems, Inc. 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
- *
- * Contributors:
- * Doug Schaefer - initial API and implementation
- * Marc-Andre Laperle - Moved to an operation for a custom wizard page
- *******************************************************************************/
-package org.eclipse.cdt.internal.build.crossgcc;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.cdt.core.templateengine.SharedDefaults;
-import org.eclipse.cdt.managedbuilder.core.IConfiguration;
-import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
-import org.eclipse.cdt.managedbuilder.core.IOption;
-import org.eclipse.cdt.managedbuilder.core.IToolChain;
-import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
-import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageManager;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-
-/**
- * An operation that runs when the new project wizard finishes for the Cross GCC toolchain.
- * It reuses the information from {@link SetCrossCommandWizardPage} to set build options (prefix and path).
- * It also clears and reruns scanner discovery to account for the modified command.
- *
- */
-public class SetCrossCommandOperation implements IRunnableWithProgress {
-
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
-
- String projectName = (String) MBSCustomPageManager.getPageProperty(SetCrossCommandWizardPage.PAGE_ID, SetCrossCommandWizardPage.CROSS_PROJECT_NAME);
- String prefix = (String) MBSCustomPageManager.getPageProperty(SetCrossCommandWizardPage.PAGE_ID, SetCrossCommandWizardPage.CROSS_COMMAND_PREFIX);
- String path = (String) MBSCustomPageManager.getPageProperty(SetCrossCommandWizardPage.PAGE_ID, SetCrossCommandWizardPage.CROSS_COMMAND_PATH);
-
- SharedDefaults.getInstance().getSharedDefaultsMap().put(SetCrossCommandWizardPage.SHARED_DEFAULTS_PATH_KEY, path);
- SharedDefaults.getInstance().getSharedDefaultsMap().put(SetCrossCommandWizardPage.SHARED_DEFAULTS_PREFIX_KEY, prefix);
- SharedDefaults.getInstance().updateShareDefaultsMap(SharedDefaults.getInstance().getSharedDefaultsMap());
-
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- if (!project.exists())
- return;
-
- IManagedBuildInfo buildInfo = ManagedBuildManager.getBuildInfo(project);
- if (buildInfo == null)
- return;
-
- IConfiguration[] configs = buildInfo.getManagedProject().getConfigurations();
- for (IConfiguration config : configs) {
- IToolChain toolchain = config.getToolChain();
- IOption option = toolchain.getOptionBySuperClassId("cdt.managedbuild.option.gnu.cross.prefix"); //$NON-NLS-1$
- ManagedBuildManager.setOption(config, toolchain, option, prefix);
- option = toolchain.getOptionBySuperClassId("cdt.managedbuild.option.gnu.cross.path"); //$NON-NLS-1$
- ManagedBuildManager.setOption(config, toolchain, option, path);
- }
-
- ManagedBuildManager.saveBuildInfo(project, true);
- }
-
-}
+/******************************************************************************* + * Copyright (c) 2009, 2013 Wind River Systems, Inc. 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 + * + * Contributors: + * Doug Schaefer - initial API and implementation + * Marc-Andre Laperle - Moved to an operation for a custom wizard page + *******************************************************************************/ +package org.eclipse.cdt.internal.build.crossgcc; +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.cdt.core.templateengine.SharedDefaults; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo; +import org.eclipse.cdt.managedbuilder.core.IOption; +import org.eclipse.cdt.managedbuilder.core.IToolChain; +import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; +import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageManager; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.jface.operation.IRunnableWithProgress; + +/** + * An operation that runs when the new project wizard finishes for the Cross GCC toolchain. + * It reuses the information from {@link SetCrossCommandWizardPage} to set build options (prefix and path). + * It also clears and reruns scanner discovery to account for the modified command. + * + */ +public class SetCrossCommandOperation implements IRunnableWithProgress { + + public void run(IProgressMonitor monitor) throws InvocationTargetException, + InterruptedException { + + String projectName = (String) MBSCustomPageManager.getPageProperty(SetCrossCommandWizardPage.PAGE_ID, SetCrossCommandWizardPage.CROSS_PROJECT_NAME); + String prefix = (String) MBSCustomPageManager.getPageProperty(SetCrossCommandWizardPage.PAGE_ID, SetCrossCommandWizardPage.CROSS_COMMAND_PREFIX); + String path = (String) MBSCustomPageManager.getPageProperty(SetCrossCommandWizardPage.PAGE_ID, SetCrossCommandWizardPage.CROSS_COMMAND_PATH); + + SharedDefaults.getInstance().getSharedDefaultsMap().put(SetCrossCommandWizardPage.SHARED_DEFAULTS_PATH_KEY, path); + SharedDefaults.getInstance().getSharedDefaultsMap().put(SetCrossCommandWizardPage.SHARED_DEFAULTS_PREFIX_KEY, prefix); + SharedDefaults.getInstance().updateShareDefaultsMap(SharedDefaults.getInstance().getSharedDefaultsMap()); + + IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); + if (!project.exists()) + return; + + IManagedBuildInfo buildInfo = ManagedBuildManager.getBuildInfo(project); + if (buildInfo == null) + return; + + IConfiguration[] configs = buildInfo.getManagedProject().getConfigurations(); + for (IConfiguration config : configs) { + IToolChain toolchain = config.getToolChain(); + IOption option = toolchain.getOptionBySuperClassId("cdt.managedbuild.option.gnu.cross.prefix"); //$NON-NLS-1$ + ManagedBuildManager.setOption(config, toolchain, option, prefix); + option = toolchain.getOptionBySuperClassId("cdt.managedbuild.option.gnu.cross.path"); //$NON-NLS-1$ + ManagedBuildManager.setOption(config, toolchain, option, path); + } + + ManagedBuildManager.saveBuildInfo(project, true); + } + +} diff --git a/cross/org.eclipse.cdt.launch.serial-feature/.project b/cross/org.eclipse.cdt.launch.serial-feature/.project index acb0250e3e2..5a3db9614fc 100644 --- a/cross/org.eclipse.cdt.launch.serial-feature/.project +++ b/cross/org.eclipse.cdt.launch.serial-feature/.project @@ -1,17 +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>
+<?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 index 3104d6d76e7..b3a611b5c93 100644 --- a/cross/org.eclipse.cdt.launch.serial-feature/build.properties +++ b/cross/org.eclipse.cdt.launch.serial-feature/build.properties @@ -1,2 +1,2 @@ -bin.includes = feature.xml,\
- feature.properties
+bin.includes = feature.xml,\ + feature.properties diff --git a/cross/org.eclipse.cdt.launch.serial-feature/feature.properties b/cross/org.eclipse.cdt.launch.serial-feature/feature.properties index e205deff831..e875fb0969f 100644 --- a/cross/org.eclipse.cdt.launch.serial-feature/feature.properties +++ b/cross/org.eclipse.cdt.launch.serial-feature/feature.properties @@ -1,17 +1,17 @@ -###############################################################################
-# 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
-###############################################################################
-
-featureName=C/C++ Launch over Serial
-providerName=Eclipse CDT
-description=Coordination for launching over a serial port that is also used for terminal access.
-copyright=\
-Copyright (c) 2017 QNX Software Systems and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
+############################################################################### +# 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 +############################################################################### + +featureName=C/C++ Launch over Serial +providerName=Eclipse CDT +description=Coordination for launching over a serial port that is also used for terminal access. +copyright=\ +Copyright (c) 2017 QNX Software Systems and others.\n\ +All rights reserved. This program and the accompanying materials\n\ +are made available under the terms of the Eclipse Public License v1.0\n\ +which accompanies this distribution, and is available at\n\ +http://www.eclipse.org/legal/epl-v10.html diff --git a/cross/org.eclipse.cdt.launch.serial-feature/feature.xml b/cross/org.eclipse.cdt.launch.serial-feature/feature.xml index d47d406d1be..70757bbb49e 100644 --- a/cross/org.eclipse.cdt.launch.serial-feature/feature.xml +++ b/cross/org.eclipse.cdt.launch.serial-feature/feature.xml @@ -1,35 +1,35 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.cdt.launch.serial.feature"
- label="%featureName"
- version="9.6.0.qualifier"
- provider-name="%providerName"
- license-feature="org.eclipse.license"
- license-feature-version="0.0.0">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </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>
+<?xml version="1.0" encoding="UTF-8"?> +<feature + id="org.eclipse.cdt.launch.serial.feature" + label="%featureName" + version="9.6.0.qualifier" + provider-name="%providerName" + license-feature="org.eclipse.license" + license-feature-version="0.0.0"> + + <description> + %description + </description> + + <copyright> + %copyright + </copyright> + + <license url="%licenseURL"> + %license + </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 index b862a296d38..eca7bdba8f0 100644 --- a/cross/org.eclipse.cdt.launch.serial.core/.classpath +++ b/cross/org.eclipse.cdt.launch.serial.core/.classpath @@ -1,7 +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>
+<?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 index 0bad6ef6c55..26dde19dd6d 100644 --- a/cross/org.eclipse.cdt.launch.serial.core/.project +++ b/cross/org.eclipse.cdt.launch.serial.core/.project @@ -1,28 +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>
+<?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 index 295926d9641..0c68a61dca8 100644 --- 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 @@ -1,7 +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
+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/build.properties b/cross/org.eclipse.cdt.launch.serial.core/build.properties index 2d575990465..786b1df9364 100644 --- a/cross/org.eclipse.cdt.launch.serial.core/build.properties +++ b/cross/org.eclipse.cdt.launch.serial.core/build.properties @@ -1,6 +1,6 @@ -source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- about.html
+source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + about.html diff --git a/cross/org.eclipse.cdt.launch.serial.core/plugin.xml b/cross/org.eclipse.cdt.launch.serial.core/plugin.xml index 537bc36e76b..7ca6053ce00 100644 --- a/cross/org.eclipse.cdt.launch.serial.core/plugin.xml +++ b/cross/org.eclipse.cdt.launch.serial.core/plugin.xml @@ -1,29 +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>
+<?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 index ec3e47f63c6..53a814c3637 100644 --- 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 @@ -1,36 +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;
- }
-
-}
+/******************************************************************************* + * 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 index ca9822e4d29..b197e1574bd 100644 --- 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 @@ -1,30 +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);
- }
-
-}
+/******************************************************************************* + * 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 index 3b18b53d8d4..f6298a4c333 100644 --- 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 @@ -1,23 +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() {
- }
-}
+/******************************************************************************* + * 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 index e810d708f32..5126a18ddec 100644 --- 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 @@ -1,67 +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;
- }
- }
-
-}
+/******************************************************************************* + * 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 index 3473c4296f3..eef3d006f38 100644 --- 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 @@ -1,37 +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);
- }
-
-}
+/******************************************************************************* + * 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 index d1cfb4dff92..7bbc6a2c7f4 100644 --- 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 @@ -1,32 +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);
- }
-
-}
+/******************************************************************************* + * 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 index 02efebb9d0b..1c2f13475f9 100644 --- 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 @@ -1,9 +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
+################################################################################ +# 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 index b862a296d38..eca7bdba8f0 100644 --- a/cross/org.eclipse.cdt.launch.serial.ui/.classpath +++ b/cross/org.eclipse.cdt.launch.serial.ui/.classpath @@ -1,7 +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>
+<?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 index 0977dd1f5ea..9da42b751e3 100644 --- a/cross/org.eclipse.cdt.launch.serial.ui/.project +++ b/cross/org.eclipse.cdt.launch.serial.ui/.project @@ -1,28 +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>
+<?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 index 295926d9641..0c68a61dca8 100644 --- 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 @@ -1,7 +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
+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/build.properties b/cross/org.eclipse.cdt.launch.serial.ui/build.properties index 983cdc39a95..4ba0a0c298b 100644 --- a/cross/org.eclipse.cdt.launch.serial.ui/build.properties +++ b/cross/org.eclipse.cdt.launch.serial.ui/build.properties @@ -1,7 +1,7 @@ -source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- icons/,\
- about.html
+source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + icons/,\ + about.html diff --git a/cross/org.eclipse.cdt.launch.serial.ui/plugin.xml b/cross/org.eclipse.cdt.launch.serial.ui/plugin.xml index ae904e80c65..cf4e3d60cbb 100644 --- a/cross/org.eclipse.cdt.launch.serial.ui/plugin.xml +++ b/cross/org.eclipse.cdt.launch.serial.ui/plugin.xml @@ -1,34 +1,34 @@ -<?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>
- <extension
- point="org.eclipse.launchbar.ui.launchBarUIContributions">
- <buildTabGroup
- launchConfigType="org.eclipse.cdt.launch.serial.launchConfigurationType"
- launchDescriptorType="org.eclipse.cdt.debug.core.coreBuildDescriptorType"
- tabGroup="org.eclipse.cdt.launch.internal.corebuild.CoreBuildTabGroup">
- </buildTabGroup>
- </extension>
-
-</plugin>
+<?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> + <extension + point="org.eclipse.launchbar.ui.launchBarUIContributions"> + <buildTabGroup + launchConfigType="org.eclipse.cdt.launch.serial.launchConfigurationType" + launchDescriptorType="org.eclipse.cdt.debug.core.coreBuildDescriptorType" + tabGroup="org.eclipse.cdt.launch.internal.corebuild.CoreBuildTabGroup"> + </buildTabGroup> + </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 index 42ec9d2a6a7..931ddd3b5ba 100644 --- 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 @@ -1,52 +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;
- }
-
-}
+/******************************************************************************* + * 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 index 716945251ef..79a3e0e86ad 100644 --- 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 @@ -1,29 +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() {
- }
-}
+/******************************************************************************* + * 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 index b1f28537234..f79a35db6a8 100644 --- 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 @@ -1,53 +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;
- }
-
-}
+/******************************************************************************* + * 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 index 58ab4e7660a..a6b5aa558fd 100644 --- 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 @@ -1,130 +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();
- }
-
-}
+/******************************************************************************* + * 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 index 96f26d4eac2..47f9dd78941 100644 --- 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 @@ -1,24 +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() });
- }
-
-}
+/******************************************************************************* + * 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 index d0060c7e224..a7011d41eee 100644 --- 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 @@ -1,35 +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);
- }
-
-}
+/******************************************************************************* + * 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 index a250eee1ba5..8023e0fa82f 100644 --- 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 @@ -1,15 +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
+################################################################################ +# 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 |