mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
added missing copyright
This commit is contained in:
parent
6ffa80bd87
commit
e661886b30
20 changed files with 405 additions and 258 deletions
|
@ -1,9 +1,9 @@
|
||||||
######################################################################
|
######################################################################
|
||||||
# Copyright (c) 2002 QNX Software Systems Ltd. and others.
|
# Copyright (c) 2002 - 2004 QNX Software Systems Ltd. and others.
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are made available under the terms of the Common Public License v0.5
|
# are made available under the terms of the Common Public License v1.0
|
||||||
# which accompanies this distribution, and is available at
|
# which accompanies this distribution, and is available at
|
||||||
# http://www.eclipse.org/legal/cpl-v05.html
|
# http://www.eclipse.org/legal/cpl-v10.html
|
||||||
#
|
#
|
||||||
# Contributors:
|
# Contributors:
|
||||||
# QNX Software Systems Ltd. - Initial implementation
|
# QNX Software Systems Ltd. - Initial implementation
|
||||||
|
|
|
@ -1,6 +1,13 @@
|
||||||
/*
|
/**********************************************************************
|
||||||
* (c) Copyright QNX Software System Ltd. 2002. All Rights Reserved.
|
* Copyright (c) 2002 - 2004 QNX Software Systems and others.
|
||||||
*/
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.launch;
|
package org.eclipse.cdt.launch;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -64,8 +71,9 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
||||||
throws CoreException;
|
throws CoreException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the save environment variables in the configuration. The array does not include the default environment of the target.
|
* Return the save environment variables in the configuration. The array
|
||||||
* array[n] : name=value
|
* does not include the default environment of the target. array[n] :
|
||||||
|
* name=value
|
||||||
*/
|
*/
|
||||||
protected String[] getEnvironmentArray(ILaunchConfiguration config) {
|
protected String[] getEnvironmentArray(ILaunchConfiguration config) {
|
||||||
Map env = null;
|
Map env = null;
|
||||||
|
@ -87,8 +95,8 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the save environment variables of this configuration. The array does not include the default environment of the
|
* Return the save environment variables of this configuration. The array
|
||||||
* target.
|
* does not include the default environment of the target.
|
||||||
*/
|
*/
|
||||||
protected Properties getEnvironmentProperty(ILaunchConfiguration config) {
|
protected Properties getEnvironmentProperty(ILaunchConfiguration config) {
|
||||||
Properties prop = new Properties();
|
Properties prop = new Properties();
|
||||||
|
@ -116,16 +124,16 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expand the variable with the format ${key}. example: HOME=/foobar NEWHOME = ${HOME}/project The environement NEWHOME will be
|
* Expand the variable with the format ${key}. example: HOME=/foobar NEWHOME =
|
||||||
* /foobar/project.
|
* ${HOME}/project The environement NEWHOME will be /foobar/project.
|
||||||
*/
|
*/
|
||||||
protected Properties expandEnvironment(ILaunchConfiguration config) {
|
protected Properties expandEnvironment(ILaunchConfiguration config) {
|
||||||
return expandEnvironment(getEnvironmentProperty(config));
|
return expandEnvironment(getEnvironmentProperty(config));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expand the variable with the format ${key}. example: HOME=/foobar NEWHOME = ${HOME}/project The environement NEWHOME will be
|
* Expand the variable with the format ${key}. example: HOME=/foobar NEWHOME =
|
||||||
* /foobar/project.
|
* ${HOME}/project The environement NEWHOME will be /foobar/project.
|
||||||
*/
|
*/
|
||||||
protected Properties expandEnvironment(Properties props) {
|
protected Properties expandEnvironment(Properties props) {
|
||||||
Enumeration names = props.propertyNames();
|
Enumeration names = props.propertyNames();
|
||||||
|
@ -170,7 +178,8 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
||||||
String v = null;
|
String v = null;
|
||||||
String p = param.toString();
|
String p = param.toString();
|
||||||
/*
|
/*
|
||||||
* Search in the current property only if it is not the same name.
|
* Search in the current property only if it
|
||||||
|
* is not the same name.
|
||||||
*/
|
*/
|
||||||
if (!p.equals(key)) {
|
if (!p.equals(key)) {
|
||||||
v = props.getProperty(p);
|
v = props.getProperty(p);
|
||||||
|
@ -211,12 +220,14 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the working directory specified by the given launch configuration, or <code>null</code> if none.
|
* Returns the working directory specified by the given launch
|
||||||
|
* configuration, or <code>null</code> if none.
|
||||||
*
|
*
|
||||||
* @deprecated Should use getWorkingDirectory()
|
* @deprecated Should use getWorkingDirectory()
|
||||||
* @param configuration
|
* @param configuration
|
||||||
* launch configuration
|
* launch configuration
|
||||||
* @return the working directory specified by the given launch configuration, or <code>null</code> if none
|
* @return the working directory specified by the given launch
|
||||||
|
* configuration, or <code>null</code> if none
|
||||||
* @exception CoreException
|
* @exception CoreException
|
||||||
* if unable to retrieve the attribute
|
* if unable to retrieve the attribute
|
||||||
*/
|
*/
|
||||||
|
@ -225,11 +236,13 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the working directory specified by the given launch configuration, or <code>null</code> if none.
|
* Returns the working directory specified by the given launch
|
||||||
|
* configuration, or <code>null</code> if none.
|
||||||
*
|
*
|
||||||
* @param configuration
|
* @param configuration
|
||||||
* launch configuration
|
* launch configuration
|
||||||
* @return the working directory specified by the given launch configuration, or <code>null</code> if none
|
* @return the working directory specified by the given launch
|
||||||
|
* configuration, or <code>null</code> if none
|
||||||
* @exception CoreException
|
* @exception CoreException
|
||||||
* if unable to retrieve the attribute
|
* if unable to retrieve the attribute
|
||||||
*/
|
*/
|
||||||
|
@ -246,12 +259,14 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Throws a core exception with an error status object built from the given message, lower level exception, and error code.
|
* Throws a core exception with an error status object built from the given
|
||||||
|
* message, lower level exception, and error code.
|
||||||
*
|
*
|
||||||
* @param message
|
* @param message
|
||||||
* the status message
|
* the status message
|
||||||
* @param exception
|
* @param exception
|
||||||
* lower level exception associated with the error, or <code>null</code> if none
|
* lower level exception associated with the error, or
|
||||||
|
* <code>null</code> if none
|
||||||
* @param code
|
* @param code
|
||||||
* error code
|
* error code
|
||||||
*/
|
*/
|
||||||
|
@ -292,8 +307,9 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assigns a default source locator to the given launch if a source locator has not yet been assigned to it, and the associated
|
* Assigns a default source locator to the given launch if a source locator
|
||||||
* launch configuration does not specify a source locator.
|
* has not yet been assigned to it, and the associated launch configuration
|
||||||
|
* does not specify a source locator.
|
||||||
*
|
*
|
||||||
* @param launch
|
* @param launch
|
||||||
* launch object
|
* launch object
|
||||||
|
@ -394,7 +410,8 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
||||||
protected String renderDebuggerProcessLabel() {
|
protected String renderDebuggerProcessLabel() {
|
||||||
String format = "{0} ({1})"; //$NON-NLS-1$
|
String format = "{0} ({1})"; //$NON-NLS-1$
|
||||||
String timestamp = DateFormat.getInstance().format(new Date(System.currentTimeMillis()));
|
String timestamp = DateFormat.getInstance().format(new Date(System.currentTimeMillis()));
|
||||||
return MessageFormat.format(format, new String[]{LaunchUIPlugin.getResourceString("AbstractCLaunchDelegate.Debugger_Process"), timestamp}); //$NON-NLS-1$
|
return MessageFormat.format(format, new String[]{
|
||||||
|
LaunchUIPlugin.getResourceString("AbstractCLaunchDelegate.Debugger_Process"), timestamp}); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ICProject verifyCProject(ILaunchConfiguration config) throws CoreException {
|
protected ICProject verifyCProject(ILaunchConfiguration config) throws CoreException {
|
||||||
|
@ -442,12 +459,14 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verifies the working directory specified by the given launch configuration exists, and returns the working directory, or
|
* Verifies the working directory specified by the given launch
|
||||||
|
* configuration exists, and returns the working directory, or
|
||||||
* <code>null</code> if none is specified.
|
* <code>null</code> if none is specified.
|
||||||
*
|
*
|
||||||
* @param configuration
|
* @param configuration
|
||||||
* launch configuration
|
* launch configuration
|
||||||
* @return the working directory specified by the given launch configuration, or <code>null</code> if none
|
* @return the working directory specified by the given launch
|
||||||
|
* configuration, or <code>null</code> if none
|
||||||
* @exception CoreException
|
* @exception CoreException
|
||||||
* if unable to retrieve the attribute
|
* if unable to retrieve the attribute
|
||||||
*/
|
*/
|
||||||
|
@ -575,7 +594,8 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
||||||
* @param referencedProjSet
|
* @param referencedProjSet
|
||||||
* A set of referenced projects
|
* A set of referenced projects
|
||||||
* @throws CoreException
|
* @throws CoreException
|
||||||
* if an error occurs while getting referenced projects from the current project
|
* if an error occurs while getting referenced projects from the
|
||||||
|
* current project
|
||||||
*/
|
*/
|
||||||
private void getReferencedProjectSet(IProject project, HashSet referencedProjSet) throws CoreException {
|
private void getReferencedProjectSet(IProject project, HashSet referencedProjSet) throws CoreException {
|
||||||
IProject[] projects = project.getReferencedProjects();
|
IProject[] projects = project.getReferencedProjects();
|
||||||
|
@ -590,7 +610,8 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* creates a list of project ordered by their build order from an unordered list of projects.
|
* creates a list of project ordered by their build order from an unordered
|
||||||
|
* list of projects.
|
||||||
*
|
*
|
||||||
* @param resourceCollection
|
* @param resourceCollection
|
||||||
* The list of projects to sort.
|
* The list of projects to sort.
|
||||||
|
@ -600,7 +621,8 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
||||||
String[] orderedNames = ResourcesPlugin.getWorkspace().getDescription().getBuildOrder();
|
String[] orderedNames = ResourcesPlugin.getWorkspace().getDescription().getBuildOrder();
|
||||||
if (orderedNames != null) {
|
if (orderedNames != null) {
|
||||||
List orderedProjects = new ArrayList(resourceCollection.size());
|
List orderedProjects = new ArrayList(resourceCollection.size());
|
||||||
//Projects may not be in the build order but should be built if selected
|
//Projects may not be in the build order but should be built if
|
||||||
|
// selected
|
||||||
List unorderedProjects = new ArrayList(resourceCollection.size());
|
List unorderedProjects = new ArrayList(resourceCollection.size());
|
||||||
unorderedProjects.addAll(resourceCollection);
|
unorderedProjects.addAll(resourceCollection);
|
||||||
|
|
||||||
|
@ -630,7 +652,8 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the current project and all of it's prerequisite projects if necessary. Respects specified build order if any exists.
|
* Builds the current project and all of it's prerequisite projects if
|
||||||
|
* necessary. Respects specified build order if any exists.
|
||||||
*
|
*
|
||||||
* @param configuration
|
* @param configuration
|
||||||
* the configuration being launched
|
* the configuration being launched
|
||||||
|
@ -638,7 +661,8 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
||||||
* the mode the configuration is being launched in
|
* the mode the configuration is being launched in
|
||||||
* @param monitor
|
* @param monitor
|
||||||
* progress monitor
|
* progress monitor
|
||||||
* @return whether the debug platform should perform an incremental workspace build before the launch
|
* @return whether the debug platform should perform an incremental
|
||||||
|
* workspace build before the launch
|
||||||
* @throws CoreException
|
* @throws CoreException
|
||||||
* if an exception occurrs while building
|
* if an exception occurrs while building
|
||||||
*/
|
*/
|
||||||
|
@ -662,8 +686,9 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Searches for compile errors in the current project and any of its prerequisite projects. If any compile errors, give the user
|
* Searches for compile errors in the current project and any of its
|
||||||
* a chance to abort the launch and correct the errors.
|
* prerequisite projects. If any compile errors, give the user a chance to
|
||||||
|
* abort the launch and correct the errors.
|
||||||
*
|
*
|
||||||
* @param configuration
|
* @param configuration
|
||||||
* @param mode
|
* @param mode
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* Copyright (c) 2002 - 2004 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.launch.internal;
|
package org.eclipse.cdt.launch.internal;
|
||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
@ -43,20 +53,12 @@ import org.eclipse.ui.IEditorPart;
|
||||||
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
|
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
|
||||||
import org.eclipse.ui.dialogs.TwoPaneElementSelector;
|
import org.eclipse.ui.dialogs.TwoPaneElementSelector;
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public class CApplicationLaunchShortcut implements ILaunchShortcut {
|
public class CApplicationLaunchShortcut implements ILaunchShortcut {
|
||||||
|
|
||||||
/**
|
|
||||||
* @see org.eclipse.debug.ui.ILaunchShortcut#launch(IEditorPart, String)
|
|
||||||
*/
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see org.eclipse.debug.ui.ILaunchShortcut#launch(ISelection, String)
|
|
||||||
*/
|
|
||||||
public void launch(ISelection selection, String mode) {
|
public void launch(ISelection selection, String mode) {
|
||||||
if (selection instanceof IStructuredSelection) {
|
if (selection instanceof IStructuredSelection) {
|
||||||
searchAndLaunch(((IStructuredSelection) selection).toArray(), mode);
|
searchAndLaunch(((IStructuredSelection) selection).toArray(), mode);
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* Copyright (c) 2002 - 2004 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.launch.internal;
|
package org.eclipse.cdt.launch.internal;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.ICProject;
|
import org.eclipse.cdt.core.model.ICProject;
|
||||||
|
@ -24,10 +34,6 @@ import org.eclipse.swt.widgets.Display;
|
||||||
import org.eclipse.swt.widgets.FileDialog;
|
import org.eclipse.swt.widgets.FileDialog;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
|
|
||||||
/**
|
|
||||||
* Insert the type's description here.
|
|
||||||
* @see ILaunchConfigurationDelegate
|
|
||||||
*/
|
|
||||||
public class CoreFileLaunchDelegate extends AbstractCLaunchDelegate {
|
public class CoreFileLaunchDelegate extends AbstractCLaunchDelegate {
|
||||||
|
|
||||||
public void launch(ILaunchConfiguration config, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
|
public void launch(ILaunchConfiguration config, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
|
||||||
|
|
|
@ -1,16 +1,22 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* Copyright (c) 2002 - 2004 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.launch.internal;
|
package org.eclipse.cdt.launch.internal;
|
||||||
|
|
||||||
/*
|
|
||||||
* (c) Copyright QNX Software System 2002.
|
|
||||||
* All Rights Reserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.IProcessInfo;
|
import org.eclipse.cdt.core.IProcessInfo;
|
||||||
import org.eclipse.cdt.core.IProcessList;
|
import org.eclipse.cdt.core.IProcessList;
|
||||||
|
@ -38,7 +44,6 @@ import org.eclipse.debug.core.ILaunch;
|
||||||
import org.eclipse.debug.core.ILaunchConfiguration;
|
import org.eclipse.debug.core.ILaunchConfiguration;
|
||||||
import org.eclipse.debug.core.ILaunchManager;
|
import org.eclipse.debug.core.ILaunchManager;
|
||||||
import org.eclipse.debug.core.IStatusHandler;
|
import org.eclipse.debug.core.IStatusHandler;
|
||||||
import org.eclipse.debug.core.model.ILaunchConfigurationDelegate;
|
|
||||||
import org.eclipse.debug.core.model.IProcess;
|
import org.eclipse.debug.core.model.IProcess;
|
||||||
import org.eclipse.jface.dialogs.MessageDialog;
|
import org.eclipse.jface.dialogs.MessageDialog;
|
||||||
import org.eclipse.jface.viewers.ILabelProvider;
|
import org.eclipse.jface.viewers.ILabelProvider;
|
||||||
|
@ -49,10 +54,6 @@ import org.eclipse.swt.widgets.Display;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.dialogs.TwoPaneElementSelector;
|
import org.eclipse.ui.dialogs.TwoPaneElementSelector;
|
||||||
|
|
||||||
/**
|
|
||||||
* Insert the type's description here.
|
|
||||||
* @see ILaunchConfigurationDelegate
|
|
||||||
*/
|
|
||||||
public class LocalCLaunchConfigurationDelegate extends AbstractCLaunchDelegate {
|
public class LocalCLaunchConfigurationDelegate extends AbstractCLaunchDelegate {
|
||||||
|
|
||||||
public void launch(ILaunchConfiguration config, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
|
public void launch(ILaunchConfiguration config, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
|
||||||
|
|
|
@ -1,7 +1,13 @@
|
||||||
/*
|
/**********************************************************************
|
||||||
* (c) Copyright QNX Software System Ltd. 2002.
|
* Copyright (c) 2002 - 2004 QNX Software Systems and others.
|
||||||
* All Rights Reserved.
|
* All rights reserved. This program and the accompanying materials
|
||||||
*/
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.launch.internal.ui;
|
package org.eclipse.cdt.launch.internal.ui;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* Copyright (c) 2002 - 2004 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.launch.internal.ui;
|
package org.eclipse.cdt.launch.internal.ui;
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
||||||
|
@ -10,15 +20,10 @@ import org.eclipse.debug.ui.CommonTab;
|
||||||
import org.eclipse.debug.ui.ILaunchConfigurationDialog;
|
import org.eclipse.debug.ui.ILaunchConfigurationDialog;
|
||||||
import org.eclipse.debug.ui.ILaunchConfigurationTab;
|
import org.eclipse.debug.ui.ILaunchConfigurationTab;
|
||||||
|
|
||||||
/**
|
|
||||||
* Insert the type's description here.
|
|
||||||
* @see AbstractLaunchConfigurationTabGroup
|
|
||||||
*/
|
|
||||||
public class CoreFileCLaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup {
|
public class CoreFileCLaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup {
|
||||||
|
|
||||||
/**
|
/* (non-Javadoc)
|
||||||
* Insert the method's description here.
|
* @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#createTabs(org.eclipse.debug.ui.ILaunchConfigurationDialog, java.lang.String)
|
||||||
* @see AbstractLaunchConfigurationTabGroup#createTabs
|
|
||||||
*/
|
*/
|
||||||
public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
|
public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
|
||||||
ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
|
ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
|
||||||
|
@ -30,6 +35,9 @@ public class CoreFileCLaunchConfigurationTabGroup extends AbstractLaunchConfigur
|
||||||
setTabs(tabs);
|
setTabs(tabs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
|
||||||
|
*/
|
||||||
public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
|
public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
|
||||||
// This configuration should work for all platforms
|
// This configuration should work for all platforms
|
||||||
configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PLATFORM, "*"); //$NON-NLS-1$
|
configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PLATFORM, "*"); //$NON-NLS-1$
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* Copyright (c) 2002 - 2004 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.launch.internal.ui;
|
package org.eclipse.cdt.launch.internal.ui;
|
||||||
|
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
|
@ -9,10 +19,6 @@ import org.eclipse.jface.resource.ImageDescriptor;
|
||||||
import org.eclipse.jface.resource.ImageRegistry;
|
import org.eclipse.jface.resource.ImageRegistry;
|
||||||
import org.eclipse.swt.graphics.Image;
|
import org.eclipse.swt.graphics.Image;
|
||||||
|
|
||||||
/*
|
|
||||||
* (c) Copyright QN Software Systems Ltd. 2002.
|
|
||||||
* All Rights Reserved.
|
|
||||||
*/
|
|
||||||
public class LaunchImages {
|
public class LaunchImages {
|
||||||
private static final String NAME_PREFIX= LaunchUIPlugin.PLUGIN_ID + '.';
|
private static final String NAME_PREFIX= LaunchUIPlugin.PLUGIN_ID + '.';
|
||||||
private static final int NAME_PREFIX_LENGTH= NAME_PREFIX.length();
|
private static final int NAME_PREFIX_LENGTH= NAME_PREFIX.length();
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* Copyright (c) 2002 - 2004 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.launch.internal.ui;
|
package org.eclipse.cdt.launch.internal.ui;
|
||||||
|
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
|
@ -21,9 +31,6 @@ import org.eclipse.ui.IWorkbenchWindow;
|
||||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||||
import org.osgi.framework.BundleContext;
|
import org.osgi.framework.BundleContext;
|
||||||
|
|
||||||
/*
|
|
||||||
* (c) Copyright QNX Software Systems Ltd. 2002. All Rights Reserved.
|
|
||||||
*/
|
|
||||||
public class LaunchUIPlugin extends AbstractUIPlugin
|
public class LaunchUIPlugin extends AbstractUIPlugin
|
||||||
implements
|
implements
|
||||||
IDebugEventSetListener {
|
IDebugEventSetListener {
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
#####################################################################
|
||||||
|
# Copyright (c) 2002 - 2004 QNX Software Systems and others.
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are made available under the terms of the Common Public License v1.0
|
||||||
|
# which accompanies this distribution, and is available at
|
||||||
|
# http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
#
|
||||||
|
# Contributors:
|
||||||
|
# QNX Software Systems - Initial API and implementation
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
AbstractCLaunchDelegate.Debugger_not_installed=CDT Debugger not installed
|
AbstractCLaunchDelegate.Debugger_not_installed=CDT Debugger not installed
|
||||||
AbstractCLaunchDelegate.C_Project_not_specified=C Project not specified
|
AbstractCLaunchDelegate.C_Project_not_specified=C Project not specified
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* Copyright (c) 2002 - 2004 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.launch.internal.ui;
|
package org.eclipse.cdt.launch.internal.ui;
|
||||||
|
|
||||||
import org.eclipse.cdt.launch.ui.CArgumentsTab;
|
import org.eclipse.cdt.launch.ui.CArgumentsTab;
|
||||||
|
@ -10,15 +20,10 @@ import org.eclipse.debug.ui.CommonTab;
|
||||||
import org.eclipse.debug.ui.ILaunchConfigurationDialog;
|
import org.eclipse.debug.ui.ILaunchConfigurationDialog;
|
||||||
import org.eclipse.debug.ui.ILaunchConfigurationTab;
|
import org.eclipse.debug.ui.ILaunchConfigurationTab;
|
||||||
|
|
||||||
/**
|
|
||||||
* Insert the type's description here.
|
|
||||||
* @see AbstractLaunchConfigurationTabGroup
|
|
||||||
*/
|
|
||||||
public class LocalCLaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup {
|
public class LocalCLaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup {
|
||||||
|
|
||||||
/**
|
/* (non-Javadoc)
|
||||||
* Insert the method's description here.
|
* @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#createTabs(org.eclipse.debug.ui.ILaunchConfigurationDialog, java.lang.String)
|
||||||
* @see AbstractLaunchConfigurationTabGroup#createTabs
|
|
||||||
*/
|
*/
|
||||||
public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
|
public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
|
||||||
ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
|
ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* Copyright (c) 2002 - 2004 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.launch.internal.ui;
|
package org.eclipse.cdt.launch.internal.ui;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* Copyright (c) 2002 - 2004 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.launch.ui;
|
package org.eclipse.cdt.launch.ui;
|
||||||
|
|
||||||
/*
|
|
||||||
* (c) Copyright QNX Software System 2002.
|
|
||||||
* All Rights Reserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
||||||
import org.eclipse.cdt.launch.internal.ui.LaunchImages;
|
import org.eclipse.cdt.launch.internal.ui.LaunchImages;
|
||||||
import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin;
|
import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin;
|
||||||
|
|
|
@ -1,6 +1,13 @@
|
||||||
/*
|
/**********************************************************************
|
||||||
* (c) Copyright QNX Software System Ltd. 2002. All Rights Reserved.
|
* Copyright (c) 2002 - 2004 QNX Software Systems and others.
|
||||||
*/
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.launch.ui;
|
package org.eclipse.cdt.launch.ui;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* Copyright (c) 2002 - 2004 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.launch.ui;
|
package org.eclipse.cdt.launch.ui;
|
||||||
|
|
||||||
/*
|
|
||||||
* (c) Copyright QNX Software System 2002.
|
|
||||||
* All Rights Reserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* Copyright (c) 2002 - 2004 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.launch.ui;
|
package org.eclipse.cdt.launch.ui;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
|
@ -22,17 +32,14 @@ import org.eclipse.ui.IEditorInput;
|
||||||
import org.eclipse.ui.IEditorPart;
|
import org.eclipse.ui.IEditorPart;
|
||||||
import org.eclipse.ui.IWorkbenchPage;
|
import org.eclipse.ui.IWorkbenchPage;
|
||||||
|
|
||||||
/*
|
|
||||||
* (c) Copyright QNX Software Systems Ltd. 2002.
|
|
||||||
* All Rights Reserved.
|
|
||||||
*/
|
|
||||||
public abstract class CLaunchConfigurationTab extends AbstractLaunchConfigurationTab {
|
public abstract class CLaunchConfigurationTab extends AbstractLaunchConfigurationTab {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the current C element context from which to initialize
|
* Returns the current C element context from which to initialize default
|
||||||
* default settings, or <code>null</code> if none.
|
* settings, or <code>null</code> if none. Note, if possible we will
|
||||||
* Note, if possible we will return the IBinary based on config entry
|
* return the IBinary based on config entry as this may be more usefull then
|
||||||
* as this may be more usefull then just the project.
|
* just the project.
|
||||||
|
*
|
||||||
* @return C element context.
|
* @return C element context.
|
||||||
*/
|
*/
|
||||||
protected ICElement getContext(ILaunchConfiguration config, String platform) {
|
protected ICElement getContext(ILaunchConfiguration config, String platform) {
|
||||||
|
@ -43,8 +50,7 @@ public abstract class CLaunchConfigurationTab extends AbstractLaunchConfiguratio
|
||||||
try {
|
try {
|
||||||
projectName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String)null);
|
projectName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String)null);
|
||||||
programName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, (String)null);
|
programName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, (String)null);
|
||||||
}
|
} catch (CoreException e) {
|
||||||
catch (CoreException e) {
|
|
||||||
}
|
}
|
||||||
if (projectName != null && !projectName.equals("")) { //$NON-NLS-1$
|
if (projectName != null && !projectName.equals("")) { //$NON-NLS-1$
|
||||||
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
|
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
|
||||||
|
@ -52,8 +58,7 @@ public abstract class CLaunchConfigurationTab extends AbstractLaunchConfiguratio
|
||||||
if (cProject != null && cProject.exists()) {
|
if (cProject != null && cProject.exists()) {
|
||||||
obj = cProject;
|
obj = cProject;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if (page != null) {
|
if (page != null) {
|
||||||
ISelection selection = page.getSelection();
|
ISelection selection = page.getSelection();
|
||||||
if (selection instanceof IStructuredSelection) {
|
if (selection instanceof IStructuredSelection) {
|
||||||
|
@ -76,13 +81,15 @@ public abstract class CLaunchConfigurationTab extends AbstractLaunchConfiguratio
|
||||||
if (platform != null && !platform.equals("*")) { //$NON-NLS-1$
|
if (platform != null && !platform.equals("*")) { //$NON-NLS-1$
|
||||||
ICDescriptor descriptor;
|
ICDescriptor descriptor;
|
||||||
try {
|
try {
|
||||||
descriptor = CCorePlugin.getDefault().getCProjectDescription(((ICElement) obj).getCProject().getProject());
|
descriptor = CCorePlugin.getDefault().getCProjectDescription( ((ICElement)obj).getCProject().getProject(),
|
||||||
|
false);
|
||||||
|
if (descriptor != null) {
|
||||||
String projectPlatform = descriptor.getPlatform();
|
String projectPlatform = descriptor.getPlatform();
|
||||||
if (!projectPlatform.equals(platform) && !projectPlatform.equals("*")) { //$NON-NLS-1$
|
if (!projectPlatform.equals(platform) && !projectPlatform.equals("*")) { //$NON-NLS-1$
|
||||||
obj = null;
|
obj = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (obj != null) {
|
if (obj != null) {
|
||||||
|
@ -125,8 +132,7 @@ public abstract class CLaunchConfigurationTab extends AbstractLaunchConfiguratio
|
||||||
String platform = Platform.getOS();
|
String platform = Platform.getOS();
|
||||||
try {
|
try {
|
||||||
return config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PLATFORM, platform);
|
return config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PLATFORM, platform);
|
||||||
}
|
} catch (CoreException e) {
|
||||||
catch (CoreException e) {
|
|
||||||
return platform;
|
return platform;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* Copyright (c) 2002 - 2004 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.launch.ui;
|
package org.eclipse.cdt.launch.ui;
|
||||||
|
|
||||||
/*
|
|
||||||
* (c) Copyright IBM Corp. 2000, 2001.
|
|
||||||
* All Rights Reserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
|
@ -31,7 +36,6 @@ import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.debug.core.ILaunchConfiguration;
|
import org.eclipse.debug.core.ILaunchConfiguration;
|
||||||
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
|
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
|
||||||
import org.eclipse.debug.ui.ILaunchConfigurationTab;
|
|
||||||
import org.eclipse.jface.dialogs.MessageDialog;
|
import org.eclipse.jface.dialogs.MessageDialog;
|
||||||
import org.eclipse.jface.viewers.ILabelProvider;
|
import org.eclipse.jface.viewers.ILabelProvider;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
|
@ -58,11 +62,12 @@ import org.eclipse.ui.model.WorkbenchContentProvider;
|
||||||
import org.eclipse.ui.model.WorkbenchLabelProvider;
|
import org.eclipse.ui.model.WorkbenchLabelProvider;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A launch configuration tab that displays and edits project and
|
* A launch configuration tab that displays and edits project and main type name
|
||||||
* main type name launch configuration attributes.
|
* launch configuration attributes.
|
||||||
* <p>
|
* <p>
|
||||||
* This class may be instantiated. This class is not intended to be subclassed.
|
* This class may be instantiated. This class is not intended to be subclassed.
|
||||||
* </p>
|
* </p>
|
||||||
|
*
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -82,8 +87,8 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
|
|
||||||
private String filterPlatform = EMPTY_STRING;
|
private String filterPlatform = EMPTY_STRING;
|
||||||
|
|
||||||
/**
|
/* (non-Javadoc)
|
||||||
* @see ILaunchConfigurationTab#createControl(Composite)
|
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
|
||||||
*/
|
*/
|
||||||
public void createControl(Composite parent) {
|
public void createControl(Composite parent) {
|
||||||
|
|
||||||
|
@ -95,7 +100,6 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
GridLayout topLayout = new GridLayout();
|
GridLayout topLayout = new GridLayout();
|
||||||
comp.setLayout(topLayout);
|
comp.setLayout(topLayout);
|
||||||
|
|
||||||
|
|
||||||
createVerticalSpacer(comp, 1);
|
createVerticalSpacer(comp, 1);
|
||||||
|
|
||||||
Composite projComp = new Composite(comp, SWT.NONE);
|
Composite projComp = new Composite(comp, SWT.NONE);
|
||||||
|
@ -117,6 +121,7 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
gd = new GridData(GridData.FILL_HORIZONTAL);
|
gd = new GridData(GridData.FILL_HORIZONTAL);
|
||||||
fProjText.setLayoutData(gd);
|
fProjText.setLayoutData(gd);
|
||||||
fProjText.addModifyListener(new ModifyListener() {
|
fProjText.addModifyListener(new ModifyListener() {
|
||||||
|
|
||||||
public void modifyText(ModifyEvent evt) {
|
public void modifyText(ModifyEvent evt) {
|
||||||
updateLaunchConfigurationDialog();
|
updateLaunchConfigurationDialog();
|
||||||
}
|
}
|
||||||
|
@ -124,6 +129,7 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
|
|
||||||
fProjButton = createPushButton(projComp, LaunchUIPlugin.getResourceString("Launch.common.B&rowse..."), null); //$NON-NLS-1$
|
fProjButton = createPushButton(projComp, LaunchUIPlugin.getResourceString("Launch.common.B&rowse..."), null); //$NON-NLS-1$
|
||||||
fProjButton.addSelectionListener(new SelectionAdapter() {
|
fProjButton.addSelectionListener(new SelectionAdapter() {
|
||||||
|
|
||||||
public void widgetSelected(SelectionEvent evt) {
|
public void widgetSelected(SelectionEvent evt) {
|
||||||
handleProjectButtonSelected();
|
handleProjectButtonSelected();
|
||||||
updateLaunchConfigurationDialog();
|
updateLaunchConfigurationDialog();
|
||||||
|
@ -149,6 +155,7 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
gd = new GridData(GridData.FILL_HORIZONTAL);
|
gd = new GridData(GridData.FILL_HORIZONTAL);
|
||||||
fProgText.setLayoutData(gd);
|
fProgText.setLayoutData(gd);
|
||||||
fProgText.addModifyListener(new ModifyListener() {
|
fProgText.addModifyListener(new ModifyListener() {
|
||||||
|
|
||||||
public void modifyText(ModifyEvent evt) {
|
public void modifyText(ModifyEvent evt) {
|
||||||
updateLaunchConfigurationDialog();
|
updateLaunchConfigurationDialog();
|
||||||
}
|
}
|
||||||
|
@ -156,6 +163,7 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
|
|
||||||
fSearchButton = createPushButton(mainComp, LaunchUIPlugin.getResourceString("CMainTab.Search..."), null); //$NON-NLS-1$
|
fSearchButton = createPushButton(mainComp, LaunchUIPlugin.getResourceString("CMainTab.Search..."), null); //$NON-NLS-1$
|
||||||
fSearchButton.addSelectionListener(new SelectionAdapter() {
|
fSearchButton.addSelectionListener(new SelectionAdapter() {
|
||||||
|
|
||||||
public void widgetSelected(SelectionEvent evt) {
|
public void widgetSelected(SelectionEvent evt) {
|
||||||
handleSearchButtonSelected();
|
handleSearchButtonSelected();
|
||||||
updateLaunchConfigurationDialog();
|
updateLaunchConfigurationDialog();
|
||||||
|
@ -165,6 +173,7 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
Button fBrowseForBinaryButton;
|
Button fBrowseForBinaryButton;
|
||||||
fBrowseForBinaryButton = createPushButton(mainComp, LaunchUIPlugin.getResourceString("Launch.common.B&rowse..."), null); //$NON-NLS-1$
|
fBrowseForBinaryButton = createPushButton(mainComp, LaunchUIPlugin.getResourceString("Launch.common.B&rowse..."), null); //$NON-NLS-1$
|
||||||
fBrowseForBinaryButton.addSelectionListener(new SelectionAdapter() {
|
fBrowseForBinaryButton.addSelectionListener(new SelectionAdapter() {
|
||||||
|
|
||||||
public void widgetSelected(SelectionEvent evt) {
|
public void widgetSelected(SelectionEvent evt) {
|
||||||
handleBinaryBrowseButtonSelected();
|
handleBinaryBrowseButtonSelected();
|
||||||
updateLaunchConfigurationDialog();
|
updateLaunchConfigurationDialog();
|
||||||
|
@ -174,8 +183,8 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
LaunchUIPlugin.setDialogShell(parent.getShell());
|
LaunchUIPlugin.setDialogShell(parent.getShell());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/* (non-Javadoc)
|
||||||
* @see ILaunchConfigurationTab#initializeFrom(ILaunchConfiguration)
|
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
|
||||||
*/
|
*/
|
||||||
public void initializeFrom(ILaunchConfiguration config) {
|
public void initializeFrom(ILaunchConfiguration config) {
|
||||||
filterPlatform = getPlatform(config);
|
filterPlatform = getPlatform(config);
|
||||||
|
@ -204,8 +213,8 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
fProgText.setText(programName);
|
fProgText.setText(programName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/* (non-Javadoc)
|
||||||
* @see ILaunchConfigurationTab#performApply(ILaunchConfigurationWorkingCopy)
|
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
|
||||||
*/
|
*/
|
||||||
public void performApply(ILaunchConfigurationWorkingCopy config) {
|
public void performApply(ILaunchConfigurationWorkingCopy config) {
|
||||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, fProjText.getText());
|
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, fProjText.getText());
|
||||||
|
@ -218,14 +227,13 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
protected void handleSearchButtonSelected() {
|
protected void handleSearchButtonSelected() {
|
||||||
|
|
||||||
if (getCProject() == null) {
|
if (getCProject() == null) {
|
||||||
MessageDialog.openInformation(
|
MessageDialog.openInformation(getShell(), LaunchUIPlugin.getResourceString("CMainTab.Project_required"), //$NON-NLS-1$
|
||||||
getShell(),
|
|
||||||
LaunchUIPlugin.getResourceString("CMainTab.Project_required"), //$NON-NLS-1$
|
|
||||||
LaunchUIPlugin.getResourceString("CMainTab.Enter_project_before_searching_for_program")); //$NON-NLS-1$
|
LaunchUIPlugin.getResourceString("CMainTab.Enter_project_before_searching_for_program")); //$NON-NLS-1$
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ILabelProvider programLabelProvider = new CElementLabelProvider() {
|
ILabelProvider programLabelProvider = new CElementLabelProvider() {
|
||||||
|
|
||||||
CElementImageProvider imageProvider = new CElementImageProvider();
|
CElementImageProvider imageProvider = new CElementImageProvider();
|
||||||
|
|
||||||
public String getText(Object element) {
|
public String getText(Object element) {
|
||||||
|
@ -249,7 +257,8 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
if (belement.isExecutable()) {
|
if (belement.isExecutable()) {
|
||||||
Image image = super.getImage(element);
|
Image image = super.getImage(element);
|
||||||
Point size = new Point(image.getBounds().width, image.getBounds().height);
|
Point size = new Point(image.getBounds().width, image.getBounds().height);
|
||||||
return CUIPlugin.getImageDescriptorRegistry().get(new CElementImageDescriptor(CPluginImages.DESC_OBJS_CEXEC, 0, size));
|
return CUIPlugin.getImageDescriptorRegistry().get(
|
||||||
|
new CElementImageDescriptor(CPluginImages.DESC_OBJS_CEXEC, 0, size));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -258,6 +267,7 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
};
|
};
|
||||||
|
|
||||||
ILabelProvider qualifierLabelProvider = new CElementLabelProvider() {
|
ILabelProvider qualifierLabelProvider = new CElementLabelProvider() {
|
||||||
|
|
||||||
public String getText(Object element) {
|
public String getText(Object element) {
|
||||||
if (element instanceof IBinary) {
|
if (element instanceof IBinary) {
|
||||||
IBinary bin = (IBinary)element;
|
IBinary bin = (IBinary)element;
|
||||||
|
@ -284,7 +294,6 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
fProgText.setText(binary.getResource().getProjectRelativePath().toString());
|
fProgText.setText(binary.getResource().getProjectRelativePath().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -295,9 +304,7 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
protected void handleBinaryBrowseButtonSelected() {
|
protected void handleBinaryBrowseButtonSelected() {
|
||||||
final ICProject cproject = getCProject();
|
final ICProject cproject = getCProject();
|
||||||
if (cproject == null) {
|
if (cproject == null) {
|
||||||
MessageDialog.openInformation(
|
MessageDialog.openInformation(getShell(), LaunchUIPlugin.getResourceString("CMainTab.Project_required"), //$NON-NLS-1$
|
||||||
getShell(),
|
|
||||||
LaunchUIPlugin.getResourceString("CMainTab.Project_required"), //$NON-NLS-1$
|
|
||||||
LaunchUIPlugin.getResourceString("CMainTab.Enter_project_before_browsing_for_program")); //$NON-NLS-1$
|
LaunchUIPlugin.getResourceString("CMainTab.Enter_project_before_browsing_for_program")); //$NON-NLS-1$
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -307,25 +314,31 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
WorkbenchContentProvider contentProvider = new WorkbenchContentProvider();
|
WorkbenchContentProvider contentProvider = new WorkbenchContentProvider();
|
||||||
dialog = new ElementTreeSelectionDialog(getShell(), labelProvider, contentProvider);
|
dialog = new ElementTreeSelectionDialog(getShell(), labelProvider, contentProvider);
|
||||||
dialog.setTitle(LaunchUIPlugin.getResourceString("CMainTab.Program_selection")); //$NON-NLS-1$
|
dialog.setTitle(LaunchUIPlugin.getResourceString("CMainTab.Program_selection")); //$NON-NLS-1$
|
||||||
dialog.setMessage(LaunchUIPlugin.getFormattedResourceString("CMainTab.Choose_program_to_run_from_NAME", cproject.getResource().getName())); //$NON-NLS-1$
|
dialog.setMessage(LaunchUIPlugin.getFormattedResourceString(
|
||||||
|
"CMainTab.Choose_program_to_run_from_NAME", cproject.getResource().getName())); //$NON-NLS-1$
|
||||||
dialog.setBlockOnOpen(true);
|
dialog.setBlockOnOpen(true);
|
||||||
dialog.setAllowMultiple(false);
|
dialog.setAllowMultiple(false);
|
||||||
dialog.setInput(cproject.getResource());
|
dialog.setInput(cproject.getResource());
|
||||||
dialog.setValidator(new ISelectionStatusValidator() {
|
dialog.setValidator(new ISelectionStatusValidator() {
|
||||||
|
|
||||||
public IStatus validate(Object[] selection) {
|
public IStatus validate(Object[] selection) {
|
||||||
if (selection.length == 0 || ! (selection[0] instanceof IFile)) {
|
if (selection.length == 0 || ! (selection[0] instanceof IFile)) {
|
||||||
return new Status(IStatus.ERROR, LaunchUIPlugin.getUniqueIdentifier(), 1, LaunchUIPlugin.getResourceString("CMainTab.Selection_must_be_file"), null); //$NON-NLS-1$
|
return new Status(IStatus.ERROR, LaunchUIPlugin.getUniqueIdentifier(), 1,
|
||||||
|
LaunchUIPlugin.getResourceString("CMainTab.Selection_must_be_file"), null); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
ICElement celement = cproject.findElement( ((IFile)selection[0]).getProjectRelativePath());
|
ICElement celement = cproject.findElement( ((IFile)selection[0]).getProjectRelativePath());
|
||||||
if(celement == null ||
|
if (celement == null
|
||||||
(celement.getElementType() != ICElement.C_BINARY && celement.getElementType() != ICElement.C_ARCHIVE)) {
|
|| (celement.getElementType() != ICElement.C_BINARY && celement.getElementType() != ICElement.C_ARCHIVE)) {
|
||||||
return new Status(IStatus.ERROR, LaunchUIPlugin.getUniqueIdentifier(), 1, LaunchUIPlugin.getResourceString("CMainTab.Selection_must_be_binary_file"), null); //$NON-NLS-1$
|
return new Status(IStatus.ERROR, LaunchUIPlugin.getUniqueIdentifier(), 1,
|
||||||
|
LaunchUIPlugin.getResourceString("CMainTab.Selection_must_be_binary_file"), null); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Status(IStatus.OK, LaunchUIPlugin.getUniqueIdentifier(), IStatus.OK, celement.getResource().getName(), null);
|
return new Status(IStatus.OK, LaunchUIPlugin.getUniqueIdentifier(), IStatus.OK,
|
||||||
|
celement.getResource().getName(), null);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
return new Status(IStatus.ERROR, LaunchUIPlugin.PLUGIN_ID, 1, LaunchUIPlugin.getResourceString("CMainTab.Selection_must_be_binary_file"), null); //$NON-NLS-1$
|
return new Status(IStatus.ERROR, LaunchUIPlugin.PLUGIN_ID, 1,
|
||||||
|
LaunchUIPlugin.getResourceString("CMainTab.Selection_must_be_binary_file"), null); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -344,10 +357,8 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Iterate through and suck up all of the executable files that
|
* Iterate through and suck up all of the executable files that we can find.
|
||||||
* we can find.
|
|
||||||
*/
|
*/
|
||||||
protected IBinary[] getBinaryFiles(final ICProject cproject) {
|
protected IBinary[] getBinaryFiles(final ICProject cproject) {
|
||||||
final Display display;
|
final Display display;
|
||||||
|
@ -358,6 +369,7 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
}
|
}
|
||||||
final Object[] ret = new Object[1];
|
final Object[] ret = new Object[1];
|
||||||
BusyIndicator.showWhile(display, new Runnable() {
|
BusyIndicator.showWhile(display, new Runnable() {
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
ret[0] = cproject.getBinaryContainer().getBinaries();
|
ret[0] = cproject.getBinaryContainer().getBinaries();
|
||||||
|
@ -386,8 +398,8 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Realize a C Project selection dialog and return the first selected project,
|
* Realize a C Project selection dialog and return the first selected
|
||||||
* or null if there was none.
|
* project, or null if there was none.
|
||||||
*/
|
*/
|
||||||
protected ICProject chooseCProject() {
|
protected ICProject chooseCProject() {
|
||||||
try {
|
try {
|
||||||
|
@ -414,7 +426,7 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return an array a ICProject whose platform match that of the runtime env.
|
* Return an array a ICProject whose platform match that of the runtime env.
|
||||||
**/
|
*/
|
||||||
|
|
||||||
protected ICProject[] getCProjects() throws CModelException {
|
protected ICProject[] getCProjects() throws CModelException {
|
||||||
ICProject cproject[] = CoreModel.getDefault().getCModel().getCProjects();
|
ICProject cproject[] = CoreModel.getDefault().getCModel().getCProjects();
|
||||||
|
@ -423,13 +435,17 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
for (int i = 0; i < cproject.length; i++) {
|
for (int i = 0; i < cproject.length; i++) {
|
||||||
ICDescriptor cdesciptor = null;
|
ICDescriptor cdesciptor = null;
|
||||||
try {
|
try {
|
||||||
cdesciptor = CCorePlugin.getDefault().getCProjectDescription((IProject) cproject[i].getResource());
|
cdesciptor = CCorePlugin.getDefault().getCProjectDescription((IProject)cproject[i].getResource(), false);
|
||||||
|
if (cdesciptor != null) {
|
||||||
String projectPlatform = cdesciptor.getPlatform();
|
String projectPlatform = cdesciptor.getPlatform();
|
||||||
if (filterPlatform.equals("*") //$NON-NLS-1$
|
if (filterPlatform.equals("*") //$NON-NLS-1$
|
||||||
|| projectPlatform.equals("*") //$NON-NLS-1$
|
|| projectPlatform.equals("*") //$NON-NLS-1$
|
||||||
|| filterPlatform.equalsIgnoreCase(projectPlatform) == true) {
|
|| filterPlatform.equalsIgnoreCase(projectPlatform) == true) {
|
||||||
list.add(cproject[i]);
|
list.add(cproject[i]);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
list.add(cproject[i]);
|
||||||
|
}
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
list.add(cproject[i]);
|
list.add(cproject[i]);
|
||||||
}
|
}
|
||||||
|
@ -437,8 +453,8 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
return (ICProject[])list.toArray(new ICProject[list.size()]);
|
return (ICProject[])list.toArray(new ICProject[list.size()]);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Return the ICProject corresponding to the project name in the project name
|
* Return the ICProject corresponding to the project name in the project
|
||||||
* text field, or null if the text does not match a project name.
|
* name text field, or null if the text does not match a project name.
|
||||||
*/
|
*/
|
||||||
protected ICProject getCProject() {
|
protected ICProject getCProject() {
|
||||||
String projectName = fProjText.getText().trim();
|
String projectName = fProjText.getText().trim();
|
||||||
|
@ -448,8 +464,8 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
return CoreModel.getDefault().getCModel().getCProject(projectName);
|
return CoreModel.getDefault().getCModel().getCProject(projectName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/* (non-Javadoc)
|
||||||
* @see ILaunchConfigurationTab#isValid(ILaunchConfiguration)
|
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(org.eclipse.debug.core.ILaunchConfiguration)
|
||||||
*/
|
*/
|
||||||
public boolean isValid(ILaunchConfiguration config) {
|
public boolean isValid(ILaunchConfiguration config) {
|
||||||
|
|
||||||
|
@ -487,13 +503,16 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/* (non-Javadoc)
|
||||||
* @see ILaunchConfigurationTab#setDefaults(ILaunchConfigurationWorkingCopy)
|
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
|
||||||
*/
|
*/
|
||||||
public void setDefaults(ILaunchConfigurationWorkingCopy config) {
|
public void setDefaults(ILaunchConfigurationWorkingCopy config) {
|
||||||
// We set empty attributes for project & program so that when one config is
|
// We set empty attributes for project & program so that when one config
|
||||||
// compared to another, the existence of empty attributes doesn't cause an
|
// is
|
||||||
// incorrect result (the performApply() method can result in empty values
|
// compared to another, the existence of empty attributes doesn't cause
|
||||||
|
// an
|
||||||
|
// incorrect result (the performApply() method can result in empty
|
||||||
|
// values
|
||||||
// for these attributes being set on a config if there is nothing in the
|
// for these attributes being set on a config if there is nothing in the
|
||||||
// corresponding text boxes)
|
// corresponding text boxes)
|
||||||
// plus getContext will use this to base context from if set.
|
// plus getContext will use this to base context from if set.
|
||||||
|
@ -507,7 +526,8 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the program name attributes on the working copy based on the ICElement
|
* Set the program name attributes on the working copy based on the
|
||||||
|
* ICElement
|
||||||
*/
|
*/
|
||||||
protected void initializeProgramName(ICElement cElement, ILaunchConfigurationWorkingCopy config) {
|
protected void initializeProgramName(ICElement cElement, ILaunchConfigurationWorkingCopy config) {
|
||||||
IBinary binary = null;
|
IBinary binary = null;
|
||||||
|
@ -534,21 +554,22 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
config.rename(name);
|
config.rename(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* @see ILaunchConfigurationTab#getName()
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
|
||||||
*/
|
*/
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return LaunchUIPlugin.getResourceString("CMainTab.Main"); //$NON-NLS-1$
|
return LaunchUIPlugin.getResourceString("CMainTab.Main"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/* (non-Javadoc)
|
||||||
* @see ILaunchConfigurationTab#getImage()
|
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage()
|
||||||
*/
|
*/
|
||||||
public Image getImage() {
|
public Image getImage() {
|
||||||
return LaunchImages.get(LaunchImages.IMG_VIEW_MAIN_TAB);
|
return LaunchImages.get(LaunchImages.IMG_VIEW_MAIN_TAB);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#updateLaunchConfigurationDialog()
|
* @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#updateLaunchConfigurationDialog()
|
||||||
*/
|
*/
|
||||||
protected void updateLaunchConfigurationDialog() {
|
protected void updateLaunchConfigurationDialog() {
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
/*
|
/**********************************************************************
|
||||||
*(c) Copyright QNX Software Systems Ltd. 2002.
|
* Copyright (c) 2002 - 2004 QNX Software Systems and others.
|
||||||
* All Rights Reserved.
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
*
|
*
|
||||||
*/
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.launch.ui;
|
package org.eclipse.cdt.launch.ui;
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
||||||
|
|
|
@ -1,7 +1,13 @@
|
||||||
/*
|
/**********************************************************************
|
||||||
* (c) Copyright QNX Software System Ltd. 2002.
|
* Copyright (c) 2002 - 2004 QNX Software Systems and others.
|
||||||
* All Rights Reserved.
|
* All rights reserved. This program and the accompanying materials
|
||||||
*/
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.launch.ui;
|
package org.eclipse.cdt.launch.ui;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
|
@ -73,8 +79,10 @@ public class CorefileDebuggerTab extends AbstractCDebuggerTab {
|
||||||
String projectCPU = "*"; //$NON-NLS-1$
|
String projectCPU = "*"; //$NON-NLS-1$
|
||||||
if (ce != null) {
|
if (ce != null) {
|
||||||
try {
|
try {
|
||||||
ICDescriptor descriptor = CCorePlugin.getDefault().getCProjectDescription(ce.getCProject().getProject());
|
ICDescriptor descriptor = CCorePlugin.getDefault().getCProjectDescription(ce.getCProject().getProject(), false);
|
||||||
|
if (descriptor != null) {
|
||||||
projectPlatform = descriptor.getPlatform();
|
projectPlatform = descriptor.getPlatform();
|
||||||
|
}
|
||||||
IBinary bin = (IBinary) ce;
|
IBinary bin = (IBinary) ce;
|
||||||
projectCPU = bin.getCPU();
|
projectCPU = bin.getCPU();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -156,8 +164,10 @@ public class CorefileDebuggerTab extends AbstractCDebuggerTab {
|
||||||
String projectCPU = "*"; //$NON-NLS-1$
|
String projectCPU = "*"; //$NON-NLS-1$
|
||||||
if (ce != null) {
|
if (ce != null) {
|
||||||
try {
|
try {
|
||||||
ICDescriptor descriptor = CCorePlugin.getDefault().getCProjectDescription(ce.getCProject().getProject());
|
ICDescriptor descriptor = CCorePlugin.getDefault().getCProjectDescription(ce.getCProject().getProject(), false);
|
||||||
|
if (descriptor != null) {
|
||||||
projectPlatform = descriptor.getPlatform();
|
projectPlatform = descriptor.getPlatform();
|
||||||
|
}
|
||||||
IBinary bin = (IBinary) ce;
|
IBinary bin = (IBinary) ce;
|
||||||
projectCPU = bin.getCPU();
|
projectCPU = bin.getCPU();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
/*
|
/**********************************************************************
|
||||||
* Created on 22-Sep-2003
|
* Copyright (c) 2002 - 2004 QNX Software Systems and others.
|
||||||
*
|
* All rights reserved. This program and the accompanying materials
|
||||||
* Copyright (c) 2002,2003 QNX Software Systems Ltd.
|
* are made available under the terms of the Common Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/cpl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* QNX Software Systems - Initial API and implementation
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
|
Loading…
Add table
Reference in a new issue