- message.append("T: "); //$NON-NLS-1$
- message.append(new TmfNanoTimestamp(time).toString());
- message.append(" T1: "); //$NON-NLS-1$
- if (fTimeProvider instanceof ITimeDataProvider2) {
- long selectionBegin = ((ITimeDataProvider2) fTimeProvider).getSelectionBegin();
- long selectionEnd = ((ITimeDataProvider2) fTimeProvider).getSelectionEnd();
- message.append(new TmfNanoTimestamp(Math.min(selectionBegin, selectionEnd)).toString());
- if (selectionBegin != selectionEnd) {
- message.append(" T2: "); //$NON-NLS-1$
- message.append(new TmfNanoTimestamp(Math.max(selectionBegin, selectionEnd)).toString());
- message.append(" \u0394: "); //$NON-NLS-1$
- message.append(new TmfTimestampDelta(Math.abs(selectionBegin - selectionEnd), ITmfTimestamp.NANOSECOND_SCALE));
- }
- } else {
- @SuppressWarnings("deprecation")
- long selectedTime = fTimeProvider.getSelectedTime();
- message.append(new TmfNanoTimestamp(selectedTime));
+ if (tdp instanceof ITimeDataProviderConverter) {
+ time = ((ITimeDataProviderConverter) tdp).convertTime(time);
+ }
+ long selectionBegin = tdp.getSelectionBegin();
+ long selectionEnd = tdp.getSelectionEnd();
+ message.append(NLS.bind("T: {0}{1} T1: {2}{3}", //$NON-NLS-1$
+ new Object[] {
+ tf == TimeFormat.CALENDAR ? Utils.formatDate(time) + ' ' : "", //$NON-NLS-1$
+ Utils.formatTime(time, tf, res),
+ tf == TimeFormat.CALENDAR ? Utils.formatDate(Math.min(selectionBegin, selectionEnd)) + ' ' : "", //$NON-NLS-1$
+ Utils.formatTime(Math.min(selectionBegin, selectionEnd), tf, res)
+ }));
+ if (selectionBegin != selectionEnd) {
+ message.append(NLS.bind(" T2: {0}{1} \u0394: {2}", //$NON-NLS-1$
+ new Object[] {
+ tf == TimeFormat.CALENDAR ? Utils.formatDate(Math.max(selectionBegin, selectionEnd)) + ' ' : "", //$NON-NLS-1$
+ Utils.formatTime(Math.max(selectionBegin, selectionEnd), tf, res),
+ Utils.formatDelta(Math.abs(selectionBegin - selectionEnd), tf, res)
+ }));