mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 14:12:10 +02:00
Cosmetics.
This commit is contained in:
parent
f090b8cd41
commit
03669cfebe
6 changed files with 22 additions and 45 deletions
|
@ -7,8 +7,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* QNX Software Systems - Initial API and implementation
|
* QNX Software Systems - Initial API and implementation
|
||||||
* Ken Ryall (Nokia) - bug 178731
|
* Ken Ryall (Nokia) - bugs 178731, 246201
|
||||||
* Ken Ryall (Nokia) - bug 246201
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.debug.internal.ui.launch;
|
package org.eclipse.cdt.debug.internal.ui.launch;
|
||||||
|
|
||||||
|
@ -70,7 +69,6 @@ import org.eclipse.ui.dialogs.ElementListSelectionDialog;
|
||||||
import org.eclipse.ui.dialogs.TwoPaneElementSelector;
|
import org.eclipse.ui.dialogs.TwoPaneElementSelector;
|
||||||
|
|
||||||
public class CApplicationLaunchShortcut implements ILaunchShortcut2 {
|
public class CApplicationLaunchShortcut implements ILaunchShortcut2 {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void launch(IEditorPart editor, String mode) {
|
public void launch(IEditorPart editor, String mode) {
|
||||||
searchAndLaunch(new Object[] { editor.getEditorInput() }, mode);
|
searchAndLaunch(new Object[] { editor.getEditorInput() }, mode);
|
||||||
|
|
|
@ -21,17 +21,15 @@ import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.runtime.IAdaptable;
|
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 {
|
public class CPropertyTester extends PropertyTester {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
|
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
|
||||||
if ("isExecutable".equals(property)) //$NON-NLS-1$
|
if ("isExecutable".equals(property)) //$NON-NLS-1$
|
||||||
return isExecutable(receiver);
|
return isExecutable(receiver);
|
||||||
else if ("isCProject".equals(property)) //$NON-NLS-1$
|
if ("isCProject".equals(property)) //$NON-NLS-1$
|
||||||
return isCProject(receiver);
|
return isCProject(receiver);
|
||||||
else
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,16 +41,14 @@ public class CPropertyTester extends PropertyTester {
|
||||||
celement = CoreModel.getDefault().create(res);
|
celement = CoreModel.getDefault().create(res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (celement != null && celement instanceof IBinary);
|
return celement != null && celement instanceof IBinary;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isCProject(Object receiver) {
|
private boolean isCProject(Object receiver) {
|
||||||
if (receiver instanceof IProject)
|
if (receiver instanceof IProject)
|
||||||
return CoreModel.hasCNature((IProject) receiver);
|
return CoreModel.hasCNature((IProject) receiver);
|
||||||
else if (receiver instanceof ICProject)
|
if (receiver instanceof ICProject)
|
||||||
return true;
|
return true;
|
||||||
else
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,15 +24,9 @@ import org.eclipse.debug.ui.actions.ILaunchable;
|
||||||
* the ILaunchable interface and Bugzilla : 396822.
|
* the ILaunchable interface and Bugzilla : 396822.
|
||||||
*/
|
*/
|
||||||
public class InvalidLaunchableAdapterFactory implements IAdapterFactory {
|
public class InvalidLaunchableAdapterFactory implements IAdapterFactory {
|
||||||
|
|
||||||
private static final Class<?>[] TYPES = { ILaunchable.class };
|
private static final Class<?>[] TYPES = { ILaunchable.class };
|
||||||
|
|
||||||
private static ArrayList<String> currentTraces = new ArrayList<String>();
|
private static ArrayList<String> currentTraces = new ArrayList<String>();
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
public Object getAdapter(Object adaptableObject, Class adapterType) {
|
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$
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,9 +68,6 @@ public class InvalidLaunchableAdapterFactory implements IAdapterFactory {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Indicates that we are adapting ILaunchable.
|
* Indicates that we are adapting ILaunchable.
|
||||||
*
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
|
|
|
@ -10,14 +10,13 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.debug.internal.ui.launch;
|
package org.eclipse.cdt.debug.internal.ui.launch;
|
||||||
|
|
||||||
import com.ibm.icu.text.MessageFormat;
|
|
||||||
import java.util.MissingResourceException;
|
import java.util.MissingResourceException;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
|
import com.ibm.icu.text.MessageFormat;
|
||||||
|
|
||||||
public class LaunchMessages {
|
public class LaunchMessages {
|
||||||
|
|
||||||
private static final String BUNDLE_NAME = "org.eclipse.cdt.debug.internal.ui.launch.LaunchMessages";//$NON-NLS-1$
|
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 static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
|
||||||
|
|
||||||
private LaunchMessages() {
|
private LaunchMessages() {
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
# Carlos O'Donnel (CodeSourcery) - Bug 218366
|
# Carlos O'Donnel (CodeSourcery) - Bug 218366
|
||||||
# IBM Corporation
|
# IBM Corporation
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
CApplicationLaunchShortcut.Application_Launcher=Application Launcher
|
CApplicationLaunchShortcut.Application_Launcher=Application Launcher
|
||||||
CApplicationLaunchShortcut.ChooseConfigToDebug=Choose a debug configuration to debug
|
CApplicationLaunchShortcut.ChooseConfigToDebug=Choose a debug configuration to debug
|
||||||
CApplicationLaunchShortcut.ChooseConfigToRun=Choose a configuration to run
|
CApplicationLaunchShortcut.ChooseConfigToRun=Choose a configuration to run
|
||||||
|
|
|
@ -23,10 +23,6 @@ import org.eclipse.debug.ui.ILaunchConfigurationTab;
|
||||||
* @since 6.0
|
* @since 6.0
|
||||||
*/
|
*/
|
||||||
public class PlaceHolderLaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup {
|
public class PlaceHolderLaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup {
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#createTabs(org.eclipse.debug.ui.ILaunchConfigurationDialog, java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
|
public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
|
||||||
setTabs(new ILaunchConfigurationTab[0]);
|
setTabs(new ILaunchConfigurationTab[0]);
|
||||||
|
|
Loading…
Add table
Reference in a new issue