1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 06:32:10 +02:00

Warning cleanup.

This commit is contained in:
Mikhail Khodjaiants 2004-08-12 19:11:09 +00:00
parent 424f976c4f
commit 42f4d8f013
3 changed files with 24 additions and 22 deletions

View file

@ -1,3 +1,8 @@
2004-08-12 Mikhail Khodjaiants
Warning cleanup.
* AbstractCLaunchDelegate.java
* CApplicationLaunchShortcut.java
2004-08-10 Mikhail Khodjaiants
Fix for bug 70442: Debugger launch configuration not updating properly.
* AbstractCDebuggerTab.java

View file

@ -422,11 +422,11 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
}
ICProject cproject = getCProject(config);
if (cproject == null) {
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
if (!project.exists()) {
IProject proj = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
if (!proj.exists()) {
abort(LaunchUIPlugin.getFormattedResourceString("AbstractCLaunchDelegate.Project_NAME_does_not_exist", name), null, //$NON-NLS-1$
ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
} else if (!project.isOpen()) {
} else if (!proj.isOpen()) {
abort(LaunchUIPlugin.getFormattedResourceString("AbstractCLaunchDelegate.Project_NAME_is_closed", name), null, //$NON-NLS-1$
ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
}
@ -589,7 +589,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
/**
* Recursively creates a set of projects referenced by the current project
*
* @param project
* @param proj
* The current project
* @param referencedProjSet
* A set of referenced projects
@ -597,8 +597,8 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
* if an error occurs while getting referenced projects from the
* current project
*/
private void getReferencedProjectSet(IProject project, HashSet referencedProjSet) throws CoreException {
IProject[] projects = project.getReferencedProjects();
private void getReferencedProjectSet(IProject proj, HashSet referencedProjSet) throws CoreException {
IProject[] projects = proj.getReferencedProjects();
for (int i = 0; i < projects.length; i++) {
IProject refProject = projects[i];
if (refProject.exists() && !referencedProjSet.contains(refProject)) {
@ -620,7 +620,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
private List getBuildOrder(List resourceCollection) {
String[] orderedNames = ResourcesPlugin.getWorkspace().getDescription().getBuildOrder();
if (orderedNames != null) {
List orderedProjects = new ArrayList(resourceCollection.size());
List orderedProjs = new ArrayList(resourceCollection.size());
//Projects may not be in the build order but should be built if
// selected
List unorderedProjects = new ArrayList(resourceCollection.size());
@ -629,26 +629,26 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
for (int i = 0; i < orderedNames.length; i++) {
String projectName = orderedNames[i];
for (int j = 0; j < resourceCollection.size(); j++) {
IProject project = (IProject)resourceCollection.get(j);
if (project.getName().equals(projectName)) {
orderedProjects.add(project);
unorderedProjects.remove(project);
IProject proj = (IProject)resourceCollection.get(j);
if (proj.getName().equals(projectName)) {
orderedProjs.add(proj);
unorderedProjects.remove(proj);
break;
}
}
}
//Add anything not specified before we return
orderedProjects.addAll(unorderedProjects);
return orderedProjects;
orderedProjs.addAll(unorderedProjects);
return orderedProjs;
}
// Try the project prerequisite order then
IProject[] projects = new IProject[resourceCollection.size()];
projects = (IProject[])resourceCollection.toArray(projects);
IWorkspace.ProjectOrder po = ResourcesPlugin.getWorkspace().computeProjectOrder(projects);
ArrayList orderedProjects = new ArrayList();
orderedProjects.addAll(Arrays.asList(po.projects));
return orderedProjects;
ArrayList orderedProjs = new ArrayList();
orderedProjs.addAll(Arrays.asList(po.projects));
return orderedProjs;
}
/**

View file

@ -234,9 +234,8 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut {
protected String getDebugConfigDialogMessageString(ICDebugConfiguration [] configList, String mode) {
if (mode.equals(ILaunchManager.DEBUG_MODE)) {
return LaunchUIPlugin.getResourceString("CApplicationLaunchShortcut.ChooseConfigToDebug"); //$NON-NLS-1$
} else {
return LaunchUIPlugin.getResourceString("CApplicationLaunchShortcut.ChooseConfigToRun"); //$NON-NLS-1$
}
return LaunchUIPlugin.getResourceString("CApplicationLaunchShortcut.ChooseConfigToRun"); //$NON-NLS-1$
}
@ -267,9 +266,8 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut {
protected String getLaunchSelectionDialogMessageString(List binList, String mode) {
if (mode.equals(ILaunchManager.DEBUG_MODE)) {
return LaunchUIPlugin.getResourceString("CApplicationLaunchShortcut.ChooseLaunchConfigToDebug"); //$NON-NLS-1$
} else {
return LaunchUIPlugin.getResourceString("CApplicationLaunchShortcut.ChooseLaunchConfigToRun"); //$NON-NLS-1$
}
return LaunchUIPlugin.getResourceString("CApplicationLaunchShortcut.ChooseLaunchConfigToRun"); //$NON-NLS-1$
}
/**
@ -325,9 +323,8 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut {
protected String getBinarySelectionDialogMessageString(List binList, String mode) {
if (mode.equals(ILaunchManager.DEBUG_MODE)) {
return LaunchUIPlugin.getResourceString("CApplicationLaunchShortcut.ChooseLocalAppToDebug"); //$NON-NLS-1$
} else {
return LaunchUIPlugin.getResourceString("CApplicationLaunchShortcut.ChooseLocalAppToRun"); //$NON-NLS-1$
}
return LaunchUIPlugin.getResourceString("CApplicationLaunchShortcut.ChooseLocalAppToRun"); //$NON-NLS-1$
}
/**