tern.java icon indicating copy to clipboard operation
tern.java copied to clipboard

[Tern Outline] Extension of outline

Open angelozerr opened this issue 9 years ago • 5 comments

It shoud be cool if Tern Outline could be extended to displays other items like:

  • Angular controller, directives like https://github.com/angelozerr/angularjs-eclipse/wiki/Angular-Explorer-View (after that we will able to remove this View)
  • Grunt/Gullp tasks like https://github.com/angelozerr/jsbuild-eclipse/wiki/Getting-Started#build-explorer (after that we will able to remove this View)
  • Repository to see see used plugins and import the repository from the workspace.
  • Files whicg are in the scope of the project.

angelozerr avatar Sep 25 '15 11:09 angelozerr

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=479132 Switching to common navigator would allow Tern to contribute to outline using CNF framework. I'll soon provide a PR showing that.

mickaelistria avatar Oct 08 '15 08:10 mickaelistria

Switching to common navigator would allow Tern to contribute to outline using CNF framework. I'll soon provide a PR showing that.

Cool!

But pay attention, we must fix problem with freeze of tern outline https://github.com/angelozerr/tern.java/issues/335 before

angelozerr avatar Oct 08 '15 08:10 angelozerr

The suggested PR is #348 I try to copy-paste a big file and didn't get UI freeze as the parsing jobs seems to be always called in its own thread.

mickaelistria avatar Oct 08 '15 15:10 mickaelistria

@mickaelistria I have updated https://github.com/angelozerr/tern.java/issues/337#issue-108311345

I would like to know your opinion about displaying angular, grunt tasks, repository, files in the tern outline. Those information are global for the project and not according to the file which is edited.

My idea is to have this outline:

  • Files
    • file1.js
    • file2.js
  • Repository (tern modules)
    • angular
    • jQuery
    • grunt
  • Angular
    • Module1
    • Controller1
    • Controller2
  • Grunt
    • task1
    • task2
  • AST
    • filled with AST of the current file like today

What do you think about that? I'm afraid that outline will host too much information. Perhaps we should have an other View to display global information of the project? Manu thanks for your suggestion.

angelozerr avatar Oct 15 '15 14:10 angelozerr

In Eclipse IDE, the Outline is in the context of the Editor, so it's better to avoid breaking that rule. I believe project-wide "symbolic elements" would better be shown in the Project Explorer. Here is for example of a screenshot of what project explorer look like with a JEE project in JBoss Tools: jbtwebprojectexplorer It shows in the same project explorer both the "filesystem elements" and the "logical structure" of the project. It's IMO more convenient than having a new view. IMO, you could have the similar grouping for JS projects.

mickaelistria avatar Oct 15 '15 14:10 mickaelistria