mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-10 12:03:16 +02:00
Bug 443481 - Warnings about non-existing invalid project paths
Add a hidden preference "org.eclipse.cdt.core/validate_include_entries" which allows to disable validation of include entries if set to false in plugin_customization.ini. Change-Id: Ia80f875228a459589ab8a4e6733d3e2f723f78d3 Signed-off-by: Anton Leherbauer <anton.leherbauer@windriver.com> Reviewed-on: https://git.eclipse.org/r/39642 Tested-by: Hudson CI
This commit is contained in:
parent
a0fd70a09e
commit
ef00469292
1 changed files with 16 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2009 QNX Software Systems and others.
|
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -47,10 +47,13 @@ import org.eclipse.core.resources.ResourcesPlugin;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.core.runtime.Path;
|
import org.eclipse.core.runtime.Path;
|
||||||
|
import org.eclipse.core.runtime.preferences.DefaultScope;
|
||||||
|
|
||||||
public class PathEntryUtil {
|
public class PathEntryUtil {
|
||||||
static PathEntryManager manager = PathEntryManager.getDefault();
|
static final PathEntryManager manager = PathEntryManager.getDefault();
|
||||||
static final IMarker[] NO_MARKERS = new IMarker[0];
|
static final IMarker[] NO_MARKERS = new IMarker[0];
|
||||||
|
static final boolean VALIDATE_INCLUDE_ENTRIES =
|
||||||
|
DefaultScope.INSTANCE.getNode(CCorePlugin.PLUGIN_ID).getBoolean("validate_include_entries", true); //$NON-NLS-1$
|
||||||
|
|
||||||
private PathEntryUtil() {
|
private PathEntryUtil() {
|
||||||
super();
|
super();
|
||||||
|
@ -426,15 +429,17 @@ public class PathEntryUtil {
|
||||||
|
|
||||||
switch (entry.getEntryKind()) {
|
switch (entry.getEntryKind()) {
|
||||||
case IPathEntry.CDT_INCLUDE: {
|
case IPathEntry.CDT_INCLUDE: {
|
||||||
IIncludeEntry include = (IIncludeEntry) entry;
|
if (VALIDATE_INCLUDE_ENTRIES) {
|
||||||
IPath includePath = include.getFullIncludePath();
|
IIncludeEntry include = (IIncludeEntry) entry;
|
||||||
if (!isValidExternalPath(includePath)) {
|
IPath includePath = include.getFullIncludePath();
|
||||||
return new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY,
|
if (!isValidExternalPath(includePath)) {
|
||||||
CoreModelMessages.getFormattedString("PathEntryManager.2", includePath.toOSString())); //$NON-NLS-1$
|
return new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY,
|
||||||
}
|
CoreModelMessages.getFormattedString("PathEntryManager.2", includePath.toOSString())); //$NON-NLS-1$
|
||||||
if (!isValidBasePath(include.getBasePath())) {
|
}
|
||||||
return new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY,
|
if (!isValidBasePath(include.getBasePath())) {
|
||||||
CoreModelMessages.getFormattedString("PathEntryManager.1", includePath.toOSString())); //$NON-NLS-1$
|
return new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY,
|
||||||
|
CoreModelMessages.getFormattedString("PathEntryManager.1", includePath.toOSString())); //$NON-NLS-1$
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue