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 183292 Details for
Bug 173095
[EditorMgmt] "Open With > Other..." dialog should set focus on the list on open
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]
Fix for focus problem
patch.txt (text/plain), 2.39 KB, created by
Markus Keller
on 2010-11-17 09:06:03 EST
(
hide
)
Description:
Fix for focus problem
Filename:
MIME Type:
Creator:
Markus Keller
Created:
2010-11-17 09:06:03 EST
Size:
2.39 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/dialogs/EditorSelectionDialog.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/EditorSelectionDialog.java,v >retrieving revision 1.13 >diff -u -r1.13 EditorSelectionDialog.java >--- Eclipse UI/org/eclipse/ui/dialogs/EditorSelectionDialog.java 10 Nov 2010 14:10:51 -0000 1.13 >+++ Eclipse UI/org/eclipse/ui/dialogs/EditorSelectionDialog.java 17 Nov 2010 14:02:37 -0000 >@@ -23,6 +23,7 @@ > import org.eclipse.jface.util.Util; > import org.eclipse.jface.viewers.ArrayContentProvider; > import org.eclipse.jface.viewers.LabelProvider; >+import org.eclipse.jface.viewers.StructuredSelection; > import org.eclipse.jface.viewers.TableViewer; > import org.eclipse.osgi.util.TextProcessor; > import org.eclipse.swt.SWT; >@@ -60,6 +61,10 @@ > public final class EditorSelectionDialog extends Dialog { > private EditorDescriptor selectedEditor; > >+ private EditorDescriptor hiddenSelectedEditor; >+ >+ private int hiddenTableTopIndex; >+ > private Button externalButton; > > private Table editorTable; >@@ -229,11 +234,32 @@ > } > > protected void fillEditorTable() { >- if (internalButton.getSelection()) { >- editorTableViewer.setInput(getInternalEditors()); >+ EditorDescriptor newSelection = null; >+ int newTopIndex = 0; >+ >+ boolean showInternal = internalButton.getSelection(); >+ boolean isShowingInternal = editorTableViewer.getInput() == getInternalEditors(); >+ if (showInternal != isShowingInternal) { >+ newSelection = hiddenSelectedEditor; >+ newTopIndex = hiddenTableTopIndex; >+ if (editorTable.getSelectionIndex() != -1) { >+ hiddenSelectedEditor = (EditorDescriptor) editorTable.getSelection()[0].getData(); >+ hiddenTableTopIndex = editorTable.getTopIndex(); >+ } >+ } >+ >+ editorTableViewer.setInput(showInternal ? getInternalEditors() : getExternalEditors()); >+ >+ if (newSelection != null) { >+ editorTable.setTopIndex(newTopIndex); >+ editorTableViewer.setSelection(new StructuredSelection(newSelection), true); > } else { >- editorTableViewer.setInput(getExternalEditors()); >+ // set focus to first element, but don't select it: >+ editorTable.setTopIndex(0); >+ editorTable.setSelection(0); >+ editorTable.deselectAll(); > } >+ editorTable.setFocus(); > } > > /**
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 173095
:
159378
|
164741
|
182717
|
182753
| 183292