When you write code in a namespace and use functions and constants from "root" namespace (like built-un functions and constants) autocompletition inserts a function/constant name with a backslash.
$dir = __D[ctrl+space] -> \__DIR__
$includePath = get_inc[ctrl+space] -> \get_include_path()
Name resolving for functions and constants is different from resolving classes: backslash is not required. Moreover, backslash is not used in modern coding standards for such situations.
So it will be cool to have another default behaviour for root functions and constants, or just an option in settings to change it.
$dir = __D[ctrl+space] -> __DIR__
$includePath = get_inc[ctrl+space] -> get_include_path()
Backslash prefixing global functions was removed.
Related "function backslash" bug. http://netbeans.org/bugzilla/show_bug.cgi?id=187674
Fixed in web-main: http://hg.netbeans.org/web-main/rev/598be003369f
I would like to transplat it into 7.0. Could I ask QA to test it? Thanks.
Integrated into 'main-golden', will be available in build *201103280400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Ondrej Brejla <OndrejBrejla@netbeans.org>
Log: #191495 - Autocomplete of functions and constants from "root" namespace
The fix was transplanted to the release70
To Whom It may concern,
Can someone help me to remove this backslash prefixing?
I am using mac and this backslash always show when I select Classes or Functions in the dropdown of the autocomplete.
Much appreciated your help.
Thank you and regards,
(In reply to OndrejBrejla from comment #1)
> Backslash prefixing global functions was removed.
Do not reopen verified and fixed issues, thanks. Especially if you just have a question. If you have some problem, try the latest dev build (e.g. 8.0 RC1 ) and if the problem persists, then file a new issue a describe step-by-step reproducible test case. Thanks.