Package

org.argus.jawa.compiler

interactive

Permalink

package interactive

Visibility
  1. Public
  2. All

Type Members

  1. trait CompilerControl extends AnyRef

    Permalink

    Interface of interactive compiler to a client such as an IDE The model the presentation compiler consists of the following parts:

    Interface of interactive compiler to a client such as an IDE The model the presentation compiler consists of the following parts:

    unitOfFile: The map from sourcefiles to loaded units. A sourcefile/unit is loaded if it occurs in that map.

    manipulated by: removeUnitOf, reloadSources.

    A call to reloadSources will add the given sources to the loaded units, and start a new background compiler pass to compile all loaded units (with the indicated sources first). The background compiler thread can be interrupted each time an AST node is completely resolved in the following ways:

    1. by a new call to reloadSources. This starts a new background compiler pass. 2. by a call to askScopeCompletion, askToDoFirst, askLinkPos, askLastType. 3. by raising an exception in the scheduler. 4. by passing a high-priority action wrapped in ask { ... }.

    Actions under 1-2 can themselves be interrupted. High-priority actions under 4 cannot; they always run to completion. So these high-priority actions should to be short.

    Normally, an interrupted action continues after the interrupting action is finished. However, if the interrupting action created a new run, the interrupted action is aborted. If there's an outstanding response, it will be set to a Right value with a FreshRunReq exception.

  2. trait CompilerLifecycleManagement extends AnyRef

    Permalink
  3. class FreshRunReq extends Throwable with ControlThrowable

    Permalink

    Signals a request for a fresh background compiler run.

    Signals a request for a fresh background compiler run. Note: The object has to stay top-level so that the PresentationCompilerThread may access it.

  4. class Global extends RichCompilationUnits with CompilerLifecycleManagement with CompilerControl with JawaResolver

    Permalink

    This is the interactive compiler of Jawa.

  5. abstract class InteractiveReporter extends ReporterImpl

    Permalink
  6. case class JawaDelta(changedOrDeletedCUFiles: ISet[AbstractFile], changedOrAddedCUs: ISeq[CompilationUnit]) extends Product with Serializable

    Permalink
  7. trait JawaResolver extends JavaKnowledge

    Permalink

    this object collects info from the symbol table and builds Global, JawaClass, and JawaMethod

  8. class MissingResponse extends Exception

    Permalink
  9. class NoSuchUnitError extends Exception

    Permalink
  10. final class PresentationCompilerThread extends Thread

    Permalink

    A presentation compiler thread.

    A presentation compiler thread. This is a lightweight class, delegating most of its functionality to the compiler instance.

  11. class Response[T] extends AnyRef

    Permalink

    Typical interaction, given a predicate <user-input>, a function <display>, and an exception handler <handle>:

    Typical interaction, given a predicate <user-input>, a function <display>, and an exception handler <handle>:

    val TIMEOUT = 100 // (milliseconds) or something like that val r = new Response() while (!r.isComplete && !r.isCancelled) { if (<user-input>) r.cancel() else r.get(TIMEOUT) match { case Some(Left(data)) => <display>(data) case Some(Right(exc)) => <handle>(exc) case None => } }

  12. trait RichCompilationUnits extends AnyRef

    Permalink

Value Members

  1. object CancelException extends Exception

    Permalink
  2. object ShutdownReq extends Throwable with ControlThrowable

    Permalink

    Signals a request for a shutdown of the presentation compiler.

    Signals a request for a shutdown of the presentation compiler. Note: The object has to stay top-level so that the PresentationCompilerThread may access it.

Ungrouped