mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-13 20:15:22 +02:00
[234030] SystemCommonDeleteAction should not fire delete event if deleting is failed
This commit is contained in:
parent
8052fec2c1
commit
a10b2f3fc5
1 changed files with 14 additions and 5 deletions
|
@ -17,6 +17,7 @@
|
||||||
* Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
|
* Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
|
||||||
* Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
|
* Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
|
||||||
* David McKnight (IBM) - [226143] [api][breaking] Make RSE rename/delete dialogs internal
|
* David McKnight (IBM) - [226143] [api][breaking] Make RSE rename/delete dialogs internal
|
||||||
|
* David McKnight (IBM) - [234030] SystemCommonDeleteAction should not fire delete event if deleting is failed
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.actions;
|
package org.eclipse.rse.internal.ui.actions;
|
||||||
|
@ -140,6 +141,7 @@ public class SystemCommonDeleteAction
|
||||||
SystemBasePlugin.logError(e.getMessage(), e);
|
SystemBasePlugin.logError(e.getMessage(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
SystemMessageException exception = null;
|
||||||
|
|
||||||
|
|
||||||
// remote delete is not as straight-forward
|
// remote delete is not as straight-forward
|
||||||
|
@ -160,6 +162,16 @@ public class SystemCommonDeleteAction
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
{
|
{
|
||||||
|
exception = e;
|
||||||
|
ok = false;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
SystemMessageDialog.displayExceptionMessage(getShell(), e);
|
||||||
|
return Status.CANCEL_STATUS;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!ok){
|
||||||
remoteDeletedObjects.clear();
|
remoteDeletedObjects.clear();
|
||||||
if (monitor.isCanceled() && set.size() > 1)
|
if (monitor.isCanceled() && set.size() > 1)
|
||||||
{
|
{
|
||||||
|
@ -193,13 +205,10 @@ public class SystemCommonDeleteAction
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SystemMessageDialog.displayMessage(e);
|
SystemMessageDialog.displayMessage(exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
SystemMessageDialog.displayExceptionMessage(getShell(), e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// start a runnable to do the action refresh events
|
// start a runnable to do the action refresh events
|
||||||
|
|
Loading…
Add table
Reference in a new issue