Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry BLIND2019-02-21 09:55:38 -0500
committerThierry BLIND2019-02-21 09:55:38 -0500
commit20fa074da9b5d921e505da1d841ef27e6ebaea65 (patch)
treea0cd34831de3947837def5032f8847081823c07e
parentc2270f4f4921832afe59835becade11fa692ef0b (diff)
downloadorg.eclipse.pdt-20fa074da9b5d921e505da1d841ef27e6ebaea65.tar.gz
org.eclipse.pdt-20fa074da9b5d921e505da1d841ef27e6ebaea65.tar.xz
org.eclipse.pdt-20fa074da9b5d921e505da1d841ef27e6ebaea65.zip
Bug 525818 - Ctrl-Shift-Space doesn't work correctly for parameters when
// comments are used. Change-Id: Iebfc0573fee0b14ad18a7449a21d0e6b01b3ec9c Signed-off-by: Thierry BLIND <thierryblind@msn.com>
-rw-r--r--plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/editor/contentassist/PHPContextInformationValidator.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/editor/contentassist/PHPContextInformationValidator.java b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/editor/contentassist/PHPContextInformationValidator.java
index 9ddb778b1..c8b2e7034 100644
--- a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/editor/contentassist/PHPContextInformationValidator.java
+++ b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/editor/contentassist/PHPContextInformationValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2019 IBM Corporation and others.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
@@ -90,7 +90,12 @@ public class PHPContextInformationValidator implements IContextInformationValida
start = getCommentEnd(document, start + 1, end);
} else if (next == '/') {
// '//'-comment: nothing to do anymore on this line
- start = end;
+ IRegion line = document.getLineInformationOfOffset(start);
+ // NB: the line ending offset could be greater than the
+ // value of "end" but that's still ok because the new
+ // value of "start" would then stop the while-loop
+ // anyway
+ start = line.getOffset() + line.getLength();
}
}
break;

Back to the top