1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 09:25:31 +02:00

Moved catch block for CoreException from page level to Wizard level

This commit is contained in:
Judy N. Green 2002-08-14 13:45:57 +00:00
parent 8b52ecdb22
commit 46acfebc85
2 changed files with 12 additions and 13 deletions

View file

@ -9,6 +9,7 @@ import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.internal.ui.CPlugin;
import org.eclipse.cdt.ui.wizards.CProjectWizard;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.swt.widgets.TabFolder;
@ -115,9 +116,14 @@ public abstract class ConversionWizard
*/
protected void doRun(IProgressMonitor monitor) {
doRunPrologue(monitor);
mainPage.doRun(monitor, getProjectID());
doRunEpilogue(monitor);
monitor.done();
try{
mainPage.doRun(monitor, getProjectID());
} catch (CoreException ce){
CCorePlugin.log(ce);
} finally{
doRunEpilogue(monitor);
monitor.isCanceled();
}
}
/**
* Return the type of project that it is being converted to

View file

@ -373,26 +373,19 @@ public abstract class ConvertProjectWizardPage
*
* @param monitor
* @param projectID
* @exception CoreException
*/
public void doRun(IProgressMonitor monitor, String projectID) {
public void doRun(IProgressMonitor monitor, String projectID) throws CoreException {
Object[] selection = getCheckedElements();
int totalSelected = selection.length;
if ((selection != null) && (totalSelected > 0)) {
if (monitor == null) {
monitor = new NullProgressMonitor();
}
monitor.beginTask(CPlugin.getResourceString(KEY_TITLE), 1);
try {
convertProjects(selection, monitor, projectID);
}
catch (CoreException ce) {
CPlugin.log(ce);
}
convertProjects(selection, monitor, projectID);
}
}