View | Details | Raw Unified | Return to bug 190803 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/rse/services/dstore/AbstractDStoreService.java (-18 / +50 lines)
Lines 11-17 Link Here
11
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
11
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
12
 * 
12
 * 
13
 * Contributors:
13
 * Contributors:
14
 * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes 
14
 * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
15
 * David McKnight   (IBM)        - [190803] Canceling a long-running dstore job prints "InterruptedException" to stdout  
15
 ********************************************************************************/
16
 ********************************************************************************/
16
17
17
package org.eclipse.rse.services.dstore;
18
package org.eclipse.rse.services.dstore;
Lines 87-97 Link Here
87
				DStoreStatusMonitor smon = getStatusMonitor(getDataStore());
88
				DStoreStatusMonitor smon = getStatusMonitor(getDataStore());
88
				smon.waitForUpdate(status, monitor);
89
				smon.waitForUpdate(status, monitor);
89
				int resultSize = subject.getNestedSize();
90
				int resultSize = subject.getNestedSize();
90
				if (resultSize == 0)
91
91
				{
92
					//System.out.println("status="+status);
93
					//System.out.println("subject="+subject);
94
				}
95
				checkHostJVM();
92
				checkHostJVM();
96
				// get results
93
				// get results
97
				List nested = subject.getNestedData();
94
				List nested = subject.getNestedData();
Lines 100-114 Link Here
100
					return (DataElement[])nested.toArray(new DataElement[resultSize]);
97
					return (DataElement[])nested.toArray(new DataElement[resultSize]);
101
				}
98
				}
102
			}
99
			}
103
			catch (Exception e)
100
			catch (InterruptedException e)
104
			{			
101
			{	
105
				e.printStackTrace();
102
				// cancel monitor if it's still not canceled
103
				if (monitor != null && !monitor.isCanceled())
104
				{
105
					monitor.setCanceled(true);
106
				}
107
				
108
				//InterruptedException is used to report user cancellation, so no need to log
109
				//This should be reviewed (use OperationCanceledException) with bug #190750
106
			}			
110
			}			
107
		}
111
		}
108
		else
112
109
		{
110
			System.out.println("no query command for "+ subject); //$NON-NLS-1$
111
		}
112
		return new DataElement[0];
113
		return new DataElement[0];
113
	}
114
	}
114
	
115
	
Lines 125-132 Link Here
125
				DStoreStatusMonitor smon = getStatusMonitor(getDataStore());
126
				DStoreStatusMonitor smon = getStatusMonitor(getDataStore());
126
				smon.waitForUpdate(status, monitor);
127
				smon.waitForUpdate(status, monitor);
127
			}
128
			}
128
			catch (Exception e)
129
			catch (InterruptedException e)
129
			{				
130
			{				
131
				// cancel monitor if it's still not canceled
132
				if (monitor != null && !monitor.isCanceled())
133
				{
134
					monitor.setCanceled(true);
135
				}
136
				
137
				//InterruptedException is used to report user cancellation, so no need to log
138
				//This should be reviewed (use OperationCanceledException) with bug #190750
130
			}	
139
			}	
131
			return status;
140
			return status;
132
		}
141
		}
Lines 153-161 Link Here
153
					return (DataElement[])nested.toArray(new DataElement[subject.getNestedSize()]);
162
					return (DataElement[])nested.toArray(new DataElement[subject.getNestedSize()]);
154
				}
163
				}
155
			}
164
			}
156
			catch (Exception e)
165
			catch (InterruptedException e)
157
			{				
166
			{				
158
				e.printStackTrace();
167
				// cancel monitor if it's still not canceled
168
				if (monitor != null && !monitor.isCanceled())
169
				{
170
					monitor.setCanceled(true);
171
				}
172
				
173
				//InterruptedException is used to report user cancellation, so no need to log
174
				//This should be reviewed (use OperationCanceledException) with bug #190750
159
			}			
175
			}			
160
		}
176
		}
161
		return new DataElement[0];
177
		return new DataElement[0];
Lines 174-181 Link Here
174
			{
190
			{
175
				getStatusMonitor(ds).waitForUpdate(status, monitor);
191
				getStatusMonitor(ds).waitForUpdate(status, monitor);
176
			}
192
			}
177
			catch (Exception e)
193
			catch (InterruptedException e)
178
			{				
194
			{				
195
				// cancel monitor if it's still not canceled
196
				if (monitor != null && !monitor.isCanceled())
197
				{
198
					monitor.setCanceled(true);
199
				}
200
				
201
				//InterruptedException is used to report user cancellation, so no need to log
202
				//This should be reviewed (use OperationCanceledException) with bug #190750
203
179
			}
204
			}
180
			return status;
205
			return status;
181
		}
206
		}
Lines 252-258 Link Here
252
			}
277
			}
253
			catch (InterruptedException e)
278
			catch (InterruptedException e)
254
			{
279
			{
255
				e.printStackTrace();
280
				// cancel monitor if it's still not canceled
281
				if (monitor != null && !monitor.isCanceled())
282
				{
283
					monitor.setCanceled(true);
284
				}
285
				
286
				//InterruptedException is used to report user cancellation, so no need to log
287
				//This should be reviewed (use OperationCanceledException) with bug #190750
256
			}
288
			}
257
			
289
			
258
			getMinerElement();
290
			getMinerElement();
(-)src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java (-3 / +9 lines)
Lines 15-20 Link Here
15
 * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
15
 * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
16
 * Xuan Chen        (IBM)        - [189681] [dstore][linux] Refresh Folder in My Home messes up Refresh in Root
16
 * Xuan Chen        (IBM)        - [189681] [dstore][linux] Refresh Folder in My Home messes up Refresh in Root
17
 * Kushal Munir (IBM) - [189352] Replace with appropriate line end character on upload
17
 * Kushal Munir (IBM) - [189352] Replace with appropriate line end character on upload
18
 * David McKnight   (IBM)        - [190803] Canceling a long-running dstore job prints "InterruptedException" to stdout 
18
 ********************************************************************************/
19
 ********************************************************************************/
19
20
20
package org.eclipse.rse.internal.services.dstore.files;
21
package org.eclipse.rse.internal.services.dstore.files;
Lines 679-688 Link Here
679
			}
680
			}
680
			catch (InterruptedException e)
681
			catch (InterruptedException e)
681
			{
682
			{
682
				e.printStackTrace();
683
				// cancel monitor if it's still not canceled
684
				if (monitor != null && !monitor.isCanceled())
685
				{
686
					monitor.setCanceled(true);
687
				}
688
				
689
				//InterruptedException is used to report user cancellation, so no need to log
690
				//This should be reviewed (use OperationCanceledException) with bug #190750
683
			}
691
			}
684
685
			//getStatusMonitor(ds).waitForUpdate(status, monitor);
686
		}
692
		}
687
		catch (Exception e)
693
		catch (Exception e)
688
		{
694
		{
(-)src/org/eclipse/rse/internal/services/dstore/processes/DStoreProcessService.java (-1 / +9 lines)
Lines 12-17 Link Here
12
 * 
12
 * 
13
 * Contributors:
13
 * Contributors:
14
 * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
14
 * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
15
 * David McKnight   (IBM)        - [190803] Canceling a long-running dstore job prints "InterruptedException" to stdout 
15
 ********************************************************************************/
16
 ********************************************************************************/
16
17
17
package org.eclipse.rse.internal.services.dstore.processes;
18
package org.eclipse.rse.internal.services.dstore.processes;
Lines 304-310 Link Here
304
			}
305
			}
305
			catch (InterruptedException e)
306
			catch (InterruptedException e)
306
			{
307
			{
307
				e.printStackTrace();
308
				// cancel monitor if it's still not canceled
309
				if (monitor != null && !monitor.isCanceled())
310
				{
311
					monitor.setCanceled(true);
312
				}
313
				
314
				//InterruptedException is used to report user cancellation, so no need to log
315
				//This should be reviewed (use OperationCanceledException) with bug #190750
308
			}
316
			}
309
			getMinerElement();
317
			getMinerElement();
310
		}
318
		}
(-)src/org/eclipse/rse/services/dstore/util/DStoreStatusMonitor.java (-3 / +5 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2002, 2007 IBM Corporation and others.
2
 * Copyright (c) 2006, 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 12-18 Link Here
12
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
12
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
13
 * 
13
 * 
14
 * Contributors:
14
 * Contributors:
15
 * {Name} (company) - description of contribution.
15
 * David McKnight   (IBM)        - [190803] Canceling a long-running dstore job prints "InterruptedException" to stdout 
16
 *******************************************************************************/
16
 *******************************************************************************/
17
17
18
package org.eclipse.rse.services.dstore.util;
18
package org.eclipse.rse.services.dstore.util;
Lines 382-388 Link Here
382
		}
382
		}
383
		catch (InterruptedException e)
383
		catch (InterruptedException e)
384
		{
384
		{
385
			e.printStackTrace();
385
			//InterruptedException is used to report user cancellation, so no need to log
386
			//This should be reviewed (use OperationCanceledException) with bug #190750
387
386
			return;
388
			return;
387
		}
389
		}
388
	}
390
	}
(-)src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellService.java (-1 / +9 lines)
Lines 12-17 Link Here
12
 * 
12
 * 
13
 * Contributors:
13
 * Contributors:
14
 * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
14
 * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
15
 * David McKnight   (IBM)        - [190803] Canceling a long-running dstore job prints "InterruptedException" to stdout 
15
 ********************************************************************************/
16
 ********************************************************************************/
16
17
17
package org.eclipse.rse.internal.services.dstore.shells;
18
package org.eclipse.rse.internal.services.dstore.shells;
Lines 151-157 Link Here
151
			}
152
			}
152
			catch (InterruptedException e)
153
			catch (InterruptedException e)
153
			{
154
			{
154
				e.printStackTrace();
155
				// cancel monitor if it's still not canceled
156
				if (monitor != null && !monitor.isCanceled())
157
				{
158
					monitor.setCanceled(true);
159
				}
160
				
161
				//InterruptedException is used to report user cancellation, so no need to log
162
				//This should be reviewed (use OperationCanceledException) with bug #190750
155
			}
163
			}
156
			getMinerElement(getEnvSystemMinerId());
164
			getMinerElement(getEnvSystemMinerId());
157
		}
165
		}

Return to bug 190803