ClassPathEntry[] entries = new ClassPathEntry[antJars.length];
for (int i = 0; i < antJars.length; i++) {
File tjar = new File(antLib, antJars[i]);
entries[i] = new ClassPathEntry(tjar);
}
AntCorePreferences antPref = AntCorePlugin.getPlugin().getPreferences();
antPref.setAntHome(anthome.toString());
antPref.setAntHomeClasspathEntries(entries);
antPref.updatePluginPreferences();
}
else {
AntCorePreferences antPref = AntCorePlugin.getPlugin().getPreferences();
antPref.setAntHome(antPref.getDefaultAntHome());
antPref.setAntHomeClasspathEntries(antPref.getDefaultAntHomeEntries());
antPref.updatePluginPreferences();
}
}