mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-29 11:55:40 +02:00
Additional fix to the progress monitor support basis for the CProjectDescription operation
This commit is contained in:
parent
968559df5c
commit
ff9b1c4616
1 changed files with 36 additions and 33 deletions
|
@ -704,42 +704,45 @@ public class CProjectDescriptionManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateProjectDescriptions(IProgressMonitor monitor) throws CoreException{
|
public void updateProjectDescriptions(IProgressMonitor monitor) throws CoreException{
|
||||||
IWorkspace wsp = ResourcesPlugin.getWorkspace();
|
try {
|
||||||
final IProject projects[] = wsp.getRoot().getProjects();
|
IWorkspace wsp = ResourcesPlugin.getWorkspace();
|
||||||
final ICProjectDescription dess[] = new ICProjectDescription[projects.length];
|
final IProject projects[] = wsp.getRoot().getProjects();
|
||||||
int num = 0;
|
final ICProjectDescription dess[] = new ICProjectDescription[projects.length];
|
||||||
for(int i = 0; i < projects.length; i++){
|
int num = 0;
|
||||||
ICProjectDescription des = getProjectDescription(projects[i], false, true);
|
for(int i = 0; i < projects.length; i++){
|
||||||
if(des != null)
|
ICProjectDescription des = getProjectDescription(projects[i], false, true);
|
||||||
dess[num++] = des;
|
if(des != null)
|
||||||
}
|
dess[num++] = des;
|
||||||
|
}
|
||||||
if(num != 0){
|
|
||||||
final int[] fi = new int[num];
|
if(num != 0){
|
||||||
runWspModification(new IWorkspaceRunnable(){
|
final int[] fi = new int[1];
|
||||||
|
fi[0] = num;
|
||||||
public void run(IProgressMonitor monitor) throws CoreException {
|
runWspModification(new IWorkspaceRunnable(){
|
||||||
monitor.beginTask("Refreshing the project settings", fi[0]);
|
|
||||||
|
public void run(IProgressMonitor monitor) throws CoreException {
|
||||||
for(int i = 0; i < dess.length; i++){
|
monitor.beginTask("Refreshing the project settings", fi[0]);
|
||||||
ICProjectDescription des = dess[i];
|
|
||||||
if(des == null)
|
for(int i = 0; i < dess.length; i++){
|
||||||
break;
|
ICProjectDescription des = dess[i];
|
||||||
IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 1);
|
if(des == null)
|
||||||
try {
|
break;
|
||||||
setProjectDescription(des.getProject(), des, true, subMonitor);
|
IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 1);
|
||||||
} catch (CoreException e){
|
try {
|
||||||
CCorePlugin.log(e);
|
setProjectDescription(des.getProject(), des, true, subMonitor);
|
||||||
} finally {
|
} catch (CoreException e){
|
||||||
subMonitor.done();
|
CCorePlugin.log(e);
|
||||||
|
} finally {
|
||||||
|
subMonitor.done();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}, monitor);
|
||||||
}, new NullProgressMonitor());
|
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
monitor.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
monitor.done();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue