Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 250982 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/cdt/ui/wizards/CDTCommonProjectWizard.java (-5 / +37 lines)
Lines 222-236 Link Here
222
		final boolean defaults = _defaults;
222
		final boolean defaults = _defaults;
223
		return new IRunnableWithProgress() {
223
		return new IRunnableWithProgress() {
224
			public void run(IProgressMonitor imonitor) throws InvocationTargetException, InterruptedException {
224
			public void run(IProgressMonitor imonitor) throws InvocationTargetException, InterruptedException {
225
				final Exception except[] = new Exception[1];
225
				getShell().getDisplay().syncExec(new Runnable() {
226
				getShell().getDisplay().syncExec(new Runnable() {
226
					public void run() { 
227
					public void run() {
228
						IRunnableWithProgress op= new WorkspaceModifyDelegatingOperation(new IRunnableWithProgress() {
229
							public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
230
								final IProgressMonitor fMonitor;
231
								if (monitor == null) {
232
									fMonitor= new NullProgressMonitor();
233
								} else {
234
									fMonitor = monitor;
235
								}
236
								fMonitor.beginTask(CUIPlugin.getResourceString("CProjectWizard.op_description"), 100); //$NON-NLS-1$
237
							
238
								try {							
239
									newProject = createIProject(lastProjectName, lastProjectLocation);
240
									fMonitor.worked(50);
241
									if (newProject != null) 
242
										fMainPage.h_selected.createProject(newProject, defaults, onFinish);
243
									fMonitor.worked(50);
244
								} catch (CoreException e) {	CUIPlugin.log(e); }
245
								finally {fMonitor.done();}
246
							}
247
						});
227
						try {
248
						try {
228
							newProject = createIProject(lastProjectName, lastProjectLocation);
249
							getContainer().run(false, true, op);
229
							if (newProject != null) 
250
						} catch (InvocationTargetException e) {
230
								fMainPage.h_selected.createProject(newProject, defaults, onFinish);
251
							except[0] = e;
231
						} catch (CoreException e) {	CUIPlugin.log(e); }
252
						} catch (InterruptedException e) {
253
							except[0] = e;
254
						}
232
					}
255
					}
233
				});
256
				});
257
				if (except[0] != null) {
258
					if (except[0] instanceof InvocationTargetException) {
259
						throw (InvocationTargetException)except[0];
260
					}
261
					if (except[0] instanceof InterruptedException) {
262
						throw (InterruptedException)except[0];
263
					}
264
					throw new InvocationTargetException(except[0]);
265
				}					
234
			}
266
			}
235
		};
267
		};
236
	}
268
	}

Return to bug 250982