-
Notifications
You must be signed in to change notification settings - Fork 52
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
Tern Explorer #289
Comments
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). |
@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)) |
the CNF allows filters to avoid duplicate. The Outline view probably has something similar. |
@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. |
Thanks @mickaelistria for your information.
@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! |
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. |
Ok @maxandersen, I have understood the message:)
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. |
@vrubezhny if you could give me some directive to extends JSDT outline view (is it possible?), it should be cool. Thanks! |
It's up to the JSDT editor to contribute content to the Outline:
https://wiki.eclipse.org/FAQ_How_do_I_create_an_Outline_view_for_my_own_language_editor%3F
For JSDT, here is the implementation:
http://git.eclipse.org/c/jsdt/webtools.jsdt.core.git/tree/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/javaeditor/JavaOutlinePage.java?id=396d55a37c164ad743dfd9f59c06ba49f25211d3
If you want to replace it, it will require some changes in JSDT to allow
different/additional content providers, label providers and filters.
Since this is the same pattern as content navigator extensions, it would
make sense to actually make the outline view a CommonViewer (see
CommonNavigator#createPartControl) and to bind specific providers to
this viewer. It's actually some more work, but I don't think it's too
difficult to do, and the benefits on longer term seems very worth it.
|
Thanks @mickaelistria !
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". |
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. |
+1 for "JavaScript Explorer" I wonder why there's no way to show the same tree in Outline and in Project Explore view. |
Ok I will do that.
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! |
rename issue?.. or possibly add related items. it seems now too broad a-la discussion thread |
Why. This issue about developping a new ViewPart like JSDT Outline but where the treeview is filled with https://github.com/angelozerr/tern-outline |
@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 : 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! |
See https://github.com/angelozerr/tern.java/wiki/Tern-Outline-support for more infomration. You can see comparison between JSDT Outline and Tern Explorer : |
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. |
Will view id |
What is the problem with this id? In the future, I hope JSDT will give the capability to override Outline. |
It is added to Node perspective in Nodeclipse/nodeclipse@b844c87 |
Ok, this id should not changed, except whe JSDT will be available to override Outline (In this case I will remove Tern Explorer) |
That would be OK then. |
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?
@vrubezhny @dgolovin @mickaelistria @maxandersen @pascalleclercq @gamerson @paulvi @fbricon @piotrtomiak @jabby what do you think about that?
The text was updated successfully, but these errors were encountered: