How do I compile file opened in editor when idle? [message #224190] |
Wed, 07 April 2004 21:36  |
Eclipse User |
|
|
|
Originally posted by: cwillia1.rochester.rr.com
Hi,
I'm helping out writing a plugin for ruby development. We'd like to be
able to run a parser on the open ruby file after the user is idle for a
second or so inside the editor. This is so that we can update the
OutlinePage and create new markers. Perviously I had cheated and parsed
during the OutlinePage getElements calls, which achieved the behavior I
was looking for, but significantly slowed down the editing.
How does the JDT manage this? Do I need to have an IResourceListener and
filter for files changes to the opened file? How do I wait for the idle
period?
Thanks,
Chris
|
|
|
Re: How do I compile file opened in editor when idle? [message #224598 is a reply to message #224190] |
Thu, 08 April 2004 11:41  |
Eclipse User |
|
|
|
You may want to take a look at the Ant editor..a little simpler than JDT :-)
We do a background "reconcile" to update the Ant Model.
We wait about 500 ms once the document is marked dirty and then kick off the
updates.
HTH
Darins
"Christopher Williams" <cwillia1@rochester.rr.com> wrote in message
news:c52abi$j1m$1@eclipse.org...
> Hi,
> I'm helping out writing a plugin for ruby development. We'd like to be
> able to run a parser on the open ruby file after the user is idle for a
> second or so inside the editor. This is so that we can update the
> OutlinePage and create new markers. Perviously I had cheated and parsed
> during the OutlinePage getElements calls, which achieved the behavior I
> was looking for, but significantly slowed down the editing.
>
> How does the JDT manage this? Do I need to have an IResourceListener and
> filter for files changes to the opened file? How do I wait for the idle
> period?
>
> Thanks,
> Chris
>
|
|
|
Powered by
FUDForum. Page generated in 0.29371 seconds