Preferences.addOptionHandler("com.android.ide.eclipse.adt", new OptionHandler());
ProjectNatureFactory.addNature("android", NATURE);
ProjectManagement.addProjectManager(NATURE, new AndroidProjectManager());
Preferences preferences = Preferences.getInstance();
Option option = new Option();
option.setNature(NATURE);
option.setPath("Android");
option.setName(AdtPrefs.PREFS_SDK_DIR);
option.setValidator(new SdkValidator());
preferences.addOption(option);
String sdkLocation = AdtPrefs.getPrefs().getOsSdkFolder();
if (sdkLocation == null || sdkLocation.length() == 0){
logger.warn("Android SDK Location not set.");