aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzzhongwei2012-12-04 01:57:26 (EST)
committerzzhongwei2012-12-04 01:57:26 (EST)
commita15c1d8d479bcb179bf110662900494c8bea890e (patch)
treee7272754bbe8260ef13d6caf8606d9830a4fac57
parent99e9bc40cbeb56a6ddeac2ead33f50d00ddf2b9e (diff)
downloadorg.eclipse.pdt-a15c1d8d479bcb179bf110662900494c8bea890e.zip
org.eclipse.pdt-a15c1d8d479bcb179bf110662900494c8bea890e.tar.gz
org.eclipse.pdt-a15c1d8d479bcb179bf110662900494c8bea890e.tar.bz2
394468: Use statements gets inserted between class comments and class
declaration https://bugs.eclipse.org/bugs/show_bug.cgi?id=394468
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/rewrite/ASTRewriteAnalyzer.java3
1 files changed, 3 insertions, 0 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 f332135..7e7346e 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,6 +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 (insertString.length() > 0) {
// bug fix for 95839: problem with inserting at the end of a line
// comment