Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Cortell2010-02-26 14:46:21 +0000
committerJohn Cortell2010-02-26 14:46:21 +0000
commit97acd431e00f634e7cac9142ebea831b386969c5 (patch)
tree0db671e3a01aef3983271cc1dd1d8007daa74c3c /launch/org.eclipse.cdt.launch
parentd2cd2d381f9cd10923bf2d30ce1a3e904d4bee3c (diff)
downloadorg.eclipse.cdt-97acd431e00f634e7cac9142ebea831b386969c5.tar.gz
org.eclipse.cdt-97acd431e00f634e7cac9142ebea831b386969c5.tar.xz
org.eclipse.cdt-97acd431e00f634e7cac9142ebea831b386969c5.zip
Fix unindented if block (no functional change)
Diffstat (limited to 'launch/org.eclipse.cdt.launch')
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java106
1 files changed, 53 insertions, 53 deletions
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java
index 47beb50c47..03b0f4f073 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java
@@ -817,69 +817,69 @@ public class CMainTab extends CLaunchConfigurationTab {
if (!dontCheckProgram) {
- String name = fProjText.getText().trim();
- if (name.length() == 0) {
- setErrorMessage(LaunchMessages.getString("CMainTab.Project_not_specified")); //$NON-NLS-1$
- return false;
- }
- if (!ResourcesPlugin.getWorkspace().getRoot().getProject(name).exists()) {
- setErrorMessage(LaunchMessages.getString("Launch.common.Project_does_not_exist")); //$NON-NLS-1$
- return false;
- }
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
- if (!project.isOpen()) {
- setErrorMessage(LaunchMessages.getString("CMainTab.Project_must_be_opened")); //$NON-NLS-1$
- return false;
- }
-
- name = fProgText.getText().trim();
- if (name.length() == 0) {
- setErrorMessage(LaunchMessages.getString("CMainTab.Program_not_specified")); //$NON-NLS-1$
- return false;
- }
- if (name.equals(".") || name.equals("..")) { //$NON-NLS-1$ //$NON-NLS-2$
- setErrorMessage(LaunchMessages.getString("CMainTab.Program_does_not_exist")); //$NON-NLS-1$
- return false;
- }
- IPath exePath = new Path(name);
- if (!exePath.isAbsolute()) {
- IPath location = project.getLocation();
- if (location == null) {
+ String name = fProjText.getText().trim();
+ if (name.length() == 0) {
+ setErrorMessage(LaunchMessages.getString("CMainTab.Project_not_specified")); //$NON-NLS-1$
+ return false;
+ }
+ if (!ResourcesPlugin.getWorkspace().getRoot().getProject(name).exists()) {
+ setErrorMessage(LaunchMessages.getString("Launch.common.Project_does_not_exist")); //$NON-NLS-1$
+ return false;
+ }
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
+ if (!project.isOpen()) {
+ setErrorMessage(LaunchMessages.getString("CMainTab.Project_must_be_opened")); //$NON-NLS-1$
+ return false;
+ }
+
+ name = fProgText.getText().trim();
+ if (name.length() == 0) {
+ setErrorMessage(LaunchMessages.getString("CMainTab.Program_not_specified")); //$NON-NLS-1$
+ return false;
+ }
+ if (name.equals(".") || name.equals("..")) { //$NON-NLS-1$ //$NON-NLS-2$
setErrorMessage(LaunchMessages.getString("CMainTab.Program_does_not_exist")); //$NON-NLS-1$
return false;
}
-
- exePath = location.append(name);
- if (!exePath.toFile().exists()) {
- // Try the old way, which is required to support linked resources.
- IFile projFile = null;
- try {
- projFile = project.getFile(name);
- }
- catch (IllegalArgumentException exc) {} // thrown if relative path that resolves to a root file ("..\somefile")
- if (projFile == null || !projFile.exists()) {
+ IPath exePath = new Path(name);
+ if (!exePath.isAbsolute()) {
+ IPath location = project.getLocation();
+ if (location == null) {
setErrorMessage(LaunchMessages.getString("CMainTab.Program_does_not_exist")); //$NON-NLS-1$
return false;
}
- else {
- exePath = projFile.getLocation();
+
+ exePath = location.append(name);
+ if (!exePath.toFile().exists()) {
+ // Try the old way, which is required to support linked resources.
+ IFile projFile = null;
+ try {
+ projFile = project.getFile(name);
+ }
+ catch (IllegalArgumentException exc) {} // thrown if relative path that resolves to a root file ("..\somefile")
+ if (projFile == null || !projFile.exists()) {
+ setErrorMessage(LaunchMessages.getString("CMainTab.Program_does_not_exist")); //$NON-NLS-1$
+ return false;
+ }
+ else {
+ exePath = projFile.getLocation();
+ }
}
+ }
+ if (!exePath.toFile().exists()) {
+ setErrorMessage(LaunchMessages.getString("CMainTab.Program_does_not_exist")); //$NON-NLS-1$
+ return false;
}
- }
- if (!exePath.toFile().exists()) {
- setErrorMessage(LaunchMessages.getString("CMainTab.Program_does_not_exist")); //$NON-NLS-1$
- return false;
- }
- try {
- if (!isBinary(project, exePath)) {
- setErrorMessage(LaunchMessages.getString("CMainTab.Program_is_not_a_recongnized_executable")); //$NON-NLS-1$
+ try {
+ if (!isBinary(project, exePath)) {
+ setErrorMessage(LaunchMessages.getString("CMainTab.Program_is_not_a_recongnized_executable")); //$NON-NLS-1$
+ return false;
+ }
+ } catch (CoreException e) {
+ LaunchUIPlugin.log(e);
+ setErrorMessage(e.getLocalizedMessage());
return false;
}
- } catch (CoreException e) {
- LaunchUIPlugin.log(e);
- setErrorMessage(e.getLocalizedMessage());
- return false;
- }
}
if (fCoreText != null) {

Back to the top