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 142459

Summary: SQL CC: No alias after quote
Product: db Reporter: Roman Mostyka <romanmostyka>
Component: SQL EditorAssignee: Jiri Skrivanek <jskrivanek>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Roman Mostyka 2008-07-31 19:08:27 UTC
1. Connect to DB.
2. Open SQL Editor and type "select " from travel.person p".
3. Place cursor after 'select "' and press Ctrl+Space.

Result: The code completion list appears, but there is no alias in it.
Comment 1 Andrei Badea 2008-08-01 11:18:58 UTC
Not fixable currently. The CC lexer sees the quote after SELECT as the beginning of a quoted identifier which extends up
to the end of the statement. Perhaps the CC lexer should be different from the highlighting lexer and should send tokens
such as QUOTED_ID_START and QUOTED_ID_END. That would at least allow the CC to do some heuristic.
Comment 2 Andrei Badea 2008-08-01 11:19:40 UTC
*** Issue 142460 has been marked as a duplicate of this issue. ***
Comment 3 Andrei Badea 2008-08-01 16:05:39 UTC
*** Issue 142460 has been marked as a duplicate of this issue. ***
Comment 4 Roman Mostyka 2008-08-08 16:23:56 UTC
*** Issue 143308 has been marked as a duplicate of this issue. ***
Comment 5 David Vancouvering 2008-11-14 21:50:05 UTC
I can still reproduce using 
  
  select ab. from "actor" ab

- no completion after the '.'

Comment 6 Jiri Rechtacek 2009-02-10 15:13:48 UTC
Reassigned to new owner.
Comment 7 Jiri Skrivanek 2009-08-21 10:45:47 UTC
If quote is typed, it is completed by second quote. Thus it preserves validity of statement and SQL code completion
works. If pair quote is removed it still doesn't work but it is a corner case.
To verify type " and Ctrl+Space in

select ab.| from "CUSTOMER" ab

This will not work

select ab."| from "CUSTOMER" ab

core-main #09065f76df37
Comment 8 Quality Engineering 2009-08-22 06:29:38 UTC
Integrated into 'main-golden', will be available in build *200908220201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/09065f76df37
User: Jiri Skrivanek <jskrivanek@netbeans.org>
Log: #142459 - If quote is typed, it is completed by second quote. Thus it preserves validity of statement and SQL code completion works. Also if completion is called within closed quotes, it doesn't add redundant quotes.