Skip to content

Commit 368feba

Browse files
committed
Add system property to switch adding transitive dependencies on/off
This change allows users to control whether the transitive dependencies should be recursively added to the classpath by providing boolean system property `pde.addTransitiveDependenciesWithForbiddenAccess`. This allows to mitigate possible functional or performance regressions of the 89b00be / #2218 which changed how PDE resolves classpath for bundle projects. By default the property is considered to be "true". See #2244
1 parent 3b4269f commit 368feba

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/RequiredPluginsClasspathContainer.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ class RequiredPluginsClasspathContainer {
104104
private IClasspathEntry[] fEntries;
105105
private boolean addImportedPackages;
106106

107+
private static final boolean ADD_TRANSITIVE_DEPENDENCIES_WITH_FORBIDDEN_ACCESS = Boolean
108+
.parseBoolean(System.getProperty("pde.addTransitiveDependenciesWithForbiddenAccess", "true")); //$NON-NLS-1$ //$NON-NLS-2$
109+
107110
/**
108111
* Cached list of {@link IClasspathContributor} from plug-in extensions
109112
*
@@ -274,7 +277,9 @@ private List<IClasspathEntry> computePluginEntriesByModel() throws CoreException
274277

275278
addJunit5RuntimeDependencies(added, entries);
276279
addImplicitDependencies(desc, added, entries);
277-
addTransitiveDependenciesWithForbiddenAccess(added, entries);
280+
if (ADD_TRANSITIVE_DEPENDENCIES_WITH_FORBIDDEN_ACCESS) {
281+
addTransitiveDependenciesWithForbiddenAccess(added, entries);
282+
}
278283

279284
// Add any additional library entries contributed via classpath
280285
// contributor

0 commit comments

Comments
 (0)