aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDawid Pakuła2018-07-07 14:43:12 -0400
committerDawid Pakuła2018-07-07 14:43:12 -0400
commit4e5456001e13b4b368216a68056547234effd9ae (patch)
tree6bfc2fbcbe58300418a88afa0e9be37f253354d7
parent7116cb85b0cf4d20860cc3e3488b87fcff985dfc (diff)
downloadorg.eclipse.pdt-4e5456001e13b4b368216a68056547234effd9ae.zip
org.eclipse.pdt-4e5456001e13b4b368216a68056547234effd9ae.tar.gz
org.eclipse.pdt-4e5456001e13b4b368216a68056547234effd9ae.tar.xz
Bug 531665 - Disable validation on external files
Signed-off-by: Dawid Pakuła <zulus@w3des.net>
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/builder/ValidatorBuildParticipantFactory.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/builder/ValidatorBuildParticipantFactory.java b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/builder/ValidatorBuildParticipantFactory.java
index 22c4666..6c52405 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/builder/ValidatorBuildParticipantFactory.java
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/builder/ValidatorBuildParticipantFactory.java
@@ -16,6 +16,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExecutableExtension;
import org.eclipse.dltk.ast.declarations.ModuleDeclaration;
+import org.eclipse.dltk.core.IModelElement;
import org.eclipse.dltk.core.IScriptProject;
import org.eclipse.dltk.core.builder.AbstractBuildParticipantType;
import org.eclipse.dltk.core.builder.IBuildContext;
@@ -68,6 +69,13 @@ public class ValidatorBuildParticipantFactory extends AbstractBuildParticipantTy
if (Boolean.TRUE.equals(context.get(ParserBuildParticipantFactory.IN_LIBRARY_FOLDER))) {
return false;
}
+ if (context.getModelElement() != null) {
+ IModelElement module = context.getModelElement();
+ if (module.isReadOnly() || module.getScriptProject() == null
+ || !module.getScriptProject().isOnBuildpath(module)) {
+ return false;
+ }
+ }
return true;
}