Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2010-03-25 20:55:35 +0000
committerDarin Wright2010-03-25 20:55:35 +0000
commitb9a131d62a9084c4e722aba8247eb0d9a877b444 (patch)
tree36d10015d17e654e667b2eec6b5eb3c0d2e42947 /org.eclipse.debug.core
parentcab5d7f72d68e1cc474121a4b514856a8436fc5a (diff)
downloadeclipse.platform.debug-b9a131d62a9084c4e722aba8247eb0d9a877b444.tar.gz
eclipse.platform.debug-b9a131d62a9084c4e722aba8247eb0d9a877b444.tar.xz
eclipse.platform.debug-b9a131d62a9084c4e722aba8247eb0d9a877b444.zip
Bug 259281 - [launch] When using Environment tab it does not process variables with newline correctly
Diffstat (limited to 'org.eclipse.debug.core')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
index 6be3b2bf2..4341b8c44 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
@@ -10,6 +10,7 @@
* Sebastian Davids - bug 50567 Eclipse native environment support on Win98
* Pawel Piech - Bug 82001: When shutting down the IDE, the debugger should first
* attempt to disconnect debug targets before terminating them
+ * Alena Laskavaia - Bug 259281
*******************************************************************************/
package org.eclipse.debug.internal.core;
@@ -801,6 +802,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
String line = reader.readLine();
String key = null;
String value = null;
+ String newLine = System.getProperty("line.separator"); //$NON-NLS-1$
while (line != null) {
int func = line.indexOf("=()"); //$NON-NLS-1$
if(func > 0) {
@@ -810,7 +812,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
while(line != null && !line.equals("}")) { //$NON-NLS-1$
line = reader.readLine();
if(line != null) {
- value += line;
+ value += newLine + line;
}
}
line = reader.readLine();
@@ -822,16 +824,15 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
value = line.substring(separator + 1);
line = reader.readLine();
if(line != null) {
- //this line has a '=' read ahead to check next line for '=', might be broken on more than one line
- separator = line.indexOf('=');
- while(separator < 0) {
- value += line.trim();
+ // this line has a '=' read ahead to check next line for '=', might be broken on more than one line
+ // also if line starts with non-identifier - it is remainder of previous variable
+ while (line.indexOf('=') < 0 || (line.length()>0 && !Character.isJavaIdentifierStart(line.charAt(0)))) {
+ value += newLine + line;
line = reader.readLine();
if(line == null) {
//if next line read is the end of the file quit the loop
break;
}
- separator = line.indexOf('=');
}
}
}

Back to the top