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.
[ BUILD # : 201012150001 ] [ JDK VERSION : 1.6.23 ] SQL highlighting is sometimes incorrect -- see attached screenshot.
Created attachment 104225 [details] screenshot
I can see this problem, probably depends on editor's infrastructure, will be consult with editor team.
I'm not able to reproduce it in recent builds. Probably fixed in editor. Reopen if it's appears again. Thanks
Reopened with repro case against 201204240400 (see screenshots). 1) Enter SQL in first screenshot ("select signup...") and run. Comment out and put different SQL ("select * from event") and run. 2) Remove second SQL statement and uncomment first one. Text remains grey as if a comment.
Created attachment 118698 [details] screenshot #1
Created attachment 118699 [details] screenshot #2
*** Bug 210011 has been marked as a duplicate of this bug. ***
Created attachment 119585 [details] proposed patch v1 The attached fix switches from a custom editor kit to the new editor infrastructure: - the SQLSyntax is replaced by directly using the already present SQLLexer and registering that as a language provider for mime-type text/x-sql. - the quoting help is replaced by a TypedTextInterceptor registered for mime-type text/x-sql. - the ident engine was removed completly, as I could not see any usable functionality. It should/will be replaced with patches in bug 155167 In my tests this fixes Glens test-case.
Created attachment 119586 [details] proposed patch v1 - part 2 - further cleanup
Created attachment 119648 [details] proposed patch v2
Great job, thank you, Matthias. Just a detail, it seems that the change causes a tiny regression. Can I change INCOMPLETE_STRING("sql-string-literal") to INCOMPLETE_STRING("sql-errors"), so that incomplete string literals are still marked as errors (underlined)?
Yes your right - I could reproduce the problem and your proposed change fixed that. Please go ahead - thanks for catching that!
http://hg.netbeans.org/core-main/rev/fd99cc5effc5 Patch applied. Thank you again!
Integrated into 'main-golden', will be available in build *201205240002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/fd99cc5effc5 User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #193557 - SQL highlight incorrect