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 146169 Details for
Bug 279748
[Progress] Job with property KEEP_PROPERTY doesn't keep if status not Status.OK_STATUS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Fix proposal (not tested)
FinishedJobs.txt (text/plain), 2.42 KB, created by
Krzysztof Daniel
on 2009-09-01 05:17:32 EDT
(
hide
)
Description:
Fix proposal (not tested)
Filename:
MIME Type:
Creator:
Krzysztof Daniel
Created:
2009-09-01 05:17:32 EDT
Size:
2.42 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/internal/progress/FinishedJobs.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/FinishedJobs.java,v >retrieving revision 1.36 >diff -u -r1.36 FinishedJobs.java >--- Eclipse UI/org/eclipse/ui/internal/progress/FinishedJobs.java 24 Mar 2008 19:21:58 -0000 1.36 >+++ Eclipse UI/org/eclipse/ui/internal/progress/FinishedJobs.java 1 Sep 2009 09:20:12 -0000 >@@ -15,7 +15,6 @@ > import java.util.HashMap; > import java.util.HashSet; > import java.util.Set; >- > import org.eclipse.core.commands.common.EventManager; > import org.eclipse.core.runtime.IStatus; > import org.eclipse.core.runtime.jobs.Job; >@@ -109,22 +108,31 @@ > static boolean keep(JobInfo info) { > Job job = info.getJob(); > if (job != null) { >- Object prop = job.getProperty(ProgressManagerUtil.KEEP_PROPERTY); >- if (prop instanceof Boolean) { >- if (((Boolean) prop).booleanValue()) { >- return true; >- } >+ if (hasKeepFlag(job)) >+ return true; >+ >+ IStatus status = job.getResult(); >+ if (status != null && status.getSeverity() == IStatus.ERROR) { >+ return true; > } >+ } >+ return false; >+ } > >- prop = job.getProperty(ProgressManagerUtil.KEEPONE_PROPERTY); >- if (prop instanceof Boolean) { >- if (((Boolean) prop).booleanValue()) { >- return true; >- } >+ /** >+ * Returns true if job has one of keep flags set. >+ */ >+ static boolean hasKeepFlag(Job job) { >+ Object prop = job.getProperty(ProgressManagerUtil.KEEP_PROPERTY); >+ if (prop instanceof Boolean) { >+ if (((Boolean) prop).booleanValue()) { >+ return true; > } >+ } > >- IStatus status = job.getResult(); >- if (status != null && status.getSeverity() == IStatus.ERROR) { >+ prop = job.getProperty(ProgressManagerUtil.KEEPONE_PROPERTY); >+ if (prop instanceof Boolean) { >+ if (((Boolean) prop).booleanValue()) { > return true; > } > } >@@ -288,6 +296,11 @@ > JobInfo info1 = (JobInfo) infos[i]; > Job job = info1.getJob(); > if (job != null) { >+ >+ // do not remove error jobs that have keep flag set >+ if (hasKeepFlag(job)) >+ continue; >+ > IStatus status = job.getResult(); > if (status != null && status.getSeverity() == IStatus.ERROR) { > JobTreeElement topElement = (JobTreeElement) info1
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 279748
:
146161
|
146169
|
157520
|
173002