This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 115615 [details] new variable $var1 does not detected by autocomplete If I create NEW class property or class constant or method then it is not detected by autocomplete engine. For solving this problem I have to reopen project or restart NB, but it is very inconvenient. Also import of default settings (section General->All other unspecified) can solve this problem. But after certain actions in editor the problem appears again. For the proof see the attached file. This problem was in all early NB 7.x versions. I also tried reinstall NB and java, but it did not help.
I can't reproduce it :( It works for me properly in 7.2 dev build. Can you test it there? If the problem still occurs, reopen this issue and provide more info how to reproduce it... I'm not able to do that :(
(In reply to comment #1) > I can't reproduce it :( It works for me properly in 7.2 dev build. Can you test it there? Sorry, but I can't use dev version in my project. I will wait for beta or release version. > If the problem still occurs, reopen this issue and provide more info > how to reproduce it... I'm not able to do that :( 1. Try to put source code and nbproject data to another location then default location (Documents and Settings\<user>\My Documents\NetBeansProjects\) 2. Open 2 projects, with names like "proj.one" and "proj.twho". In second project set "Include Path" to value = "path\to\1st_project\proj.one\includes" This hypothesis. Other non-default values, I did not set
Created attachment 117452 [details] NB doesn't detect new property "testvar"
(In reply to comment #1) > I can't reproduce it :( It works for me properly in 7.2 dev build. Can you test > it there? I tested on version "Dev 201203280401" - see atached file ``NB doesn't detect new property "testvar"''. And the problem is exists :( > If the problem still occurs, reopen this issue and provide more info how to reproduce it... I'm not able to do that :( I run NB with command line key "--locale en". Try to open 2 projects, with names like "proj.one" and "proj.twho". In second project set "Include Path" to value = "path\to\1st_project\proj.one\includes" This hypothesis. Other non-default values, I did not set. Also, can you make the following: If the user add/modify/remove any class constant/property/method then NB re-init project structure ? This will solve the problem, because If I reopen project, then NB "sees" a new class property.
Vlado, please, can you reproduce that? Thanks.
I guess I managed to reproduce, but not sure what exactly cause it :) What I did: - create 2 projects in different folders, close them - close NetBeans - start NetBeans, open both project - set Include path of projectA to folder of projectB - create new subfolder in projectB called "includes" - remove include path in projectA and add new to projectB/includes - create class in projectB in subfolder that is included by projectA => suggested issue occured The problem is that I can't reproduce it in any other class, just the single one... The problem appears in ProjectB in includes/Test.php I'll attach both projects. Project A location: C:\Users\tester\Documents\b\PhpProject2 Project B location: C:\Users\tester\a\PhpProject2 Product Version: NetBeans IDE Dev (Build 201203280401) Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17 System: Windows 7 version 6.1 running on x86; Cp1252; en (nb)
Created attachment 117453 [details] projectB
Created attachment 117454 [details] projectA
Created attachment 117455 [details] screenshot
Really crazy scenario :-) But thanks for evaluation, I'll try to look at it. But I'm not sure with the result, maybe it's not a PHP issue, maybe something wrong with scanning and indexing. We'll see.
(In reply to comment #6) > I guess I managed to reproduce, but not sure what exactly cause it :) > > What I did: > - create 2 projects in different folders, close them > - close NetBeans > - start NetBeans, open both project > - set Include path of projectA to folder of projectB > - create new subfolder in projectB called "includes" > - remove include path in projectA and add new to projectB/includes > - create class in projectB in subfolder that is included by projectA > => suggested issue occured > > The problem is that I can't reproduce it in any other class, just the single > one... The problem appears in ProjectB in includes/Test.php I didn't understand you. Did you reproduced this bug ? And can you developer team simply add feature about which I wrote: If the user add/modify/remove any class constant/property/method then NB re-init project structure (class/method/props/consts relations) ? PS. I use java build 1.6.0_31-b05 on win XP. But, I think, this is never mind. And the problem is exist in all early NB 7.x versions.
(In reply to comment #11) > I didn't understand you. Did you reproduced this bug ? Yes, I did. Btw, if you go to main manu Source | Scan for external changes it fix the problem. Ondra: FYI, as igorya wrote, reopening NB fixes it and I reproduce it with newly created class again
Vlada: yep, so it really seems that files are not scanned properly.
(In reply to comment #12) > (In reply to comment #11) > > > I didn't understand you. Did you reproduced this bug ? > > Yes, I did. Btw, if you go to main manu Source | Scan for external changes it > fix the problem. Yes, it works. But it does not always help on version 7.1.1 :(
I tried the same scenario as Vlada in comment #6 and it worked for me properly. I created new class in new subfolder, and then I created new object, in the second project, from that "new subfolder class" and tried to use CC for a method and it worked :( Product Version: NetBeans IDE Dev (Build 20120403-d05888281c3a) Java: 1.6.0_26; Java HotSpot(TM) Client VM 20.1-b02 System: Linux version 3.0.0-17-generic-pae running on i386; UTF-8; cs_CZ (nb) User directory: /home/warden/userdir Cache directory: /home/warden/userdir/var/cache
(In reply to comment #15) > I tried the same scenario as Vlada in comment #6 and it worked for me properly. > I created new class in new subfolder, and then I created new object, in the > second project, from that "new subfolder class" and tried to use CC for a > method and it worked :( > > Product Version: NetBeans IDE Dev (Build 20120403-d05888281c3a) > Java: 1.6.0_26; Java HotSpot(TM) Client VM 20.1-b02 > System: Linux version 3.0.0-17-generic-pae running on i386; UTF-8; cs_CZ (nb) This BUG is not depend from any products versions. And it exists in ALL 7.x NB version. Perhaps it also depends on the structure of the project. Please, make SIMPLY thing: If the user add/modify/remove any class constant/property/method then NB re-init project structure. Already there is no strength and patience :(
Finally I'm able to reproduce that, thanks Vlado :)
Láďo, could you provide steps to reproduce? I'm a bit confused :) Are the steps from comment #6 the right ones? Just reassign back to me, thanks.
(In reply to comment #18) > Láďo, could you provide steps to reproduce? I'm a bit confused :) Are the steps > from comment #6 the right ones? > > Just reassign back to me, thanks. Yes, they are :) I just reproduced it. You can omit closing the 2 projects and restarting NB. Simply create 2 projects and continue with Set Include path... Product Version: NetBeans IDE Dev (Build 201205020400) Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17 System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)
Sorry, works for me properly (steps from comment #6) in the current dev build. Product Version: NetBeans IDE Dev (Build 20121004-9e091c41a7f6) Java: 1.6.0_35; Java HotSpot(TM) 64-Bit Server VM 20.10-b01 System: Linux version 3.2.0-31-generic running on amd64; UTF-8; cs_CZ (nb)
God day. Anybody can fix this fucking BUG ?! From version 7.1 to 7.3 it still exists :((((((((((((((((((((
I can reproduce it in few steps. Both project can be in same folder, included folder can have arbitrary name. I also tried litte different code (without class) - see screenshots. 1. open NetBeans 2. create new projectA, create new projectB 3. create some folder in projectB 4. in projectA set include patch to projectB/createdFolder 5. in projectB/createdFolder create new PHP file 6. in that file CC doesn't work Project A location: C:\xampp\htdocs\projectA Project B location: C:\xampp\htdocs\projectB Product Version: NetBeans IDE 7.3.1 (Build 201305301707) Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b13 System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
Created attachment 135274 [details] CC problem with global variable
Created attachment 135275 [details] CC problem with class variable
It doesn't work with: <?php class Foo { function __c| <--- invoke CC here = no suggestions } ?> Normally CC shows with __call(), __callstatic(), __construct()...
Ondro, see comment #25 - these magic methods are provided automatically, right? Do you have any idea why in this case they are not in CC? Thanks.
Not so exactly. They are resolved by index as well. In CC there is this piece of code: request.index.getAccessibleMagicMethods(classElement) where classElement is ClassElement resolved by index...so if index doesn't return any class (which is the case why CC doesn't work in that directory) then "getAccessibleMagicMethods" is never called.
Imho the problem is, that indexer indexes that "testB/testfolder/Foo.php" file under the "testB/testfolder/" root...but CC (and corresponding IndexQueryImpl) searches "testB" root (and virtual FSs). The "testB/testfolder/" root is missing there. If one tries to complete that "testB/testfolder/Foo.php" class from "testA" project, it works properly, because "testB/testfolder/" root is included in IndexQueryImpl root list.
So, the problem is that you are putting "testFolder" and not the whole project on Include Path. In other words, instead of "testFolder", simply add Source Files of ProjectB and it will work. The reason is that nested source roots are not supported so we are going to add a check for it to the Include Path dialog. Thanks for repoting.
Done as written in my last comment. Thanks for reporting. http://hg.netbeans.org/web-main/rev/c5adc305f134
Integrated into 'main-golden', will be available in build *201306252301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/c5adc305f134 User: Tomas Mysik <tmysik@netbeans.org> Log: #208284 - Autocomplete does not work for new class properties, constants or methods
verified. thanks