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 180426 - Code completion in EL confuses the object to complete on
Summary: Code completion in EL confuses the object to complete on
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
: 90341 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-02-08 06:08 UTC by Petr Jiricka
Modified: 2010-02-19 13:41 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Attaching a screenshot. (173.97 KB, image/png)
2010-02-08 06:12 UTC, Petr Jiricka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2010-02-08 06:08:09 UTC
1. Create a Java EE 6 web application with JSF
2. Create CRUD application using Entity Classes from DB and JSF pages from Entity Classes.
3. Open List.xhtml
4. Invoke code completion here: #{item.|customerId} - | marks caret position

Applicable possibilities from the 'item' object are not found, instead, completion seems to pick up possibilities from the 'items' object.
Comment 1 Petr Jiricka 2010-02-08 06:12:34 UTC
Created attachment 93959 [details]
Attaching a screenshot.
Comment 2 Marek Fukala 2010-02-08 08:16:18 UTC
reproducible, the Collection's methods are offered.
Comment 3 Marek Fukala 2010-02-17 13:31:07 UTC
*** Bug 90341 has been marked as a duplicate of this bug. ***
Comment 4 mithridates 2010-02-17 14:07:00 UTC
Although it is a defect/regression, priority is P2 and target is 6.9? 
Hmm.
I took a brief look at the sources for myself, but I had no clue ;-)
Comment 5 Marek Fukala 2010-02-18 04:34:47 UTC
It's actually not a regression. It never worked for classes implementing Iterable, only when a method with Iterable return type was used as a value attribute.

fixed in web-main#7d061b22143d

but there are still issues... I tried some more complicated scenarios which didn't work. However given the state of code I am not willing to do more such fixes into it since it is really ugly implemented and I would have to redone it from scratch to be able to precisely follow the EL rules.

mithridates, please verify if you can on as much cases as possible. I wonder if the broken cases I ment above happens in real world applications. Thanks in advance.
Comment 6 mithridates 2010-02-18 08:08:50 UTC
(In reply to comment #5)

> fixed in web-main#7d061b22143d

So it will be available in the next nightly build, right? Or will I have to buid for myself? (hadn't tried that before, maybe a good exercise ;-)

> However given the state of code I am not willing to do more such 
> fixes into it since it is really ugly implemented and I would have to redone it
> from scratch to be able to precisely follow the EL rules.

Exactly what I was expecting after looking at the code and reading your comments ;-)

> mithridates, please verify if you can on as much cases as possible. I wonder if
> the broken cases I ment above happens in real world applications. Thanks in
> advance.
Yes of course I will do. If necessary: should I file new issues with reference to this one?
Comment 7 Marek Fukala 2010-02-18 08:29:44 UTC
(In reply to comment #6)
> So it will be available in the next nightly build, right? Or will I have to
> buid for myself? (hadn't tried that before, maybe a good exercise ;-)
During one day it should be merged into the main build, then a message will be put here by the infrastructure.

> > the broken cases I ment above happens in real world applications. Thanks in
> > advance.
> Yes of course I will do. If necessary: should I file new issues with reference
> to this one?
That would be nice. Thanks.
Comment 8 Quality Engineering 2010-02-18 21:49:28 UTC
Integrated into 'main-golden', will be available in build *201002190200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/7d061b22143d
User: Marek Fukala <mfukala@netbeans.org>
Log: #180426 -  Code completion in EL confuses the object to complete on
Comment 9 mithridates 2010-02-19 13:41:13 UTC
(In reply to comment #7)
> (In reply to comment #6)

> > > the broken cases I ment above happens in real world applications. Thanks in
> > > advance.
> > Yes of course I will do. If necessary: should I file new issues with reference
> > to this one?
> That would be nice. Thanks.

First: 
Completion for var-variable of datatable is ok with build 201002190200. 

But as You stated above, there are still some problems. In the next days I will outline these points and File a new Issue.