Bug 579170 - Project Explorer / Package Presentation / Hierarchically: Regression
Summary: Project Explorer / Package Presentation / Hierarchically: Regression
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.25 (2022-03)   Edit
Hardware: All Linux
: P3 normal with 5 votes (vote)
Target Milestone: 3.26   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords: regression
: 579386 579446 579652 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-03-09 11:36 EST by Ralf Naujokat CLA
Modified: 2022-07-07 21:12 EDT (History)
14 users (show)

See Also:


Attachments
Screenshot from Eclipse 2021-12 (214.28 KB, image/png)
2022-03-15 10:02 EDT, Ralf Naujokat CLA
no flags Details
Screenshot from Eclipse 2022-03 (252.45 KB, image/png)
2022-03-15 10:03 EDT, Ralf Naujokat CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Naujokat CLA 2022-03-09 11:36:32 EST
Since Eclipse 2022-03-M3 the Package Representation has changed.
Now the full qualified package name is used, when set to 'Hierarchical'.
The fomer presentation showed an optimized shorter package name,
displaying only the changed part of name, compared to the parent name,
which was much more readable in the tree view.

-- Configuration Details --
Product: Eclipse IDE 4.23.0.20220303-1200 (org.eclipse.epp.package.jee.product)Installed Features:
 org.eclipse.platform 4.23.0.v20220223-1800
Comment 1 Rolf Theunissen CLA 2022-03-15 08:51:50 EDT
I tried reproducing your issue, but I either cannot reproduce it on newer releases or I don't understand your problem.

Can you still reproduce it on RC2? If so, could you add some screenshots that show the problem.
Comment 2 Ralf Naujokat CLA 2022-03-15 09:42:44 EDT
I don't find a download for RC2. Where is it?
I am looking here:
https://www.eclipse.org/downloads/packages/release/2022-03/rc1
In the dropdown menu 'Eclipse Developer Builds' is only RC1
Comment 3 Rolf Theunissen CLA 2022-03-15 09:48:07 EDT
(In reply to Ralf Naujokat from comment #2)
> I don't find a download for RC2. Where is it?
> I am looking here:
> https://www.eclipse.org/downloads/packages/release/2022-03/rc1
> In the dropdown menu 'Eclipse Developer Builds' is only RC1

As of tomorrow it will be generally available, now you can download it here:
https://download.eclipse.org/technology/epp/downloads/release/2022-03/R/
Comment 4 Ralf Naujokat CLA 2022-03-15 10:02:44 EDT
Created attachment 288219 [details]
Screenshot from Eclipse 2021-12
Comment 5 Ralf Naujokat CLA 2022-03-15 10:03:09 EDT
Created attachment 288220 [details]
Screenshot from Eclipse 2022-03
Comment 6 Ralf Naujokat CLA 2022-03-15 10:06:37 EDT
I have added two screenshots, where you can see the different presentation.
Both versions have it set to 'hierarchical'.
Comment 7 Ralf Naujokat CLA 2022-03-15 10:08:08 EDT
Forgot to mention: Eclipse 2022-03 is Version RC2.
Comment 8 Rolf Theunissen CLA 2022-03-15 10:08:51 EDT
Moving to JDT UI for investigation.
Comment 9 Jeff Johnston CLA 2022-03-15 17:24:58 EDT
(In reply to Rolf Theunissen from comment #8)
> Moving to JDT UI for investigation.

I am unable to reproduce this on Linux.  I have the EPP: Eclipse IDE for Committers 2022-03 RC2 installed.  I also have Eclipse JDT checkout out.  For both the Project Explorer and Package Explorer, switching from Flat to Hierarchical works exactly as expected for org.eclipse.jdt.core and org.eclipse.jdt.ui.

I do not have access to a Mac to see if this is OS related.
Comment 10 Rolf Theunissen CLA 2022-03-16 04:43:35 EDT
I wasn't able to reproduce it on Windows either, with only eclipse plug-ins in my workspace.

Might be related to maven projects too.
Comment 11 Ralf Naujokat CLA 2022-03-16 04:53:45 EDT
Ok, i will check it with a complete new workspace,
maybe it is related to reusing a 2021-12 workspace.

BTW, i have the same behavior on linux and macos.
Comment 12 Ralf Naujokat CLA 2022-03-16 05:13:49 EDT
My findings:

Moving a project to a new empty folder and using this folder 
as a new workspace (no .metadata) i got the same unwanted result 
after importing the existing maven project.

Doing the same but deleting all .project and .settings files/folders
before importing the project finally gave me the nice and clean presentation 
again.

Ok, my bad, sorry for not checking this before reporting,
but with switching between eclipse versions 2021-12 and 2022-03
i could see the change in presentation from bad to ugly.

So i think, this must be something in the .settings.
No idea, if it's worth further checking.
Comment 13 Ralf Naujokat CLA 2022-03-16 13:34:44 EDT
Sorry to tell you, but it's back again.

Again downloaded fresh Eclipse 2022-03-R,
created new clean workspace,
copied all projects to new workspace,
deleted all .project and .settings,
started eclipse and imported all maven projects,

and my unwanted presentation is back.

I really don't know, what's the different.
Comment 14 Jeff Johnston CLA 2022-03-16 14:12:14 EDT
(In reply to Ralf Naujokat from comment #13)
> Sorry to tell you, but it's back again.
> 
> Again downloaded fresh Eclipse 2022-03-R,
> created new clean workspace,
> copied all projects to new workspace,
> deleted all .project and .settings,
> started eclipse and imported all maven projects,
> 
> and my unwanted presentation is back.
> 
> I really don't know, what's the different.

Maybe it is the type of project.

I just downloaded the eclipse for Java Developers EPP that is official today.  I created a simple Java project and created two packages (javaproj and javaproj.javaproj2) each with a class.  Switching back and forth between flat and hierarchical does exactly as expected.

Can you try a simple case like this to at least narrow down if this works for you?
Comment 15 James Stevenson CLA 2022-03-16 14:17:39 EDT
Same problem here.

Version: 2022-03 (4.23.0)
Build id: 20220310-1457
Ubuntu 20.04.3
Comment 16 Andrey Loskutov CLA 2022-03-16 15:47:43 EDT
How did you originally installed Eclipse - via Oomph installer or by downloading the J2EE package? 

I've tried to install 2021-12 J2EE package via zip download and update it to 4.23 - everything still works.

Are you using Oomph preferences recorder? If yes, that one automatically changes settings also for new workspace.
Comment 17 Ralf Naujokat CLA 2022-03-17 04:26:38 EDT
@James Stevenson
Sorry for that, but i am glad,
that i am not the only one. ;-)

@Andrey Loskutov
I never use the oomph installer,
this thing never worked for me.
But i admit, my last try was years ago.

Some details about my general environment:
I am using maven multi module projects,
lombok and graalvm17 as jdk.
Everything works fine on eclipse 2021-12.
Using the same workspace with 2022-03 gives
the error, this is happening since M3.

I will have a deeper look as soon as possible.
Comment 18 Andrey Loskutov CLA 2022-03-17 04:34:39 EDT
(In reply to Ralf Naujokat from comment #17)
> I am using maven multi module projects,
> lombok and graalvm17 as jdk.

I believe lombok contained forked JDT code. Could it be, that the problem disappears if you uninstall it?
Comment 19 Ralf Naujokat CLA 2022-03-17 06:23:26 EDT
Hi,

finally i figured it out.

If the project has facets, the error is there.

On deleting the line
 <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
in the .project file, and saving it, the ugly presentation is gone.

If you convert the project to faceted form, the error is back again.
Comment 20 Marco Maccaferri CLA 2022-03-19 14:24:31 EDT
I have just upgraded from 4.22 to 4.23 and are experiencing this bug. I've read some comments, and the solutions proposed doesn't work, the projects have only the jdt.core.javanature.

I must also add that double-clicking on the java files doesn't open them anymore, F3 works, double-clicking on other files opens the editor, seems that only java files are ignored (not sure is related).

This on Ubuntu Linux with OpenJDK 11.0.14+9-Ubuntu-0ubuntu2.22.10.
Comment 21 Andrey Loskutov CLA 2022-03-19 14:29:15 EDT
(In reply to Marco Maccaferri from comment #20)
> I must also add that double-clicking on the java files doesn't open them
> anymore, F3 works, double-clicking on other files opens the editor, seems
> that only java files are ignored (not sure is related).

This is bug 579282. According to bug 579282 comment 24 the bug is caused by PyDev.
Comment 22 Marco Maccaferri CLA 2022-03-19 15:03:35 EDT
(In reply to Andrey Loskutov from comment #21)
> This is bug 579282. According to bug 579282 comment 24 the bug is caused by
> PyDev.

Yes, I have PyDev and after uninstalling it the package presentation is also fixed! I can't believe it...

Thanks.
Comment 23 Andrey Loskutov CLA 2022-03-21 11:30:25 EDT
(In reply to Marco Maccaferri from comment #22)
> (In reply to Andrey Loskutov from comment #21)
> > This is bug 579282. According to bug 579282 comment 24 the bug is caused by
> > PyDev.
> 
> Yes, I have PyDev and after uninstalling it the package presentation is also
> fixed! I can't believe it...
> 
> Thanks.

Thanks for verifying! According to that, this is a duplicate of bug 579282 (Pydev issue https://www.brainwy.com/tracker/PyDev/1192).

*** This bug has been marked as a duplicate of bug 579282 ***
Comment 24 Florian Wunderlich CLA 2022-03-21 12:06:17 EDT
This bug - which is *only* about the package presentation in the project explorer - is definitely not a duplicate of bug 579282.

It occurs without PyDev and without the other problem of the aforementioned bug - double clicks work perfectly fine.

As documented by Comment 19, the problem described by this bug is related to whether a project is in faceted form.
Comment 25 Andrey Loskutov CLA 2022-03-21 12:19:54 EDT
(In reply to Missing name from comment #24)
> This bug - which is *only* about the package presentation in the project
> explorer - is definitely not a duplicate of bug 579282.
> 
> It occurs without PyDev and without the other problem of the aforementioned
> bug - double clicks work perfectly fine.
> 
> As documented by Comment 19, the problem described by this bug is related to
> whether a project is in faceted form.

OK, moving to web tools.
Comment 26 Missing name Mising name CLA 2022-03-22 04:44:12 EDT
(In reply to Ralf Naujokat from comment #19)
> Hi,
> 
> finally i figured it out.
> 
> If the project has facets, the error is there.
> 
> On deleting the line
>  <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
> in the .project file, and saving it, the ugly presentation is gone.
> 
> If you convert the project to faceted form, the error is back again.

Hi,

I've the same problem with the ugly/unreadable presentation in the hierarchy but without the

<nature>org.eclipse.wst.common.project.facet.core.nature</nature>

entry the module doesn't become a part/library in the Web-application deployed via the "Servers"-plugin. So just removing the entry doesn't fix the problem it makes it worse because the Web-Application is not deployed correctly.
Comment 27 Andrey Loskutov CLA 2022-03-23 11:17:18 EDT
*** Bug 579386 has been marked as a duplicate of this bug. ***
Comment 28 Bruno Lacombe CLA 2022-03-23 11:26:21 EDT
The problem is only on "Dynamic web project" (Java EE) 
 not in "Java project" (application)
and on view "Project Explorer"

Test on Windows 10/11 and Eclipse  Version: 2022-03 (4.23.0), Build id: 20220310-1457
Comment 29 He Pengpai CLA 2022-03-27 22:50:24 EDT
(In reply to Ralf Naujokat from comment #19)
> Hi,
> 
> finally i figured it out.
> 
> If the project has facets, the error is there.
> 
> On deleting the line
>  <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
> in the .project file, and saving it, the ugly presentation is gone.
> 
> If you convert the project to faceted form, the error is back again.

I have upgraded from 4.22 to 4.23 and are experiencing this bug.
It was solved that way.
I am using maven projects and lombok.
Test on Windows 10,Eclipse Version: 2022-03 (4.23.0).
Comment 30 Rolf Theunissen CLA 2022-03-28 07:42:25 EDT
*** Bug 579446 has been marked as a duplicate of this bug. ***
Comment 31 Yurx Cherio CLA 2022-03-29 17:27:32 EDT
I am having this issue after upgrading to 2022-03. Package Presentation is set to Hierarchical however the tree node labels display full package names:

top
  top.next
    top.next.further
  top.another
    top.another.more1
    top.another.more2

It seems like simple Java projects are not affected. I observe this issue on projects with "Utility Module" facet and "Dynamic Web Module" facet

Version: 2022-03 (4.23.0)
Build id: 20220310-1457
Comment 32 Yurx Cherio CLA 2022-03-31 12:04:06 EDT
I see one more, possibly related, similar issue. In the project with "Dynamic Web Module" when "Web App Libraries" node is expanded it now displays JAR files with full absolute path spelled out for each JAR. In order to see jar names the "Project Explorer" view needs to be expanded and may take half the screen of real estate (cringe).

I am making an assumption here about possible relation to the reported issue based on the facts that it is related to Dynamic Web Module and the tree view displays full name/path to the resource.

Originally Eclipse was installed from a ZIP (Eclipse IDE for Enterprise Java and Web Developers) and then subsequently upgraded.
I have no python related plugins or extensions installed.

OS: Ubuntu 18.04 and Ubuntu 20.04, 64bit architecture
Java: OpenJdk 11 & OpenJdk 17
Comment 33 Tim Warnky CLA 2022-04-05 10:08:24 EDT
I am experiencing this too, although I initially thought it was just a problem that the Abbreviate package names didn't work anymore (Window > Preferences > Java > Appearance). That feature is not working for me anymore under Hierarchical or Flat view.

I am using a maven java project with Dynamic Web Module and this occurred after upgrading in place. Removing the Eclipse Faceted Project Properties does fix it, but I'm not sure what other features that turns off.

Windows 10
Version: 2022-03 (4.23.0)
Build id: 20220310-1457
Comment 34 Nitin Dahyabhai CLA 2022-04-05 22:57:00 EDT
This is very confounding as there's only one set of changes made in the Java EE tools (https://git.eclipse.org/c/jeetools/webtools.javaee.git/) between 3.24/2021-12 and 3.25/2022-03, which should not have had this effect. Observing what's happening, the navigator content providers for EAR projects are being invoked because they activate on child resources that adapt to projects with the web facet, among others. Disabling "J2EE Application Deployment Descriptors" might be a workaround, but there's so much abstraction and delegation going on that it's hard to be 100% certain of it. Ultimately, the J2EELabelProvider is being asked for labels on Java Elements, and it has no sense of whether package fragments should be displayed hierarchically or flat--all while I'm not convinced it should even be involved there.
Comment 35 Nitin Dahyabhai CLA 2022-04-05 23:00:23 EDT
Attempted fix in M1.
Comment 36 Nitin Dahyabhai CLA 2022-04-11 14:11:54 EDT
*** Bug 579652 has been marked as a duplicate of this bug. ***
Comment 37 Yurx Cherio CLA 2022-04-11 14:21:28 EDT
@Nitin "... there's so much abstraction and delegation going on that it's hard to be 100% certain ..." - doesn't inspire confidence. I am really sorry if my question may cause anyone feel uncomfortable but are you saying that Eclipse IDE is now so complex that it is at the point that fixing bugs and/or regressions may not always be possible?
Comment 38 Nitin Dahyabhai CLA 2022-04-11 14:29:46 EDT
(In reply to Yurx Cherio from comment #37)
> @Nitin "... there's so much abstraction and delegation going on that it's
> hard to be 100% certain ..." - doesn't inspire confidence. I am really sorry
> if my question may cause anyone feel uncomfortable but are you saying that
> Eclipse IDE is now so complex that it is at the point that fixing bugs
> and/or regressions may not always be possible?

Not in general, no, but in this area where the common navigator has so much going on in combination with the Java EE component's complexities, yes. Perhaps it was more obvious to the original authors.
Comment 39 Wojtek Bok CLA 2022-04-13 12:17:53 EDT
My bug: 579652  

Has been marked a a duplicate for this bug.

My problem is that the error decoration shows in the Project Explorer src entry for folders/files, rather than the src entry for packages/classes/

I see that this bug has been fixed. Does it also solve the decoration issue?
Comment 40 Nitin Dahyabhai CLA 2022-04-13 12:21:54 EDT
(In reply to Wojtek Bok from comment #39)
> I see that this bug has been fixed. Does it also solve the decoration issue?

It should. If it does not, reopen that bug.
Comment 41 Wojtek Bok CLA 2022-04-13 12:40:22 EDT
Mu apologies. I am not really familiar with where the various pre-release files are. I d/l eclipse-jee-2022-03-R-win32-x86_64.zip

Could you post a link to the fixed file please? A ZIP file as my development machine is not connected to the Internet.


Thanks
Comment 42 Nitin Dahyabhai CLA 2022-04-18 16:45:31 EDT
(In reply to Wojtek Bok from comment #41)
> Mu apologies. I am not really familiar with where the various pre-release
> files are. I d/l eclipse-jee-2022-03-R-win32-x86_64.zip
> 
> Could you post a link to the fixed file please? A ZIP file as my development
> machine is not connected to the Internet.

From https://www.eclipse.org/downloads/packages/release/2022-06/m1
Comment 43 Wojtek Bok CLA 2022-04-20 14:57:12 EDT
Thanks

The decoration now shows in the package/class entry.

It ALSO shows in the folder/file entry. I assume this is planned.
Comment 44 Bruno Lacombe CLA 2022-05-02 06:56:18 EDT
I confirm, on all my project (Dynamic web project, and java project) the bug is out.
good job, thank's
Comment 45 浩 高 CLA 2022-07-07 21:12:55 EDT
(In reply to Nitin Dahyabhai from comment #42)
> (In reply to Wojtek Bok from comment #41)
> > Mu apologies. I am not really familiar with where the various pre-release
> > files are. I d/l eclipse-jee-2022-03-R-win32-x86_64.zip
> > 
> > Could you post a link to the fixed file please? A ZIP file as my development
> > machine is not connected to the Internet.
> 
> From https://www.eclipse.org/downloads/packages/release/2022-06/m1

please see
https://github.com/eclipse-jdt/eclipse.jdt.ui/issues/145#issuecomment-1176987138

it might be releated to wtp

My eclipse is 2022-06