History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-16266
Type: New Feature New Feature
Status: Open Open
Assignee: Maxim Mossienko
Reporter: Christopher A. Petro
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

Support for Rhino importPackage in JavaScript

Created: 09 Nov 07 02:03   Updated: 09 Nov 07 14:06
Component/s: JavaScript

Build: 7,364
Severity: Medium


 Description  « Hide
Mozilla Rhino (http://www.mozilla.org/rhino/) allows JavaScript to be embedded in Java processes. This is included with JDK 6 but can be used directly without the new JDK 6 scripting extensions in earlier JDKs. Under Rhino, JavaScript can access Java classes directly by importing them. This uses the following syntax:

importPackage(Packages.java.text);
/* use something from java.text */
var sqlDateFormat = new SimpleDateFormat("yyyyMMdd");
var cobDate = sqlDateFormat.format(command.getCobDate());

It would be spiffy if these imports were handled correctly for code analysis, completion, and Go To Declaration. Currently we have to turn off all inspections when working on all of our embedded JavaScript.



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.