Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Orion » Async ContentAssist(How to make the computation of the proposals async)
Async ContentAssist [message #923081] Tue, 25 September 2012 11:33 Go to next message
Holger Schill is currently offline Holger Schill
Messages: 68
Registered: July 2009
Member
Hi all,

I am Holger from Xtext team and I am currently working on a research-project to bring DSL-editors into the web.

What I already achived is a standalone Webpage without Orion-Server compareable to the embedded view example.

1. I plugged Google prettify in to calculate the styles for highlighting.
2. I wrote a small servlet that runs inside of an jetty inside of eclipse with equinox to let eclipse calculate the proposals for my orion editor. I mad use of jquery and JSON to achive that. This works in sync mode but freezes the browser for a while.

And here comes the question:

Is there already a way to make the calculation of the proposals async? Out of the code I was not able to find something like that.

Thanks in advance,

Holger


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: Async ContentAssist [message #923117 is a reply to message #923081] Tue, 25 September 2012 12:02 Go to previous messageGo to next message
Mark Macdonald is currently offline Mark Macdonald
Messages: 21
Registered: July 2009
Junior Member
You can get asynchronous proposal computation by making your computeProposals method return a jQuery.Deferred object* instead of returning the proposals array directly.

Once the proposals have been fetched from the server, the Deferred should resolve (passing the proposals array), and the content assist engine will display them.

* Any object that fulfills the promise.then contract will also work; strictly speaking, jQuery is not required.

Re: Async ContentAssist [message #923821 is a reply to message #923117] Wed, 26 September 2012 04:14 Go to previous messageGo to next message
Holger Schill is currently offline Holger Schill
Messages: 68
Registered: July 2009
Member
Thanks Mark,

I'll try that out.

Cheers,
Holger


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: Async ContentAssist [message #936697 is a reply to message #923117] Mon, 08 October 2012 04:37 Go to previous message
Holger Schill is currently offline Holger Schill
Messages: 68
Registered: July 2009
Member
Hi Marc,

thanks for your support. With the Deferred object the async CA ist running like a charm.

Cheers,

Holger


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Previous Topic:feedback from command-triggered long running operations
Next Topic:Orion and same origin policy
Goto Forum:
  


Current Time: Fri Aug 29 08:28:03 EDT 2014

Powered by FUDForum. Page generated in 0.13090 seconds