/**
* Search for unlinked installations
*/
protected IStatus run(Context installer) {
InstallOptions options = installer.getOptions();
if (options.isVerbose())
System.out.println("Scanning for unlinked installations");
Collection result = new TreeSet();
try {
findUnlinkedDirs(rootDir, installer.getOptions(), result);
}
catch (ScanFailedException e) {
System.out.println("Abort scan for unlinked installations because exception occurred");
e.printStackTrace();
result.clear();
}
StringBuffer buf = new StringBuffer(result.size() * 40);
for (Iterator iter = result.iterator(); iter.hasNext();) {
File installDir = (File) iter.next();
if (buf.length() > 0)
buf.append(",");
buf.append(installDir.getPath());
}
options.set(OPTION_UNLINKED_INSTALL_DIRS, buf.toString());
return super.run(installer);
}