Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[wtp-dev] Why WTP doesn't highlight like JSDT?

Title: Samsung Enterprise Portal mySingle

 

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>

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

 

 

 


Back to the top