Summary: | Create core class to handle stepping/stopping/continue work for sourcewindow and HPD | ||
---|---|---|---|
Product: | frysk | Reporter: | Mike Cvet <mcvet> |
Component: | general | Assignee: | Mike Cvet <mcvet> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | scox |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Bug Depends on: | |||
Bug Blocks: | 1633, 3346 |
Description
Mike Cvet
2006-11-12 16:35:09 UTC
frysk-core/frysk/rt: 2006-11-12 Mike Cvet <mcvet@redhat.com> * StateModel.java (StateModel): Added. Handles SourceWindow and HPD stop/continue/stepping. Addresses #3510. (stepIn): Moved over from SourceWindow. (stepOver): Ditto. (lineMap): Ditto. (stepCompleted): Ditto. (run): Ditto. (runningTasks): Ditto. (executeTasks): Ditto. (stepOut): Ditto. (stop): Ditto. (setUpStep): Ditto. (lineLoopCount): Ditto. (dwflMap): Ditto. (pbo): Ditto. (stepInstruction): Ditto. frysk-gui/frysk/gui/srcwin: 2006-11-12 Mike Cvet <mcvet@redhat.com> * SourceWindow.java (procReblocked): Moved work to StateModel. (doStep): Ditto. (doStop): Ditto. (stepCompleted): Ditto. (doRun): Ditto. (stepInstruction): Ditto. (executeTasks): Ditto. (SourceWinBlocker..run): Ditto. (finishSourceWin): Removed some initializations. (SourceWinBlocker.SourceWinBlocker): Updated to call methods in StateModel. (generateProcStackTrace): Ditto. (numSteppingThreads): Ditto. (SourceWinBlocker.existingTask): Ditto. * StepDialog.java (.buttonEvent): Updated to call refactored SourceWindow methods. * StateModel.java: Refactored to RunState.java. * RunState.java: Refactored from StateModel.java. (pbo): Removed. ProcBlockObserver is no longer used. (stateProc): Added. The Proc this RunState is responsible for. (tasks): Added. LinkedList of Tasks belonging to stateProc. (numRunningTasks): Number of Tasks belonging to stateProc in the unblocked state. (RunState): Removed reference to ProcBlockObserver. This class now extends Observable and implements TaskObserver.Instruction directly. Fixes #3538. (getNumRunningTasks): Added. (setNumRunningTasks): Added. (getNumObservers): Added. Returns the number of Observers in this Observable's Observer list. (removeObserver): Added. Calls deleteObserver() with the additional stipulation of releasing all Tasks if there are no more Observers watching them. (setProc): Added. Sets stateProc and tasks, and blocks all tasks from the incoming Proc. (updateExecuted): Added. Callback for TaskObserver.Instruction. Notify all watching observers that a task has been re-blocked. (addedTo): Added. Callback for TaskObserver.Instruction. (deletedFrom): Ditto. (addFailed): Ditto. (requestAdd): Schedules this Observer to be added to all Tasks. (requestAddObservers): Adds this InstructionObserver to the incoming Task. (blockTask): Schedules this InstructionObserver to be added to all incoming Tasks. (getNumTasks): Added. * tests/TestStateModel: Refactored to TestRunState. * tests/TestRunState: Refactored from TestStateModel. Updated to use RunState. |