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

Bug 280022

Summary: Line comments are not highlighted correctly when on first line
Product: [WebTools] JSDT Reporter: Laurens Holst <laurens.nospam>
Component: GeneralAssignee: wst.javascript <wst.javascript-inbox>
Status: RESOLVED DUPLICATE QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: cmjaun
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Laurens Holst CLA 2009-06-11 20:11:28 EDT
Build ID: M20090211-1700

Hi,

Line comments are not highlighted correctly when on first line. Example:

function hasAttribute(oNode, sName) {
    // ...asd
}

If you make a file containing this code, the ‘...asd’ comment will show in black, instead of green like it is supposed to. Note that you may need to close/reopen the document.

If you start editing the comment, the colour will change to green, and will remain so until you reload the document.

If you add a statement on the first line before the comment, the issue will disappear:

function hasAttribute(oNode, sName) {
    var x = 1;
    // ...asd
}

~Laurens
Comment 1 Laurens Holst CLA 2009-06-11 20:11:43 EDT
Using JSDT 1.0.4, by the way.
Comment 2 Chris Jaun CLA 2009-06-12 09:51:09 EDT
This is fixed in WTP 3.1.

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