|
|
Re: Browser/Javascript Communication [message #466365 is a reply to message #466327] |
Mon, 09 January 2006 14:50 |
Pierre Padovani Messages: 6 Registered: July 2009 |
Junior Member |
|
|
Daniel Spiewak wrote:
> Unfortunately, I don't think there is a way since the Browser instance is totally separate from the Java code. As far as the html knows, it's running in a full-fledge browser. In other words, there's no way for the JavaScript code to get any sort of reference to the Java code that its browser is embedded within.
>
> I think your solution is pretty sound. I suggest that you profile your code a bit and find out how expensive the Browser#execute method is on average. If it isn't too bad, then set up an infinite loop (well, with an escape clause for stoppage) using Display#asyncExec(Runnable) to post to the event loop a call to the execute method. Depending on how expensive the call is, you could set a time delay on the loop (loop once, freeze for a quarter of a second, loop again). Hopefully the call isn't so expensive that you have to have a long delay (thus worse response time for the JavaScript editor persistance).
As I understand it, certain javascript engines allow for exensions to be
added to their runtimes. Could we not create an eclipse javascript
extension that allows javascript to perform calls out to eclispe? Does
the IE engine allow extensions? Does Mozilla's?
Just a thought.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03676 seconds