try {
Object o = getRemoteVar( "lineNumber" );
if ( o == null ) {
return -1;
}
IntegerValue val = (IntegerValue) o;
int realval = val.value();
ctxCache.setCacheBreakpointLineNumber( realval );
return realval;
} catch ( NullPointerException e ) {
// Drools 5+
} catch ( Throwable e ) {
DroolsEclipsePlugin.log( e );
}
// Drools 5
try {
Object o = getRemoteVar( "label" );
if ( o == null ) {
return -1;
}
ObjectReference obj = (ObjectReference) o;
ClassType frameType = (ClassType) obj.type();
Field field = frameType.fieldByName( "lineNumber" );
o = obj.getValue( field );
if ( o == null ) {
return -1;
}
IntegerValue val = (IntegerValue) o;
int realval = val.value();
ctxCache.setCacheBreakpointLineNumber( realval );
return realval;
} catch ( NullPointerException e ) {
// Drools 5+
} catch ( Throwable e ) {