mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix for PR 91442: [Scanner Config] Saving per file DSC for Mozilla project chokes the system.
When there is new per file scanner info for number of files in a project, the project is refreshed only once (no recursive processing of change delta).
This commit is contained in:
parent
28b56b0e88
commit
fb26e4691f
5 changed files with 14 additions and 7 deletions
|
@ -29,7 +29,6 @@ import org.eclipse.cdt.make.core.scannerconfig.ScannerConfigScope;
|
||||||
import org.eclipse.cdt.make.internal.core.MakeMessages;
|
import org.eclipse.cdt.make.internal.core.MakeMessages;
|
||||||
import org.eclipse.cdt.make.internal.core.scannerconfig2.SCProfileInstance;
|
import org.eclipse.cdt.make.internal.core.scannerconfig2.SCProfileInstance;
|
||||||
import org.eclipse.cdt.make.internal.core.scannerconfig2.ScannerConfigProfileManager;
|
import org.eclipse.cdt.make.internal.core.scannerconfig2.ScannerConfigProfileManager;
|
||||||
import org.eclipse.core.resources.IFile;
|
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.resources.IResourceChangeEvent;
|
import org.eclipse.core.resources.IResourceChangeEvent;
|
||||||
|
@ -171,9 +170,11 @@ public class DiscoveredPathManager implements IDiscoveredPathManager, IResourceC
|
||||||
if (changedResources != null) {
|
if (changedResources != null) {
|
||||||
List changeDelta = new ArrayList(changedResources.size());
|
List changeDelta = new ArrayList(changedResources.size());
|
||||||
for (Iterator i = changedResources.iterator(); i.hasNext(); ) {
|
for (Iterator i = changedResources.iterator(); i.hasNext(); ) {
|
||||||
IFile file = (IFile) i.next();
|
IResource resource = (IResource) i.next();
|
||||||
IPath path = file.getFullPath();
|
IPath path = resource.getFullPath();
|
||||||
changeDelta.add(new PathEntryContainerChanged(path, 3)); // both include paths and symbols changed
|
changeDelta.add(new PathEntryContainerChanged(path,
|
||||||
|
PathEntryContainerChanged.INCLUDE_CHANGED |
|
||||||
|
PathEntryContainerChanged.MACRO_CHANGED)); // both include paths and symbols changed
|
||||||
}
|
}
|
||||||
CoreModel.pathEntryContainerUpdates(container,
|
CoreModel.pathEntryContainerUpdates(container,
|
||||||
(PathEntryContainerChanged[]) changeDelta.toArray(new PathEntryContainerChanged[changeDelta.size()]),
|
(PathEntryContainerChanged[]) changeDelta.toArray(new PathEntryContainerChanged[changeDelta.size()]),
|
||||||
|
|
|
@ -201,7 +201,9 @@ public class PerProjectSICollector implements IScannerInfoCollector2, IScannerIn
|
||||||
monitor.subTask(MakeMessages.getString("ScannerInfoCollector.Updating") + project.getName()); //$NON-NLS-1$
|
monitor.subTask(MakeMessages.getString("ScannerInfoCollector.Updating") + project.getName()); //$NON-NLS-1$
|
||||||
try {
|
try {
|
||||||
// update scanner configuration
|
// update scanner configuration
|
||||||
MakeCorePlugin.getDefault().getDiscoveryManager().updateDiscoveredInfo(pathInfo, null);
|
List resourceDelta = new ArrayList(1);
|
||||||
|
resourceDelta.add(project);
|
||||||
|
MakeCorePlugin.getDefault().getDiscoveryManager().updateDiscoveredInfo(pathInfo, resourceDelta);
|
||||||
monitor.worked(50);
|
monitor.worked(50);
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
MakeCorePlugin.log(e);
|
MakeCorePlugin.log(e);
|
||||||
|
|
|
@ -208,7 +208,9 @@ public class DiscoveredPathContainerPage extends WizardPage implements IPathEntr
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// update scanner configuration
|
// update scanner configuration
|
||||||
MakeCorePlugin.getDefault().getDiscoveryManager().updateDiscoveredInfo(info, null);
|
List resourceDelta = new ArrayList(1);
|
||||||
|
resourceDelta.add(fCProject.getProject());
|
||||||
|
MakeCorePlugin.getDefault().getDiscoveryManager().updateDiscoveredInfo(info, resourceDelta);
|
||||||
return true;
|
return true;
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
MakeCorePlugin.log(e);
|
MakeCorePlugin.log(e);
|
||||||
|
|
|
@ -333,7 +333,8 @@ public class DiscoveryOptionsBlock extends AbstractDiscoveryOptionsBlock {
|
||||||
ScannerConfigScope profileScope = ScannerConfigProfileManager.getInstance().
|
ScannerConfigScope profileScope = ScannerConfigProfileManager.getInstance().
|
||||||
getSCProfileConfiguration(profileId).getProfileScope();
|
getSCProfileConfiguration(profileId).getProfileScope();
|
||||||
List changedResources = new ArrayList();
|
List changedResources = new ArrayList();
|
||||||
changedResources.add(project.getFullPath());
|
// changedResources.add(project.getFullPath());
|
||||||
|
changedResources.add(project);
|
||||||
MakeCorePlugin.getDefault().getDiscoveryManager().changeDiscoveredContainer(
|
MakeCorePlugin.getDefault().getDiscoveryManager().changeDiscoveredContainer(
|
||||||
project, profileScope, changedResources);
|
project, profileScope, changedResources);
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,6 +192,7 @@ public class CElementContentProvider extends BaseCElementContentProvider impleme
|
||||||
if (isPathEntryChange(delta)) {
|
if (isPathEntryChange(delta)) {
|
||||||
// throw the towel and do a full refresh of the affected C project.
|
// throw the towel and do a full refresh of the affected C project.
|
||||||
postRefresh(element.getCProject());
|
postRefresh(element.getCProject());
|
||||||
|
return;// bailout
|
||||||
}
|
}
|
||||||
|
|
||||||
if (delta.getResourceDeltas() != null) {
|
if (delta.getResourceDeltas() != null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue