Community
Participate
Working Groups
I tried to synchronize this AspectJ file (with an .aj extension), and when I selected update, I get the following weird prompt, asking me to pick between the Java and AspectJ version of the file. I've also had it happen before that AspectJ files appeared in the package explorer with a Java item icon next to the AspectJ icon. This is in Eclipse 3.2 M5a (presumably coming from java-like language support). See screen shot.
Created attachment 36505 [details] screen shot
still occurs?
I can't reproduce this. Doesn't mean that it's fixed, but maybe just that Ron's set-up is slightly different. What's happening here is that the filter is not being applied appropriately. In the package explorer, aj files appear twice. The first is associated with the AJCompilationUnit and the second is associated with the (Java) CompilationUnit. Typically, a filter is applied to the package explorer so that the (Java) CompilationUnit is hidden. Seems like that the filter is not working for you for some reason.
I've been able to reproduce the problem and I've located where its cause is, but at this point we don't have easy access to change it. The dialog uses JavaElementResourceMapping objects to map how elements have changed in the two versions being compared. The elements are displayed by walking the Java structure and looking for similarities between the two trees. IPackageFragment objects that contain aspects have 2 ICompilationUnits for the aspect (one that is Java and one that is AspectJ). They both need to exist because different parts of the Eclipse infrastructure requires one or the other. Most of the time, the unused ICompilationUnit is filtered from view, but that's not possible in this situation. See also, AdditionalMappingsDialog and TreeViewer.
*** Bug 244790 has been marked as a duplicate of this bug. ***
With JDT Weaving enabled, this is no longer a problem. The duplicate CompilationUnit is not created and so it will never appear twice.