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.
The SQL editor needs to tell whether an identifier is a SQL keyword for the purpose of syntax highligting. Currently it has a list of SQL keywords which is private to the db/sqleditor module. The j2ee/verifier module needs to warn about entity classes using SQL keywords as identifiers. In order not to copy-paste the list of keywords an API must be introduced which will be used by both the SQL editor and j2ee/verifier.
Created attachment 31011 [details] Propsed API (changes in the db/dbapi module)
Created attachment 31012 [details] Related changes in the SQL editor
I would like to ask for a review of the proposed API. It introduces a SQLKeywords class with methods for determining whether an identifier is a SQL-99 keyword. The API does not conceptually belong in the Database Explorer (the db module, the only one in the database area providing a public API). Thus I propose it for now is a friend API in the db/dbapi module. The changes are in the db/dbapi and db/sqleditor modules on the branch issue_77849. Tomasz, please use the API in j2ee/verification and post the diff here.
If there aren't any comments I will commit this tomorrow.
Integrated. Checking in db/dbapi/arch.xml; /cvs/db/dbapi/Attic/arch.xml,v <-- arch.xml new revision: 1.1.4.3; previous revision: 1.1.4.2 done Checking in db/dbapi/nbproject/project.properties; /cvs/db/dbapi/nbproject/Attic/project.properties,v <-- project.properties new revision: 1.1.4.4; previous revision: 1.1.4.3 done Checking in db/dbapi/nbproject/project.xml; /cvs/db/dbapi/nbproject/Attic/project.xml,v <-- project.xml new revision: 1.1.4.4; previous revision: 1.1.4.3 done Checking in db/dbapi/src/org/netbeans/modules/db/api/sql/SQLKeywords.java; /cvs/db/dbapi/src/org/netbeans/modules/db/api/sql/Attic/SQLKeywords.java,v <-- SQLKeywords.java new revision: 1.1.4.1; previous revision: 1.1 done Checking in db/dbapi/test/unit/src/org/netbeans/modules/db/api/sql/SQLKeywordsTest.java; /cvs/db/dbapi/test/unit/src/org/netbeans/modules/db/api/sql/Attic/SQLKeywordsTest.java,v <-- SQLKeywordsTest.java new revision: 1.1.4.1; previous revision: 1.1 done Checking in db/sqleditor/nbproject/project.xml; /cvs/db/sqleditor/nbproject/project.xml,v <-- project.xml new revision: 1.2.22.3; previous revision: 1.2.22.2 done Checking in db/sqleditor/src/org/netbeans/modules/db/sql/editor/Bundle.properties; /cvs/db/sqleditor/src/org/netbeans/modules/db/sql/editor/Bundle.properties,v <-- Bundle.properties new revision: 1.2.2.1.2.2; previous revision: 1.2.2.1.2.1 done Checking in db/sqleditor/src/org/netbeans/modules/db/sql/editor/SQLSyntax.java; /cvs/db/sqleditor/src/org/netbeans/modules/db/sql/editor/SQLSyntax.java,v <-- SQLSyntax.java new revision: 1.2.2.1.2.1; previous revision: 1.2.2.1 done Checking in ide/golden/deps.txt; /cvs/ide/golden/deps.txt,v <-- deps.txt new revision: 1.175.2.4.2.91; previous revision: 1.175.2.4.2.90 done Checking in ide/golden/friend-packages.txt; /cvs/ide/golden/friend-packages.txt,v <-- friend-packages.txt new revision: 1.15.4.1.2.93; previous revision: 1.15.4.1.2.92 done