X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=org.eclipse.linuxtools.tmf.ui%2Fsrc%2Forg%2Feclipse%2Flinuxtools%2Ftmf%2Fui%2Fwidgets%2Frawviewer%2FTmfRawEventViewer.java;h=2ee72aee175ca1c51b8bcac721eff04d63e0c099;hb=abbdd66ae5cfcdcb2b8af78a8f4b2dad410974ab;hp=e6ff77486d7a87a74282f69434837407ba1fbb91;hpb=9b749023dcd92299ad0146beabbec59de27863a3;p=deliverable%2Ftracecompass.git diff --git a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/rawviewer/TmfRawEventViewer.java b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/rawviewer/TmfRawEventViewer.java index e6ff77486d..2ee72aee17 100644 --- a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/rawviewer/TmfRawEventViewer.java +++ b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/rawviewer/TmfRawEventViewer.java @@ -57,7 +57,7 @@ import org.eclipse.swt.widgets.Slider; * of visible lines in the StyledText control is set to fill the viewer display area. * An underlying data model is used to store a cache of event raw text line data. * The slider is ratio-based. - * + * * @version 1.0 * @author Patrick Tasse */ @@ -604,9 +604,8 @@ public class TmfRawEventViewer extends Composite implements ControlListener, Sel private int getPreviousCaretOffset(int time) { if (fStoredCaretPosition[0].time == time) { return fStoredCaretPosition[1].caretOffset; - } else { - return fStoredCaretPosition[0].caretOffset; } + return fStoredCaretPosition[0].caretOffset; } private void updateHighlightedRank() { @@ -741,6 +740,8 @@ public class TmfRawEventViewer extends Composite implements ControlListener, Sel } break; } + default: + break; } //fSlider.setSelection((int) (SLIDER_MAX * ((double) fLines.get(fTopLineIndex).rank / fTrace.getNbEvents()))); if (e.detail != SWT.NONE) { @@ -917,6 +918,8 @@ public class TmfRawEventViewer extends Composite implements ControlListener, Sel } break; } + default: + break; } //fSlider.setSelection((int) (SLIDER_MAX * ((double) fLines.get(fTopLineIndex).rank / fTrace.getNbEvents()))); updateHighlightedRank();