|
1 | 1 | /******************************************************************************* |
2 | | - * Copyright (c) 2005, 2019 IBM Corporation and others. |
| 2 | + * Copyright (c) 2005, 2026 IBM Corporation and others. |
3 | 3 | * |
4 | 4 | * This program and the accompanying materials |
5 | 5 | * are made available under the terms of the Eclipse Public License 2.0 |
|
22 | 22 | import org.eclipse.core.runtime.FileLocator; |
23 | 23 | import org.eclipse.core.runtime.IPath; |
24 | 24 | import org.eclipse.jface.resource.ImageDescriptor; |
| 25 | +import org.eclipse.jface.viewers.DecorationOverlayIcon; |
| 26 | +import org.eclipse.jface.viewers.IDecoration; |
25 | 27 | import org.eclipse.jface.viewers.LabelProvider; |
26 | 28 | import org.eclipse.swt.SWT; |
27 | 29 | import org.eclipse.swt.graphics.Image; |
@@ -152,8 +154,8 @@ private ImageDescriptor getPredefinedImageDescriptor(String kind) { |
152 | 154 |
|
153 | 155 | private void createImageWithOverlay(int state, String imagePath, ImageSet images, ImageDescriptor baseDescriptor) { |
154 | 156 | ImageDescriptor descriptor = createImageDescriptor(imagePath); |
155 | | - OverlayIcon icon = new OverlayIcon(baseDescriptor, new ImageDescriptor[][] { |
156 | | - {}, { descriptor } }); |
| 157 | + DecorationOverlayIcon icon = new DecorationOverlayIcon(baseDescriptor.createImage(), descriptor, |
| 158 | + IDecoration.BOTTOM_RIGHT); |
157 | 159 | images.put(state, icon.createImage()); |
158 | 160 | } |
159 | 161 |
|
|
0 commit comments