aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzzhongwei2012-11-26 01:42:56 (EST)
committerzzhongwei2012-11-26 01:42:56 (EST)
commit40da25a71da8fa0f19f60c509de64b72c540e9a8 (patch)
tree21fa91c1937e1e952082bc08f23e7595431d1e3e
parent6d09f8eb9e48eb06f807533685f3adde358bc8db (diff)
downloadorg.eclipse.pdt-40da25a71da8fa0f19f60c509de64b72c540e9a8.zip
org.eclipse.pdt-40da25a71da8fa0f19f60c509de64b72c540e9a8.tar.gz
org.eclipse.pdt-40da25a71da8fa0f19f60c509de64b72c540e9a8.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.ui/src/org/eclipse/php/internal/ui/editor/contentassist/UseStatementInjector.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/editor/contentassist/UseStatementInjector.java b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/editor/contentassist/UseStatementInjector.java
index 73f4bc9..5597982 100644
--- a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/editor/contentassist/UseStatementInjector.java
+++ b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/editor/contentassist/UseStatementInjector.java
@@ -333,7 +333,8 @@ public class UseStatementInjector {
if (index > 0) {// workaround for bug 393253
try {
int beginLine = document
- .getLineOfOffset(program
+ .getLineOfOffset(currentNamespace
+ .getBody()
.statements()
.get(index - 1)
.getEnd()) + 1;