Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2006

Tip: Looking for answers? Try searching our database.

Incremental compilation in IDEs

Thread view: 
amitdev@gmail.com - 04 Jun 2006 17:52 GMT
Hi,

Any idea how the ide's do incremental ocmpilation as you type?
Is it just running a background thread whenever the user makes a
change and is idle?
Any pointers would be appreciated.
Chris Smith - 05 Jun 2006 03:03 GMT
> Any idea how the ide's do incremental ocmpilation as you type?
> Is it just running a background thread whenever the user makes a
> change and is idle?

I'm unsure exactly what you're looking for.  Yes, most likely there is a
background thread there, and probably some synchronization using
wait/notify so that when the code is changed, the environment can run it
against the syntax and semantic checkers.

Not that in general, the IDE doesn't actually compile as you type.  It
just runs the first few stages of the compiler -- lexical, syntactic,
and semantic analysis, and reports any errors.  Eclipse, at least, also
stores the abstract syntax tree that results from the parser (syntactic
analysis), so that it can be used by various plug-ins to interact with
the source code at a higher level than plain text.

Signature

Chris Smith - Lead Software Developer / Technical Trainer
MindIQ Corporation

Mike Schilling - 05 Jun 2006 04:19 GMT
> Not that in general, the IDE doesn't actually compile as you type.  It
> just runs the first few stages of the compiler -- lexical, syntactic,
> and semantic analysis, and reports any errors.  Eclipse, at least, also
> stores the abstract syntax tree that results from the parser (syntactic
> analysis), so that it can be used by various plug-ins to interact with
> the source code at a higher level than plain text.

And note that an IDE [1] does this parsing in a way that's very tolerant of
errors. A class or method that's full of syntax errors is still a candidate
for code completion.

1. In particular, IntelliJ, though I'd be shocked if it were unique in this
respect.
amitdev@gmail.com - 08 Jun 2006 01:52 GMT
Thanks for your comments. Actually I cannot maintain any AST. Imagine
there is a
compiler which is a blackbox. I need to compile and highlight errors as
the user types.
I am planning to run a timer and periodically compile checking if the
user has changed
the text. The main question is when to run the compile. The timer will
be safer I guess
> > Any idea how the ide's do incremental ocmpilation as you type?
> > Is it just running a background thread whenever the user makes a
[quoted text clipped - 15 lines]
> Chris Smith - Lead Software Developer / Technical Trainer
> MindIQ Corporation


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.