diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java index 8a76a0afcd4..51b48d31dc3 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java @@ -7,8 +7,7 @@ * * Contributors: * QNX Software Systems - Initial API and implementation - * Ken Ryall (Nokia) - bug 178731 - * Ken Ryall (Nokia) - bug 246201 + * Ken Ryall (Nokia) - bugs 178731, 246201 *******************************************************************************/ package org.eclipse.cdt.debug.internal.ui.launch; @@ -70,7 +69,6 @@ import org.eclipse.ui.dialogs.ElementListSelectionDialog; import org.eclipse.ui.dialogs.TwoPaneElementSelector; public class CApplicationLaunchShortcut implements ILaunchShortcut2 { - @Override public void launch(IEditorPart editor, String mode) { searchAndLaunch(new Object[] { editor.getEditorInput() }, mode); diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CPropertyTester.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CPropertyTester.java index c889e1cce96..0920a0be131 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CPropertyTester.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CPropertyTester.java @@ -1,11 +1,11 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 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 - * http://www.eclipse.org/legal/epl-v10.html + * Copyright (c) 2000, 2009 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 + * http://www.eclipse.org/legal/epl-v10.html * - * Contributors: + * Contributors: * IBM Corporation - initial implementation * Ken Ryall (Nokia) - Modified to launch on a project context. *******************************************************************************/ @@ -21,38 +21,34 @@ import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IAdaptable; /** - * A property tester that determines if a file is an executable. + * A property tester that determines if a file is an executable or a C/C++ project. */ public class CPropertyTester extends PropertyTester { - @Override public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { if ("isExecutable".equals(property)) //$NON-NLS-1$ return isExecutable(receiver); - else if ("isCProject".equals(property)) //$NON-NLS-1$ + if ("isCProject".equals(property)) //$NON-NLS-1$ return isCProject(receiver); - else - return false; + return false; } private boolean isExecutable(Object receiver) { ICElement celement = null; if (receiver instanceof IAdaptable) { - IResource res = (IResource) ((IAdaptable)receiver).getAdapter(IResource.class); + IResource res = (IResource) ((IAdaptable) receiver).getAdapter(IResource.class); if (res != null) { celement = CoreModel.getDefault().create(res); } } - return (celement != null && celement instanceof IBinary); + return celement != null && celement instanceof IBinary; } private boolean isCProject(Object receiver) { if (receiver instanceof IProject) - return CoreModel.hasCNature((IProject)receiver); - else if (receiver instanceof ICProject) + return CoreModel.hasCNature((IProject) receiver); + if (receiver instanceof ICProject) return true; - else - return false; + return false; } - } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/InvalidLaunchableAdapterFactory.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/InvalidLaunchableAdapterFactory.java index 10ff510a19f..90bc67b6a3e 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/InvalidLaunchableAdapterFactory.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/InvalidLaunchableAdapterFactory.java @@ -24,15 +24,9 @@ import org.eclipse.debug.ui.actions.ILaunchable; * the ILaunchable interface and Bugzilla : 396822. */ public class InvalidLaunchableAdapterFactory implements IAdapterFactory { - private static final Class[] TYPES = { ILaunchable.class }; - private static ArrayList currentTraces = new ArrayList(); - /* - * (non-Javadoc) - * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class) - */ @Override @SuppressWarnings("rawtypes") public Object getAdapter(Object adaptableObject, Class adapterType) { @@ -42,23 +36,21 @@ public class InvalidLaunchableAdapterFactory implements IAdapterFactory { */ String trace = getStackTrace(); - if ( ! currentTraces.contains( trace ) ) { + if (!currentTraces.contains(trace)) { /* * Note we have seen this one for the first time. */ - currentTraces.add( trace ); + currentTraces.add(trace); /* * Generate a message for this in the log file. */ String msg = LaunchMessages.getString("Launch.ILaunchable.Interface.Error"); //$NON-NLS-1$ - CDebugUIPlugin.log( new Status( IStatus.INFO, CDebugUIPlugin.PLUGIN_ID, 0, msg, new Throwable( "" ) ) ); //$NON-NLS-1$ + CDebugUIPlugin.log(new Status(IStatus.INFO, CDebugUIPlugin.PLUGIN_ID, 0, msg, new Throwable(""))); //$NON-NLS-1$ } - /* - * We do not actually provide an adapter factory for this. - */ + // We do not actually provide an adapter factory for this. return null; } @@ -76,9 +68,6 @@ public class InvalidLaunchableAdapterFactory implements IAdapterFactory { /* * Indicates that we are adapting ILaunchable. - * - * (non-Javadoc) - * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList() */ @Override @SuppressWarnings("rawtypes") diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/LaunchMessages.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/LaunchMessages.java index 7e6a20357bb..7bca4892654 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/LaunchMessages.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/LaunchMessages.java @@ -10,21 +10,20 @@ *******************************************************************************/ package org.eclipse.cdt.debug.internal.ui.launch; -import com.ibm.icu.text.MessageFormat; import java.util.MissingResourceException; import java.util.ResourceBundle; +import com.ibm.icu.text.MessageFormat; + public class LaunchMessages { - private static final String BUNDLE_NAME = "org.eclipse.cdt.debug.internal.ui.launch.LaunchMessages";//$NON-NLS-1$ - private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME); private LaunchMessages() { } public static String getFormattedString(String key, String arg) { - return MessageFormat.format(getString(key), new String[]{arg}); + return MessageFormat.format(getString(key), new String[] { arg }); } public static String getFormattedString(String key, String[] args) { diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/LaunchMessages.properties b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/LaunchMessages.properties index d83a53bd822..80283570807 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/LaunchMessages.properties +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/LaunchMessages.properties @@ -12,7 +12,6 @@ # Carlos O'Donnel (CodeSourcery) - Bug 218366 # IBM Corporation ############################################################################### - CApplicationLaunchShortcut.Application_Launcher=Application Launcher CApplicationLaunchShortcut.ChooseConfigToDebug=Choose a debug configuration to debug CApplicationLaunchShortcut.ChooseConfigToRun=Choose a configuration to run diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/PlaceHolderLaunchConfigurationTabGroup.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/PlaceHolderLaunchConfigurationTabGroup.java index ed24c0296bd..e20092557bd 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/PlaceHolderLaunchConfigurationTabGroup.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/PlaceHolderLaunchConfigurationTabGroup.java @@ -23,10 +23,6 @@ import org.eclipse.debug.ui.ILaunchConfigurationTab; * @since 6.0 */ public class PlaceHolderLaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { - - /* (non-Javadoc) - * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#createTabs(org.eclipse.debug.ui.ILaunchConfigurationDialog, java.lang.String) - */ @Override public void createTabs(ILaunchConfigurationDialog dialog, String mode) { setTabs(new ILaunchConfigurationTab[0]);