apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.68k stars 854 forks source link

JakartaEE Auto complete of @Named Managed Beans not working in Netbeans 14 #4338

Closed bercolax closed 1 year ago

bercolax commented 2 years ago

Apache NetBeans version

Apache NetBeans 14

What happened

I have created a Maven built JakartaEE 9 web application in Netbeans 14. Other things are working fine. But in the JSF page, I am not able to see the EL auto complete displaying the list of @Named beans. As the packages have been renamed jakarta (replacing javax), may be the changes must be done in the related modules to list the @jakarta.inject.Named annotated Java classes in the EL autocomplete. The navigation from the EL in the JSF page to the Java source code of the jakarta.inject.Named annotated Java classes is also not happening.

How to reproduce

Did this work correctly in an earlier version?

No

Operating System

Ubuntu 20+, Windows 11

JDK

JDK 11

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

Every time

Are you willing to submit a pull request?

No

Code of Conduct

Yes

grantleyT commented 2 years ago

same problem. NB 13 and 14 if you hard code el link in it works fine, but will not display. Using Payara Community server, followed their Jakarta EE 9 tutorial where the same el worked perfectly on IntelliJ platform. If you just import Javax.inject.Name it displays correctly in NB.

bercolax commented 2 years ago

I guess in the NB plugin must do a Search javax and replace with jakarta and publish this as an add on plugin for those who want to work with Jakarta EE 9 onwards.

javierllorente commented 2 years ago

I can still reproduce this issue with NetBeans 15 and 16-rc1.

grantleyT commented 2 years ago

Same here, I tried it last night with the Jakarta 9.1 compatible Glassfish Server. Still no luck!

On Sat, 22 Oct 2022, 6:13 am Javier Llorente, @.***> wrote:

I can still reproduce this issue with NetBeans 15 and 16-rc1.

— Reply to this email directly, view it on GitHub https://github.com/apache/netbeans/issues/4338#issuecomment-1287344014, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANAJPVJWKM2KGA64UYYMAQ3WELTNFANCNFSM52YNK3CQ . You are receiving this because you commented.Message ID: @.***>

bercolax commented 2 years ago

Incase we can get involved and help, kindly let me know. Will be happy to get involved. We can have two jars for related plugin. Users working with the jakartaee packages can uninstall the javax.xxx plugin and install the jakartaee.xxx plugin.

bercolax commented 1 year ago

Can any one please tell if this has been fixed in Netbeans 16? (released on Nov 30, 2022)

menny68 commented 1 year ago

Cdi beans annotated with jakarta.inject.Named stil not detected in NetBeans 16

In a maven web application with jakartaee 9.1 and facelets when try auto complete in #{} expression are till proposed beans with javax namespace instead of jakarta namespace e.g. javax.servlet.http.httpsession

Screenshot from 2022-12-11 18-01-43

juneau001 commented 1 year ago

I had done some work on this issue earlier this year but the PR was not submitted in time for release. I need to perform a diff against the latest code and my working branch to try and determine what is still causing this issue. Will try to get this done soon. Sorry for the delay.

grantleyT commented 1 year ago

Ok, thanks for the update.

On Mon, 12 Dec 2022, 12:22 pm Josh Juneau, @.***> wrote:

I had done some work on this issue earlier this year but the PR was not submitted in time for release. I need to perform a diff against the latest code and my working branch to try and determine what is still causing this issue. Will try to get this done soon. Sorry for the delay.

— Reply to this email directly, view it on GitHub https://github.com/apache/netbeans/issues/4338#issuecomment-1345737041, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANAJPVJLSZXVMNPCS7ERP3LWMZ44LANCNFSM52YNK3CQ . You are receiving this because you commented.Message ID: @.***>

bercolax commented 1 year ago

I had done some work on this issue earlier this year but the PR was not submitted in time for release. I need to perform a diff against the latest code and my working branch to try and determine what is still causing this issue. Will try to get this done soon. Sorry for the delay.

Thanks for the reply and the update.

king-martinien commented 1 year ago

hello, I have the same problem (cannot detect CDI beans in xhtml files ). i'm using Netbeans 14 and jakartaEE 10 with the compatible eclipse glassfish server.

king-martinien commented 1 year ago

hello, I have the same problem (cannot detect CDI beans in xhtml files ). i'm using Netbeans 14 and jakartaEE 10 with the compatible eclipse glassfish server.

Now i have downloaded Netbeans 17 and the problem is still there.

OnElectric commented 1 year ago

Hi, the only way I have been able to use autocompletions in jsp is by adding the javax.servlet-api library with java 11. Does anyone know another way? Since for everything to be correct when we compile jsp, we must remove that library so that it uses jakarta instead of javax. Thank you

AmilMammadli commented 1 year ago

in netbeans 17 and jdk 20, autocomplete does not work between <%%> in jsp file, please help

llufti commented 1 year ago

Unfortunately it was not possible to solve this problem I am using 17 without success the problem is that this is an essential tool for development making programming much easier did anyone succeed?

juneau001 commented 1 year ago

This is the same as issue #4035. I currently have a PR to repair that issue in progress.

apapamarkou commented 1 year ago

Still have this issue. MacOsx , Windows, Linux Netpeans 14, 16, 17.

asbachb commented 1 year ago

@bercolax @apapamarkou @grantleyT @menny68

Should be fixed in NetBeans 18. Would be nice if someone could double check so that we can close the issue.

astain commented 1 year ago

Issue is still present for me in 18, no named beans discovered, no EL auto-completion in projects that use JakartaEE.

asbachb commented 1 year ago

Fixed with #6160

bercolax commented 1 year ago

Installed Netbeans 19 and verified that the issue has been fixed. Thanks a lot.