public static Set < IMarker > getMarkerFromSelection ( ISelection selection ) { Set < IMarker > markers = new HashSet <> ( ) ; if ( ! ( selection instanceof IStructuredSelection ) ) { return markers ; } IStructuredSelection sSelection = ( IStructuredSelection ) selection ; for ( Iterator < ? > iter = sSelection . iterator ( ) ; iter . hasNext ( ) ; ) { Object next = iter . next ( ) ; markers . addAll ( getMarkers ( next ) ) ; } return markers ; }
Fish an IMarker out of given selection .