Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Rösler2014-02-27 21:41:11 +0000
committerMickael Istria2014-04-22 08:17:26 +0000
commit4f75487f722112d4729e85a8e101caceb76d52d2 (patch)
treef8f962b8c9d3440d9b219d14c75ad024996ae2f4
parent400e35200affca2ae681f1e23a651632a2c880b4 (diff)
downloadorg.eclipse.swtbot-4f75487f722112d4729e85a8e101caceb76d52d2.tar.gz
org.eclipse.swtbot-4f75487f722112d4729e85a8e101caceb76d52d2.tar.xz
org.eclipse.swtbot-4f75487f722112d4729e85a8e101caceb76d52d2.zip
Bug 412833 fix line break on Windows
Change-Id: I69d0de17d4b6db28aca4d5b04ef88ecabccb9215 Signed-off-by: Mark Rösler <mark-roesler@gmx.de>
-rw-r--r--org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/ui/RecorderDialog.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/ui/RecorderDialog.java b/org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/ui/RecorderDialog.java
index 8b3b336d..99472299 100644
--- a/org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/ui/RecorderDialog.java
+++ b/org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/ui/RecorderDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Red Hat Inc..
+ * Copyright (c) 2012-2014 Red Hat Inc. and others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Mickael Istria (Red Hat) - initial API and implementation
+ * Mark Rösler - Bug 412833 fix line break on Windows
*******************************************************************************/
package org.eclipse.swtbot.generator.ui;
@@ -140,8 +141,14 @@ public class RecorderDialog extends TitleAreaDialog implements IRecorderDialog {
this.recorder.addListener(new CodeGenerationListener() {
public void handleCodeGenerated(GenerationRule code) {
- for(String action: code.getActions())
- generatedCode.setText(generatedCode.getText() + action + ";\n");
+ String lineSeparator = System.getProperty("line.separator");
+ StringBuilder builder = new StringBuilder(generatedCode.getText());
+ for (String action : code.getActions()) {
+ builder.append(action);
+ builder.append(";");
+ builder.append(lineSeparator);
+ }
+ generatedCode.setText(builder.toString());
}
});

Back to the top