| Summary: | Useless hover in grunt js file | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Steve Northover <steve_northover> | ||||
| Component: | JS Tools | Assignee: | Troy Tao <troytao> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | curtis.windatt.public, Michael_Rennie | ||||
| Version: | 12.0 | ||||||
| Target Milestone: | 12.0 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| See Also: |
https://git.eclipse.org/r/69377 https://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=b0edfe43a857c6f4fc90f7766e6438860902e03a |
||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
New Gerrit change created: https://git.eclipse.org/r/69377 We have documentation for primitive types. Tern thinks that it is a String and gives the doc for Strings. I agree that it isn't helpful to show in hovers. I wasn't hovering over a string so I was confused. Whether to show help for a String or Number is another issue that we can sort out elsewhere (or shelve). On the one hand, I sometimes find it useful to hover and see what Tern thinks the type is. On the other hand, the primitive hovers talk about constructors, which is not at all helpful. Troy, can you update the fix to suppress all primitive hovers? 1. string 2. number 3. bool NOTE:
> I wasn't hovering over a string so I was confused.
(In reply to Steve Northover from comment #5) > NOTE: > > > I wasn't hovering over a string so I was confused. I saw that. The inferred type of the thing you hovered over was a string, that's how we know to show the hover for a string :) (In reply to Michael Rennie from comment #4) > On the one hand, I sometimes find it useful to hover and see what Tern > thinks the type is. On the other hand, the primitive hovers talk about > constructors, which is not at all helpful. > > Troy, can you update the fix to suppress all primitive hovers? > > 1. string > 2. number > 3. bool Done :) (In reply to Troy Tao from comment #7) > (In reply to Michael Rennie from comment #4) > > On the one hand, I sometimes find it useful to hover and see what Tern > > thinks the type is. On the other hand, the primitive hovers talk about > > constructors, which is not at all helpful. > > > > Troy, can you update the fix to suppress all primitive hovers? > > > > 1. string > > 2. number > > 3. bool > > Done :) I think there is more we need to do here, just ignoring the types has the negative side-effect that it shuts off doc hovers for those types completely. Consider the snippet: /** * @description This is a super important number that we no longer need * @since 123.45 * @public * @deprecated */ var num = 10; we no longer see the doc in the hover. As much as I am not a fan of modifying Tern code unless we have to, I think it might be easiest to take the doc off if the 'thing' is not actually the primitive constructor. (In reply to Michael Rennie from comment #8) > As much as I am not a fan of modifying Tern code unless we have to, I think > it might be easiest to take the doc off if the 'thing' is not actually the > primitive constructor. Just keep me in the loop as for Tern 18 I'm trying to reduce the number of changes we have to make for Orion. (In reply to Michael Rennie from comment #8) > (In reply to Troy Tao from comment #7) > > (In reply to Michael Rennie from comment #4) > > > On the one hand, I sometimes find it useful to hover and see what Tern > > > thinks the type is. On the other hand, the primitive hovers talk about > > > constructors, which is not at all helpful. > > > > > > Troy, can you update the fix to suppress all primitive hovers? > > > > > > 1. string > > > 2. number > > > 3. bool > > > > Done :) > > I think there is more we need to do here, just ignoring the types has the > negative side-effect that it shuts off doc hovers for those types completely. > > Consider the snippet: > > /** > * @description This is a super important number that we no longer need > * @since 123.45 > * @public > * @deprecated > */ > var num = 10; > > we no longer see the doc in the hover. > > As much as I am not a fan of modifying Tern code unless we have to, I think > it might be easiest to take the doc off if the 'thing' is not actually the > primitive constructor. A new patch has been updated and it excludes docs of Boolean, String, Number and RegRex constructors when generate type docs to display at hover time. (In reply to Curtis Windatt from comment #9) > (In reply to Michael Rennie from comment #8) > > As much as I am not a fan of modifying Tern code unless we have to, I think > > it might be easiest to take the doc off if the 'thing' is not actually the > > primitive constructor. > > Just keep me in the loop as for Tern 18 I'm trying to reduce the number of > changes we have to make for Orion. I have put a "/*Orion*/" in tern.js to denote our change and hope it will suffice. Gerrit change https://git.eclipse.org/r/69377 was merged to [master]. Commit: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=b0edfe43a857c6f4fc90f7766e6438860902e03a |
Created attachment 260563 [details] the over On beta3: 1) Root/org.eclipse.orion.client/modules/orionode/Gruntfile.js 2) Hover over text in line 23 (see image) 3) A useless hover telling me about a String constructor comes up and hides my code I think this is just a bug and the wrong hover help is being found. I wonder how useful hover help is for a String constructor? I'm guessing that the tooling can't know. I suppose we could arbitrarily filter ...