Replace getToolsRepository() with getToolsLabel(String labelValue) which prepends the tools repository path to the given string and parses the result as a label.
This is a cleaner way to access the tools repository label.
--
MOS_MIGRATED_REVID=114105929
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/RuleDefinitionEnvironment.java b/src/main/java/com/google/devtools/build/lib/analysis/RuleDefinitionEnvironment.java
index 2eab411..45200fb 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/RuleDefinitionEnvironment.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/RuleDefinitionEnvironment.java
@@ -28,7 +28,8 @@
Label getLabel(String labelValue);
/**
- * Returns the path to the tools repository. It is different for blaze and bazel.
+ * Prepends the tools repository path to the given string and parses the result
+ * using {@link RuleDefinitionEnvironment#getLabel}
*/
- String getToolsRepository();
+ Label getToolsLabel(String labelValue);
}