Skip to content

Commit

Permalink
Invalid image for license agreement data #1042
Browse files Browse the repository at this point in the history
Use proper URL and fall back to default image.

Signed-off-by: Alexander Fedorov <[email protected]>
  • Loading branch information
ruspl-afed committed Feb 20, 2022
1 parent e552d18 commit 3f2e966
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
*******************************************************************************/
package org.eclipse.passage.lic.licenses.edit.providers;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collection;
import java.util.List;

Expand Down Expand Up @@ -193,8 +195,12 @@ protected void addContentTypePropertyDescriptor(Object object) {
*/
@Override
public Object getImage(Object object) {
return overlayImage(object,
getResourceLocator().getImage("../org.eclipse.passage.lic.agreements.edit/full/obj16/agreement.png")); //$NON-NLS-1$
try {
return overlayImage(object,
new URL("platform:/plugin/org.eclipse.passage.lic.agreements.edit/full/obj16/agreement.png")); //$NON-NLS-1$
} catch (MalformedURLException e) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/license.png")); //$NON-NLS-1$
}
}

/**
Expand Down

0 comments on commit 3f2e966

Please sign in to comment.