Community
Participate
Working Groups
Using AJDT 1.1.12 When I reference other projects in my current project, after some time the class path gets changed. Project references disappear and directory entries to the bin directories of those project appear. e.g. I have a project Persistence which contains the persistence aspects for our applications, and which is used in all other applications. At first I will see in .classpath: <classpathentry kind="src" path="/Persistence"/> after a while, it changes to: <classpathentry kind="lib" path="/Persistence/lib"/> This only happens in projects with an AspectJ nature, not in those with a Java nature.
Hi Arco, In your comment you mentioned that "after a while it changes to <classpathentry kind="lib" path="/Persistence/lib"/>" Have you set the output directory of Persistence to be Persistence/lib? If so, then this is working as designed. Whenever projects have a project dependency on an AspectJ project, this project dependency is changed to be a classfolder dependency. Therefore, the .classpath entry will be changed as you are seeing. Thanks, Helen
Sorry, I have mistakenly put /lib in my report, it should have been Persistence/bin.
In which case, this is working as designed.
The problem is, that in versions up to AJDT 1.1.10 the project reference stayed in place. In 1.1.12, if I select the project as part of the build path in the projects tab, after a while, the project reference disappears from the projecs tab, and an entry only containing the bin directory appears in the libraries tab. The projects continue to build, but stuff like finding references spanning multiple projects doesn't work anymore. The only way to get the functionality back, is to go to the properties dialog, and set the references again. The problem then is of course that shortly thereafter the reference is gone again.
Can you go into more detail about "stuff like finding references spanning multiple projects doesn't work anymore"? If possible, can you give me a specific scenario? Fixes have gone into this area recently which will be included in the 1.1.13 release, so I would like to know if what you're seeing has already been fixed, or whether it's another scenario which needs to be addressed before 1.1.13. Thanks, Helen
When I try to find references for a class or method in my Persistence project, using menu Search->References->Workspace, I will find references to all locations in the projects that reference the Persistence project, as long as the Persistence project is referenced on the Projects-tab of the build path. If it is only referenced through the classpath, I will only find references within the Persistence project itself. The same goes for refactorings. If I rename a method while the project is referenced "properly", all references will be renamed. Otherwise only the references in the project itself are renamed, and I get compilation errors in the referencing projects. Arco Oost
This has raised an interesting point, namely that when project dependencies are kept then we get many feature for free. One example is the problem reported here. Changing to classfolder dependencies breaks many of these features. In particular, regarding the references issue raised here, the same behaviour occurs between two java projects where one has a class folder dependency on another. Looking back over the reasons why we switched the dependencies to class folder dependencies it seems that the nicest way to deal with this is to keep project dependencies as they are defined originally by the user (and consequently pick up the nice features for free) BUT look at creating a state.dat file which is meaningful for the AJ project and which the JavaBuilder understands (this is the root of all the problems). I've therefore backed out the code which changes the dependencies so now project dependencies are preserved and the problem reported here is no longer an issue. To cover the investigation/work on the state.dat file I've raised AJDT bug number 73435.