Bug 77849

Summary: Introduce an API for recognizing SQL keywords
Product: db Reporter: Andrei Badea <abadea>
Component: CodeAssignee: Andrei Badea <abadea>
Status: RESOLVED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P2 CC: apireviews, tslota
Version: 5.xKeywords: API, API_REVIEW_FAST
Target Milestone: 5.x   
Hardware: All   
OS: All   
Whiteboard:
Issue Type: ENHANCEMENT Exception Report:
Bug Depends on:    
Bug Blocks: 74481    
Attachments: Propsed API (changes in the db/dbapi module)
Related changes in the SQL editor

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
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo