Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class TestLabelProvider extends BaseLabelProvider implements ICloudLabelP

public static final double WEIGHT = 0.987D;
public static final float ANGLE = 12.34F;
public static Color COLOR = new Color(Display.getDefault(), new RGB(100, 100, 100));
public static Color COLOR = new Color(new RGB(100, 100, 100));
public static FontData[] FONT_DATA = Display.getDefault().getShells()[0].getFont().getFontData();

public String getLabel(Object element) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,10 @@ public TagCloud(Composite parent, int style, int accuracy, int maxSize) {
this.accuracy = accuracy;
this.maxSize = maxSize;
cloudArea = new Rectangle(0, 0, maxSize, maxSize);
highlightColor = new Color(getDisplay(), Display.getDefault().getSystemColor(SWT.COLOR_RED).getRGB());
highlightColor = new Color(Display.getDefault().getSystemColor(SWT.COLOR_RED).getRGB());
gc = new GC(this);
layouter = new DefaultLayouter(accuracy, accuracy);
setBackground(new Color(getDisplay(), Display.getDefault().getSystemColor(SWT.COLOR_WHITE).getRGB()));
setBackground(new Color(Display.getDefault().getSystemColor(SWT.COLOR_WHITE).getRGB()));
initListeners();
textLayerImage = new Image(getDisplay(), 100, 100);
zoomFit();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public void widgetDefaultSelected(SelectionEvent e) {

protected Image createImageFromColor(RGB rgb, int size) {
Image image;
Color color = new Color(Display.getDefault(), rgb);
Color color = new Color(rgb);
image = new Image(Display.getDefault(), size, size);
GC gc = new GC(image);
gc.setBackground(color);
Expand Down Expand Up @@ -355,7 +355,7 @@ public void widgetSelected(SelectionEvent e) {
if (color == null)
return;
Color old = viewer.getCloud().getBackground();
Color c = new Color(Display.getDefault(), color);
Color c = new Color(color);
viewer.getCloud().setBackground(c);
old.dispose();
viewer.getCloud().redrawTextLayerImage();
Expand All @@ -382,7 +382,7 @@ public void widgetSelected(SelectionEvent e) {
if (color == null)
return;
Color old = viewer.getCloud().getSelectionColor();
Color c = new Color(Display.getDefault(), color);
Color c = new Color(color);
viewer.getCloud().setSelectionColor(c);
old.dispose();
viewer.getCloud().redrawTextLayerImage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public void setColors(List<RGB> newColors) {
colorList.clear();
colors.clear();
for (RGB color : newColors) {
Color c = new Color(Display.getDefault(), color);
Color c = new Color(color);
colorList.add(c);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ class DotHtmlLabelIndentationHighlightingTest extends AbstractHighlightingTest {
int foregroundR, int foregroundG, int foregroundB,
int backgroundR, int backgroundG, int backgroundB) {

val expectedForegroundColor = new Color(null, foregroundR, foregroundG, foregroundB)
val expectedBackgroundColor = new Color(null, backgroundR, backgroundG, backgroundB)
val expectedForegroundColor = new Color(foregroundR, foregroundG, foregroundB)
val expectedBackgroundColor = new Color(backgroundR, backgroundG, backgroundB)

for(highlightingRegion : highlightingRegions) {
val offset = highlightingRegion.offset
Expand Down