1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +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 2004-08-10 Mikhail Khodjaiants
Fix for bug 70442: Debugger launch configuration not updating properly. Fix for bug 70442: Debugger launch configuration not updating properly.
* AbstractCDebuggerTab.java * AbstractCDebuggerTab.java

View file

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

View file

@ -234,9 +234,8 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut {
protected String getDebugConfigDialogMessageString(ICDebugConfiguration [] configList, String mode) { protected String getDebugConfigDialogMessageString(ICDebugConfiguration [] configList, String mode) {
if (mode.equals(ILaunchManager.DEBUG_MODE)) { if (mode.equals(ILaunchManager.DEBUG_MODE)) {
return LaunchUIPlugin.getResourceString("CApplicationLaunchShortcut.ChooseConfigToDebug"); //$NON-NLS-1$ 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) { protected String getLaunchSelectionDialogMessageString(List binList, String mode) {
if (mode.equals(ILaunchManager.DEBUG_MODE)) { if (mode.equals(ILaunchManager.DEBUG_MODE)) {
return LaunchUIPlugin.getResourceString("CApplicationLaunchShortcut.ChooseLaunchConfigToDebug"); //$NON-NLS-1$ 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) { protected String getBinarySelectionDialogMessageString(List binList, String mode) {
if (mode.equals(ILaunchManager.DEBUG_MODE)) { if (mode.equals(ILaunchManager.DEBUG_MODE)) {
return LaunchUIPlugin.getResourceString("CApplicationLaunchShortcut.ChooseLocalAppToDebug"); //$NON-NLS-1$ 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$
} }
/** /**