try {
Object rem = getRemoteVar( "sourceName" );
if ( rem == null ) {
return null;
}
StringReference res = (StringReference) rem;
String realres = res.value();
ctxCache.setCacheMVELName( realres );
return realres;
} catch ( NullPointerException e ) {
// Drools 5
} catch ( Throwable e ) {
DroolsEclipsePlugin.log( e );
}
// Drools 5
try {
Object rem = getRemoteVar( "label" );
if ( rem == null ) {
return null;
}
ObjectReference obj = (ObjectReference) rem;
ClassType frameType = (ClassType) obj.type();
Field field = frameType.fieldByName( "sourceFile" );
rem = obj.getValue( field );
if ( rem == null ) {
return null;
}
StringReference res = (StringReference) rem;
String realres = res.value();
ctxCache.setCacheMVELName( realres );
return realres;
} catch ( Throwable e ) {
DroolsEclipsePlugin.log( e );
}