Community
Participate
Working Groups
The "Link With Editor" function often fails to synchronize selected file with the one currently opend in the editor. The Navigator Tree works fine. -- Configuration Details -- Product: Eclipse 1.3.0.20100617-0521 (org.eclipse.epp.package.jee.product) Installed Features: org.eclipse.jdt 3.6.0.v20100526-0800-7z8XFUJFMTfCWGoVuHImpms9H155
(In reply to comment #0) > The "Link With Editor" function often fails to synchronize selected file with > the one currently opend in the editor. Do you have some steps to reproduce the problem?
Ok! Some more Details : Im using the Java EE Perpectie. 0. Eclipse is closed with some open files. 1. Now Eclipse is started again. 2.a Some file (tab) is activated and should be highlighted in the Project Explorer. 2.b If another file is selcted (by tab) an this one should be highlighted in the Project Explorer. 3. Toggle "Link with Editor" has no effect 2.a and 2.b somtimes fail. It seems to me that this issue depends on the project type. If the project is a plain Java project highlighting works. If the project is is a "Dynamic Web Project" it fails. If I once have selected a file from the Project Explorer highlighting works fine.
Moving this to webtools since it seems to be specific to their types of projects. Perhaps there is a link helper that is handling these?
what editors are open? And, what is the file type of what's in the editor? (html open in a web browser never seems to work ... but sounds like this is something else).
Like Francis said, this requires the contribution of a LinkHelper, which doesn't happen anywhere in SSE. Without information about what kind of file, the kind of project, and where in the project the file is located, there's really nothing we can do.
(In reply to comment #4) > what editors are open? And, what is the file type of what's in the editor? > > (html open in a web browser never seems to work ... but sounds like this is > something else). I've seen this with the Java Editor.
Can you attach the project in which this is happening?
Created attachment 182794 [details] situation after startup with different tree views
Ok, I think it seems there is an important information missing. * The problem occurs in the *Project Explorer*. * Navigator and Java Package Explorer working fine. It can be seen with a simple *Dynamic Web Project* (for instance) The screenshot shows how it looks like after startup.
Moving to Java EE.
Hajo, we have one other report of an unreproducible scenario where the Java Resources node is missing from the Project Explorer. We also do not provide any sorts of link helpers - the JDT link helper is used to do this synchronization. Can you reproduce this scenario, and then expand the project in the Project Explorer to see if the Java Resources node exists and has children? I am assigning this bug to myself for the initial investigation/follow through, but this is temporary until I find the correct home for this bug.
If I expand the node everything exists : file, class and functions. One more detail : If the node is expanded in Project Explorer and the file (MT1.java) becomes active the file node is highlighted (!). If another open (which was also open at startup) file is activated the node is still not expanded. -> It seems linking (or the JDT link hepler) as such works but the tree expansion fails.
Can you also reproduce in the 'Java' perspective and a simple Java project?
I have got an identical problem with C/C++ projects after upgrading from Helios to Indigo. "Link to editor" works in Navigator but fails in Project Explorer and C/C++ Explorer. As described in comment #12 it seems that the tree expansion does not work. When I expand the tree manually "Link to editor" works flawlessly for every file in a completely expanded folder but still fails for files in unexpanded folders. Interestingly, once "Link to editor" is working for a specific file I can unexpanded the tree and it will be expanded as soon as I refocus it in the editor.
(In reply to comment #14) > "Link to editor" works in Navigator but fails in Project Explorer and C/C++ > Explorer. Bug only happens for C/C++ projects. No problem with simple resource projects. Therefore, I opened a new bug request #356275 for CDT.
I provided a simple test case that demonstrates this issue in a particular case (Java file located outside the Java Build Path) in bug #364789. However, in the past I saw this problem occur with other file types, too, like XMLs or WSDLs. Maybe the problem was again they were outside of the Java Build Path, but I couldn't remember well, so the problem reported here might (or might not) be more general than the one reported in bug #364789.