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 67469 Details for
Bug 182917
[Dialogs] Improve progress in FilteredItemsSelectionDialog
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposition of changes
patch_182917_20070516.txt (text/plain), 4.47 KB, created by
Krzysztof Michalski
on 2007-05-16 14:03:04 EDT
(
hide
)
Description:
Proposition of changes
Filename:
MIME Type:
Creator:
Krzysztof Michalski
Created:
2007-05-16 14:03:04 EDT
Size:
4.47 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/dialogs/FilteredItemsSelectionDialog.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FilteredItemsSelectionDialog.java,v >retrieving revision 1.42 >diff -u -r1.42 FilteredItemsSelectionDialog.java >--- Eclipse UI/org/eclipse/ui/dialogs/FilteredItemsSelectionDialog.java 15 May 2007 13:13:44 -0000 1.42 >+++ Eclipse UI/org/eclipse/ui/dialogs/FilteredItemsSelectionDialog.java 16 May 2007 18:01:21 -0000 >@@ -893,7 +893,7 @@ > */ > public void scheduleProgressMessageRefresh() { > if (refreshProgressMessageJob.cancel()) >- refreshProgressMessageJob.schedule(); >+ refreshProgressMessageJob.schedulePrgressRefresh(false); > } > > /* >@@ -1278,7 +1278,8 @@ > */ > private class RefreshProgressMessageJob extends UIJob { > >- private boolean cancelling = false; >+ private boolean cancelling= true; >+ private boolean cyclical=false; > > /** > * Creates a new instance of the class >@@ -1293,14 +1294,15 @@ > > public IStatus runInUIThread(IProgressMonitor monitor) { > >- cancelling = false; >- > if (FilteredItemsSelectionDialog.this != null) { > FilteredItemsSelectionDialog.this.updateProgressLabel(); > } >- >- if (cancelling) >- refreshProgressMessageJob.schedule(); >+ >+ if (cancelling) >+ return new Status(IStatus.CANCEL, PlatformUI.PLUGIN_ID, IStatus.CANCEL, EMPTY_STRING, null); >+ >+ if (cyclical) >+ schedule(200); > > return new Status(IStatus.OK, PlatformUI.PLUGIN_ID, IStatus.OK, > EMPTY_STRING, null); >@@ -1313,8 +1315,21 @@ > */ > protected void canceling() { > super.canceling(); >- this.cancelling = true; >+ this.cancelling= true; >+ this.cyclical= false; >+ } >+ >+ /** >+ * Schedule progress refresh job >+ * @param cyclical if true refresh is cyclical with 300 milliseconds deley >+ * if false it will be schedule only once >+ */ >+ public void schedulePrgressRefresh(boolean cyclical) { >+ this.cancelling= false; >+ this.cyclical= cyclical; >+ schedule(); > } >+ > } > > /** >@@ -1358,7 +1373,7 @@ > > if (FilteredItemsSelectionDialog.this != null) { > GranualProgressMonitor wrappedMonitor = new GranualProgressMonitor( >- monitor, contentProvider, true); >+ monitor, true); > FilteredItemsSelectionDialog.this.reloadCache(true, > wrappedMonitor); > } >@@ -1700,9 +1715,7 @@ > * > * @see GranualProgressMonitor#internalWorked(double) > */ >- private static class GranualProgressMonitor extends ProgressMonitorWrapper { >- >- private ContentProvider contentProvider; >+ private class GranualProgressMonitor extends ProgressMonitorWrapper { > > private String name; > >@@ -1730,9 +1743,8 @@ > * from a non-filtering job will not be displayed on UI. > */ > public GranualProgressMonitor(IProgressMonitor monitor, >- ContentProvider contentProvider, boolean isFiltering) { >+ boolean isFiltering) { > super(monitor); >- this.contentProvider = contentProvider; > this.isFiltering = isFiltering; > } > >@@ -1770,7 +1782,8 @@ > if (this.name == null) > this.name = name; > this.totalWork = totalWork; >- updateProgressMessage(); >+ if (refreshProgressMessageJob.cancel()) >+ refreshProgressMessageJob.schedulePrgressRefresh(true); > } > > /* >@@ -1792,6 +1805,7 @@ > done = true; > contentProvider.setProgressMessage("", isFiltering); //$NON-NLS-1$ > super.done(); >+ refreshProgressMessageJob.cancel(); > } > > /* >@@ -1811,8 +1825,8 @@ > */ > public void internalWorked(double work) { > worked = worked + work; >- if ((((int) (((worked - work) * 10) / totalWork)) < ((int) ((worked * 10) / totalWork))) >- || (((int) ((worked * 10) / totalWork)) == 0)) >+ if ((((int) (((worked - work)) / totalWork)) < ((int) ((worked) / totalWork))) >+ || (((int) ((worked) / totalWork)) == 0)) > if (!isCanceled()) > updateProgressMessage(); > } >@@ -1886,7 +1900,7 @@ > */ > protected final IStatus run(IProgressMonitor parent) { > GranualProgressMonitor monitor = new GranualProgressMonitor(parent, >- contentProvider, true); >+ true); > return doRun(monitor); > } > >@@ -2555,7 +2569,6 @@ > if (!isFiltering && filterJob.getState() == Job.RUNNING) > return; > this.progressMessage = progressMessage; >- scheduleProgressMessageRefresh(); > } > > /**
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 182917
: 67469 |
68451
|
68570
|
68597
|
68624