Link with editor does not work in Project Explorer when project presentation is "hierarchical"
Following #819
Steps to reproduce
From a fresh installation and clean workspace:
In Project Explorer, ensure "Link with Editor" is enabled. In Project Explorer, double click to open a project. Use the open resource dialog (shift+⌘+r) to open src/main/java/com/example/package1/File1.java Use the open resource dialog to open src/main/java/com/example/package2/File2.java Use the open resource dialog to switch back to File1.java, and note the link with editor functionality isn't working. Use previous (fn+control+up arrow) and next (fn+control+down arrow) tab shortcuts to switch between open files, and note the link with editor functionality isn't working. Click on the open tabs one at a time, and note the link with editor functionality isn't working. In Project Explorer, manually expand the tree until you can see the contents of package1 (but not package2). Repeat steps 5-7, and note that the "Link with Editor" is working when the tab for File1.java is active (but not File2.java). In Project Explorer, manually expand the tree until you can see the contents of package2. Repeat steps 5-7, and note that the "Link with Editor" is working with File1.java and File2.java.
Tested under this environment:
- OS & version: Mac & Debian
- Eclipse IDE/Platform version (as shown in Help > About): Version: 2024-12 (4.34.0) Build id: 20241128-0757
I never had problem with links on win and cant test on mac. But if you can contribute a patch it will be accepted. see https://github.com/eclipse-platform/.github/blob/main/CONTRIBUTING.md
I had the same issue with 2024-12, my workaround is to uninstall the PyDev plugin
I am on MacOS sequoia 15.1.1 and link with editor works fine for me, irrespective of whether the project presentation is "hierarchical" or not.
Eclipse SDK Version: 2025-06 (4.36) Build id: I20250325-1800 OS: Mac OS X, v.15.1.1, aarch64 / cocoa Java vendor: Eclipse Adoptium Java runtime version: 21.0.1+12-LTS Java version: 21.0.1
I couldn't reproduce the issue on Mac by following the mentioned steps, so I don't see a problem with the link with editor functionality.
Has anyone been able to reproduce this on Linux?
Hi,
steel able to reproduce this on Debian and Eclipse 2025-03 (4.35.0). Maybe the first post miss some information.
I have to set the Project Explorer configuration as is : Project presentation=hierarchical Top Level Elements=Working Sets
PyDev is not installed.
I just had a case of a .class file inside the Java Runtime container which was not working as expected: Trying to open "Map" type linked in the editor; trying to open "Symbol" class (from com.sun.tools.javac.code package) couldn't link. I'm using hierarchical projects. I came here to read the hints and realized that I also had top-level elements=working sets; I changed it to projects and everything works as expected.
However, one important thing is that I have no working set at all defined in my workspace, so the tree is identical with working sets or projects as top-level element... But that is not enough to explain my failure: I tried to debug why "Map" works and "Symbol" doesn't and couldn't find a substantial difference; only the depth of the "Symbol" node is by 2 units bigger than the depth of the "Map" node.