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.
Hi guys. First off, thanks for making such a great IDE - I used to be an avid Eclipse user but these days I truly enjoy sitting down infront of NetBeans, good job! Let's get down to it, I am filing this under "enhancement", but what I'm hoping to get out of this ticket is really the information to "enhance" the IDE myself, because the one thing I have a gripe with when I code in NetBeans is the way its code completion works. I feel convinced that the "behavior" must somehow be modifiable, but I am unable to find anything about my exact issues in the settings - so I am hoping it's doable by editing some config file... Here's the thing, let's say I am coding an HTML-page, have my template ready and want to enter a new <span> element... so, I write: <span and hit Ctrl+Space to get the code completion up, and sure enough a "<span>" appears in the code-completion. Now... what I want to do, is modify the "code template" that effectively decides what happens when I select a code-completion element to insert. Right now, in the above usecase, all I get back is the same "<span"-entry I had already written - doesn't make much sense to me... For me, a much better result would be something like the following code-template: <span>${content}</span>${cursor} I'd likewise be able to customize several other "small parts" of the code-completion, not just for HTML but also for JavaScript. I am aware of the code-template feature, and yes I can get the above behaviour using that. But I am so used to always handle my completion with Ctrl+space, and I really see no reason why I shouldn't be able to customize that behavior aswell. Please tell me there is a way to do this... Thanks Regards, Cole
In JS files, it is supported since NetBeans 8.2. HTML is still missing :/
*** Bug 260755 has been marked as a duplicate of this bug. ***
(In reply to ChrisLE from comment #1) > In JS files, it is supported since NetBeans 8.2. HTML is still missing :/ If this is supported in the JS editor - how do I actually alter the code-completion for JavaScript? I don't really have much need for this, because the JS support is damn near spot on, but for my own curiosity how would it be done? Also, I'm a little amazed nothing new has happened on this topic. Using code-completion in HTML-editor, and selecting for example "<span>" from the popup, still leaves me hanging with an ugly- and incomplete "<span" to continue with. Surely this behavior must be modifiable ?
Thix ticket is not for altering the code completion for JS. If you want so, please ask in the forum or have a look here: https://netbeans.org/community/lists/top.html#dev if you want to add such functionality for HTML/XHML/XML to the NB core, please have a look in this ticket, how Petr Pisl did this: https://netbeans.org/bugzilla/show_bug.cgi?id=259167
So the altering of JS code completion is a really other topic than this. I would prefer to change this ticket to DEFECT instead of ENHANCEMENT(?)
Maybe the context is missing for HTML code templates. I have a plugin and HTML-Code is not working. Can someone give me the right context? I hope that there is a context, like in PHP and JavaScript. It is php-code and JavaScript-code.
Anything new here?
We need a consistency to all languages. You can set the context of PHP and JS, I think for Java too, so wee need to set this for HTML too. Otherwise, plugins which add code template are not working. Ok they will work, but a template like this: a-ngFor-trackBy is not easy to know.
I created the ticket at Apache Jira now: https://issues.apache.org/jira/browse/NETBEANS-95 if there is no other objection, I will close this ticket here, because it is already referenced in the other ticket.
As mentioned before, I created a ticket in the Apache Jira board.