private long _time1;\r
private long _time0_;\r
private long _time1_;\r
- private long _time0_InLastEvent = 0;\r
- private long _time1_InLastEvent = 0;\r
+ private long _time0_extSynch = 0;\r
+ private long _time1_extSynch = 0;\r
private boolean _timeRangeFixed;\r
private int _nameWidthPref = 200;\r
private int _minNameWidth = 6;\r
_stateCtrl.selectItem(trace, false);\r
}\r
\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis.ITimeAnalysisViewer\r
+ * #setSelectVisTimeWindow(long, long, java.lang.Object)\r
+ */\r
public void setSelectVisTimeWindow(long time0, long time1, Object source) {\r
if (_acceptSetSelAPICalls == false || source == this) {\r
return;\r
}\r
\r
setStartFinishTime(time0, time1);\r
+\r
+ // update notification time values since we are now in synch with the\r
+ // external application\r
+ updateExtSynchTimers();\r
}\r
\r
public void setAcceptSelectionAPIcalls(boolean acceptCalls) {\r
public void notifyStartFinishTimeSelectionListeners(long _time0, long _time1) {\r
if (widgetTimeScaleSelectionListners.size() > 0) {\r
// Check if the time has actually changed from last notification\r
- if (_time0 != _time0_InLastEvent || _time1 != _time1_InLastEvent) {\r
+ if (_time0 != _time0_extSynch || _time1 != _time1_extSynch) {\r
// Notify Time Scale Selection Listeners\r
TmfTimeScaleSelectionEvent event = new TmfTimeScaleSelectionEvent(\r
this, _time0, _time1, getTimeSpace(), getSelectedTime());\r
listener.tsfTmProcessTimeScaleEvent(event);\r
}\r
\r
- // last time notification cache\r
- _time0_InLastEvent = _time0;\r
- _time1_InLastEvent = _time1;\r
+ // update external synch timers\r
+ updateExtSynchTimers();\r
}\r
}\r
}\r
\r
+ /**\r
+ * update the cache timers used to identify the need to send a time window\r
+ * update to external registered listeners\r
+ */\r
+ private void updateExtSynchTimers() {\r
+ // last time notification cache\r
+ _time0_extSynch = _time0;\r
+ _time1_extSynch = _time1;\r
+ }\r
+\r
public void setTimeCalendarFormat(boolean toAbsoluteCaltime) {\r
calendarTimeFormat = toAbsoluteCaltime;\r
}\r