}
new Thread(new Runnable() {
public void run() {
final ConcurrentMap<File, Set<File>> filesMap = new ConcurrentHashMap<File, Set<File>>();
final ConcurrentMap<File, Graph<String>> nodes = new ConcurrentHashMap<File, Graph<String>>();
new TaskRunner(new ISwingRunnableWithProgress() {
public void run(IProgress progress) throws Throwable {
LWRepository repository = GenerateDependenciesActionHandler.this.jarPanel.repository;
filesMap.putAll(updateFilesMap(repository, progress));
progress.setRange(0, filesMap.entrySet().size());
for (Map.Entry<File, Set<File>> entry : filesMap
.entrySet()) {
progress.increment(1, "");
Graph<String> sourceNode = ensureNodeExists(nodes,
entry.getKey());
for (File usedFile : entry.getValue()) {
if (!usedFile.equals(entry.getKey())) {
Graph<String> targetNode = ensureNodeExists(
nodes, usedFile);
boolean alreadyParent = false;
for (Graph<String> child : sourceNode
.getChildren()) {
if (child == targetNode) {
alreadyParent = true;
break;
}
}
if (!alreadyParent) {
sourceNode.addChild(targetNode);
}
}
}
}
}
}, "", "", 0).exec();
new TaskRunner(new ISwingRunnableWithProgress() {
public void run(IProgress progress) throws Throwable {
progress.setRange(0, nodes.entrySet().size());
File temporaryDir = new File(
IConstants.JAVA_IO_TMPDIR_PATH + "/"
+ UUID.randomUUID().toString());