@Override public void reloadCache(boolean checkDuplicates, IProgressMonitor monitor) { IProgressMonitor remainingMonitor; if (ConsistencyRunnable.needsExecution()) { monitor.beginTask(JavaUIMessages.TypeSelectionDialog_progress_consistency, 10); try { ConsistencyRunnable runnable= new ConsistencyRunnable(); 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(); }
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()) { if (history.needConsistencyCheck()) { monitor.beginTask(JavaUIMessages.TypeSelectionDialog_progress_consistency, 100); refreshSearchIndices(new SubProgressMonitor(monitor, 90)); history.checkConsistency(new SubProgressMonitor(monitor, 10)); } else { refreshSearchIndices(monitor); } monitor.done(); fgFirstTime= false; } else { history.checkConsistency(monitor); } } public static boolean needsExecution() {
@Override 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()) { if (history.needConsistencyCheck()) { SubMonitor subMonitor= SubMonitor.convert(monitor,JavaUIMessages.TypeSelectionDialog_progress_consistency, 10 ); refreshSearchIndices(subMonitor.split(9)); history.checkConsistency(subMonitor.split(1)); } else { refreshSearchIndices(monitor); } fgFirstTime= false; } else { history.checkConsistency(monitor); } } public static boolean needsExecution() {
@Override public void reloadCache(boolean checkDuplicates, IProgressMonitor monitor) { IProgressMonitor remainingMonitor; SubMonitor subMonitor= SubMonitor.convert(monitor, JavaUIMessages.TypeSelectionDialog_progress_consistency, 10); if (ConsistencyRunnable.needsExecution()) { try { ConsistencyRunnable runnable= new ConsistencyRunnable(); runnable.run(subMonitor.split(1)); } catch (InvocationTargetException e) { ExceptionHandler.handle(e, JavaUIMessages.TypeSelectionDialog_error3Title, JavaUIMessages.TypeSelectionDialog_error3Message); close(); return; } catch (InterruptedException e) { // cancelled by user close(); return; } remainingMonitor= subMonitor.split(8); } else { remainingMonitor= subMonitor; } super.reloadCache(checkDuplicates, remainingMonitor); }
public void reloadCache(boolean checkDuplicates, IProgressMonitor monitor) { IProgressMonitor remainingMonitor; if (ConsistencyRunnable.needsExecution()) { monitor.beginTask(JavaUIMessages.TypeSelectionDialog_progress_consistency, 10); try { ConsistencyRunnable runnable= new ConsistencyRunnable(); 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(); }
@Override 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()) { if (history.needConsistencyCheck()) { monitor.beginTask(JavaUIMessages.TypeSelectionDialog_progress_consistency, 100); refreshSearchIndices(new SubProgressMonitor(monitor, 90)); history.checkConsistency(new SubProgressMonitor(monitor, 10)); } else { refreshSearchIndices(monitor); } monitor.done(); fgFirstTime= false; } else { history.checkConsistency(monitor); } } public static boolean needsExecution() {