mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-10 17:55:39 +02:00
progress bar for PerformOK
This commit is contained in:
parent
bf037ce51c
commit
e45328dc4f
1 changed files with 22 additions and 5 deletions
|
@ -395,15 +395,32 @@ implements
|
||||||
*/
|
*/
|
||||||
public boolean performOk() {
|
public boolean performOk() {
|
||||||
if (doneOK || noContentOnPage || !displayedConfig) return true;
|
if (doneOK || noContentOnPage || !displayedConfig) return true;
|
||||||
|
IRunnableWithProgress runnable = new IRunnableWithProgress() {
|
||||||
|
public void run(IProgressMonitor monitor) {
|
||||||
forEach(ICPropertyTab.OK, null);
|
forEach(ICPropertyTab.OK, null);
|
||||||
doneOK = true; // further pages need not to do anything
|
doneOK = true; // further pages need not to do anything
|
||||||
try {
|
try {
|
||||||
CoreModel.getDefault().setProjectDescription(getProject(), prjd);
|
// CoreModel.getDefault().setProjectDescription(getProject(), prjd);
|
||||||
|
CoreModel.getDefault().setProjectDescription(getProject(), prjd, true, monitor);
|
||||||
} catch (CoreException e) { }
|
} catch (CoreException e) { }
|
||||||
updateViews(internalElement);
|
updateViews(internalElement);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
IRunnableWithProgress op = new WorkspaceModifyDelegatingOperation(runnable);
|
||||||
|
try {
|
||||||
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply changes for all tabs but for given page & current cfg only.
|
* Apply changes for all tabs but for given page & current cfg only.
|
||||||
* Called after "Apply" button pressed.
|
* Called after "Apply" button pressed.
|
||||||
|
|
Loading…
Add table
Reference in a new issue