Skip to content

Commit

Permalink
Add info about Nashorn implementation. See
Browse files Browse the repository at this point in the history
  • Loading branch information
angelozerr committed Nov 6, 2015
1 parent c4cc0ff commit 9f7d083
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions core/tern.server.nashorn/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
tern.server.nashorn
=========

[tern.server.nashorn](https://github.com/angelozerr/tern.java/tree/master/core/tern.server.nashorn) is a tern server implementation based on nashorn.
[tern.server.nashorn](https://github.com/angelozerr/tern.java/tree/master/core/tern.server.nashorn) is a tern server implementation based on Nashorn.

## Sample with SWT

[tern.eclipse.swt.samples](https://github.com/angelozerr/tern.java/tree/master/eclipse/tern.eclipse.swt.samples) provides a sample with a simple SWT Text & the Nashorn tern server implementation. To use it :
[tern.eclipse.swt.samples.java8](https://github.com/angelozerr/tern.java/tree/master/samples/tern.eclipse.swt.samples.java8) provides a sample with a simple SWT Text & the Nashorn tern server implementation. To use it :

* use Java8

* import the following projects in your workspace :

* the Nashorn bundle according your OS. If you have Windows 64 bits you can use https://github.com/angelozerr/tern.java/tree/master/thirdparties/nashorn/nashorn_win32_x86_64
* minimal-json. You can find it at https://github.com/angelozerr/tern.java/tree/master/thirdparties/minimal-json
* tern.core
* tern.eclipse
* tern.eclipse.swt.samples
* tern.eclipse.swt.samples.java8
* tern.server.nashorn
* ternjs

* Run the main https://github.com/angelozerr/tern.java/blob/master/eclipse/tern.eclipse.swt.samples/src/tern/eclipse/swt/samples/nashorn/NashornTernEditor.java
* Run the main https://github.com/angelozerr/tern.java/blob/master/samples/tern.eclipse.swt.samples.java8/src/tern/eclipse/swt/samples/nashorn/NashornTernEditor.java

You can play with Ctrl+Space to open tern completion :

Expand All @@ -26,9 +27,7 @@ You can play with Ctrl+Space to open tern completion :

# Nashorn Integration

* no need to implement require AMD function, because ternjs is able to execute without node.js inside Web Browser. The Nashorn tern server implementation works like if ternjs was executed in a Web Browser.

* don't use V80bject because we need every time release it. I have just use String (which follows JSON format) for tern request/response.
* no need to implement require AMD function, because ternjs is able to execute without node.js inside Web Browser. The Nashorn tern server implementation works like if ternjs was executed in a Web Browser.

* implement basic console.log. I think Nashorn should provide that.

Expand All @@ -43,5 +42,4 @@ You can play with Ctrl+Space to open tern completion :

# TODO

* clean code!
* integrate the thern server Nashorn inside Eclipse IDE

0 comments on commit 9f7d083

Please sign in to comment.