You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/11/04 13:15:50 UTC

[GitHub] tmysik closed pull request #1008: [NETBEANS-1576] PHP autocompletion partially broken

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists