Bug 513759 - JDT null analysis "Annotate" feature does not work for non-workspace paths
Summary: JDT null analysis "Annotate" feature does not work for non-workspace paths
Status: CLOSED DUPLICATE of bug 513758
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.7   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-16 09:44 EDT by Matthew DOnofrio CLA
Modified: 2017-03-16 10:48 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew DOnofrio CLA 2017-03-16 09:44:51 EDT
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.
Comment 1 Stephan Herrmann CLA 2017-03-16 09:59:36 EDT
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.
Comment 2 Matthew DOnofrio CLA 2017-03-16 10:07:06 EDT
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.
Comment 3 Stephan Herrmann CLA 2017-03-16 10:48:42 EDT
Closing as duplicate, as functionality is not at stake, only user feedback.

*** This bug has been marked as a duplicate of bug 513758 ***