Community
Participate
Working Groups
Build Identifier: I20110613-1736 ajbuilder supposed to be replacement for javabuilder and used instead in AJDT projects. We usually have all our sources in a shared source tree, create folders under project src folder and link these folders to this shared tree: <link> <name>src/com/antennasoftware/amp/studio</name> <type>2</type> <locationURI>VSW_DIR/source/com/antennasoftware/amp/studio</locationURI> </link> This approch works fine for JDT and AJDT projects - sources are found and processed. However ajbuilder does not report correctly the resource and path in created IProblem - the folder created under src is reported as Resource and Path is simply empty - that renders ajbuilder useless in navigation from problem to the relevant line in the source. Description Resource Path Location Type Type safety: Unchecked invocation sort(List) of the generic method sort(List<T>) of type Collections com.antennasoftware.amp.studio line 817 Java Problem Reproducible: Always Steps to Reproduce: create AJDT project with linked sources that have at least entry in the problems view, build it, double click on the problem - double click will not open editor pointed to the problem
Can you be more precise: 1. What would you expect the problem to look like? 2. Does this happen for all problems, or only those applied to resources in linked folders?
>>> 1. What would you expect the problem to look like? "Resource" should be a file name - e.g. FieldModel.java "Path" should be workspace relative path of the parent folder - e.g. /com.antennasoftware.amp.codegen/src/com/antennasoftware/amp/codegen/toolkit/model BTW - line information set by ajbuilder is correct. Example of problem created by java builder: Description Resource Path Location Type Type safety: The expression of type ModelFieldReference needs unchecked conversion to conform to ModelFieldReference<T> FieldModel.java /com.antennasoftware.amp.codegen/src/com/antennasoftware/amp/codegen/toolkit/model line 81 Java Problem >>> 2. Does this happen for all problems, or only those applied to resources in linked folders? I do not know the answer as in this project we do not have not regular source files but I am confident that there are no issues with regular source files - otherwise it would be reported and fixed long time ago.
Consider for the 2.2.0 release.
I have finally gotten a chance to look at this. I see that the problem comes around the way AJDT inconsistently handles linked vs regular resources. It looks like this code has been around for a very, very long time. Between that time and now, the APIs for dealing with linked resources have improved. I am tempted to do a major refactoring around this area. My only concern is that this affects other things that may not be sufficiently tested.
Fixed. I did some refactoring and removed the old code that converts from a filesystem location to a workspace location. We are now using appropriate Eclipse core APIs instead and things are much safer and shorter. Will be in next snapshot build. http://git.eclipse.org/c/ajdt/org.eclipse.ajdt.git/commit/?id=d083ede368d5b29455dd6a70af2148e88f4ddd68