Skip to content

Commit

Permalink
ClasspathComputer: drop public method createEntryUsingPreviousEntry
Browse files Browse the repository at this point in the history
Not used internally any more, being public was a mistake eventually.
  • Loading branch information
haubi authored and akurtakov committed Sep 12, 2023
1 parent 3f20167 commit 1e9da99
Showing 1 changed file with 0 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -463,36 +463,6 @@ private static void setMinimumCompliance(Map<String, String> map, String key, St
}
}

/**
* Returns a new classpath container entry for the given execution environment. If the given java project
* has an existing JRE/EE classpath entry, the access rules, extra attributes and isExported settings of
* the existing entry will be added to the new execution entry.
*
* @param javaProject project to check for existing classpath entries
* @param ee id of the execution environment to create an entry for
* @param path id of the container to create an entry for
*
* @return new classpath container entry
* @throws CoreException if there is a problem accessing the classpath entries of the project
*/
public static IClasspathEntry createEntryUsingPreviousEntry(IJavaProject javaProject, String ee, IPath path) throws CoreException {
IClasspathEntry[] entries = javaProject.getRawClasspath();
for (IClasspathEntry entry : entries) {
if (path.isPrefixOf(entry.getPath()) && path.equals(PDECore.JRE_CONTAINER_PATH)) {
return JavaCore.newContainerEntry(getEEPath(ee), entry.getAccessRules(), entry.getExtraAttributes(), entry.isExported());
}
if (entry.getPath().equals(path)) {
return JavaCore.newContainerEntry(path, entry.getAccessRules(), entry.getExtraAttributes(), entry.isExported());
}
}

if (path.equals(PDECore.JRE_CONTAINER_PATH)) {
return createJREEntry(ee);
}

return JavaCore.newContainerEntry(path);
}

/**
* Returns a classpath container entry for the given execution environment.
* @param ee id of the execution environment or <code>null</code>
Expand Down

0 comments on commit 1e9da99

Please sign in to comment.