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.
find usage of static methods don't return anyting refactoring don't work for static methods if methods don't have keyword "static" in front
I'm not sure that I understand you correctly. Please, provide me a test code where refactoring don't work and reopen this issue, thanks.
I've made some improvements in the trunk, so it could help you. http://hg.netbeans.org/web-main/rev/21c99e47726b
From that lucian has wrote he meant the 'Find Usages' is unable to find 'non-static function called statically' routines. I have the some issue in my project. Simple test code: <?php class CTest208309 { static function testStaticFunction($param) { echo('Hey, im the static one'); self::testAffectedFunction(); } function testAffectedFunction() { echo('Hey, im the non-static one but can be safely used statically as i'. 'do\'n depend on "this" and my class'); } } CTest208309::testStaticFunction(null); CTest208309::testAffectedFunction(); ?> If you gonna try to find usages for testStaticFunction is gonna be fine but if you search for usages of testAffectedFunction you gonna see only one result - the definition of the function itself. [b]obrejla[/b] Please see http://netbeans.org/bugzilla/show_bug.cgi?id=172035 there similar problem was fixed for Code Completion(With added options to:Editor->Code Completion->PHP: (1)Also static methods after "->" (2)Also non-static methods after "::"). Can be useful if similar thing and options(better in Per-Project mode) can be added for "Searching" but better to have one place for it(Not in Code completion and other places) but in PHP(Global/Per Project) options in some separate tab.
Yep I understand now. So we can make an enhancement from this issue since it's really not a defect. It could be implemented in some next release.
Created attachment 119116 [details] This patch adds support of $cl->staticRoutine() and clDef::nonStaticRoutine() to Find Usages and Auto-Highlight on selection with configuration taken from existing one from Options->Auto Complete->PHP Attached a patch which ads the respective support of 1) $classObject->someStaticRoutine(...) 2) {className/self/static}::someNonStaticRoutine(...) to 'Find Usages' and 'Automatic Highlight on Select'. Support is configurable via already existing options in Options->Code Completion::PHP-> 1) Also Static Methods after "->" 2) Also Non-Static Methods after "::". Please review the attached patch. I'm a C/C++/Asm/PHP/Shell developer(Not Java) so deep check for regressions need to be performed by some experienced NetBeans dev.
Thanks for the patch, its slightly modified version was applied (the code is a bit different now). Thanks. http://hg.netbeans.org/web-main/rev/07c87ae35a20