Skip to content
Snippets Groups Projects
Commit 4e1e362f authored by Simon Barner's avatar Simon Barner
Browse files

- Revert previous change since it resulted into SWT "Widget is disposed" exceptions

- Performed some refactoring (no functional change) and added documentation
refs 2709
parent 0d4e17e8
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,6 @@ import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;
import org.eclipse.wb.swt.ResourceManager;
import org.fortiss.tooling.kernel.extension.data.IConstraintViolation;
import org.fortiss.tooling.kernel.extension.data.IConstraintViolation.ESeverity;
import org.fortiss.tooling.kernel.service.IPersistencyService;
......@@ -55,7 +54,7 @@ import org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 0B397D9F1501CDBECCF10925257AB363
* @ConQAT.Rating YELLOW Hash: 9632DD179445E13A7C49B222BAB96A84
*/
public class MarkerViewPart extends ViewPart {
......@@ -95,9 +94,10 @@ public class MarkerViewPart extends ViewPart {
if(oldImage != null) {
oldImage.dispose();
}
final ImageDescriptor imageDescr =
final ImageDescriptor imageDescriptor =
IMarkerService.getInstance().getImageFor(severity, false);
cell.setImage(ResourceManager.getImage(imageDescr));
// Private copy of image is required is it is owned (and disposed) by the cell
cell.setImage(imageDescriptor.createImage());
} else {
cell.setText("");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment