mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +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 {
|
try {
|
||||||
fBuildInfo = MakeCorePlugin.createScannerConfigBuildInfo(project, ScannerConfigBuilder.BUILDER_ID);
|
fBuildInfo = MakeCorePlugin.createScannerConfigBuildInfo(project, ScannerConfigBuilder.BUILDER_ID);
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
|
// missing builder information (builder disabled or legacy project)
|
||||||
fInitialized = false;
|
fInitialized = false;
|
||||||
fBuildInfo = MakeCorePlugin.createScannerConfigBuildInfo(fPrefs, ScannerConfigBuilder.BUILDER_ID, true);
|
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)
|
* @see org.eclipse.cdt.ui.dialogs.ICOptionPage#performApply(org.eclipse.core.runtime.IProgressMonitor)
|
||||||
*/
|
*/
|
||||||
public void performApply(IProgressMonitor monitor) throws CoreException {
|
public void performApply(IProgressMonitor monitor) throws CoreException {
|
||||||
// Missing builder info
|
if (!fInitialized && !needsSCNature) {
|
||||||
if (!fInitialized) {
|
// Missing builder info on a non-legacy project
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (monitor == null) {
|
if (monitor == null) {
|
||||||
|
@ -233,8 +234,8 @@ public class DiscoveryOptionsBlock extends AbstractCOptionPage {
|
||||||
* @see org.eclipse.cdt.ui.dialogs.ICOptionPage#performDefaults()
|
* @see org.eclipse.cdt.ui.dialogs.ICOptionPage#performDefaults()
|
||||||
*/
|
*/
|
||||||
public void performDefaults() {
|
public void performDefaults() {
|
||||||
// Missing builder info
|
if (!fInitialized && !needsSCNature) {
|
||||||
if (!fInitialized) {
|
// Missing builder info on a non-legacy project
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
IScannerConfigBuilderInfo info;
|
IScannerConfigBuilderInfo info;
|
||||||
|
@ -310,7 +311,7 @@ public class DiscoveryOptionsBlock extends AbstractCOptionPage {
|
||||||
try {
|
try {
|
||||||
if (project != null && project.hasNature(MakeProjectNature.NATURE_ID)
|
if (project != null && project.hasNature(MakeProjectNature.NATURE_ID)
|
||||||
&& !project.hasNature(ScannerConfigNature.NATURE_ID)) {
|
&& !project.hasNature(ScannerConfigNature.NATURE_ID)) {
|
||||||
needsSCNature = true; // an old project
|
needsSCNature = true; // legacy project
|
||||||
}
|
}
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
showMissingBuilder = true;
|
showMissingBuilder = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue