Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2008-02-19 22:22:17 -0500
committerDarin Wright2008-02-19 22:22:17 -0500
commita2d30c529b5f0167ade53d3bd47fda8b43341a82 (patch)
tree4d5b071d390ba9b0236a17a902647605ab1b505e /org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples
parent0ba6e05fa03edaeeea6150162f7345c10a16e903 (diff)
downloadeclipse.platform.debug-a2d30c529b5f0167ade53d3bd47fda8b43341a82.tar.gz
eclipse.platform.debug-a2d30c529b5f0167ade53d3bd47fda8b43341a82.tar.xz
eclipse.platform.debug-a2d30c529b5f0167ade53d3bd47fda8b43341a82.zip
*** empty log message ***
Diffstat (limited to 'org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples')
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEventHandler.java4
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerContentProvider.java7
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerControlsModelProxy.java3
3 files changed, 10 insertions, 4 deletions
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEventHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEventHandler.java
index 363718233..a09df84d3 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEventHandler.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEventHandler.java
@@ -14,8 +14,8 @@ import java.util.Timer;
import java.util.TimerTask;
import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.examples.core.midi.launcher.MidiLaunch;
import org.eclipse.debug.examples.core.midi.launcher.ClockControl;
+import org.eclipse.debug.examples.core.midi.launcher.MidiLaunch;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
import org.eclipse.debug.internal.ui.viewers.update.DebugEventHandler;
@@ -93,7 +93,7 @@ public class ControlEventHandler extends DebugEventHandler {
fTimer.schedule(new TimerTask() {
public void run() {
ModelDelta delta = new ModelDelta(fLaunch, IModelDelta.NO_CHANGE);
- delta = delta.addNode(new ClockControl(fLaunch), IModelDelta.STATE);
+ delta = delta.addNode(new ClockControl(fLaunch), IModelDelta.STATE | IModelDelta.CONTENT);
fireDelta(delta);
}
}, 0, 100);
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerContentProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerContentProvider.java
index 1f57c9b1a..348e854e2 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerContentProvider.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerContentProvider.java
@@ -14,11 +14,11 @@ import javax.sound.midi.Sequencer;
import javax.sound.midi.Track;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.examples.core.midi.launcher.ClockControl;
import org.eclipse.debug.examples.core.midi.launcher.LengthControl;
import org.eclipse.debug.examples.core.midi.launcher.MidiLaunch;
import org.eclipse.debug.examples.core.midi.launcher.SequencerControl;
import org.eclipse.debug.examples.core.midi.launcher.TempoControl;
-import org.eclipse.debug.examples.core.midi.launcher.ClockControl;
import org.eclipse.debug.internal.ui.model.elements.ElementContentProvider;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
@@ -38,6 +38,9 @@ public class SequencerContentProvider extends ElementContentProvider {
if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
return getTracks((MidiLaunch) element).length;
} else if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId())) {
+ if (((MidiLaunch)element).isTerminated()) {
+ return 0;
+ }
return 3;
}
return 0;
@@ -77,7 +80,7 @@ public class SequencerContentProvider extends ElementContentProvider {
*/
public Track[] getTracks(MidiLaunch launch) {
Sequencer sequencer = launch.getSequencer();
- if (sequencer != null) {
+ if (sequencer != null && sequencer.isOpen()) {
return sequencer.getSequence().getTracks();
}
return new Track[0];
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerControlsModelProxy.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerControlsModelProxy.java
index e200493fe..3faf1c4f0 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerControlsModelProxy.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerControlsModelProxy.java
@@ -83,6 +83,9 @@ public class SequencerControlsModelProxy extends EventHandlerModelProxy {
if (event.getSource() instanceof Sequencer) {
return fLaunch.getSequencer().equals(event.getSource());
}
+ if (event.getSource().equals(fLaunch)) {
+ return true;
+ }
return false;
}

Back to the top