Skip to content

Commit

Permalink
ProductFile should extract the locating of the instance area to a method
Browse files Browse the repository at this point in the history
to allow overrides by extenders

Fix eclipse-equinox#100
  • Loading branch information
laeubi committed Dec 13, 2022
1 parent 806b8b8 commit d098efe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-SymbolicName: org.eclipse.equinox.p2.publisher.eclipse;singleton:=true
Bundle-Version: 1.4.200.qualifier
Bundle-Version: 1.4.300.qualifier
Bundle-Activator: org.eclipse.pde.internal.publishing.Activator
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,7 @@ private void addIcon(String os, String value) {
File iconFile = new File(value);
if (!iconFile.isFile()) {
//workspace
Location instanceLocation = ServiceHelper.getService(Activator.getContext(), Location.class, Location.INSTANCE_FILTER);
Location instanceLocation = getInstanceLocation();
if (instanceLocation != null && instanceLocation.getURL() != null) {
File workspace = URLUtil.toFile(instanceLocation.getURL());
if (workspace != null)
Expand All @@ -1371,6 +1371,10 @@ private void addIcon(String os, String value) {
list.add(iconFile.getAbsolutePath());
}

protected Location getInstanceLocation() {
return ServiceHelper.getService(Activator.getContext(), Location.class, Location.INSTANCE_FILTER);
}

private void processSolaris(Attributes attributes) {
addIcon(OS_SOLARIS, attributes.getValue(SOLARIS_LARGE));
addIcon(OS_SOLARIS, attributes.getValue(SOLARIS_MEDIUM));
Expand Down

0 comments on commit d098efe

Please sign in to comment.