I have a JFace editor that is mostly made up of a TreeViewer. This is hooked up to a ContentOutlinePage to bring the Outline view to life.
When either one receives a SelectionChangedEvent event they call the others setSelection() method ... and therein lies the problem. setSelection() generates another SelectionChangedEvent ... and thus the infinite loop is joined.
Is there a means of telling if the SelectionChangedEvent was created by actual user interaction rather than by another object calling setSelection()?
Is there a better means still of stopping this sort of deadly-embrace?
Clues welcomed.