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 the New File dialog, there should be a "New JET Module" template. On completion of the wizard, two files should be created with the same name, e.g., 'home.js' and 'home.html'. They should be created in two different folders, i.e., the user should be able to select a folder for the JS file and a folder for the HTML file. The default folder for the JS file should be 'js/viewModels' and for the HTML file 'js/views'. There should be skeleton content in the two files. I.e., in the JS file there should be a JQuery 'define' block, with one observable property, while in the HTML file that property should be used, e.g., via a 'data-bind' attribute in a 'span' element.
Assigning to Tomas.
In which category this New File template should be? HTML5/JavaScript? Thanks.
BTW I also need content for these 2 files - please reopen this issue and provide them. Thanks.
https://github.com/GeertjanWielenga/SmartTools4OracleJET/tree/master/src/org/netbeans/modules/st4oj/resources/empty
Yes, in HTML5/JavaScript category.
Actually, please also add another file template, in addition to the above, with the two files below -- i.e., there'll be two file templates, one named "Empty" and the other named "Knockout.js". For "Knockout.js", use the two files below: https://github.com/GeertjanWielenga/SmartTools4OracleJET/tree/master/src/org/netbeans/modules/st4oj/resources/kohelloworld
PS -- display names: "Empty JET Module" and "Knockout JET Module"
(In reply to Geertjan Wielenga from comment #0) > the user should be > able to select a folder for the JS file and a folder for the HTML file. BTW I just noticed it - unfortunately, this is not easily doable [1] with the current NB APIs. What we can do is: (a) select folder for e.g. JS file and try to guess the location for the HTML file - is this even possible? or (b) create 2 New File wizards - one for HTML file and one for the JS file. Any preferences? Again, reopen this issue, thanks. [1] We could perhaps use a "bottom" panel for it but not sure if it is OK (my understanding is that the "bottom" panel should provide more information for the new file like package for new Java class etc.)
At the end I was able to fix it as originally requested. Please verify, thanks. http://hg.netbeans.org/web-main/rev/7de1ad728041
Integrated into 'main-silver', will be available in build *201603110002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/7de1ad728041 User: Tomas Mysik <tmysik@netbeans.org> Log: #257220 - New JET Module file wizard