diff options
author | eutarass | 2010-11-24 19:18:06 +0000 |
---|---|---|
committer | eutarass | 2010-11-24 19:18:06 +0000 |
commit | a7e327a8cd095bd7bc7c770c01e0bf211e65e9e8 (patch) | |
tree | 53ff850564f4610332c18b9e0c4692dac990d00a /plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java | |
parent | 1eab734175639148310e7d2a7e4dd68cd297042a (diff) | |
download | org.eclipse.tcf-a7e327a8cd095bd7bc7c770c01e0bf211e65e9e8.tar.gz org.eclipse.tcf-a7e327a8cd095bd7bc7c770c01e0bf211e65e9e8.tar.xz org.eclipse.tcf-a7e327a8cd095bd7bc7c770c01e0bf211e65e9e8.zip |
TCF Debugger: added support for setting minimal run control actions interval
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java')
-rw-r--r-- | plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java index 0a021cc44..b6ad8d015 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java @@ -108,6 +108,8 @@ public class TCFLaunch extends Launch { private boolean disconnected; private boolean shutdown; private boolean last_context_exited; + private long actions_timestamp; + private long actions_interval = 200; private Runnable update_memory_maps; @@ -896,11 +898,19 @@ public class TCFLaunch extends Launch { } } + /****************************************************************************************************************/ + + public void setContextActionsInterval(long interval) { + actions_interval = interval; + } + public void addContextAction(TCFAction action) { assert Protocol.isDispatchThread(); context_action_queue.add(action); if (context_action_queue.getFirst() == action) { - Protocol.invokeLater(action); + long time = System.currentTimeMillis(); + Protocol.invokeLater(actions_timestamp + actions_interval - time, action); + actions_timestamp = time; for (Listener l : listeners) l.onContextActionsStart(this); } } @@ -915,7 +925,9 @@ public class TCFLaunch extends Launch { assert context_action_queue.getFirst() == action; context_action_queue.removeFirst(); if (!context_action_queue.isEmpty()) { - Protocol.invokeLater(context_action_queue.getFirst()); + long time = System.currentTimeMillis(); + Protocol.invokeLater(actions_timestamp + actions_interval - time, context_action_queue.getFirst()); + actions_timestamp = time; } else { for (Listener l : listeners) l.onContextActionsDone(this); |