public DroolsLineBreakpoint getDroolsBreakpoint ( String source ) { if ( source == null ) { return null ; } Iterator < IBreakpoint > iterator = getBreakpoints ( ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { IJavaBreakpoint element = ( IJavaBreakpoint ) iterator . next ( ) ; if ( element instanceof DroolsLineBreakpoint && ( ( DroolsLineBreakpoint ) element ) . getDialectName ( ) . equals ( "mvel" ) ) { DroolsLineBreakpoint l = ( DroolsLineBreakpoint ) element ; try { int matchLine = l . getLineNumber ( ) ; String matchSource = l . getRuleName ( ) ; if ( source . equals ( matchSource ) || l . getFileRuleMappings ( ) . containsKey ( source ) ) { return l ; } } catch ( CoreException e ) { logError ( e ) ; } } } return null ; }
Tries to find a match for the provided breakpoint information from the list of registered breakpoints . For stepping and possibly other purposes it returns also a breakpoint for cases where exactly the same line was not found .