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.

Bug 77849 - Introduce an API for recognizing SQL keywords
Summary: Introduce an API for recognizing SQL keywords
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords: API, API_REVIEW_FAST
Depends on:
Blocks: 74481
  Show dependency tree
 
Reported: 2006-06-13 18:47 UTC by Andrei Badea
Modified: 2006-07-17 13:57 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Propsed API (changes in the db/dbapi module) (24.32 KB, text/plain)
2006-06-13 18:59 UTC, Andrei Badea
Details
Related changes in the SQL editor (8.64 KB, text/plain)
2006-06-13 19:00 UTC, Andrei Badea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Badea 2006-06-13 18:47:48 UTC
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.
Comment 1 Andrei Badea 2006-06-13 18:59:58 UTC
Created attachment 31011 [details]
Propsed API (changes in the db/dbapi module)
Comment 2 Andrei Badea 2006-06-13 19:00:31 UTC
Created attachment 31012 [details]
Related changes in the SQL editor
Comment 3 Andrei Badea 2006-06-13 19:06:53 UTC
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.
Comment 4 Andrei Badea 2006-06-20 15:28:42 UTC
If there aren't any comments I will commit this tomorrow.
Comment 5 Andrei Badea 2006-06-21 17:42:31 UTC
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