Add IGNORE_BACKEND directive for native automatically

Also parse correctly case IGNORE_BACKEND: JS, NATIVE
This commit is contained in:
Mikhail Zarechenskiy
2017-03-13 19:21:33 +03:00
parent 006062499c
commit 05ef705609
22 changed files with 106 additions and 26 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -236,7 +236,7 @@ public final class InTextDirectivesUtils {
private static boolean isIgnoredTargetByPrefix(TargetBackend targetBackend, File file, String prefix) {
if (targetBackend == TargetBackend.ANY) return false;
List<String> ignoredBackends = findLinesWithPrefixesRemoved(textWithDirectives(file), prefix);
List<String> ignoredBackends = findListWithPrefixes(textWithDirectives(file), prefix);
return ignoredBackends.contains(targetBackend.name());
}