Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] JSDT & Extension features (refactoring, search)

Let's discuss this over a beer in reston :-)

Tom

Von meinem iPhone gesendet

> Am 04.03.2016 um 20:56 schrieb Max Andersen <manderse@xxxxxxxxxx>:
> 
> It will be a chicken egg with the license. Can't really help pushing
> forward if the license is GPL which prevents it not only from being
> use at eclipse foundation but also I can't even bundle outside the
> foundation with other EPL or ASL code  :/
> 
> /max
> http://about.me/maxandersen
> 
> 
>> On 04 Mar 2016, at 20:45, Tom Schindl <tom.schindl@xxxxxxxxxxxxxxx> wrote:
>> 
>> Hi,
>> 
>> As Max pointed towards my work I think I should provide some background.
>> 
>> The main target of the stuff I'm working on is any type of application
>> no matter if you just work on your simple RCP and want a scripting
>> editor, want to implement a fully blow IDE or you have a simple none
>> OSGi-based application.
>> 
>> So I've taken care to not depend on anything beside org.eclipse.text and
>> then based on your UI-Technology org.eclipse.jface.text or our JavaFX
>> replacement.
>> 
>> The basic idea is that syntax highlight should be a configuration thing
>> and not something you express with (java)code. I've naturally looked at
>> TextMate definition but decided against making this as the default
>> definition language for highlightings but something that is very close
>> to how Eclipse-Text inner workings.
>> 
>> But eventually someone could write a converter who builds the in memory
>> model from eg TextMate.
>> 
>> At dev-time we use a DSL but at runtime we use JSON-Files to load the
>> configurations from.
>> 
>> * Dev-Time Format:
>> http://git.eclipse.org/c/efxclipse/org.eclipse.efxclipse.git/tree/bundles/code/org.eclipse.fx.code.editor.langs/src/org/eclipse/fx/code/editor/ldef/langs/js.ldef
>> 
>> * Runtime-Time Format:
>> http://git.eclipse.org/c/efxclipse/org.eclipse.efxclipse.git/tree/bundles/code/org.eclipse.fx.code.editor.langs/src-gen/org/eclipse/fx/code/editor/ldef/langs/js.json
>> 
>> Another must is the possibility to provide themes easily (which for
>> JavaFX is fairly easy as we simply delegate to JavaFX-CSS) but for SWT
>> we implemented our own story and no I don't think SWT-CSS is the correct
>> solution, if I want to write a lightweight SWT-UI I never ever add all
>> the e4 CSS stuff!
>> 
>> Finally let me talk a but about the basic framework idea:
>> 
>> *Everything is a service!*
>> 
>> * lexical-highlighting is a service
>> * auto-complete is a service
>> * hover is a service
>> * annotation (errors, break-points, ...) is service
>> 
>> So the editor really does not really care where things come from and all
>> of them are optional services!
>> 
>> We currently have opensource impls for:
>> * dart
>> * typescript (current version is completely different to the v1 where
>> we used ts-server but we now directly call the LanguageService-API
>> [1,2])
>> * highlighting for various languages [3]
>> 
>> So finally why GPLv3?
>> 
>> First of all the basics framework features are EPL because they are part
>> of e(fx)clipse, the SWT-bits are currently available under GPL because I
>> wanted to keep tighter control what happens with the code until others
>> help push this forward.
>> 
>> BestSolution.at is the last company who would refuse to relicense under
>> EPL if others contribute towards getting a new, better and more
>> lightweight editor framework out up and running at Eclipse.
>> 
>> And yes I said NEW because what I've seen so far from SSE is that is
>> much too heavyweight for my use cases.
>> 
>> BestSolution.at primarily focuses on JavaFX (Editors) but that does not
>> mean we would not push the Eclipse IDE forward if we see a business case
>> for that.
>> 
>> Tom
>> 
>> [1]http://tomsondev.bestsolution.at/2016/02/08/javascript-performance-v8-vs-nashorn-for-typescript-language-service/
>> [2]http://tomsondev.bestsolution.at/2016/02/09/useing-typescript-languageservice-to-build-an-jstypescript-ide-in-java/
>> [3]http://git.eclipse.org/c/efxclipse/org.eclipse.efxclipse.git/tree/bundles/code/org.eclipse.fx.code.editor.langs/src/org/eclipse/fx/code/editor/ldef/langs/
>> 
>> 
>> 
>>> On 04.03.16 18:02, Max Rydahl Andersen wrote:
>>> On 4 Mar 2016, at 9:29, Angelo zerr wrote:
>>> 
>>>   Hi Max,
>>> 
>>>   2016-03-04 9:18 GMT+01:00 Max Andersen manderse@xxxxxxxxxx
>>>   <mailto:manderse@xxxxxxxxxx>:
>>> 
>>>       You mean jsdt supporting text mate syntax bundles ?
>>> 
>>>   I mean using TextMate syntax (coming from VSCode which is MIT
>>>   license) for
>>>   JSX, TypeScript, JS file extension.
>>> 
>>>   But for JSDT, I need just an extension point to override
>>>   IJavaCodeScanner
>>>   https://bugs.eclipse.org/bugs/show_bug.cgi?id=486961
>>> 
>>>   After that, you can implement it like you wish:
>>> 
>>>     * with acorn like I have done
>>>       https://github.com/angelozerr/tern.java/tree/master/sandbox
>>>     * with TextMate liek I would like to do.
>>> 
>>>       I think that's interesting but not something that fit into jsdt.
>>> 
>>>       Have you looked at the work tom Schindl done on making a generic
>>>       text
>>>       editor at platform level to enable things like this?
>>> 
>>>   No, have you a link please?
>>> 
>>> https://github.com/BestSolution-at/code-swt
>>> 
>>> its still under GPLv3 but I hope Tom will eventually make it EPL.
>>> 
>>> /max
>>> 
>>>   Regard's Angelo
>>> 
>>>       /max
>>>       http://about.me/maxandersen
>>> 
>>>       On 04 Mar 2016, at 08:42, Angelo zerr angelo.zerr@xxxxxxxxx
>>>       <mailto:angelo.zerr@xxxxxxxxx> wrote:
>>> 
>>>       Hi Gorkem,
>>> 
>>>       I have forgotten to say you that I had started a POC with
>>>       TextMate. Are
>>>       you interested with my work? It's not finished but I will try to
>>>       integrate
>>>       inside JSDT Editor and if it works I would liek to provide a PR
>>>       with an
>>>       extension point to override the default JSDT syntax coloration.
>>>       It should
>>>       be fantastic if JSDT could provide this extension point
>>>       https://bugs.eclipse.org/bugs/show_bug.cgi?id=486961 for Neon.
>>>       If it's
>>>       possible I will implement this extension point with my TextMate
>>>       work and
>>>       Eclipse user will be available to benefit with JSX, Angular2 syntax
>>>       coloration this year.
>>> 
>>>       Regard's Angelo
>>> 
>>>       2016-03-03 20:06 GMT+01:00 Angelo zerr angelo.zerr@xxxxxxxxx
>>>       <mailto:angelo.zerr@xxxxxxxxx>:
>>> 
>>>               Angelo what does your ESLint validator use(other than
>>>               aslint)?
>>> 
>>>           I'm afraid that you will not able to use directly because I
>>>           use a tern
>>>           plugin per linter for that (tern-eslint, tern-jshint, tern-lint,
>>>           tern-jscs)
>>>           Those tern linter uses ESLint, JSHint, API and returns the
>>>           same message
>>>           error (so it's easy to implement your own linter).
>>> 
>>>           But you could adapt
>>>           https://github.com/angelozerr/tern-eslint/blob/master/eslint.js#L394
>>>           to
>>>           use it without tern plugin.
>>> 
>>>               Can we run it with Nashorn?
>>> 
>>>           Yes, since tern can be executed with Nashorn
>>>           https://github.com/angelozerr/tern.java/tree/master/core/tern.server.nashorn
>>> 
>>>           2016-03-03 18:53 GMT+01:00 Gorkem Ercan
>>>           gorkem.ercan@xxxxxxxxx <mailto:gorkem.ercan@xxxxxxxxx>:
>>> 
>>>               On 3 Mar 2016, at 11:25, Angelo zerr wrote:
>>> 
>>>                       I think we are gradually turning JavaScript
>>>                       Editor to a proper SSE
>>>                       editor.
>>>                       Victor is now looking to integrate
>>>                       reconcile validators as an extension point. The
>>>                       batch validation is
>>>                       also
>>>                       moving to become WTP validation.
>>>                       I think this will help you with these
>>>                       typescript/jsx cases.
>>> 
>>>                   Today I have developped a WTP validation. for
>>>                   TypeScript file (*.ts) by
>>>                   hacking the WTP validation. ( I add a
>>>                   DocumentRegionProcessor when JSDT
>>>                   editor is opened).
>>>                   It works great (I had done that too for tern.java
>>>                   with WTP Validator for
>>>                   JSHint, ESLint, etc).
>>> 
>>>                   With your integration, it will be more cleaner. Is
>>>                   it planned for neon?
>>> 
>>>               Yes the target is Neon. Hopefully, you will no longer
>>>               need the
>>>               DocumentRegionProcessor hack
>>>               anymore. We plan to convert the basic JS syntax
>>>               validation to use
>>>               WTP/SSE style validators.
>>> 
>>>               Angelo what does your ESLint validator use(other than
>>>               aslint)? Can we
>>>               run it with Nashorn? The old JSDT parser
>>>               is a combination of a linter and syntax parser and with
>>>               the move to
>>>               Esprima we are loosing the
>>>               linter type markers. I am looking into the possibility
>>>               of pulling in a
>>>               linter to JSDT to fill the gap.
>>> 
>>>                   Also semantic highlighting can be the next step
>>>                   forward. I also want to
>>> 
>>>                       explore if we can utilize
>>>                       Textmate language grammars to provide default
>>>                       highlighting.
>>> 
>>>                   I love this idea:) VSCode uses exactly this idea. See
>>> 
>>>                   https://github.com/Microsoft/vscode/tree/master/extensions/javascript/syntaxes
>>> 
>>>               There are other editors out there that use Textmate
>>>               grammars too. It is
>>>               the
>>>               de facto standard nowadays.
>>> 
>>>               Regard's Angelo
>>> 
>>>                       Regard's Angelo
>>> 
>>>                           2016-03-03 3:25 GMT+01:00 Doug Schaefer
>>>                           cdtdoug@xxxxxxxxx <mailto:cdtdoug@xxxxxxxxx>:
>>> 
>>>                           Anyone know of a JSX/ES6 plug-in? I've
>>>                           become a big React fan the
>>>                           last few
>>> 
>>>                               months and would love proper support
>>>                               (instead of confusing the poor
>>>                               JavaScript editor). I'll be showing some
>>>                               of my work at EclipseCon
>>>                               with my
>>>                               IDE for IoT demo and will have to do
>>>                               some handwaving.
>>> 
>>>                               Thanks,
>>>                               Doug.
>>> 
>>>                               On Wed, Mar 2, 2016 at 2:07 AM, Angelo
>>>                               zerr angelo.zerr@xxxxxxxxx
>>>                               <mailto:angelo.zerr@xxxxxxxxx>
>>>                               wrote:
>>> 
>>>                               Hi Gorkem,
>>> 
>>>                                   I understand that it's a little hard
>>>                                   for you to give me an answer. I
>>>                                   will
>>>                                   study refactor/search in few months.
>>> 
>>>                                   Now I would like to start
>>>                                   developping Angular2 Eclipse plugin
>>>                                   but as
>>>                                   Angular2 uses syntax with [], () for
>>>                                   attributes names, HTML editor
>>>                                   doesn't
>>>                                   support it -(
>>>                                   See
>>>                                   https://github.com/angelozerr/angular2-eclipse/issues/1
>>> 
>>>                                   Regard's Angelo
>>> 
>>>                                   2016-03-02 1:29 GMT+01:00 Gorkem
>>>                                   Ercan gorkem.ercan@xxxxxxxxx
>>>                                   <mailto:gorkem.ercan@xxxxxxxxx>:
>>> 
>>>                                   We are continuing with our plan to
>>>                                   drop the inference engine and
>>> 
>>>                                       replace
>>>                                       the parser with Esprima.
>>>                                       Search and refactoring are two
>>>                                       areas of JSDT that will be impacted
>>>                                       highly from this change.
>>>                                       At this time, it is very hard
>>>                                       for anyone to be able to asses if we
>>>                                       can
>>>                                       have extensions on these areas.
>>>                                       I wish I had a better answer at
>>>                                       this time.
>>> 
>>>                                       —
>>>                                       Gorkem
>>> 
>>>                                       On 1 Mar 2016, at 10:48, Angelo
>>>                                       zerr wrote:
>>> 
>>>                                       Hi guys,
>>> 
>>>                                           I would like to know if JSDT
>>>                                           has the intention to provide
>>>                                           some
>>>                                           extension to
>>>                                           override features and
>>>                                           delegate features to an
>>>                                           other component
>>>                                           (ternjs,
>>>                                           typescript, etc) like
>>>                                           search, or refactor.
>>> 
>>>                                           In my case I would like to
>>>                                           use for instance rename of
>>>                                           tern.js
>>>                                           (with
>>>                                           tern.java) and rename of
>>>                                           TypeScript (typescript.java)
>>>                                           inside
>>>                                           Eclipse.
>>>                                           My
>>>                                           question is:
>>> 
>>>                                             * implement my own
>>>                                               refactor action?
>>>                                             * use JSDT refactor action
>>>                                               and override it (if in
>>>                                               the future it will be
>>>                                               supported).
>>> 
>>>                                           There are several problems
>>>                                           by using JSDT or search feature:
>>> 
>>>                                             *
>>> 
>>>                                               the project must have
>>>                                               JSDT nature (otherwise
>>>                                               Refactor menu item
>>>                                               doesn't
>>>                                               appear, search with
>>>                                               Ctrl+Shift+G cannot be
>>>                                               executed). In the case
>>>                                               of
>>>                                               typescript.java and
>>>                                               tern.java I don't need
>>>                                               to have the JSDT
>>>                                               nature.
>>> 
>>>                                             *
>>> 
>>>                                               refactor, search works
>>>                                               with an IJavaScriptUnit
>>>                                               although in my
>>>                                               case,
>>>                                               I
>>>                                               don't need that. I want
>>>                                               just offset to consume
>>>                                               TypeScript service
>>>                                               language
>>>                                               or ternjs, and that's all.
>>> 
>>>                                           See problem with tern.java
>>>                                           with search with Ctrl+Shift+G:
>>> 
>>>                                           https://github.com/angelozerr/tern.java/issues/339#issuecomment-146618346
>>> 
>>>                                           Please tell me if you think
>>>                                           that JSDT coudl provide some
>>>                                           extensionb.
>>>                                           Otherwise I will implement
>>>                                           search and refactor from
>>>                                           scratch.
>>> 
>>>                                           Many thanks
>>> 
>>>                                           Regard's Angelo
>>> 
>>>                                           ------------------------------------------------------------------------
>>> 
>>>                                           wtp-dev mailing list
>>>                                           wtp-dev@xxxxxxxxxxx
>>>                                           <mailto: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
>>>                                       <mailto: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
>>>                                   <mailto: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
>>>                               <mailto: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 <mailto: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 <mailto: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 <mailto: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 <mailto: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 <mailto: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 <mailto: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 <mailto: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
>>> 
>>> /max
>>> http://about.me/maxandersen
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> 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
>> 
>> 
>> --
>> Thomas Schindl, CTO
>> BestSolution.at EDV Systemhaus GmbH
>> Eduard-Bodem-Gasse 5-7, A-6020 Innsbruck
>> http://www.bestsolution.at/
>> Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
>> _______________________________________________
>> 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


Back to the top