Skip to content

Commit

Permalink
Remove now unused API-tools system-packages profiles
Browse files Browse the repository at this point in the history
With eclipse-pde#279 and
eclipse-pde#284 the users of those
profiles were changed to use better ways to find the available
system-packages of a Java version.
  • Loading branch information
HannesWell committed Aug 11, 2022
1 parent 2eef7d1 commit ce5c86a
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 1,669 deletions.
3 changes: 1 addition & 2 deletions apitools/org.eclipse.pde.api.tools/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ bin.includes = .,\
META-INF/,\
plugin.xml,\
lib/apitooling-ant.jar,\
scripts/,\
system_packages/
scripts/
jars.extra.classpath=platform:/plugin/org.apache.ant/lib/ant.jar,platform:/plugin/org.objectweb.asm
jars.compile.order = .,\
lib/apitooling-ant.jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,29 +245,20 @@ private void initialize(ExecutionEnvironmentDescription ee) throws CoreException
}
}


private static Properties getPropertiesFromURL(URL profileURL) {
InputStream is = null;
try {
URL resolvedURL = FileLocator.resolve(profileURL);
URLConnection openConnection = resolvedURL.openConnection();
openConnection.setUseCaches(false);
is = openConnection.getInputStream();
if (is != null) {
Properties profile = new Properties();
profile.load(is);
return profile;
}
} catch (IOException e) {
ApiPlugin.log(e);
} finally {
try {
try (InputStream is = openConnection.getInputStream()) {
if (is != null) {
is.close();
Properties profile = new Properties();
profile.load(is);
return profile;
}
} catch (IOException e) {
ApiPlugin.log(e);
}
} catch (IOException e) {
ApiPlugin.log(e);
}
return null;
}
Expand Down Expand Up @@ -306,7 +297,6 @@ private void initialize(Properties profile, ExecutionEnvironmentDescription desc
// org.eclipse.pde.api.tools\system_packages\JavaSE-x-systempackages.profile
// They are calculated by launching eclipse in Java x and then using
// org.eclipse.osgi.storage.Storage.calculateVMPackages
// Post Java 18 we use TargetPlatformHelper.querySystemPackages
String environmentId = description.getProperty(ExecutionEnvironmentDescription.CLASS_LIB_LEVEL);
IExecutionEnvironmentsManager manager = JavaRuntime.getExecutionEnvironmentsManager();
IExecutionEnvironment environment = manager.getEnvironment(environmentId);
Expand Down

This file was deleted.

Loading

0 comments on commit ce5c86a

Please sign in to comment.