Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2008-01-29 22:08:11 -0500
committerDarin Wright2008-01-29 22:08:11 -0500
commitcf1e2c4814a446f9c2e9e6a7c0b9130f51d0a350 (patch)
tree61e17a7863a6fccdcdc100d0ae9276baeae588e5 /org.eclipse.debug.examples.ui
parent32ae1d1f2d17bd7ae1ffa3875454a24077832cb6 (diff)
downloadeclipse.platform.debug-cf1e2c4814a446f9c2e9e6a7c0b9130f51d0a350.tar.gz
eclipse.platform.debug-cf1e2c4814a446f9c2e9e6a7c0b9130f51d0a350.tar.xz
eclipse.platform.debug-cf1e2c4814a446f9c2e9e6a7c0b9130f51d0a350.zip
Bug 217025 - Compiler warnings in I20080129-0800 (debug example ui)
Diffstat (limited to 'org.eclipse.debug.examples.ui')
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlsMementoProvider.java1
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java11
2 files changed, 10 insertions, 2 deletions
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlsMementoProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlsMementoProvider.java
index 0dd91e62e..6df637fc8 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlsMementoProvider.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlsMementoProvider.java
@@ -15,7 +15,6 @@ import org.eclipse.debug.examples.core.midi.launcher.MidiLaunch;
import org.eclipse.debug.examples.core.midi.launcher.TempoControl;
import org.eclipse.debug.internal.ui.model.elements.DebugElementMementoProvider;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.ui.IMemento;
/**
* Provides mementos for sequencer elements.
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java
index e27d4227b..eb48c3494 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java
@@ -13,6 +13,7 @@ package org.eclipse.debug.examples.ui.midi.adapters;
import javax.sound.midi.Track;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.examples.core.midi.launcher.MidiLaunch;
import org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
import org.eclipse.jface.viewers.TreePath;
@@ -29,7 +30,15 @@ public class TrackLabelProvider extends ElementLabelProvider {
*/
protected String getLabel(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
Track track = (Track) elementPath.getLastSegment();
- return "Track";
+ MidiLaunch launch = (MidiLaunch) elementPath.getSegment(0);
+ Track[] tracks = launch.getSequencer().getSequence().getTracks();
+ int i = 0;
+ for (i = 0; i < tracks.length; i++) {
+ if (track.equals(tracks[i])) {
+ break;
+ }
+ }
+ return "Track " + i;
}
}

Back to the top