mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Fix for PR 76040 [Scanner Config] Importing 1.2.1 project does not update.
Distinguishing two cases of missing builder information: - Disabled builder - Legacy project
This commit is contained in:
parent
e1bb75eb34
commit
101d8a23ec
1 changed files with 6 additions and 5 deletions
|
@ -129,6 +129,7 @@ public class DiscoveryOptionsBlock extends AbstractCOptionPage {
|
|||
try {
|
||||
fBuildInfo = MakeCorePlugin.createScannerConfigBuildInfo(project, ScannerConfigBuilder.BUILDER_ID);
|
||||
} catch (CoreException e) {
|
||||
// missing builder information (builder disabled or legacy project)
|
||||
fInitialized = false;
|
||||
fBuildInfo = MakeCorePlugin.createScannerConfigBuildInfo(fPrefs, ScannerConfigBuilder.BUILDER_ID, true);
|
||||
}
|
||||
|
@ -147,8 +148,8 @@ public class DiscoveryOptionsBlock extends AbstractCOptionPage {
|
|||
* @see org.eclipse.cdt.ui.dialogs.ICOptionPage#performApply(org.eclipse.core.runtime.IProgressMonitor)
|
||||
*/
|
||||
public void performApply(IProgressMonitor monitor) throws CoreException {
|
||||
// Missing builder info
|
||||
if (!fInitialized) {
|
||||
if (!fInitialized && !needsSCNature) {
|
||||
// Missing builder info on a non-legacy project
|
||||
return;
|
||||
}
|
||||
if (monitor == null) {
|
||||
|
@ -233,8 +234,8 @@ public class DiscoveryOptionsBlock extends AbstractCOptionPage {
|
|||
* @see org.eclipse.cdt.ui.dialogs.ICOptionPage#performDefaults()
|
||||
*/
|
||||
public void performDefaults() {
|
||||
// Missing builder info
|
||||
if (!fInitialized) {
|
||||
if (!fInitialized && !needsSCNature) {
|
||||
// Missing builder info on a non-legacy project
|
||||
return;
|
||||
}
|
||||
IScannerConfigBuilderInfo info;
|
||||
|
@ -310,7 +311,7 @@ public class DiscoveryOptionsBlock extends AbstractCOptionPage {
|
|||
try {
|
||||
if (project != null && project.hasNature(MakeProjectNature.NATURE_ID)
|
||||
&& !project.hasNature(ScannerConfigNature.NATURE_ID)) {
|
||||
needsSCNature = true; // an old project
|
||||
needsSCNature = true; // legacy project
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
showMissingBuilder = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue