* @return The expected {@link IContext}, or <code>null</code> if <code>preferences</code> was <code>null</code>
*/
public static IContext extractContext(DevicePreferences preferences) {
IContext result = null;
if (preferences != null) {
result = new ContextImpl();
result.setScanServerName(preferences.getScanServer());
result.setUserLogFile(preferences.getUserLogFile());
result.setMaxLineNumber(preferences.getMaxLineNumber());
}
return result;