-
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
Connect tern.java to an external user installed, user managed, tern server #142
Comments
Yes I know, I have integrated tern-closure https://github.com/angelozerr/tern.java/wiki/Tern-&-Closure-support and you have an UI options to manage JSON dirs.
You mean use a tern folder which contains plugins, defs and other tern-* plugins? If it that I had created aon issue for that #30
Is it that https://github.com/angelozerr/tern.java/wiki/New-and-Noteworthy-0.4.0#user-content-nodejs-remotedirect-access ?
It means that we must observe the changes of this file to reload the JSON IDETernProject.
yes it was my idea to debug with breakpoint tern plugin with nodeclipse. See https://github.com/angelozerr/tern.java/wiki/Debugging-tern.js-with-Nodeclipse I think we have the same idea, but I would like to manage 2 cases : 1.1 generate a tern plugin with the existing wizard "Server Plugins" https://github.com/angelozerr/tern.java/wiki/Tern-Toolings inside the root project (next to .tern-project)
|
@MetaMemoryT please read https://github.com/angelozerr/tern.java/wiki/Tern-Toolings-Server-Plugins it's the first step to use custom tern plugin (inside root project)? |
Thanks for all the information. I am currently thinking of using a different editor than eclipse because of JSDT's lack of support for es6, (nothing to do directly about this project.). You can close this if you think everything has been addressed. |
That's shame for tern.java -( Are you tried to create bugzilla for your need? What do you need about es6? Do you think tern.java could support your need?
I have not finished. I will close it when I will finish it. |
@MetaMemoryT if you are interested please install 0.7.0 SNAPSHOT version of tern.java http://oss.opensagres.fr/tern.repository/0.7.0-SNAPSHOT/ Now you can customize your tern repository like you wished After clicking on OK button, you can reopen the Tern -> Modules and you will see the modules of your custom tern repository. Hope you will like it. |
That is https://bugs.eclipse.org/bugs/show_bug.cgi?id=223131 |
Isn't this done? |
Yes you are right, I close this issue. |
This is a very simple solution to issues such as #43 #141
The Problem
Power users and developers are often creating their own tern modules/defs/plugins and hand edit .tern-project files with complex additions that the gui does not support. For example, the plugin tern-closure supports custom "finder" attributes (look here for more information):
The gui will always lag behind what the plugins support, so here is a proposal enabling "power users" to work on the bleeding edge (forked tern server, forked plugins, etc) with little hassle and easily debug the tern server.
The Eclipse Interface
In the eclipse gui, on the project properties, under Tern panel, there would be 2 new options:
use external tern process: [true / false] (default to false)
port of external tern process: [port number]
And 1 new button:
[Connect to external tern server]
The New Way to use Tern.java
The new workflow of a "power user"/plugin developer would be to:
Hand edit a .tern-project file in the project root.
Ensure all plugins/modules/defs are in the correct paths for the next step. The power user can retrieve them any way they want, npm install, etc.
Manually start the tern server with any special args, custom PATH, desired. (type in on the command line):
click the button [Connect to external tern server] under the eclipse project properties, on tern panel
If the connection failed, an eclipse dialog would pop up "Cannot connect to tern server on port "
Benefits and Conclusion
This would allow the continuation of development of an "integrated tern" while power users / developers could benefit / test their newly created features before the next tern.java release.
The external tern would not be managed by eclipse, it would not automatically shutdown, etc. That is all left up to the developer to manage from the command line, for each individual project he wants to have tern support for.
This would make tern much easier to debug, because someone could install tern and then:
and use node-inspector to "break on exceptions" when they did some behavior in eclipse that caused tern to create an error.
I found node-inspector much nicer that eclipse v8 debugging, because it has simple "live editing" with no annoying "virtual project files" (what I want is this Nodeclipse/nodeclipse#157) and you can set breakpoints in it easier, and the breakpoints persist automatically between sessions, compared to eclipse you have to import/export them every debug launch.
This new system would also fix one other issue, if the "use external tern process: " is checked, tern.java would never touch the .tern-project file, (because if you are hand editing it, you do not want it minified, or tern.java overwriting it.) Some projects (like tern itself) contain a hand edited .tern-project, and when imported into tern.java, tern.java automatically overwrites it, creating a git file change you don't want to commit to the main project.
The text was updated successfully, but these errors were encountered: