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 82449 Details for
Bug 209066
[concurrency] RequestMonitor should preserve the error message intact when propagating errors.
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]
Updated patch for the bug
patch.txt (text/plain), 5.52 KB, created by
Marc Khouzam
on 2007-11-08 10:12:35 EST
(
hide
)
Description:
Updated patch for the bug
Filename:
MIME Type:
Creator:
Marc Khouzam
Created:
2007-11-08 10:12:35 EST
Size:
5.52 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.dd.dsf.ui >Index: src/org/eclipse/dd/dsf/ui/viewmodel/update/VMCache.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.dd.dsf/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/update/VMCache.java,v >retrieving revision 1.14 >diff -u -r1.14 VMCache.java >--- src/org/eclipse/dd/dsf/ui/viewmodel/update/VMCache.java 19 Oct 2007 22:15:19 -0000 1.14 >+++ src/org/eclipse/dd/dsf/ui/viewmodel/update/VMCache.java 8 Nov 2007 15:07:35 -0000 >@@ -16,7 +16,6 @@ > import java.util.Vector; > import java.util.concurrent.Executor; > >-import org.eclipse.core.runtime.IStatus; > import org.eclipse.dd.dsf.concurrent.ConfinedToDsfExecutor; > import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; > import org.eclipse.dd.dsf.concurrent.DefaultDsfExecutor; >@@ -358,36 +357,14 @@ > else > { > service.getModelData(dmc, >- new DataRequestMonitor<IDMData>(executor, null) { >+ new DataRequestMonitor<IDMData>(executor, rm) { > @Override >- protected void handleCompleted() { >- if(getStatus().isOK()) >- { >- if(isCacheWriteEnabled()) >- fData.put(dmc, getData()); >- rm.setData(getData()); >- } >+ protected void handleOK() { >+ if(isCacheWriteEnabled()) >+ fData.put(dmc, getData()); >+ rm.setData(getData()); > rm.done(); > } >- >- @Override >- public synchronized void setCanceled(boolean canceled) { >- rm.setCanceled(canceled); >- super.setCanceled(canceled); >- } >- >- @Override >- public void setMultiStatus(String pluginId, int code, >- String message, IStatus subStatus) { >- rm.setMultiStatus(pluginId, code, message, subStatus); >- super.setMultiStatus(pluginId, code, message, subStatus); >- } >- >- @Override >- public synchronized void setStatus(IStatus status) { >- rm.setStatus(status); >- super.setStatus(status); >- } > } > ); > } >#P org.eclipse.dd.dsf >Index: src/org/eclipse/dd/dsf/concurrent/RequestMonitor.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.dd.dsf/plugins/org.eclipse.dd.dsf/src/org/eclipse/dd/dsf/concurrent/RequestMonitor.java,v >retrieving revision 1.2 >diff -u -r1.2 RequestMonitor.java >--- src/org/eclipse/dd/dsf/concurrent/RequestMonitor.java 8 Jun 2007 23:52:51 -0000 1.2 >+++ src/org/eclipse/dd/dsf/concurrent/RequestMonitor.java 8 Nov 2007 15:07:36 -0000 >@@ -156,20 +156,6 @@ > handleRejectedExecutionException(); > } > } >- >- /** >- * Convenience method for setting the status using a status object of a >- * sub-command. >- * @param pluginId plugin id of the invoked method >- * @param code status code >- * @param message message to include >- * @param subStatus status object to base the RequestMonitor status on >- */ >- public void setMultiStatus(String pluginId, int code, String message, final IStatus subStatus) { >- MultiStatus status = new MultiStatus(pluginId, code, message, null); >- status.merge(subStatus); >- fStatus = status; >- } > > @Override > public String toString() { >@@ -178,7 +164,7 @@ > > /** > * Default handler for the completion of a request. The implementation >- * calls {@link #handleOK()} if the request succeded, and calls >+ * calls {@link #handleOK()} if the request succeeded, and calls > * {@link #handleErrorOrCancel()} or cancel otherwise. > * <br> > * Note: Sub-classes may override this method. >@@ -235,7 +221,7 @@ > */ > protected void handleError() { > if (fParentRequestMonitor != null) { >- fParentRequestMonitor.setMultiStatus(DsfPlugin.PLUGIN_ID, getStatus().getCode(), "Failed: " + toString(), getStatus()); //$NON-NLS-1$ >+ fParentRequestMonitor.setStatus(getStatus()); > fParentRequestMonitor.done(); > } else { > MultiStatus logStatus = new MultiStatus(DsfPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, "Request for monitor: '" + toString() + "' resulted in an error.", null); //$NON-NLS-1$ //$NON-NLS-2$ >@@ -253,19 +239,19 @@ > */ > protected void handleCancel() { > if (fParentRequestMonitor != null) { >- fParentRequestMonitor.setMultiStatus(DsfPlugin.PLUGIN_ID, getStatus().getCode(), "Canceled: " + toString(), getStatus()); //$NON-NLS-1$ >+ fParentRequestMonitor.setStatus(getStatus()); > fParentRequestMonitor.done(); > } > } > > /** > * Default handler for when the executor supplied in the constructor >- * rejects the runnable that is submitted invoke this requrest monitor. >+ * rejects the runnable that is submitted invoke this request monitor. > * This usually happens only when the executor is shutting down. > */ > protected void handleRejectedExecutionException() { > if (fParentRequestMonitor != null) { >- fParentRequestMonitor.setMultiStatus(DsfPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Rejected execution exception when trying to complete the request monitor: " + toString(), getStatus()); //$NON-NLS-1$ >+ fParentRequestMonitor.setStatus(getStatus()); > fParentRequestMonitor.done(); > } else { > MultiStatus logStatus = new MultiStatus(DsfPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, "Request for monitor: '" + toString() + "' resulted in a rejected execution exception.", null); //$NON-NLS-1$ //$NON-NLS-2$
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
Flags:
cdtdoug
:
iplog-
Actions:
View
|
Diff
Attachments on
bug 209066
:
82443
| 82449 |
82484