aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzzhongwei2013-02-26 04:08:56 (EST)
committerzzhongwei2013-02-26 04:10:03 (EST)
commit826baa9ae7d6ec006b96468693cb95ed9640cee8 (patch)
tree5a0f4bacf9cbf5a0e1b9406a032a9cf807956a21
parent5c00c894c34e862e3631a63cc46b513040b9ba78 (diff)
downloadorg.eclipse.pdt-826baa9ae7d6ec006b96468693cb95ed9640cee8.zip
org.eclipse.pdt-826baa9ae7d6ec006b96468693cb95ed9640cee8.tar.gz
org.eclipse.pdt-826baa9ae7d6ec006b96468693cb95ed9640cee8.tar.bz2
401766: array key replace is missing last char + hint issue
https://bugs.eclipse.org/bugs/show_bug.cgi?id=401766
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist/strategies/ArrayStringKeysStrategy.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist/strategies/ArrayStringKeysStrategy.java b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist/strategies/ArrayStringKeysStrategy.java
index 393acef..b25d5f6 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist/strategies/ArrayStringKeysStrategy.java
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/codeassist/strategies/ArrayStringKeysStrategy.java
@@ -53,6 +53,10 @@ public class ArrayStringKeysStrategy extends AbstractCompletionStrategy {
SourceRange replaceRange = getReplacementRange(context);
ArrayKeyContext arrayContext = (ArrayKeyContext) context;
+ if (arrayContext.hasQuotes()) {// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401766
+ replaceRange = new SourceRange(replaceRange.getOffset(),
+ replaceRange.getLength() + 1);
+ }
CompletionRequestor requestor = arrayContext.getCompletionRequestor();
String prefix = arrayContext.getPrefix();