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.
In PHP files the dollar sign code completion doesn't offer suggestions of IDs and Classes as it does in HTML files. So the following code ( "|" = current position ) would offer no suggestions if it was in a php file, but would in an html file. ----- <div id="box"> </div> <script type="text/javascript"> $(|).hide(); </script> ----- This is a major hindrance to my workflow. Thanks for any help you can provide.
Petr, could somebody evaluate this issue ASAP ? Thanks in advance.
I suppose the correct code sample is: $("|").hide(); ... the caret it inside a string literal. In this case the jquery completion works fine in html files, but anywhere else it doesn't. Just from a quick glimpse to the code I found: JsCodeCompletion:881: ... private void addElementIds(final List<CompletionProposal> proposals, final CompletionRequest request, final String prefix) { Source source = request.info.getSnapshot().getSource(); if (source.getMimeType().equals(JsUtils.HTML_MIME_TYPE)) { ... which clearly says it won't work anywhere else then in text/html mimetype files. The same condition is used for classes and tag names. It is there from the year 2008. Even if this is quite nasty bug it is not P1 at all => downgrading. I'll fix it i 7.1 repository a bit later.
Thanks! So what does that translate to in terms of seeing a useable fix?
Fixed in web-main http://hg.netbeans.org/web-main/rev/9680be90d6c4 Reporter could you please test it in the next daily build. Thanks.
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/9680be90d6c4 User: Petr Pisl <ppisl@netbeans.org> Log: #200276 - JQuery Dollar Sign ($) Code Completion for IDs and Classes not Working in PHP files
Verified, it works the same way in php and html files, but I found #202539 (autocompletion is performed instead of simple completion). Product Version: NetBeans IDE 7.1 Beta (Build 201109222201) Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17 System: Linux version 2.6.38-11-generic running on i386; UTF-8; en_US (nb)