Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delite IntelliSense for Eclipse, Sublime, Emacs, Vim, Web Editor CodeMirror #415

Open
angelozerr opened this issue Jun 15, 2015 · 7 comments

Comments

@angelozerr
Copy link

Hi Delite team,

I contact you because @brunano21 suggested me to give an Eclipse support for delite angelozerr/tern.java#286

I would like to know if you could be (very) interested by this kind support. tern.java which is an Eclipse plugin based on ternjs JavaScript inference engine which gives support for completion, hover, etc and can be used with a lot of JavaScritpt Editor like Eclipse, Sublime, Emacs, Vim, Web Editor CodeMirror, Orion.

You can play with the ternjs demo at http://ternjs.net/doc/demo.html

ternjs is extensible and you can write plugins (written in JavaScript) to support any JavaScript framework. I have started to write a tern plugin for delite at https://github.com/angelozerr/tern-delite and you can see this kind feature:

terndelitedemo

Here you can see that "delite/register" is injected in the register function parameter, and you can benfit with register completion.

If you think it can be very interesting to have a delite support, don't hesitate to tell me.

Regard's Angelo

@cjolif
Copy link
Contributor

cjolif commented Jun 17, 2015

hi @angelozerr thanks for the proposal. This looks interesting indeed. I guess my question would be how delite specific would that be? I mean you should be able to achieve that for any AMD library that is using jsdoc for documentation? Or do you need something more that is delite specific?

@angelozerr
Copy link
Author

At first AMD support (inject the well instance according the module, ex : "delite/register" inject the instance to the "register" function parameter") is managed by the standard requirejs tern plugin..

After that you must define JSON type definition inside !requirejs like I have done https://github.com/angelozerr/tern-delite/blob/master/delite.js#L17

I have generated this JSON Type Definition from your JSDoc. I think there are a lot of errors, but I'm waiting for your answer to know if I continue it ot not.

@wkeese
Copy link
Member

wkeese commented Jun 18, 2015

Hmm, too bad the data isn't generated automatically.

It would be nice to have delite support in that editor. I'm not sure exactly what you are asking from us though.

Also, I can't promise that the delite API is stabilized. There may be some future changes.

@angelozerr
Copy link
Author

Hmm, too bad the data isn't generated automatically.

What do you mean? The data is generated from your JavaScripts sources.

The generation is doen in 2 steps :

node generator/node/make_plugin to generate it from your sources.

to generate the tern plugin.

In the future I have the intention to provide inside Eclipse an action which does that.

It would be nice to have delite support in that editor.

It works with several editor like Vim, Emacs, Sublime, Orion, CodeMirror, Atom and Eclipse.

I'm not sure exactly what you are asking from us though.

@brunano21 suggested me to create this tern plugin. So I would like to know if I will take time to improve it or not.

Also, I can't promise that the delite API is stabilized. There may be some future changes.

No problem, as I have explained you, the tern-delite is generated by using your JSDoc comments.

@wkeese
Copy link
Member

wkeese commented Jun 18, 2015

OK, I guess you did mention earlier that the data is generated, but why did you say that:

I think there are a lot of errors

That made me think that you generated it by hand.

@angelozerr
Copy link
Author

That made me think that you generated it by hand.

Ok sorry with my bad english -(

tern-delite is generated from JSDoc, but I have said "I think there are a lot of errors" because :

  • I don't used the whole information of JSDoc (some type are missing, description are missing, etc)
  • the JSDoc is not engough, some method must be improved like register.

If I take the sample:

require(["delite/register", "delite/Widget"], function (register, Widget) {
    var MyWidget = register("my-widget", [HTMLElement, Widget], {
        foo: "bar"
    });
});

The register method must returns a constructor computed by using HTMLElement, Widget. This behaviour should be possible with tern.

Do you want an online demo of tern-delite?

@angelozerr
Copy link
Author

For your information:

I have planed to work to support validation required module (inside defien or require) of RequireJS liek I have done for YUI https://github.com/angelozerr/tern.java/wiki/Tern-&-AlloyUI-support#validation-module--submodules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants