Skip to content

Commit

Permalink
add library name as section name for user imported libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
safirex committed Jun 3, 2020
1 parent 7585da2 commit c66d969
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,19 @@ private Collection<LibraryItem> makeLibraryItems(JarReport jarOrFolderReport) th
final String canonicalName = e.getKlass().getCanonicalName();
if (!excludedItems.contains(canonicalName) &&
!artifactsFilter.contains(canonicalName)) {
final String name = e.getKlass().getSimpleName();
final String fxmlText = JarExplorer.makeFxmlText(e.getKlass());
result.add(new LibraryItem(name, UserLibrary.TAG_USER_DEFINED, fxmlText, iconURL, library));

final String name = e.getKlass().getSimpleName();
String sectionName =jarOrFolderReport.getJar().toString();

// if some os don't use '/' for folder path (don't know if there is)
if (sectionName.lastIndexOf("\\")==-1)
sectionName=UserLibrary.TAG_USER_DEFINED;
else
sectionName=sectionName.substring(sectionName.lastIndexOf("\\")+1,
sectionName.lastIndexOf("."));

final String fxmlText = JarExplorer.makeFxmlText(e.getKlass());
result.add(new LibraryItem(name, sectionName, fxmlText, iconURL, library));
}
}
}
Expand Down

0 comments on commit c66d969

Please sign in to comment.