Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Orion (Archived) » Async ContentAssist(How to make the computation of the proposals async)
Async ContentAssist [message #923081] Tue, 25 September 2012 15:33 Go to next message
Holger Schill is currently offline Holger SchillFriend
Messages: 75
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 16:02 Go to previous messageGo to next message
Mark Macdonald is currently offline Mark MacdonaldFriend
Messages: 35
Registered: July 2009
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 08:14 Go to previous messageGo to next message
Holger Schill is currently offline Holger SchillFriend
Messages: 75
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 08:37 Go to previous message
Holger Schill is currently offline Holger SchillFriend
Messages: 75
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 Apr 19 04:22:01 GMT 2024

Powered by FUDForum. Page generated in 0.02185 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top