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.
Summary: | CDI beans names not listed in autocomplete window | ||
---|---|---|---|
Product: | javaee | Reporter: | GeraldoLuiz |
Component: | JSF Editor | Assignee: | Marek Fukala <mfukala> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | ads, dkonecny, justinwyer, mfukala, mmocnak, mschovanek, pjiricka, sustaining |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | Windows 7 x64 | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
GeraldoLuiz
2009-12-15 17:28:12 UTC
The JSR-299 Context and Dependency Injection (CDI) is part of Java EE 6 Specification so its features should be integrated into netbeans autocomplete and code assist system. This is actually pretty important because there is a strong sentiment by some in the JSF expert group that @Named should be preferred to @ManagedBean in most cases. It would be a shame if people got lured into @ManagedBean just because of the IDE support. This is serious deficiency which needs to be amended ASAP. For now I'm assigning it to you Denis. I have added API methods into Web Beans model which allow to get Java Elements with @Named annotation. Also there is a method which returns "named" value . So I reassign this issue into JSF area. It would also need to resolve elements (methods or fields) which are annotated with @Produces as these can also be used within EL expressions. (In reply to comment #6) > It would also need to resolve elements (methods or fields) which are annotated > with @Produces as these can also be used within EL expressions. Ignore this, the @Named annotation would be required in addition to @Produces in this case. should be fixed in web-main#826629b831a0 As for the CDI support module, there used to be no public packages exposed, so supposing this wasn't intentional, I exposed the api package as fried to the web.jsf.editor module. I know wery little of what are the plans for this module regarding the api level, so whoever is involved, please review and possibly take appropriate actions. By the way, I must do emphasize that the EL support code is a mess and needs to be redone from scratch. The fix is made with respect to this fact. Integrated into 'main-golden', will be available in build *201001150201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/826629b831a0 User: Marek Fukala <mfukala@netbeans.org> Log: #178687 - CDI beans names not listed in autocomplete window Additional important fix which needs to be put into the patch as well! web-main#56083e99ed95 - proper handling of web beans names. verified. 100118-a10216e72f6c (web-main) Integrated into 'main-golden', will be available in build *201001190201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/56083e99ed95 User: Marek Fukala <mfukala@netbeans.org> Log: #178687 - additional fix: proper handling of web beans names The changeset http://hg.netbeans.org/main-golden/rev/56083e99ed95 uses the method WebBeansModel.getNamedElements(). The mentioned method has been introduced by following the changeset http://hg.netbeans.org/main-golden/rev/65946d78b9f8 however a "simple" port doesn't work because a new implementaion of WebBeansModelProvider is needed. Could you please provide a changeset for the method WebBeansModel.getNamedElements() and its implementation applicable in the release68_fixes branch? The fix has been ported into the release68_fixes repository. http://hg.netbeans.org/release68_fixes/rev/2813fdcf740e The fix has been ported together with the bugfix of issue #179629. If a rollback is needed, both issues have to be skipped together. Since the port is non-trivial (please see the changeset), please consider wider and deeper testing. verified in 68_fixes build NetBeans IDE 6.8 (Build 201001261800) Thanks for this enhancement. Netbeans is, without any dounbt, the best IDE around, and it gets even better with this theese quick responses to the community requests. Geraldo. Thanks for the words of support Geraldo! It is always good to get a feedback and even better if it is positive one. :-) FYI: http://wiki.netbeans.org/NewAndNoteworthy69m1#Context_and_Dependency_Injection lists new CDI features. |