Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 196599 - Global code completion not working
Global code completion not working
Status: RESOLVED INVALID
Product: php
Classification: Unclassified
Component: Code
7.0
PC Windows 7
: P3 (vote)
: TBD
Assigned To: pgebauer
issues@php
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-11 16:39 UTC by maghiel
Modified: 2011-03-14 22:27 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
class screenshot (5.25 KB, image/png)
2011-03-14 15:22 UTC, Vladimir Riha
Details
function (6.66 KB, image/png)
2011-03-14 15:23 UTC, Vladimir Riha
Details
comment (8.69 KB, image/png)
2011-03-14 15:24 UTC, Vladimir Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description maghiel 2011-03-11 16:39:39 UTC
[ BUILD # : 201103100000 ]
[ JDK VERSION : 1.6.23 ]

    Verify global variable code completion.
        Create a PHP function.
        Declare a global variable.
        Type several first symbols of the variable name and invoke code
completion. 
        EXPECTED RESULT: Code completion appears and the variable name is among
suggestions. 

*FAIL* Suggestions don't become available outside the function scope. 

---

    Verify variable from included file code completion.
        Include an other PHP file into PHP source.
        Open that PHP source and create a global variable there.
        Create a PHP function in the first source.
        Inside that function, type several first symbols of the variable name
and invoke code completion.
        Choose that variable in the list and press Enter. 
        EXPECTED RESULT: Code is completed properly. No require or include
directive is auto-generated. 

*FAIL* Result: No suggestions.
Comment 1 Vladimir Riha 2011-03-14 15:22:50 UTC
Created attachment 106984 [details]
class screenshot
Comment 2 Vladimir Riha 2011-03-14 15:23:15 UTC
Created attachment 106985 [details]
function
Comment 3 Vladimir Riha 2011-03-14 15:24:11 UTC
Created attachment 106986 [details]
comment
Comment 4 Vladimir Riha 2011-03-14 15:25:05 UTC
It works for me, see the attached screenshots, folding works for functions,
classes, /* */ comments. Can you give me more details? I tried it in php file
and php web page as well.

Currently I don't have the newest build, I'll try the latest in the evening.


Product Version: NetBeans IDE Dev (Build 201103090000)
Java: 1.6.0_24; Java HotSpot(TM) Client VM 19.1-b02
System: Windows 7 version 6.1 running on x86; Cp1250; cs_CZ (nb)
Comment 5 Vladimir Riha 2011-03-14 15:41:29 UTC
Sorry, I have opend bad bug, all my comments don't belongs here...
Comment 6 Vladimir Riha 2011-03-14 15:41:54 UTC
Comment on attachment 106984 [details]
class screenshot

bad issue
Comment 7 Vladimir Riha 2011-03-14 15:42:07 UTC
Comment on attachment 106985 [details]
function

bad issue
Comment 8 Vladimir Riha 2011-03-14 15:42:14 UTC
Comment on attachment 106986 [details]
comment

bad issue
Comment 9 Vladimir Riha 2011-03-14 21:18:19 UTC
Did you use the keyword "global"? I did it kind of automatically (because I'm used to do it that way and I don't know if any other way is possible) and it works in both cases. 

For the first issue:
<?php
function myF(){
    global $justVar;
    $<codeCompletion>
}?>
This works

For the second one:
second.php:
<?php
$foo = 2;
?>

first.php:
<?php
include 'second.php';
function myF(){
    global $f<codeCompletion>
}?>

This works as well. If you tested it differently, could you please attach the source files? Maybe I get it wrong...
Comment 10 maghiel 2011-03-14 22:25:52 UTC
Sorry I didn't close this issue, lot of work on my hands.
It turned out the test suites were wrong, not netbeans itself.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo