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 60370 Details for
Bug 144469
[open type] Allow immediate input to Open Type dialog
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]
Patch
144469_OpenType_immediate_patch.txt (text/plain), 5.86 KB, created by
Markus Keller
on 2007-03-07 09:08:31 EST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Markus Keller
Created:
2007-03-07 09:08:31 EST
Size:
5.86 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.ui >Index: ui/org/eclipse/jdt/internal/ui/dialogs/FilteredTypesSelectionDialog.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredTypesSelectionDialog.java,v >retrieving revision 1.9 >diff -u -r1.9 FilteredTypesSelectionDialog.java >--- ui/org/eclipse/jdt/internal/ui/dialogs/FilteredTypesSelectionDialog.java 6 Mar 2007 11:19:08 -0000 1.9 >+++ ui/org/eclipse/jdt/internal/ui/dialogs/FilteredTypesSelectionDialog.java 7 Mar 2007 14:01:02 -0000 >@@ -427,15 +427,15 @@ > */ > public int open() { > >- try { >- ensureConsistency(); >- } catch (InvocationTargetException e) { >- ExceptionHandler.handle(e, JavaUIMessages.TypeSelectionDialog_error3Title, JavaUIMessages.TypeSelectionDialog_error3Message); >- return CANCEL; >- } catch (InterruptedException e) { >- // cancelled by user >- return CANCEL; >- } >+// try { >+// ensureConsistency(); >+// } catch (InvocationTargetException e) { >+// ExceptionHandler.handle(e, JavaUIMessages.TypeSelectionDialog_error3Title, JavaUIMessages.TypeSelectionDialog_error3Message); >+// return CANCEL; >+// } catch (InterruptedException e) { >+// // cancelled by user >+// return CANCEL; >+// } > > if (getInitialPattern() == null) { > IWorkbenchWindow window= JavaPlugin.getActiveWorkbenchWindow(); >@@ -556,38 +556,62 @@ > fSearchScope= scope; > } > >- private void ensureConsistency() throws InvocationTargetException, InterruptedException { >- // we only have to ensure history consistency here since the search engine >- // takes care of working copies. >- class ConsistencyRunnable implements IRunnableWithProgress { >- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { >- if (fgFirstTime) { >- // Join the initialize after load job. >- IJobManager manager= Job.getJobManager(); >- manager.join(JavaUI.ID_PLUGIN, monitor); >- } >- OpenTypeHistory history= OpenTypeHistory.getInstance(); >- if (fgFirstTime || history.isEmpty()) { >- monitor.beginTask(JavaUIMessages.TypeSelectionDialog_progress_consistency, 100); >- if (history.needConsistencyCheck()) { >- refreshSearchIndices(new SubProgressMonitor(monitor, 90)); >- history.checkConsistency(new SubProgressMonitor(monitor, 10)); >- } else { >- refreshSearchIndices(monitor); >- } >- monitor.done(); >- fgFirstTime= false; >+ /* >+ * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#reloadCache(boolean, org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.GranualProgressMonitor) >+ */ >+ public void reloadCache(boolean checkDuplicates, IProgressMonitor monitor) { >+ ConsistencyRunnable runnable= new ConsistencyRunnable(); >+ IProgressMonitor remainingMonitor; >+ if (runnable.needsExecution()) { >+ monitor.beginTask(JavaUIMessages.TypeSelectionDialog_progress_consistency, 10); >+ try { >+ runnable.run(new SubProgressMonitor(monitor, 1)); >+ } catch (InvocationTargetException e) { >+ ExceptionHandler.handle(e, JavaUIMessages.TypeSelectionDialog_error3Title, JavaUIMessages.TypeSelectionDialog_error3Message); >+ close(); >+ return; >+ } catch (InterruptedException e) { >+ // cancelled by user >+ close(); >+ return; >+ } >+ remainingMonitor= new SubProgressMonitor(monitor, 9); >+ } else { >+ remainingMonitor= monitor; >+ } >+ super.reloadCache(checkDuplicates, remainingMonitor); >+ monitor.done(); >+ } >+ >+ private static class ConsistencyRunnable implements IRunnableWithProgress { >+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { >+ if (fgFirstTime) { >+ // Join the initialize after load job. >+ IJobManager manager= Job.getJobManager(); >+ manager.join(JavaUI.ID_PLUGIN, monitor); >+ } >+ OpenTypeHistory history= OpenTypeHistory.getInstance(); >+ if (fgFirstTime || history.isEmpty()) { >+ monitor.beginTask(JavaUIMessages.TypeSelectionDialog_progress_consistency, 100); >+ if (history.needConsistencyCheck()) { >+ refreshSearchIndices(new SubProgressMonitor(monitor, 90)); >+ history.checkConsistency(new SubProgressMonitor(monitor, 10)); > } else { >- history.checkConsistency(monitor); >+ refreshSearchIndices(monitor); > } >+ monitor.done(); >+ fgFirstTime= false; >+ } else { >+ history.checkConsistency(monitor); > } >- public boolean needsExecution() { >- OpenTypeHistory history= OpenTypeHistory.getInstance(); >- return fgFirstTime || history.isEmpty() || history.needConsistencyCheck(); >- } >- private void refreshSearchIndices(IProgressMonitor monitor) throws InvocationTargetException { >- try { >- new SearchEngine().searchAllTypeNames( >+ } >+ public boolean needsExecution() { >+ OpenTypeHistory history= OpenTypeHistory.getInstance(); >+ return fgFirstTime || history.isEmpty() || history.needConsistencyCheck(); >+ } >+ private void refreshSearchIndices(IProgressMonitor monitor) throws InvocationTargetException { >+ try { >+ new SearchEngine().searchAllTypeNames( > null, > 0, > // make sure we search a concrete name. This is faster according to Kent >@@ -598,11 +622,15 @@ > new TypeNameRequestor() {}, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > monitor); >- } catch (JavaModelException e) { >- throw new InvocationTargetException(e); >- } >+ } catch (JavaModelException e) { >+ throw new InvocationTargetException(e); > } > } >+ } >+ >+ private void ensureConsistency() throws InvocationTargetException, InterruptedException { >+ // we only have to ensure history consistency here since the search engine >+ // takes care of working copies. > ConsistencyRunnable runnable= new ConsistencyRunnable(); > if (!runnable.needsExecution()) > return;
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 144469
: 60370