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 204410

Summary: autocomplete don't work as expected on group by and
Product: db Reporter: medeag
Component: SQL EditorAssignee: Jaroslav Havlin <jhavlin>
Status: RESOLVED FIXED    
Severity: normal CC: adeelRaza
Priority: P3 Keywords: NETFIX
Version: 7.1   
Hardware: Macintosh   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:
Attachments: Code Completion on GROUP BY
proposed patch v1

Description medeag 2011-10-30 14:08:48 UTC
Product Version: NetBeans IDE Dev (Build 201110290600)
Java: 1.6.0_26; Java HotSpot(TM) 64-Bit Server VM 20.1-b02-384
System: Mac OS X version 10.6.8 running on x86_64; MacRoman; ka_GE (nb)

I intended to type following query(from specs):

select tb from my_table tb  GROUP BY 1 

but i couldn't  invoke autocomplete on GROUP after i typed tb ,  same goes for "order by" instead of "group by"
Comment 1 Jiri Rechtacek 2011-10-31 14:05:59 UTC
Created attachment 112599 [details]
Code Completion on GROUP BY

Works for me on 
  Product Version         = NetBeans IDE Dev (Build 20111031-d6562f82b82f) (#d6562f82b82f)
  Operating System        = Linux version 3.0.0-12-generic running on amd64
  Java; VM; Vendor        = 1.7.0; Java HotSpot(TM) 64-Bit Server VM 21.0-b17; Oracle Corporation
  Runtime                 = Java(TM) SE Runtime Environment 1.7.0-b147
  Java Home               = /usr/local/share/java/jdk1.7.0/jre
  System Locale; Encoding = en (nb); UTF-8

Could you verify it's working for you on the same connection? Thanks
Comment 2 Jiri Rechtacek 2011-10-31 14:06:21 UTC
Works for me on 
  Product Version         = NetBeans IDE Dev (Build 20111031-d6562f82b82f)
(#d6562f82b82f)
  Operating System        = Linux version 3.0.0-12-generic running on amd64
  Java; VM; Vendor        = 1.7.0; Java HotSpot(TM) 64-Bit Server VM 21.0-b17;
Oracle Corporation
  Runtime                 = Java(TM) SE Runtime Environment 1.7.0-b147
  Java Home               = /usr/local/share/java/jdk1.7.0/jre
  System Locale; Encoding = en (nb); UTF-8

Could you verify it's working for you on the same connection? Thanks
Comment 3 medeag 2011-10-31 14:12:23 UTC
Just saw the attachment, that it is not what i have meant:
type for e.g "gr" and then invoke autocomplete, it should suggest group by but id doesn't.
The only keyword that autocompleted is "where"

Thanks,
Medea
Comment 4 matthias42 2011-11-20 15:52:47 UTC
Created attachment 113347 [details]
proposed patch v1

(In reply to comment #3)
> Just saw the attachment, that it is not what i have meant:
> type for e.g "gr" and then invoke autocomplete, it should suggest group by but
> id doesn't.
> The only keyword that autocompleted is "where"

The attached patch makes GROUP and ORDER recognized keywords in the FROM-Context, which should do the trick.
Comment 5 matthias42 2011-11-25 19:51:47 UTC
*** Bug 194173 has been marked as a duplicate of this bug. ***
Comment 6 Jaroslav Havlin 2012-05-22 13:55:11 UTC
http://hg.netbeans.org/core-main/rev/59236b70d544
Patch applied. Thank you, Matthias.
Comment 7 Quality Engineering 2012-05-24 05:29:30 UTC
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/59236b70d544
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #204410 - autocomplete don't work as expected on group by