use of org.eclipse.jdt.internal.core.JarEntryResource in project che by eclipse.
the class JavaNavigation method convertToJarEntry.
private List<JarEntry> convertToJarEntry(Object[] rootContent, IPackageFragmentRoot root) throws JavaModelException {
List<JarEntry> result = new ArrayList<>();
for (Object o : rootContent) {
if (o instanceof IPackageFragment) {
JarEntry entry = DtoFactory.getInstance().createDto(JarEntry.class);
IPackageFragment packageFragment = (IPackageFragment) o;
entry.setName(getSpecificText((IJavaElement) o));
entry.setPath(packageFragment.getElementName());
entry.setType(JarEntryType.PACKAGE);
result.add(entry);
}
if (o instanceof IClassFile) {
JarEntry entry = getJarClass((IClassFile) o);
result.add(entry);
}
if (o instanceof JarEntryResource) {
result.add(getJarEntryResource((JarEntryResource) o));
}
}
Collections.sort(result, comparator);
return result;
}
Aggregations