Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 490932

Summary: Make the 'not loaded plugin' / 'used env' warning message more consumable
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public
Version: 12.0   
Target Milestone: 12.0   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Michael Rennie CLA 2016-04-01 13:18:02 EDT
Follow up from bug 490828.

Currently, if you are using the new linting rule to detect not loaded plugins / eslint-env settings you get a message like:

"To get support for the 'pg' environment, the 'postgres' plugin must be started. 'postgres' has not been set in the plugins entry of your .tern-project file."

That message talks about a bunch of stuff, while not really helping an end user that has no knowledge (or care) about Tern or its plugins. If we must talk about plugins, the best bet is to refer to the annnotation, rather than repeating the marked name a bunch of times. 

This would be much better:

"This environment references a Tern plugin that is not currently loaded."

It tells the user the thing marked is not being used, that there is a plugin for it, and the fix right below it, says "add it for me". Since we are no longer regex'ing the annotation string for a name, theres no need to mention it.
Comment 1 Michael Rennie CLA 2016-04-01 13:22:11 EDT
Another thing to consider - we also don't need to mention that a plugins' name might differ from the env name, the quick fix takes care of that (translating between differences), and it adds no end user value. Would any dev actually care that a plugin they had no knowledge about is named something other than the env they probably used assist to enter?
Comment 2 Curtis Windatt CLA 2016-04-04 15:55:18 EDT
"This environment references a Tern plugin that is not currently loaded."
This gives no helpful information to the user.  At a minimum we should point them at the .tern-project file, not talk about Tern plugins.
"This environment references a Tern plugin that is not loaded in the .tern-project file."

I'm OK with not mentioning the env/plugin name difference as long as the annotation mentions .tern-project file.  Might be confusing but if they run the quick fix then look at the .tern-project file they will see what is going on.
Comment 3 Curtis Windatt CLA 2016-04-05 15:01:07 EDT
Lets have a discussion at the meeting on Tuesday after Mike returns.  The quick fix for adding a plugin for a require statement is called 'Update project settings'.  We need to be consistent in our terminology between the rules.
Comment 5 Curtis Windatt CLA 2016-06-02 16:43:23 EDT
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=bd4d4224538efa12ece8a75de2e8bbb56a79b2a9
Updated the tests so they pass with the new message.