NameAndVersion nameAndVersion = new NameAndVersion(nav[0], vn, true,
file);
for (Iterator<String> it = urls.keySet().iterator(); it.hasNext();) {
String loc = it.next();
if (loc.indexOf(nav[0]) >= 0) {
PluginDescriptor desc = urls.get(loc);
//System.out.println("Accounted for: "+desc.getId()+" "+desc.getVersion().toString());
if (!PluginCore.getManager().isPluginEnabled(urls.get(loc)))
nameAndVersion.setStatus(BAD);
else
nameAndVersion.setStatus(LOADED);
it.remove();
}
}
plugins.add(nameAndVersion);
}
}
for (String url : urls.keySet()) {
PluginDescriptor desc = urls.get(url);
File location = new File(desc.getLocation().getFile());
if (location.getPath().indexOf(PluginCore.userPluginDir.getPath()) >= 0)
continue; // This must be a loaded user dir plugin that's been deleted.
//System.out.println("File: "+desc.getLocation().getFile());
NameAndVersion nameAndVersion = new NameAndVersion(desc.getId(),
new VersionNumber(desc.getVersion().toString()), false,
location);
if (!PluginCore.getManager().isPluginEnabled(urls.get(url)))
nameAndVersion.setStatus(BAD);
else
nameAndVersion.setStatus(LOADED);