aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzzhongwei2012-12-06 03:54:51 (EST)
committerzzhongwei2012-12-06 03:54:51 (EST)
commitd1cfc679f5fd071bdc5a676abbfe4c9c44e6d789 (patch)
tree51a545c4fc6bad1db4a0760141b35f957d2645ee
parenta9fcc4acc6c0c84642cd5da215232f5956a74e80 (diff)
downloadorg.eclipse.pdt-d1cfc679f5fd071bdc5a676abbfe4c9c44e6d789.zip
org.eclipse.pdt-d1cfc679f5fd071bdc5a676abbfe4c9c44e6d789.tar.gz
org.eclipse.pdt-d1cfc679f5fd071bdc5a676abbfe4c9c44e6d789.tar.bz2
fixed the indentation of the auto inserted use statement
-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 7e7346e..ec584fa 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