Skip to content

Commit

Permalink
Fixes to import issues, Java 1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
haiodo committed Sep 28, 2017
1 parent 7c1a68f commit e057abd
Show file tree
Hide file tree
Showing 8 changed files with 608 additions and 709 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ private static StringBuilder addQuoted(StringBuilder sb, String value) {
return sb.append(quote).append(value).append(quote);
}

public static void generateFolderDependencyDiagram(String diagamFile, String searchRoot, final List<String> filters) {
public static void generateFolderDependencyDiagram(String diagamFile, String searchRoot,
final List<String> filters) {
List<RequireProject> projects = RequireProjectEngine.findDotProjects(searchRoot, new NullProgressMonitor(),
false);

Expand Down Expand Up @@ -52,6 +53,22 @@ public static void generateFolderDependencyDiagram(String diagamFile, String sea
Map<String, Set<String>> folderFolder = new HashMap<>();

for (RequireProject prj : projects) {

// From source check
String fullPath = prj.getPath();
boolean skip = false;
for (String s : filters) {
if (s.startsWith("+")) {
if (!fullPath.contains(s.substring(1))) {
skip = true;
break;
}
}
}
if (skip) {
continue;
}

String folder = prj.getParentPath();
Set<String> to = folderFolder.get(folder);
if (to == null) {
Expand Down Expand Up @@ -102,9 +119,39 @@ public static void generateFolderDependencyDiagram(String diagamFile, String sea
if (!folder.equals(folderE.getKey())) {
continue;
}

String fullPath = prj.getPath();
boolean skip = false;
for (String s : filters) {
if (s.startsWith("+")) {
if (!fullPath.contains(s.substring(1))) {
skip = true;
break;
}
}
}
if (skip) {
continue;
}

for (String dep : prj.getDependencies()) {
RequireProject rprj = projectNames.get(dep);
if (rprj != null) {

String fullPath2 = rprj.getPath();
boolean skip2 = false;
for (String s : filters) {
if (s.startsWith("+")) {
if (!fullPath2.contains(s.substring(1))) {
skip2 = true;
break;
}
}
}
if (skip2) {
continue;
}

String parentPath = rprj.getParentPath();
if (parentPath.equals(depE)) {
System.out.println("\t" + prj.getName() + " depend on " + rprj.getName());
Expand Down

0 comments on commit e057abd

Please sign in to comment.