### Eclipse Workspace Patch 1.0 #P org.eclipse.rse.services.dstore Index: src/org/eclipse/rse/services/dstore/AbstractDStoreService.java =================================================================== RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/AbstractDStoreService.java,v retrieving revision 1.10 diff -u -r1.10 AbstractDStoreService.java --- src/org/eclipse/rse/services/dstore/AbstractDStoreService.java 14 May 2007 09:44:35 -0000 1.10 +++ src/org/eclipse/rse/services/dstore/AbstractDStoreService.java 8 Jun 2007 15:02:00 -0000 @@ -11,7 +11,8 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes + * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes + * David McKnight (IBM) - [190803] Canceling a long-running dstore job prints "InterruptedException" to stdout ********************************************************************************/ package org.eclipse.rse.services.dstore; @@ -87,11 +88,7 @@ DStoreStatusMonitor smon = getStatusMonitor(getDataStore()); smon.waitForUpdate(status, monitor); int resultSize = subject.getNestedSize(); - if (resultSize == 0) - { - //System.out.println("status="+status); - //System.out.println("subject="+subject); - } + checkHostJVM(); // get results List nested = subject.getNestedData(); @@ -100,15 +97,19 @@ return (DataElement[])nested.toArray(new DataElement[resultSize]); } } - catch (Exception e) - { - e.printStackTrace(); + catch (InterruptedException e) + { + // cancel monitor if it's still not canceled + if (monitor != null && !monitor.isCanceled()) + { + monitor.setCanceled(true); + } + + //InterruptedException is used to report user cancellation, so no need to log + //This should be reviewed (use OperationCanceledException) with bug #190750 } } - else - { - System.out.println("no query command for "+ subject); //$NON-NLS-1$ - } + return new DataElement[0]; } @@ -125,8 +126,16 @@ DStoreStatusMonitor smon = getStatusMonitor(getDataStore()); smon.waitForUpdate(status, monitor); } - catch (Exception e) + catch (InterruptedException e) { + // cancel monitor if it's still not canceled + if (monitor != null && !monitor.isCanceled()) + { + monitor.setCanceled(true); + } + + //InterruptedException is used to report user cancellation, so no need to log + //This should be reviewed (use OperationCanceledException) with bug #190750 } return status; } @@ -153,9 +162,16 @@ return (DataElement[])nested.toArray(new DataElement[subject.getNestedSize()]); } } - catch (Exception e) + catch (InterruptedException e) { - e.printStackTrace(); + // cancel monitor if it's still not canceled + if (monitor != null && !monitor.isCanceled()) + { + monitor.setCanceled(true); + } + + //InterruptedException is used to report user cancellation, so no need to log + //This should be reviewed (use OperationCanceledException) with bug #190750 } } return new DataElement[0]; @@ -174,8 +190,17 @@ { getStatusMonitor(ds).waitForUpdate(status, monitor); } - catch (Exception e) + catch (InterruptedException e) { + // cancel monitor if it's still not canceled + if (monitor != null && !monitor.isCanceled()) + { + monitor.setCanceled(true); + } + + //InterruptedException is used to report user cancellation, so no need to log + //This should be reviewed (use OperationCanceledException) with bug #190750 + } return status; } @@ -252,7 +277,14 @@ } catch (InterruptedException e) { - e.printStackTrace(); + // cancel monitor if it's still not canceled + if (monitor != null && !monitor.isCanceled()) + { + monitor.setCanceled(true); + } + + //InterruptedException is used to report user cancellation, so no need to log + //This should be reviewed (use OperationCanceledException) with bug #190750 } getMinerElement(); Index: src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java =================================================================== RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java,v retrieving revision 1.11 diff -u -r1.11 DStoreFileService.java --- src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java 5 Jun 2007 14:06:13 -0000 1.11 +++ src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java 8 Jun 2007 15:01:59 -0000 @@ -15,6 +15,7 @@ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API * Xuan Chen (IBM) - [189681] [dstore][linux] Refresh Folder in My Home messes up Refresh in Root * Kushal Munir (IBM) - [189352] Replace with appropriate line end character on upload + * David McKnight (IBM) - [190803] Canceling a long-running dstore job prints "InterruptedException" to stdout ********************************************************************************/ package org.eclipse.rse.internal.services.dstore.files; @@ -679,10 +680,15 @@ } catch (InterruptedException e) { - e.printStackTrace(); + // cancel monitor if it's still not canceled + if (monitor != null && !monitor.isCanceled()) + { + monitor.setCanceled(true); + } + + //InterruptedException is used to report user cancellation, so no need to log + //This should be reviewed (use OperationCanceledException) with bug #190750 } - - //getStatusMonitor(ds).waitForUpdate(status, monitor); } catch (Exception e) { Index: src/org/eclipse/rse/internal/services/dstore/processes/DStoreProcessService.java =================================================================== RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/processes/DStoreProcessService.java,v retrieving revision 1.6 diff -u -r1.6 DStoreProcessService.java --- src/org/eclipse/rse/internal/services/dstore/processes/DStoreProcessService.java 10 May 2007 14:11:15 -0000 1.6 +++ src/org/eclipse/rse/internal/services/dstore/processes/DStoreProcessService.java 8 Jun 2007 15:01:59 -0000 @@ -12,6 +12,7 @@ * * Contributors: * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API + * David McKnight (IBM) - [190803] Canceling a long-running dstore job prints "InterruptedException" to stdout ********************************************************************************/ package org.eclipse.rse.internal.services.dstore.processes; @@ -304,7 +305,14 @@ } catch (InterruptedException e) { - e.printStackTrace(); + // cancel monitor if it's still not canceled + if (monitor != null && !monitor.isCanceled()) + { + monitor.setCanceled(true); + } + + //InterruptedException is used to report user cancellation, so no need to log + //This should be reviewed (use OperationCanceledException) with bug #190750 } getMinerElement(); } Index: src/org/eclipse/rse/services/dstore/util/DStoreStatusMonitor.java =================================================================== RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DStoreStatusMonitor.java,v retrieving revision 1.11 diff -u -r1.11 DStoreStatusMonitor.java --- src/org/eclipse/rse/services/dstore/util/DStoreStatusMonitor.java 5 Jun 2007 10:17:44 -0000 1.11 +++ src/org/eclipse/rse/services/dstore/util/DStoreStatusMonitor.java 8 Jun 2007 15:02:00 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2002, 2007 IBM Corporation and others. + * Copyright (c) 2006, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,7 +12,7 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * David McKnight (IBM) - [190803] Canceling a long-running dstore job prints "InterruptedException" to stdout *******************************************************************************/ package org.eclipse.rse.services.dstore.util; @@ -382,7 +382,9 @@ } catch (InterruptedException e) { - e.printStackTrace(); + //InterruptedException is used to report user cancellation, so no need to log + //This should be reviewed (use OperationCanceledException) with bug #190750 + return; } } Index: src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellService.java =================================================================== RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellService.java,v retrieving revision 1.4 diff -u -r1.4 DStoreShellService.java --- src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellService.java 10 May 2007 14:11:15 -0000 1.4 +++ src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellService.java 8 Jun 2007 15:01:59 -0000 @@ -12,6 +12,7 @@ * * Contributors: * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API + * David McKnight (IBM) - [190803] Canceling a long-running dstore job prints "InterruptedException" to stdout ********************************************************************************/ package org.eclipse.rse.internal.services.dstore.shells; @@ -151,7 +152,14 @@ } catch (InterruptedException e) { - e.printStackTrace(); + // cancel monitor if it's still not canceled + if (monitor != null && !monitor.isCanceled()) + { + monitor.setCanceled(true); + } + + //InterruptedException is used to report user cancellation, so no need to log + //This should be reviewed (use OperationCanceledException) with bug #190750 } getMinerElement(getEnvSystemMinerId()); }