| Summary: | block comment messes up tooltip for variables | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | guji muun <gujiman> |
| Component: | OrionHub | Assignee: | Project Inbox <orion.releng-inbox> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Michael_Rennie |
| Version: | 10.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
actually this may be feature to describe a function for example if i create a new js file and add the code:
/*
*
* This function is for testing
*/
function testing(foo, hello) {
return foo, hello;
}
testing(a,b);
1) Then the tootltip for the function 'testing' will be 'This function is for testing'. Which is correct.
However this may not work properly if someone uses this feature as i described earlier.
This is working as expected. The comment immediately before any element is considered its documentation (regardless of whitespace). In your example, when you hover over a literal (in this case a string), you see the ECMA description of that kind of literal only when no user documentation has been added. But in the two cases where you added some documentation before the literals, your new user documentation is used instead of the default ECMA tooltip. |
The best way to describe this error is: 1) Goto Orionhub and create a new js file. 2) add the following script: /* * * This is a comment block */ var mess = "hello"; var foo = 123; // line comment function testing() { return foo, mess; } 3) when you place your mouse over any of the 'mess' variables, the tooltip doc shows the message in the block comment 'This is a comment block' The remaining variable foo shows the correct tooltip doc. However if you remove the block comment then the correct tooltip is displayed for 'mess'. 4) Infact this only occurs to the first variable that comes after any block comment, for example create a new js doc and add the following code: var hello = "hello"; var foo = 123; // line comment function testing() { return foo, hello; } /* * * This is a comment block number 2 */ var hello2 = "hello"; var fo2 = 123; // line comment function testing2() { return fo2, hello2; } 5) Now all the variable show the correct tooltip except for 'hello2' which has a tooltip doc 'This is a comment block number 2'