1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-10 01:35:39 +02:00

Fix for 176871: InvalidThreadAccess in CElementLabelProvider

This commit is contained in:
Anton Leherbauer 2007-03-22 15:46:54 +00:00
parent 01274ff514
commit 5cb6f4c74c

View file

@ -21,6 +21,7 @@ import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.cdt.core.model.IInclude;
import org.eclipse.cdt.ui.CUIPlugin;
@ -54,7 +55,6 @@ public class CUILabelProvider extends LabelProvider implements IColorProvider {
fStorageLabelProvider= new StorageLabelProvider();
fImageFlags= imageFlags;
fTextFlags= textFlags;
fInactiveColor= CUIPlugin.getStandardDisplay().getSystemColor(SWT.COLOR_DARK_GRAY);
}
/**
@ -230,6 +230,9 @@ public class CUILabelProvider extends LabelProvider implements IColorProvider {
if (element instanceof IInclude) {
IInclude include= (IInclude)element;
if (!include.isActive()) {
if (fInactiveColor == null && Display.getCurrent() != null) {
fInactiveColor= CUIPlugin.getStandardDisplay().getSystemColor(SWT.COLOR_DARK_GRAY);
}
return fInactiveColor;
}
}