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.
Summary: | Code templates should expand from embedded languages' templates | ||
---|---|---|---|
Product: | editor | Reporter: | jamespb <jamespb> |
Component: | Completion & Templates | Assignee: | Vitezslav Stejskal <vstejskal> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | pjiricka, tor |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | Windows Vista | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
jamespb
2007-11-10 20:12:47 UTC
(As far as I know, this has never worked) The problem is in the editor code templates code; it needs to check abbreviations in embedded languages, such that when you're in JavaScript it expands JavaScript code templates, in HTML the HTML templates, and so on. Yeah, this needs to be fixed. Currently the editor uses codetemplates from a top-level language _anywhere_ in a file. Given a choice between 1. erb files use Ruby templates, and there's no way to define templates just for an *.html.erb file 2. erb files and Ruby files have completely different code templates, so I can define templates that only work in *.html.erb files, and different templates in *.css.erb, etc. I'd definitely choose #1. When I'm editing foo.html.erb, and I'm in a <% %> section, I'm writing Ruby; it's very surprising that the code templates I use all the time don't work. I'm working on this one now. Should be working now. I also updated ruby.rhtml to make both its ruby and rhtml templates work. James, we did #1. changeset 329dd78d09a7 in main details: http://hg.netbeans.org/main?cmd=changeset;node=329dd78d09a7 changeset 3275161479d9 in main details: http://hg.netbeans.org/main?cmd=changeset;node=3275161479d9 |