tmysik closed pull request #1008: [NETBEANS-1576] PHP autocompletion partially
broken
URL: https://github.com/apache/incubator-netbeans/pull/1008
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/php/php.editor/src/org/netbeans/modules/php/editor/model/impl/ModelVisitor.java
b/php/php.editor/src/org/netbeans/modules/php/editor/model/impl/ModelVisitor.java
index 573a66089a..ca19c71c7a 100644
---
a/php/php.editor/src/org/netbeans/modules/php/editor/model/impl/ModelVisitor.java
+++
b/php/php.editor/src/org/netbeans/modules/php/editor/model/impl/ModelVisitor.java
@@ -898,7 +898,8 @@ public void visit(Assignment node) {
// DO NOT check varN.findVarAssignment(varN.getOffset())
// because there is a performance problem if VariableName
has many assignments
// (some unit tests fail because of a timeout)
- if (varN.getElements().isEmpty()) {
+ boolean isEmptyElements = varN.getElements().isEmpty();
+ if (isEmptyElements) {
// NETBEANS-1576
// add vardoc info instead of current assignment info
List<PhpDocTypeTagInfo> vardocComments =
varTypeComments.get(varN.getName());
@@ -928,7 +929,7 @@ public void visit(Assignment node) {
node,
allAssignments);
varN.addElement(varAssignment);
- if (varN.getElements().isEmpty()) {
+ if (isEmptyElements) {
// e.g.
// $variable = ...
// /* @var $variable TypeName */
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists