Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344759 - Avoid using Display.getDefault()
Summary: Avoid using Display.getDefault()
Status: CLOSED WONTFIX
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-04 15:55 EDT by Curtis Windatt CLA
Modified: 2019-08-20 17:41 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Curtis Windatt CLA 2011-05-04 15:55:30 EDT
Several places in PDE UI we are still using Display.getDefault().  We should avoid using it wherever possible.
Comment 1 Curtis Windatt CLA 2011-05-04 15:57:31 EDT
Most of the usage has been around for some time.  Marking as 3.8 for now.  Dani, is this something you feel needs to be changed for 3.7?
Comment 2 Dani Megert CLA 2011-05-05 09:22:42 EDT
> Dani, is this something you feel needs to be changed for 3.7?
Nope.
Comment 3 Eric Moffatt CLA 2011-05-05 11:14:18 EDT
Why would Display.getCurrent() be an ant-pattern ? I ask because I've been trying to standardize the e4 code by using this pattern...;-). Am I going the wrong way?
Comment 4 Dani Megert CLA 2011-05-05 12:21:54 EDT
>Why would Display.getCurrent() be an ant-pattern ?
This bug says Display.getDefault() is evil ;-)

It always depends what you try to do. If you are on a multi-display environment and want the display for widget X, then Display.getCurrent() might not give you that.
Comment 5 Eclipse Genie CLA 2019-08-20 17:41:19 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.