Never noticed this difference in behavior before. No, there is no policy
reason for this happening.

You can open a bug here to report the issue:
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=JSDT

Thanks,
Chris





From:   김수진 <[email protected]>
To:     [email protected],
Date:   04/29/2013 04:36 AM
Subject:        [wtp-dev] Why WTP doesn't highlight like JSDT?
Sent by:        [email protected]




 Hi,

 When I ran the Open Declaration(F3) Action for JavaScript code in HTML
 Editor,  I realized that the Highlighting of results was different with JS
 Editor.

 1)
 In JavaScript Editor, Open Declaration highlights function name for
 function call expression.
 But the range of Highlighting in HTML Editor is overall the function
 definition.
 (see examples below)

 2)
 In JavaScript Editor, Open Declaration highlights a value of property.
 But the range of Highlighting in HTML Editor is property name.
 (see examples below)

 Is this WTP's policy?
 If so, I wonder the reason.


 ==================================================== 1) Example
 ====================================================
 = Sample JavaScript Code =
 function fu() {
    return 1;
 }
 fu();


 == in JavaScript Editor ==
 function fu() {       // only 'fu' Highlighting.
    return 1;
 }
 fu();                    // Press F3 on 'fu'


 == in HTML Editor ==
 <script>
     function fu() {   // overall the function definition.
        return 1;
     }

     fu();                // Press F3 on 'fu'
 </script>

 
===================================================================================================================

 ==================================================== 2) Example
 ===================================================
 = Sample JavaScript Code =
 var obj = {
    name : "Jane",
    age : 27
 }
 obj.name;


 == in JavaScript Editor ==
 var obj = {
    name : "Jane",    // Highlighting 'name'
    age : 27
 }
 obj.name;           // press F3 on 'name'


 == in HTML Editor ==
 <script>
     var obj = {
        name : "Jane",     // Highlighting "Jane"
        age : 27
     }
     obj.name;                // press F3 on 'name'
 </script>
 
===================================================================================================================










_______________________________________________
wtp-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/wtp-dev


<<inline: graycol.gif>>

<<inline: 49661434.gif>>

_______________________________________________
wtp-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/wtp-dev

Reply via email to