Community
Participate
Working Groups
Invoking "Annotate" from within a class file does not work if the external annotations path for the library is an absolute path elsewhere outside of the workspace. It appears to work correctly when configured to a path within the workspace. This took a LOT of trial and error as there was no feedback for incorrect usage. See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=513758 The behavior I would expect is either a message indicating that external annotation cannot be generated in this way for remote paths or (as I would expect) that it should work for these paths.
I agree that lack of feedback is bad. OTOH, this is what help has to say: "Creating external annotations Pre-requisites: External annotations require a library with source attachment. Additionally, annotation based null analysis must be enabled for the current project, an external annotation location must be defined for the library and that location must be a directory (not a zip file) within the workspace." See the last three words.
You are correct but I had to reread the documentation many times before I finally saw the "within the workspace". I agree that it IS there It's confusing because annotations otherwise work for remotely configured files but cannot be added to. It was the lack of feedback that I was caught up on. I'd read this just earlier today and actually couldn't find it again later on so, imo, it's not clear. You did quote exactly what I read (wherever it is). For example: https://wiki.eclipse.org/JDT_Core/Null_Analysis/External_Annotations No information is listed there on the "within the workspace". There was a lot of conflicting information on how to go about the process of generating an annotation file. The documentation says: "manually creating external annotations would consist of..." and that "can be contributed by a separate plug-in" ... suggesting that there were no facilities available from the IDE-- and in my case it didn't work and even in a working environment didn't always produce results. From a new user's perspective this has been EXTREMELY confusing and very hard to get going. Additional feedback from the IDE would go a long way to encouraging greater use of this feature.
Closing as duplicate, as functionality is not at stake, only user feedback. *** This bug has been marked as a duplicate of bug 513758 ***