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.
This bug was originally marked as duplicate of bug 268660, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related. Build: NetBeans IDE 8.2 (Build 201705191307) VM: Java HotSpot(TM) 64-Bit Server VM, 25.102-b14, Java(TM) SE Runtime Environment, 1.8.0_102-b14 OS: Windows 10 User Comments: GUEST: Working on a React JSX file doing code formatting. GUEST: while formatting ES6 sanhome: JSX file editing ralphbenjamin: format js code sanhome: Formatting in JSX. Open JSX file for editing, make some changes, hit Shift+Alt+F GUEST: editing GUEST: Problem sanhome: Formatting of JSX code. Gary.A.Peach: normal operation GUEST: ? Gary.A.Peach: formatting jsx jmail: It was silent error - I do not know what has happened GUEST: throw error when format javascript code of react.the code has include jsx tags,I think this error's reason is netbeans support react not perfect. GUEST: An exception is thrown when I right click the mouse and select "Format". Code completion using TAB also don't work, for example if I type "cl" then TAB, an exception is also thrown. var React = require('react'); var AddItem = React.createClass({ render: function () { return ( <form id="add-todo" onSubmit={this.handleSubmit}> <input type="text" required ref="newItem"/> <input type="submit" value="Hit me"/> </form> ); }, handleSubmit: function() { console.log(this.refs.newItem); } }); module.exports = AddItem; Gary.A.Peach: trying to format jsx Stacktrace: java.lang.NullPointerException at org.netbeans.modules.javascript2.editor.formatter.JsFormatVisitor.getStart(JsFormatVisitor.java:1451) at org.netbeans.modules.javascript2.editor.formatter.JsFormatVisitor.enterJsxAttributeNode(JsFormatVisitor.java:218) at com.oracle.js.parser.ir.JsxAttributeNode.accept(JsxAttributeNode.java:66) at com.oracle.js.parser.ir.Node.accept(Node.java:280) at com.oracle.js.parser.ir.JsxElementNode.accept(JsxElementNode.java:85) at com.oracle.js.parser.ir.ReturnNode.accept(ReturnNode.java:74)
Created attachment 164656 [details] stacktrace