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

Bug 439077

Summary: Distinguish 'found a comment' from 'in a comment'
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 6.0   
Target Milestone: 7.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Michael Rennie CLA 2014-07-07 17:41:20 EDT
While working on tests for bug 426185 I found that our finder function findComment finds the following as 'in a comment':

var foo = 10;
[caret here]/**/
function var() {}

We should either update the finder support to only return the 'found' comment if we are truly inside it (past the /* or before the */) or provide a way to distinguish 'in' vs. 'on the boundaries'.
Comment 1 Michael Rennie CLA 2014-07-08 12:43:34 EDT
I poted to leave the Finder API as-is, since it is used to find if a comment exists at the given offset, *not* if we are in a comment at that offset. And since it returns the comment node, the assist framework can simply ask if we are in the comment:

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=49700589109e7af87cad55d7b2d8d54f706a145f