[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| Re: [wtp-dev] JSDT weekly 20151006 | 
On 8 Oct 2015, at 12:04, Angelo zerr wrote:
@Mickael, thanks for your work.
A quick question with probably not a quick answer. Does Tern support
JavaScript variants? In particular I'm thinking of JSX with React. And 
that
is also interesting in the React Native space. This is similar to QML 
for
Qt.
@Doug I'm very happy that you post this question. I think JSDT should
support TypeScript for Angular2 and JSX with React. Here my answer to 
your
questions:
+1. As long as we realize there are no elves working on it to make it 
happen.
But feel free to open an enhancement request.
* JSX with React: tern is based on acorn parser which is extensible 
too.
It exists an acorn plugin for JSX 
https://github.com/RReverser/acorn-jsx
but I have never played with it and I would like to study it to know 
how we
could integrates it to tern by cerating a tern plugin tern-react which 
will
customize acorn with acorn-jsx. See
https://github.com/marijnh/tern/issues/565
* TypeScript: the best mean is to create an acorn-typescript plugin, 
but I
have no the skill to do that -( My idea is to use TypeScript
LanguageService inside tern. See 
https://github.com/marijnh/tern/issues/652
After doing that, there is teh question about Syntax Coloration. There 
is
the same problem with ES6 synatx. My idea was to delegate syntax 
coloration
to tern I have created a POC with my idea at
https://github.com/angelozerr/tern.java/tree/master/sandbox
@Angelo Victor is going to work on coming up with a proposal for an 
extension point on JSDT
so that tools such as tern.java can be easily integrated for 
highlighting, validations etc.
I think he will get your feedback on that.
Regard's Angelo
2015-10-08 17:30 GMT+02:00 Doug Schaefer <dschaefer@xxxxxxx>:
A quick question with probably not a quick answer. Does Tern support
JavaScript variants? In particular I'm thinking of JSX with React. 
And that
is also interesting in the React Native space. This is similar to QML 
for
Qt.
Doug
------------------------------
*From:* wtp-dev-bounces@xxxxxxxxxxx [wtp-dev-bounces@xxxxxxxxxxx] on
behalf of Mickael Istria [mistria@xxxxxxxxxx]
*Sent:* Thursday, October 08, 2015 10:27 AM
*To:* wtp-dev@xxxxxxxxxxx
*Subject:* Re: [wtp-dev] JSDT weekly 20151006
On 10/07/2015 09:53 AM, Angelo zerr wrote:
2° Delegate JavaScript features to other components liek tern
On this topic, I suggest the following changes in JSDT that I find as
working enough for my experiments regarding merging Tern Outline into 
JSDT
Outline:
* Remove some extension points that are covered by upstream 
frameworks.
Mainly the Common Navigator, which makes it easy to write an 
extensible
Outline or a Quick Outline, without need to add other extension 
points. For
example, the "javaScriptElementFilter" extension point could be 
replaced by
usage of the commonFilter.
This is not a critical issue for extensibility, but removing code in 
JSDT
without loosing funcitonality nor extensibility is something that 
we'll all
see as a good thing.
* Take advantage of adapters: in most classes where we want to have
extensibility, JSDT directly uses or casts to its types 
(IJavaScriptType,
IJavaScriptUnit, IJavaScriptElement...). Extenders projects may not 
use
directly these types but might be able to adapt to the specified 
types
relying on the Core adapter framework. By leveraging that and 
checking for
adapters when possible, several pieces of JSDT code would remain 
working
with the parts of extending frameworks. Current JSDT Outline filters 
are an
example: Tern can provide its own richer elements to Outline, but 
since
they're not JSDT types, filters don't work. Assuming JSDT would check 
for
adapters and Tern would provide adapters, filters would remain 
working even
with Tern content. We can imagine similar thing for refactorings, 
search
and others.
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat <http://www.jboss.org/tools>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>
_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or 
unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/wtp-dev
_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or 
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/wtp-dev