[
https://issues.jboss.org/browse/JBIDE-13742?page=com.atlassian.jira.plugi...
]
Victor Rubezhny commented on JBIDE-13742:
-----------------------------------------
jsdt don't look at anything for sure. It tries to create an AST due to provide a
static model of JavaScript and use it to create JavaScript objects. Theoretically under
some circumstances it can show you the Modernizr script properties/functions, but it's
very poor on object types calculation for content assist.
VJet does in pretty similar way (extended in model calculation process), but its efforts
are killed the the issue with Regular Expressions. It just cannot parse these JavaScripts.
Once [this
issue|https://bugs.eclipse.org/bugs/show_bug.cgi?id=401250] is fixed we'll
have to test VJet again against the Modernizr usage.
NexJ builds a model dynamically by executing JavaScript code on the fly due to calculate
the object types... But there are also the issues with minified JQuery scripts. So,
actually it just doesn't work for Modernizr script.
So, yes. This is a problem for content assist.
But I really don't believe that either JSDT or VJET (even when the issues will be
fixed) will be able to use Modernizr to detect what JS-features are supported by a browser
(and native browser code will will be executed ) and what JS-features aren't browser
supported (and JS/CSS loaded by Modernizr will be executed instead of native code).
It's just because neighter JSDT not VJET execute the code: they just parse it in
different ways.
NexJ could be more positive here (of course when minified JS issues are fixed) because it
executes the code due to provide the JS Objects. So, probably it it will be able to
execute Modernizr then it could calculate types properly. But it still will not be able to
predict how Modernizr will actually work on a user's browser.
Investigate how modernizr affects vjet/jsdt/etc.
------------------------------------------------
Key: JBIDE-13742
URL:
https://issues.jboss.org/browse/JBIDE-13742
Project: Tools (JBoss Tools)
Issue Type: Feature Request
Components: jsp/jsf/xml/html source editing
Reporter: Max Rydahl Andersen
Assignee: Victor Rubezhny
Fix For: 4.1.x
Check how javascript completion is affected by usage of modernizr.
http://modernizr.com/docs/#load
Can they still provide code completion for the library ?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira