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 206850 Details for
Bug 362421
[QuickAccess] Regression: "Quick access" panel lacks major usability features from 3.x stream
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.
[patch]
Remember size after re-size
Bug-362421--Resize.patch (text/plain), 3.85 KB, created by
Dean Roberts
on 2011-11-11 10:08:40 EST
(
hide
)
Description:
Remember size after re-size
Filename:
MIME Type:
Creator:
Dean Roberts
Created:
2011-11-11 10:08:40 EST
Size:
3.85 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/SearchField.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/SearchField.java >index 1363c89..8586029 100644 >--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/SearchField.java >+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/SearchField.java >@@ -66,6 +66,8 @@ > private static final String ORDERED_ELEMENTS = "orderedElements"; //$NON-NLS-1$ > private static final int MAXIMUM_NUMBER_OF_ELEMENTS = 60; > private static final int MAXIMUM_NUMBER_OF_TEXT_ENTRIES_PER_ELEMENT = 3; >+ private static final String DIALOG_HEIGHT = "dialogHeight"; //$NON-NLS-1$ >+ private static final String DIALOG_WIDTH = "dialogWidth"; //$NON-NLS-1$ > > Shell shell; > private Text text; >@@ -80,6 +82,8 @@ > private Map<QuickAccessElement, ArrayList<String>> textMap = new HashMap<QuickAccessElement, ArrayList<String>>(); > > private LinkedList<QuickAccessElement> previousPicksList = new LinkedList<QuickAccessElement>(); >+ private int dialogHeight = -1; >+ private int dialogWidth = -1; > > @PostConstruct > void createWidget(final Composite parent, MApplication application, MWindow window) { >@@ -108,6 +112,8 @@ > } > > void doClose() { >+ dialogHeight = shell.getSize().y; >+ dialogWidth = shell.getSize().x; > } > > QuickAccessElement getPerfectMatch(String filter) { >@@ -129,6 +135,7 @@ > shell.addShellListener(new ShellAdapter() { > @Override > public void shellClosed(ShellEvent e) { >+ quickAccessContents.doClose(); > text.setText(""); //$NON-NLS-1$ > e.doit = false; > } >@@ -257,8 +264,8 @@ > Rectangle result = new Rectangle(preferredSize.x, preferredSize.y, preferredSize.width, > preferredSize.height); > >- Monitor mon = getClosestMonitor(display, Geometry.centerPoint(result)); >- >+ Point topLeft = new Point(preferredSize.x, preferredSize.y); >+ Monitor mon = getClosestMonitor(display, topLeft); > Rectangle bounds = mon.getClientArea(); > > if (result.height > bounds.height) { >@@ -280,8 +287,10 @@ > Composite parent = text.getParent(); > Rectangle tempBounds = parent.getBounds(); > Rectangle compBounds = display.map(parent, null, tempBounds); >- int width = Math.max(350, compBounds.width); >- int height = 250; >+ int preferredWidth = dialogWidth == -1 ? 350 : dialogWidth; >+ int width = Math.max(preferredWidth, compBounds.width); >+ int height = dialogHeight == -1 ? 250 : dialogHeight; >+ > shell.setBounds(getConstrainedShellBounds(display, new Rectangle(compBounds.x, compBounds.y > + compBounds.height, width, height))); > shell.layout(); >@@ -305,6 +314,7 @@ > if (!shell.isDisposed() && !table.isDisposed() && !text.isDisposed()) { > if (!shell.isFocusControl() && !table.isFocusControl() > && !text.isFocusControl()) { >+ quickAccessContents.doClose(); > text.setText(""); //$NON-NLS-1$ > quickAccessContents.resetProviders(); > } >@@ -320,6 +330,14 @@ > String[] orderedProviders = dialogSettings.getArray(ORDERED_PROVIDERS); > String[] textEntries = dialogSettings.getArray(TEXT_ENTRIES); > String[] textArray = dialogSettings.getArray(TEXT_ARRAY); >+ try { >+ dialogHeight = dialogSettings.getInt(DIALOG_HEIGHT); >+ dialogWidth = dialogSettings.getInt(DIALOG_WIDTH); >+ } catch (NumberFormatException e) { >+ dialogHeight = -1; >+ dialogWidth = -1; >+ } >+ > if (orderedElements != null && orderedProviders != null && textEntries != null > && textArray != null) { > int arrayIndex = 0; >@@ -375,6 +393,8 @@ > dialogSettings.put(ORDERED_PROVIDERS, orderedProviders); > dialogSettings.put(TEXT_ENTRIES, textEntries); > dialogSettings.put(TEXT_ARRAY, textArray); >+ dialogSettings.put(DIALOG_HEIGHT, shell.getSize().y); >+ dialogSettings.put(DIALOG_WIDTH, shell.getSize().x); > } > > private IDialogSettings getDialogSettings() {
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 362421
: 206850 |
206851
|
206867
|
206870