Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 284985 Details for
Bug 569529
[Cocoa] Link and multi-line Text hog CPU in dark theme
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Reproducing snippet
Bug569529_macOS_LinkEatsCPU.java (text/plain), 1.72 KB, created by
Alexandr Miloslavskiy
on 2020-12-07 13:28:12 EST
(
hide
)
Description:
Reproducing snippet
Filename:
MIME Type:
Creator:
Alexandr Miloslavskiy
Created:
2020-12-07 13:28:12 EST
Size:
1.72 KB
patch
obsolete
>/******************************************************************************* > * Copyright (c) 2020 Syntevo and others. > * > * This program and the accompanying materials > * are made available under the terms of the Eclipse Public License 2.0 > * which accompanies this distribution, and is available at > * https://www.eclipse.org/legal/epl-2.0/ > * > * SPDX-License-Identifier: EPL-2.0 > * > * Contributors: > * Syntevo - initial API and implementation > *******************************************************************************/ > >import org.eclipse.swt.SWT; >import org.eclipse.swt.layout.GridLayout; >import org.eclipse.swt.widgets.*; > >import java.util.ArrayList; > >public class Bug569529_macOS_LinkEatsCPU { > public static void main(String[] args) { > System.setProperty("org.eclipse.swt.display.useSystemTheme", "true"); > > final Display display = new Display(); > > final Shell shell = new Shell(display); > shell.setLayout(new GridLayout(1, true)); > > final Label hint = new Label(shell, 0); > hint.setText( > "1) Use macOS with Dark Theme\n" + > "2) Notice that snippet constantly hogs CPU\n" + > "3) On macOS 11.0 BigSur, even invisible links will cause the problem" > ); > > final ArrayList<Link> links = new ArrayList<>(); > Button btnShowHide = new Button(shell, 0); > btnShowHide.setText("Show/hide links"); > btnShowHide.addListener(SWT.Selection, event -> { > for (Link link : links) > { > link.setVisible(!link.getVisible()); > } > }); > > for (int i = 0; i < 10; i++) > { > Link link = new Link(shell, 0); > links.add(link); > link.setText("<a>This is link#" + i + "</a>"); > } > > shell.pack(); > shell.open(); > > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) { > display.sleep(); > } > } > > display.dispose(); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 569529
: 284985