diff options
author | 2016-01-11 16:37:50 +0000 | |
---|---|---|
committer | 2016-01-11 20:03:06 +0000 | |
commit | a327faeb91922bca307f28a4ce7930db87cc3548 (patch) | |
tree | df7b3c077db9fe6cbb03f87aa01a6be993246a38 /src/main/java | |
parent | 5e52e1b9beccc6f9ab543d900e2ed4f1b353b7a3 (diff) |
Allow to filter attributes based on the rule of the attribute.
--
MOS_MIGRATED_REVID=111854804
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/query2/output/ProtoOutputFormatter.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/query2/output/ProtoOutputFormatter.java b/src/main/java/com/google/devtools/build/lib/query2/output/ProtoOutputFormatter.java index e1f8ea78a5..da5a2fab6a 100644 --- a/src/main/java/com/google/devtools/build/lib/query2/output/ProtoOutputFormatter.java +++ b/src/main/java/com/google/devtools/build/lib/query2/output/ProtoOutputFormatter.java @@ -139,7 +139,7 @@ public class ProtoOutputFormatter extends AbstractUnorderedFormatter { .setLocation(location); for (Attribute attr : rule.getAttributes()) { if (!includeDefaultValues && !rule.isAttributeValueExplicitlySpecified(attr) - || !includeAttribute(attr)) { + || !includeAttribute(rule, attr)) { continue; } Iterable<Object> possibleAttributeValues = @@ -325,7 +325,7 @@ public class ProtoOutputFormatter extends AbstractUnorderedFormatter { protected void postProcess(Rule rule, Build.Rule.Builder rulePb) { } /** Filter out some attributes */ - protected boolean includeAttribute(Attribute attr) { + protected boolean includeAttribute(Rule rule, Attribute attr) { return true; } } |