Skip to content
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

[Research][Plugins] Nashorn support - tern plugin for nashorn #196

Open
paulvi opened this issue Dec 8, 2014 · 9 comments
Open

[Research][Plugins] Nashorn support - tern plugin for nashorn #196

paulvi opened this issue Dec 8, 2014 · 9 comments

Comments

@paulvi
Copy link
Contributor

paulvi commented Dec 8, 2014

Please support Hashorn

https://blogs.oracle.com/nashorn/

related to #33

@angelozerr
Copy link
Owner

@paulvi why creating a new issue although #33 exists?

@paulvi
Copy link
Contributor Author

paulvi commented Dec 8, 2014

This one is about Hashorn syntax and hints tooling support included into ternIDE

I know that Nashorn has globals defined like

"Java", "JavaFX", "$ARG"

https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.ui/templates/common-templates/.jshintrc#L122

I am researching now where to get full definitions...

@paulvi
Copy link
Contributor Author

paulvi commented Dec 8, 2014

http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nashorn/toc.html

http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nashorn/shell.html#sthref24

4 Nashorn and Shell Scripting
4.4 Global Objects
4.5 Additional Nashorn Built-in Functions

http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nashorn/api.html#sthref17

2 The Nashorn Java API

Of course completion from Java types is out of scope

var MyJavaClass = Java.type('JavaClass');
JavaClass.

.class for variables

var intNum = 10;
print(intNum.class);

var string = "a string";
print(string.class);

Output:

class java.lang.Integer
class java.lang.String

@paulvi
Copy link
Contributor Author

paulvi commented Dec 8, 2014

@angelozerr
Copy link
Owner

I can't find "tern plugin for nashorn

I can't find "tern plugin for nashorn"

No time to develop it, but if you or other people wants to develop it, I could help you.

Of course completion from Java types is out of scope

Perhaps we could call JDT inside tern nashorm plugin with Flux? Don't know if it's possible, it's just an idea...

@paulvi
Copy link
Contributor Author

paulvi commented Dec 8, 2014

No time to develop it,

We have discussed it several month ago, that if you do all plugins yourself you end up unable to support them all.
You should just point to tutorial how to create plugin.

Of course completion from Java types is out of scope
Perhaps we could call JDT inside tern nashorm plugin with Flux?

that would be JDT integration. that is project is be Java project.

Flux is cloud service.

paulvi added a commit to Nodeclipse/nodeclipse that referenced this issue Dec 10, 2014
@paulvi paulvi changed the title Hashorn support Hashorn support - tern plugin for nashorn Dec 11, 2014
@paulvi
Copy link
Contributor Author

paulvi commented Dec 11, 2014

ref #125

@paulvi
Copy link
Contributor Author

paulvi commented Dec 12, 2014

BTW, please create and use "Plugin" label.

@paulvi
Copy link
Contributor Author

paulvi commented Dec 17, 2014

From http://www.infoq.com/articles/nashorn found that

Nashorn supports JavaScript in the ECMAScript 5.1 version plus some extensions.

https://wiki.openjdk.java.net/display/Nashorn/Nashorn+extensions

https://wiki.openjdk.java.net/display/Nashorn/Nashorn+Documentation

§ javax.script guide
http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/
§ Nashorn user guide
http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nashorn/
§ Scripting programming guide
http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/prog_guide/

While docs are there, they should be in some .json and .xml already as they are already supportted by Netbeans

@paulvi paulvi changed the title Hashorn support - tern plugin for nashorn [Resaerch][Plugins] Hashorn support - tern plugin for nashorn Dec 17, 2014
@paulvi paulvi changed the title [Resaerch][Plugins] Hashorn support - tern plugin for nashorn [Research][Plugins] Hashorn support - tern plugin for nashorn Dec 17, 2014
@angelozerr angelozerr changed the title [Research][Plugins] Hashorn support - tern plugin for nashorn [Research][Plugins] Nashorn support - tern plugin for nashorn Nov 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants