Skip to content

Tern Explorer #289

Description

@angelozerr

I think it should be cool that tern.java provide a "Tern Explorer" View which display JavaScripts functions, variables of the current JavaScript file like the JSDT Ouline View.

Why doing that although JSDT does that?

  • we could display a lot of information like type, variable inside a function.
  • display the acorn AST
  • displays for each frameworks some items. For instance for AngularJS displays controller, modules, etc like AngularJS Explorer, grunt/gulp tasks like Build Explorer. We could displays modules for node.js/requirejs, etc => having oen explorer to displays thoses thoses items instead of having a new view for each JavaScript frameworks.

@vrubezhny @dgolovin @mickaelistria @maxandersen @pascalleclercq @gamerson @paulvi @fbricon @piotrtomiak @jabby what do you think about that?

Activity

  1. mickaelistria commented on Jun 16, 2015

    @mickaelistria
    Contributor

    I'm not sure adding yet-another-view is a good UI solution. Instead, it would make more sense to contribute additional data to the Project Explorer (via CNF) or Outline view (via whatever works).

  2. angelozerr commented on Jun 16, 2015

    @angelozerr
    OwnerAuthor

    @mickaelistria I would like unify angular explorer + build explorer (gulp/grunt) and add functions, variables. If I contribute to Project Explorer or Outline View, we will have some duplicate variables (coming from JSDT and coming from Tern, (it's the same problem with completion))

  3. mickaelistria commented on Jun 16, 2015

    @mickaelistria
    Contributor

    the CNF allows filters to avoid duplicate. The Outline view probably has something similar.
    I believe having those details in the Outline view is what users will expect.

  4. vrubezhny commented on Jun 16, 2015

    @vrubezhny
    Contributor

    @angelozerr, but still it is a good idea to integrate to Project Explorer and Outline View. We're going to provide a mode for JSDT that excludes any internal parsing/validation/content assisting/ And, as far as I tested, Tern.java works fine in such a mode. But Content outline is completely empty in such a mode, so your contribution to Outline View will be very welcomed.

  5. angelozerr commented on Jun 16, 2015

    @angelozerr
    OwnerAuthor

    the CNF allows filters to avoid duplicate.

    Thanks @mickaelistria for your information.

    But Content outline is completely empty in such a mode, so your contribution to Outline View will be very welcomed.

    @vrubezhny glad this issue please you:) Could we work together about this issue? If you can prepare me the implementation of the extension point for Outline View + Project explorer, it will win me a lot of time and I could work for https://github.com/angelozerr/tern-outline Thanks!

  6. maxandersen commented on Jun 16, 2015

    @maxandersen

    please dont add more custom views when eclipse already has it.

    please show up on wtp-dev with what you need instead of just fixing it in tern.

  7. angelozerr commented on Jun 17, 2015

    @angelozerr
    OwnerAuthor

    please dont add more custom views when eclipse already has it.

    Ok @maxandersen, I have understood the message:)

    please show up on wtp-dev with what you need instead of just fixing it in tern.

    I fix nothing inside tern.java. I suppose you speak about WTP JSON Editor or WTP Web Resources

    If it that, my goal is to try to contribute to WTP.

  8. angelozerr commented on Jun 17, 2015

    @angelozerr
    OwnerAuthor

    @vrubezhny if you could give me some directive to extends JSDT outline view (is it possible?), it should be cool. Thanks!

  9. mickaelistria commented on Jun 17, 2015

    @mickaelistria
    Contributor
  10. angelozerr commented on Jun 17, 2015

    @angelozerr
    OwnerAuthor

    Thanks @mickaelistria !

    If you want to replace it, it will require some changes in JSDT to allow different/additional content providers

    It was my fear. I think in a first step, I will create a new ViewPart "Tern Explorer" which will replace Angular Explorer and Build Explorer. Once JSDT will do some change for their outline, I will remove "Tern Explorer".

  11. mickaelistria commented on Jun 17, 2015

    @mickaelistria
    Contributor

    Ok. But don't call it "Tern Explorer", most users don't know what Tern is. A Generic "JavaScript Explorer" would probably be more intuitive.
    Also, despite the Outline view requires changes in JSDT, you can still contribute your ContentProviders and co to the CNF framework to show them in the Project Explorer view. It's just a matter of adding an extension (no code necessary once you already have the providers).
    Finally, if you're willing to make JSDT Outline page more extensible/customizable by rewriting it on top of CNF or other, your patches are welcome ;)

  12. paulvi commented on Jun 26, 2015

    @paulvi
    Contributor

    +1 for "JavaScript Explorer"

    I wonder why there's no way to show the same tree in Outline and in Project Explore view.

  13. angelozerr commented on Jun 26, 2015

    @angelozerr
    OwnerAuthor

    +1 for "JavaScript Explorer"

    Ok I will do that.

    I wonder why there's no way to show the same tree in Outline and in Project Explore view.

    It's my goal.

    My first goal is to fill the view with variables, functions of the current file. But I would like to extend it to fill other items like angular controller, modules liek https://github.com/angelozerr/angularjs-eclipse/wiki/Angular-Explorer-View (in order to remove this view from AngularJS Eclipse).

    My idea is to give the capability for each tern modules to extend the explorer. For instance for tern node module, we could display list of used node module (require). To fix http://stackoverflow.com/questions/27906867/eclipse-supporting-outline-view-with-require-js-define for instance.

    Any feedback and idea are welcome!

  14. paulvi commented on Jun 29, 2015

    @paulvi
    Contributor

    rename issue?.. or possibly add related items. it seems now too broad a-la discussion thread

  15. 4 remaining items

  16. added this to the 1.0.0 milestone on Aug 8, 2015
  17. angelozerr commented on Aug 8, 2015

    @angelozerr
    OwnerAuthor

    @vrubezhny @dgolovin @mickaelistria @maxandersen @pascalleclercq @gamerson @paulvi @fbricon @piotrtomiak @jabby I have started to implement Tern Explorer (it's the first step before integrating inside Outline and Navigator).

    Here the result :

    ternexplorer

    On the left you can see Tern Explorer and on the right teh JSDT (which is blank because it seems that JSDT doesn't support variables declaration inside function with Outline)

    I must improve again (support double click, support object literal, etc), but you if you have time, please play with Tern Explorer and gives me feedback. Thanks!

  18. angelozerr commented on Aug 11, 2015

    @angelozerr
    OwnerAuthor

    See https://github.com/angelozerr/tern.java/wiki/Tern-Outline-support for more infomration. You can see comparison between JSDT Outline and Tern Explorer :

  19. paulvi commented on Aug 12, 2015

    @paulvi
    Contributor

    Can TernExplorer content bee inside Outline instead of JSDT ?

  20. angelozerr commented on Aug 12, 2015

    @angelozerr
    OwnerAuthor

    Can TernExplorer content bee inside Outline instead of JSDT ?

    Please read https://github.com/angelozerr/tern.java/wiki/Tern-Outline-support#why-an-another-view

    I don't know how to override or extend JSDT Outline.

  21. paulvi commented on Sep 22, 2015

    @paulvi
    Contributor

    Will view id tern.eclipse.ide.ui.views.TernExplorerView stay the same ?

  22. angelozerr commented on Sep 22, 2015

    @angelozerr
    OwnerAuthor

    Will view id tern.eclipse.ide.ui.views.TernExplorerView stay the same ?

    What is the problem with this id? In the future, I hope JSDT will give the capability to override Outline.

  23. paulvi commented on Sep 22, 2015

    @paulvi
    Contributor

    It is added to Node perspective in Nodeclipse/nodeclipse@b844c87

  24. angelozerr commented on Sep 22, 2015

    @angelozerr
    OwnerAuthor

    Ok, this id should not changed, except whe JSDT will be available to override Outline (In this case I will remove Tern Explorer)

  25. paulvi commented on Sep 23, 2015

    @paulvi
    Contributor

    That would be OK then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions