drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/refactoring/RuleSourceFieldRenameParticipant.java
private IFile getSourceFieldIFile() {
        Field fReferences;
        try {
            fReferences = processor.getClass().getDeclaredField("fReferences");
            fReferences.setAccessible(true);
            SearchResultGroup object[] = (SearchResultGroup[]) fReferences.get(processor);
            for (SearchResultGroup searchResultGroup : object) {
                if (searchResultGroup.getResource() instanceof IFile)
                    return (IFile) searchResultGroup.getResource();
            }
        } catch (SecurityException e) {
            return null;
        } catch (NoSuchFieldException e) {
            return null;
        } catch (IllegalArgumentException e) {
            return null;
        } catch (IllegalAccessException e) {
            return null;
        }
        return null;
    }
private IFile getSourceFieldIFile() {
        Field fReferences;
        try {
            fReferences = processor.getClass().getDeclaredField("fReferences");
            fReferences.setAccessible(true);
            SearchResultGroup object[] = (SearchResultGroup[]) fReferences.get(processor);
            for (SearchResultGroup searchResultGroup : object) {
                if (searchResultGroup.getResource() instanceof IFile)
                    return (IFile) searchResultGroup.getResource();
            }
        } catch (SecurityException e) {
            return null;
        } catch (NoSuchFieldException e) {
            return null;
        } catch (IllegalArgumentException e) {
            return null;
        } catch (IllegalAccessException e) {
            return null;
        }
        return null;
    }
private IFile getSourceFieldIFile ( ) { Field fReferences ; try { fReferences = processor . getClass ( ) . getDeclaredField ( "fReferences" ) ; fReferences . setAccessible ( true ) ; SearchResultGroup object [ ] = ( SearchResultGroup [ ] ) fReferences . get ( processor ) ; for ( SearchResultGroup searchResultGroup : object ) { if ( searchResultGroup . getResource ( ) instanceof IFile ) return ( IFile ) searchResultGroup . getResource ( ) ; } } catch ( SecurityException e ) { return null ; } catch ( NoSuchFieldException e ) { return null ; } catch ( IllegalArgumentException e ) { return null ; } catch ( IllegalAccessException e ) { return null ; } return null ; }
TODO: Search the Native way to find the SourceField IFile
TODO : Search the Native way to find the SourceField IFile