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.
Before the java re-factoring, I was able to create ErrorEvents with line and column info for my post-compile step: Assuming I had an org.openide.src.Element element and JavaEditor, editor: javax.swing.text.Element textElement = editor.sourceToText((Element)element); if (textElement != null) { StyledDocument document = findDocument(editor); if (document != null) { int offset = textElement.getStartOffset(); line = NbDocument.findLineNumber(document, offset) + 1; column = NbDocument.findLineColumn(document, offset) + 1; } } After the refactoring, textElement is always null.
You are using undocumented implementation detail of the java module. You should use org.openide.cookies.SourceCookie.Editor.sourceToText() for the purposes you describe. That cookie was previously implemented directly on JavaEditor class, but in the current implementation it is provided from other source. Just ask the DataObject, or whatever Element for SourceCookie.Editor cookie and use the result instead of calling JavaEditor directly. I'll deprecate the obsolete methods.
Resolved for 3.3.x or earlier, no new info since then -> closing.
Resolved for 3.4.x or earlier, no new info since then -> closing.