public bool LoadIncludeText()

in Backend/RiderPlugin/JetBrains.TextTemplating/JetBrains/TextTemplatingEngineHost.cs [45:75]


    public bool LoadIncludeText(string requestFileName, out string content, out string location)
    {
      if (string.IsNullOrEmpty(requestFileName))
      {
        content = string.Empty;
        location = string.Empty;
        return false;
      }

      requestFileName = Helper.ExpandMacrosAndVariables(requestFileName);
      if (Path.IsPathRooted(requestFileName))
      {
        location = requestFileName;
        content = LoadContent(requestFileName);
        return true;
      }

      string folderPath = Path.GetDirectoryName(TemplateFile);
      string candidate = Path.Combine(folderPath, requestFileName);
      if (Path.IsPathRooted(candidate))
      {
        location = candidate;
        content = LoadContent(candidate);
        return true;
      }

      Transformation.Warning(RelativeUnsupportedMessage);
      location = string.Empty;
      content = string.Empty;
      return false;
    }