Skip to content
Merged
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
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* Copyright (c) 2000, 2026 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -429,15 +429,14 @@ private void updateColor(ISourceViewer viewer) {
if (text == null || text.isDisposed())
return;

Display display= text.getDisplay();
fColor= createColor(getPreferenceStore(), JavaEditor.LINK_COLOR, display);
fColor= createColor(getPreferenceStore(), JavaEditor.LINK_COLOR);
}

/**
* Creates a color from the information stored in the given preference store.
* Returns <code>null</code> if there is no such information available.
*/
private Color createColor(IPreferenceStore store, String key, Display display) {
private Color createColor(IPreferenceStore store, String key) {

RGB rgb= null;

Expand All @@ -449,7 +448,7 @@ private Color createColor(IPreferenceStore store, String key, Display display) {
rgb= PreferenceConverter.getColor(store, key);

if (rgb != null)
return new Color(display, rgb);
return new Color(rgb);
}

return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* <code><pre>
* Canvas canvas = new Canvas(shell, SWT.BORDER);
* canvas.setBounds(10, 10, 300, 300);
* Color color = new Color(null, 255, 0, 0);
* Color color = new Color(255, 0, 0);
* canvas.setBackground(color);
* ControlEditor editor = new ControlEditor (canvas);
* // The editor will be a button in the bottom right corner of the canvas.
Expand All @@ -28,7 +28,7 @@
* RGB rgb = dialog.getRGB();
* if (rgb != null) {
* if (color != null) color.dispose();
* color = new Color(null, rgb);
* color = new Color(rgb);
* canvas.setBackground(color);
* }
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* <code><pre>
* Canvas canvas = new Canvas(shell, SWT.BORDER);
* canvas.setBounds(10, 10, 300, 300);
* Color color = new Color(null, 255, 0, 0);
* Color color = new Color(255, 0, 0);
* canvas.setBackground(color);
* ControlEditor editor = new ControlEditor (canvas);
* // The editor will be a button in the bottom right corner of the canvas.
Expand All @@ -29,7 +29,7 @@
* RGB rgb = dialog.getRGB();
* if (rgb != null) {
* if (color != null) color.dispose();
* color = new Color(null, rgb);
* color = new Color(rgb);
* canvas.setBackground(color);
* }
*
Expand Down
Loading