Skip to content

Commit

Permalink
Support extra classpath with no inner jar specification
Browse files Browse the repository at this point in the history
Currently one can only reference an inner jar with extra-classpath but
not the bundle itself.

As this is actually something useful and this is even used in platform
builds (even though it seem not effective due to this bug), PDE should
support it as well.
  • Loading branch information
laeubi committed Feb 8, 2025
1 parent a3feb92 commit 86b18e7
Showing 1 changed file with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -522,18 +522,26 @@ protected void addExtraClasspathEntries(List<IClasspathEntry> entries, String[]
addExtraLibrary(path, null, entries);
} else {
int count = path.getDevice() == null ? 4 : 3;
if (path.segmentCount() >= count) {
int segments = path.segmentCount();
if (segments >= count - 1) {
String pluginID = path.segment(count - 2);
IPluginModelBase model = PluginRegistry.findModel(pluginID);
if (model != null && model.isEnabled()) {
path = path.setDevice(null);
path = path.removeFirstSegments(count - 1);
IResource underlyingResource = model.getUnderlyingResource();
if (underlyingResource == null) {
IPath result = PDECore.getDefault().getModelManager().getExternalModelManager()
.getNestedLibrary(model, path.toString());
if (result != null) {
addExtraLibrary(result, model, entries);
if (path.segmentCount() == 0) {
String installLocation = model.getInstallLocation();
if (installLocation != null) {
addExtraLibrary(IPath.fromOSString(installLocation), model, entries);
}
} else {
IPath result = PDECore.getDefault().getModelManager().getExternalModelManager()
.getNestedLibrary(model, path.toString());
if (result != null) {
addExtraLibrary(result, model, entries);
}
}
} else {
IFile file = underlyingResource.getProject().getFile(path);
Expand Down

0 comments on commit 86b18e7

Please sign in to comment.