1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-10 01:35:39 +02:00

progress bar for PerformOK

This commit is contained in:
Oleg Krasilnikov 2007-03-19 13:49:48 +00:00
parent bf037ce51c
commit e45328dc4f

View file

@ -395,15 +395,32 @@ implements
*/
public boolean performOk() {
if (doneOK || noContentOnPage || !displayedConfig) return true;
forEach(ICPropertyTab.OK, null);
doneOK = true; // further pages need not to do anything
IRunnableWithProgress runnable = new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) {
forEach(ICPropertyTab.OK, null);
doneOK = true; // further pages need not to do anything
try {
// CoreModel.getDefault().setProjectDescription(getProject(), prjd);
CoreModel.getDefault().setProjectDescription(getProject(), prjd, true, monitor);
} catch (CoreException e) { }
updateViews(internalElement);
}
};
IRunnableWithProgress op = new WorkspaceModifyDelegatingOperation(runnable);
try {
CoreModel.getDefault().setProjectDescription(getProject(), prjd);
} catch (CoreException e) { }
updateViews(internalElement);
new ProgressMonitorDialog(getShell()).run(false, true, op);
} catch (InvocationTargetException e) {
Throwable e1 = e.getTargetException();
CUIPlugin.errorDialog(getShell(),
NewUIMessages.getResourceString("AbstractPage.8"), //$NON-NLS-1$
NewUIMessages.getResourceString("AbstractPage.9"), e1, true); //$NON-NLS-1$
return false;
} catch (InterruptedException e) {}
return true;
}
/**
* Apply changes for all tabs but for given page & current cfg only.
* Called after "Apply" button pressed.