// Extract Eclipse installations from the log file
File eclipseDir;
for (Iterator iter = log.getEntries().iterator(); iter.hasNext();) {
InstallLogEntry entry = (InstallLogEntry) iter.next();
switch (entry.getOperationCode()) {
case InstallLog.LINK_CREATED_ENTRY :
int tokenIndex = entry.getArgument().indexOf(InstallLogEntry.LINK_ENTRY_TOKEN);
if (tokenIndex == -1)
break;
File linkFile = new File(entry.getArgument().substring(0, tokenIndex));
File linksDir = linkFile.getParentFile();
if (linksDir == null)
break;
eclipseDir = linksDir.getParentFile();
if (eclipseDir == null || !eclipseDir.isDirectory())
break;
result.add(eclipseDir.getAbsoluteFile());
break;
case InstallLog.ECLIPSE_CONFIG_CLEANED_ENTRY :
eclipseDir = new File(entry.getArgument());
if (!eclipseDir.isDirectory())
break;
result.add(eclipseDir.getAbsoluteFile());
break;
}