mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 06:45:43 +02:00
Moved catch block for CoreException from page level to Wizard level
This commit is contained in:
parent
8b52ecdb22
commit
46acfebc85
2 changed files with 12 additions and 13 deletions
|
@ -9,6 +9,7 @@ import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.internal.ui.CPlugin;
|
import org.eclipse.cdt.internal.ui.CPlugin;
|
||||||
import org.eclipse.cdt.ui.wizards.CProjectWizard;
|
import org.eclipse.cdt.ui.wizards.CProjectWizard;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
|
||||||
import org.eclipse.swt.widgets.TabFolder;
|
import org.eclipse.swt.widgets.TabFolder;
|
||||||
|
@ -115,9 +116,14 @@ public abstract class ConversionWizard
|
||||||
*/
|
*/
|
||||||
protected void doRun(IProgressMonitor monitor) {
|
protected void doRun(IProgressMonitor monitor) {
|
||||||
doRunPrologue(monitor);
|
doRunPrologue(monitor);
|
||||||
mainPage.doRun(monitor, getProjectID());
|
try{
|
||||||
doRunEpilogue(monitor);
|
mainPage.doRun(monitor, getProjectID());
|
||||||
monitor.done();
|
} catch (CoreException ce){
|
||||||
|
CCorePlugin.log(ce);
|
||||||
|
} finally{
|
||||||
|
doRunEpilogue(monitor);
|
||||||
|
monitor.isCanceled();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Return the type of project that it is being converted to
|
* Return the type of project that it is being converted to
|
||||||
|
|
|
@ -373,26 +373,19 @@ public abstract class ConvertProjectWizardPage
|
||||||
*
|
*
|
||||||
* @param monitor
|
* @param monitor
|
||||||
* @param projectID
|
* @param projectID
|
||||||
|
* @exception CoreException
|
||||||
*/
|
*/
|
||||||
public void doRun(IProgressMonitor monitor, String projectID) {
|
public void doRun(IProgressMonitor monitor, String projectID) throws CoreException {
|
||||||
|
|
||||||
Object[] selection = getCheckedElements();
|
Object[] selection = getCheckedElements();
|
||||||
int totalSelected = selection.length;
|
int totalSelected = selection.length;
|
||||||
|
|
||||||
if ((selection != null) && (totalSelected > 0)) {
|
if ((selection != null) && (totalSelected > 0)) {
|
||||||
|
|
||||||
if (monitor == null) {
|
if (monitor == null) {
|
||||||
monitor = new NullProgressMonitor();
|
monitor = new NullProgressMonitor();
|
||||||
}
|
}
|
||||||
|
|
||||||
monitor.beginTask(CPlugin.getResourceString(KEY_TITLE), 1);
|
monitor.beginTask(CPlugin.getResourceString(KEY_TITLE), 1);
|
||||||
|
convertProjects(selection, monitor, projectID);
|
||||||
try {
|
|
||||||
convertProjects(selection, monitor, projectID);
|
|
||||||
}
|
|
||||||
catch (CoreException ce) {
|
|
||||||
CPlugin.log(ce);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue