Esolang-Comment-Template-Generator
Java 10, 189 159 bytes

s-&gt;c-&gt;{var r=&quot;&quot;;int p=0,i;for(var a:s.split(&quot;\\|&quot;)){for(i=p;i--&gt;0;r+=&quot; &quot;);r+=a;for(p+=a.length();i++&lt;s.replace(&quot;|&quot;,&quot;&quot;).length()-p;r+=&quot; &quot;);r+=c+&quot;\n&quot;;}return r;}

-30 bytes converting Java 7 to Java 10 and optimizing the loops.
Try it online.
Explanation:
s-&gt;c-&gt;{                     // Method with String &amp; char parameters and String return-type
  var r=&quot;&quot;;                 //  Result-String, starting empty
  int p=0,                  //  Position-integer, starting at 0
      i;                    //  Index integer
  for(var a:s.split(&quot;\\|&quot;)){//  Loop over the parts split by &quot;|&quot;
    for(i=p;i--&gt;0;r+=&quot; &quot;);  //   Add `p` amount of spaces to the result-String
    r+=a;                   //   Add the current part to the result-String
    for(p+=a.length();      //   Add the length of the current part to the position-integer
        i++&lt;s.replace(&quot;|&quot;,&quot;&quot;).length()-p;r+=&quot; &quot;);
                            //   Add the row's trailing spaces to the result-String
    r+=c+&quot;\n&quot;;}             //   Add the character and a new-line to the result-String
  return r;}                //  Return the result-String