1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 14:12:10 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2013-08-13 10:07:04 -07:00
parent f090b8cd41
commit 03669cfebe
6 changed files with 22 additions and 45 deletions

View file

@ -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);

View file

@ -21,17 +21,15 @@ 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;
}
@ -43,16 +41,14 @@ public class CPropertyTester extends PropertyTester {
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)
if (receiver instanceof ICProject)
return true;
else
return false;
}
}

View file

@ -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<String> currentTraces = new ArrayList<String>();
/*
* (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) {
@ -56,9 +50,7 @@ public class InvalidLaunchableAdapterFactory implements IAdapterFactory {
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")

View file

@ -10,14 +10,13 @@
*******************************************************************************/
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() {

View file

@ -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

View file

@ -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]);