Incremental compilation in IDEs

Discussion in 'Java' started by amitdev@gmail.com, Jun 4, 2006.

  1. Guest

    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.
     
    , Jun 4, 2006
    #1
    1. Advertising

  2. Chris Smith Guest

    <> wrote:
    > 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.

    --
    Chris Smith - Lead Software Developer / Technical Trainer
    MindIQ Corporation
     
    Chris Smith, Jun 5, 2006
    #2
    1. Advertising

  3. "Chris Smith" <> wrote in message
    news:...

    >
    > 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.
     
    Mike Schilling, Jun 5, 2006
    #3
  4. Guest

    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
    Chris Smith wrote:
    > <> wrote:
    > > 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.
    >
    > --
    > Chris Smith - Lead Software Developer / Technical Trainer
    > MindIQ Corporation
     
    , Jun 8, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Goldin

    Incremental search

    Mark Goldin, Jul 26, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    2,967
    rxiong
    Aug 25, 2010
  2. Luis Ferrao

    DataGrid: iTunes-like incremental search

    Luis Ferrao, Jan 10, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    986
    Luis Ferrao
    Jan 10, 2005
  3. Kevin McMurtrie

    Need help with incremental GC failure

    Kevin McMurtrie, Jun 19, 2004, in forum: Java
    Replies:
    0
    Views:
    664
    Kevin McMurtrie
    Jun 19, 2004
  4. Kevin McMurtrie

    Need help with incremental GC failure

    Kevin McMurtrie, Jun 19, 2004, in forum: Java
    Replies:
    0
    Views:
    648
    Kevin McMurtrie
    Jun 19, 2004
  5. David
    Replies:
    0
    Views:
    362
    David
    Mar 1, 2005
Loading...

Share This Page