aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/rewrite/ASTRewriteAnalyzer.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/rewrite/ASTRewriteAnalyzer.java b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/rewrite/ASTRewriteAnalyzer.java
index 7e7346ed1..ec584fad0 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/rewrite/ASTRewriteAnalyzer.java
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/rewrite/ASTRewriteAnalyzer.java
@@ -272,8 +272,9 @@ public final class ASTRewriteAnalyzer extends AbstractVisitor {
final void doTextInsert(int offset, String insertString,
TextEditGroup editGroup) {
- if (isInsertUseStatement && insertString.trim().length() == 0) {
- return;
+ if (isInsertUseStatement && insertString.trim().length() > 0) {
+ insertString = insertString.replaceAll("\r", "").replaceAll("\n",
+ "");
}
if (insertString.length() > 0) {
// bug fix for 95839: problem with inserting at the end of a line