private boolean isCurrentFieldValueSpecified ( Field f ) throws IllegalAccessException { Object currentValue = f . get ( this ) ; if ( currentValue == null ) { return false ; } Object defaultValue = getDefaultValue ( f ) ; if ( defaultValue == null ) { return currentValue != null ; } else { // There is a default value, check to see if the user has selected something other // than the default return ! defaultValue . equals ( f . get ( this ) ) ; } }
This method will check to see if the user has specified a value different to that of the default value . This is not an ideal solution but should cover most situations in the use of the plugin .