diff options
author | Michael Rennie | 2011-02-07 21:44:40 +0000 |
---|---|---|
committer | Michael Rennie | 2011-02-07 21:44:40 +0000 |
commit | 7b9df4346d5066d82b499d08791cd59144c1bab9 (patch) | |
tree | cdbe7cc08575263e592decc8e829e758fbbf522c | |
parent | 202c068081a1d23e8e9d9a0a71e49a2bc0dae123 (diff) | |
download | eclipse.platform.debug-7b9df4346d5066d82b499d08791cd59144c1bab9.tar.gz eclipse.platform.debug-7b9df4346d5066d82b499d08791cd59144c1bab9.tar.xz eclipse.platform.debug-7b9df4346d5066d82b499d08791cd59144c1bab9.zip |
7 files changed, 26 insertions, 22 deletions
diff --git a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/ExternalToolsCore.java b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/ExternalToolsCore.java index e14df9960..b0e2bf115 100644 --- a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/ExternalToolsCore.java +++ b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/ExternalToolsCore.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009 IBM Corporation and others. + * Copyright (c) 2009, 2011 IBM Corporation 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 @@ -24,8 +24,6 @@ public class ExternalToolsCore extends Plugin { // The plug-in ID public static final String PLUGIN_ID = "org.eclipse.core.externaltools"; //$NON-NLS-1$ - private static final String EMPTY_STRING= ""; //$NON-NLS-1$ - /** * Status code indicating an unexpected internal error. * @since 2.1 @@ -102,7 +100,7 @@ public class ExternalToolsCore extends Plugin { */ public static IStatus newErrorStatus(String message, Throwable exception) { if (message == null) { - message= EMPTY_STRING; + return new Status(IStatus.ERROR, PLUGIN_ID, 0, IExternalToolConstants.EMPTY_STRING, exception); } return new Status(IStatus.ERROR, PLUGIN_ID, 0, message, exception); } diff --git a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/IExternalToolConstants.java b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/IExternalToolConstants.java index 4641a0e8c..b276e212b 100644 --- a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/IExternalToolConstants.java +++ b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/IExternalToolConstants.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2011 IBM Corporation 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 @@ -18,6 +18,14 @@ package org.eclipse.core.externaltools.internal; * </p> */ public interface IExternalToolConstants { + + /** + * Constant for the empty {@link String} + * + * @since org.eclipse.core.externaltools 1.0.100 + */ + public static final String EMPTY_STRING = ""; //$NON-NLS-1$ + /** * Plug-in identifier for external tools UI (value <code>org.eclipse.ui.externaltools</code>). */ diff --git a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java index 00d1c63f8..a1ae3a67b 100644 --- a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java +++ b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2010 IBM Corporation and others. + * Copyright (c) 2000, 2011 IBM Corporation 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 @@ -166,7 +166,7 @@ public class ProgramLaunchDelegate extends LaunchConfigurationDelegate { private String generateCommandLine(String[] commandLine) { if (commandLine.length < 1) - return ""; //$NON-NLS-1$ + return IExternalToolConstants.EMPTY_STRING; StringBuffer buf = new StringBuffer(); for (int i = 0; i < commandLine.length; i++) { buf.append(' '); diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuilderTab.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuilderTab.java index 004f08059..2b53abfd7 100644 --- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuilderTab.java +++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuilderTab.java @@ -319,7 +319,7 @@ public class ExternalToolsBuilderTab extends AbstractLaunchConfigurationTab { String buildKindString= null; String buildScope= null; try { - buildKindString= configuration.getAttribute(IExternalToolConstants.ATTR_RUN_BUILD_KINDS, ""); //$NON-NLS-1$ + buildKindString= configuration.getAttribute(IExternalToolConstants.ATTR_RUN_BUILD_KINDS, IExternalToolConstants.EMPTY_STRING); buildScope= configuration.getAttribute(IExternalToolConstants.ATTR_BUILDER_SCOPE, (String)null); } catch (CoreException e) { } diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsMainTab.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsMainTab.java index cb1ed713b..56fe08449 100644 --- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsMainTab.java +++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsMainTab.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2010 IBM Corporation and others. + * Copyright (c) 2000, 2011 IBM Corporation 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 @@ -317,9 +317,9 @@ public abstract class ExternalToolsMainTab extends AbstractLaunchConfigurationTa * configuration. */ protected void updateWorkingDirectory(ILaunchConfiguration configuration) { - String workingDir= ""; //$NON-NLS-1$ + String workingDir= IExternalToolConstants.EMPTY_STRING; try { - workingDir= configuration.getAttribute(IExternalToolConstants.ATTR_WORKING_DIRECTORY, ""); //$NON-NLS-1$ + workingDir= configuration.getAttribute(IExternalToolConstants.ATTR_WORKING_DIRECTORY, IExternalToolConstants.EMPTY_STRING); } catch (CoreException ce) { ExternalToolsPlugin.getDefault().log(ExternalToolsLaunchConfigurationMessages.ExternalToolsMainTab_Error_reading_configuration_10, ce); } @@ -331,9 +331,9 @@ public abstract class ExternalToolsMainTab extends AbstractLaunchConfigurationTa * configuration. */ protected void updateLocation(ILaunchConfiguration configuration) { - String location= ""; //$NON-NLS-1$ + String location= IExternalToolConstants.EMPTY_STRING; try { - location= configuration.getAttribute(IExternalToolConstants.ATTR_LOCATION, ""); //$NON-NLS-1$ + location= configuration.getAttribute(IExternalToolConstants.ATTR_LOCATION, IExternalToolConstants.EMPTY_STRING); } catch (CoreException ce) { ExternalToolsPlugin.getDefault().log(ExternalToolsLaunchConfigurationMessages.ExternalToolsMainTab_Error_reading_configuration_10, ce); } @@ -345,9 +345,9 @@ public abstract class ExternalToolsMainTab extends AbstractLaunchConfigurationTa * configuration. */ protected void updateArgument(ILaunchConfiguration configuration) { - String arguments= ""; //$NON-NLS-1$ + String arguments= IExternalToolConstants.EMPTY_STRING; try { - arguments= configuration.getAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, ""); //$NON-NLS-1$ + arguments= configuration.getAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, IExternalToolConstants.EMPTY_STRING); } catch (CoreException ce) { ExternalToolsPlugin.getDefault().log(ExternalToolsLaunchConfigurationMessages.ExternalToolsMainTab_Error_reading_configuration_7, ce); } diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsPlugin.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsPlugin.java index f3b82cbdb..16c945a2e 100644 --- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsPlugin.java +++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsPlugin.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2011 IBM Corporation 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 @@ -48,12 +48,10 @@ public final class ExternalToolsPlugin extends AbstractUIPlugin implements /** * Status representing no problems encountered during operation. */ - public static final IStatus OK_STATUS = new Status(IStatus.OK, PLUGIN_ID, 0, "", null); //$NON-NLS-1$ + public static final IStatus OK_STATUS = new Status(IStatus.OK, PLUGIN_ID, 0, IExternalToolConstants.EMPTY_STRING, null); private static ExternalToolsPlugin plugin; - private static final String EMPTY_STRING = ""; //$NON-NLS-1$ - private static IWindowListener fWindowListener; private static ILaunchManager launchManager; @@ -134,7 +132,7 @@ public final class ExternalToolsPlugin extends AbstractUIPlugin implements */ public static IStatus newErrorStatus(String message, Throwable exception) { if (message == null) { - message= EMPTY_STRING; + return new Status(IStatus.ERROR, PLUGIN_ID, 0, IExternalToolConstants.EMPTY_STRING, exception); } return new Status(IStatus.ERROR, PLUGIN_ID, 0, message, exception); } diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java index 3f97506f2..67c457c8c 100644 --- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java +++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2011 IBM Corporation 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 @@ -209,7 +209,7 @@ public final class BuilderPropertyPage extends PropertyPage implements ICheckSta boolean projectNeedsMigration= false; for (int i = 0; i < commands.length; i++) { - String[] version= new String[] {""}; //$NON-NLS-1$ + String[] version= new String[] {IExternalToolConstants.EMPTY_STRING}; ILaunchConfiguration config = BuilderUtils.configFromBuildCommandArgs(project, commands[i].getArguments(), version); if (BuilderCoreUtils.VERSION_2_1.equals(version[0])) { // Storing the .project file of a project with 2.1 configs, will |