public static int GetLineOfPCalAlgorithm(IDocument document){
  try {
    final String moduleAsString=document.get();
    return LocationToLine(document,TLAtoPCalMapping.GetLineOfPCalAlgorithm(moduleAsString));
  }
 catch (  BadLocationException e) {
    e.printStackTrace();
  }
  return -1;
}

public static int GetLineOfPCalAlgorithm ( IDocument document ) { try { final String moduleAsString = document . get ( ) ; return LocationToLine ( document , TLAtoPCalMapping . GetLineOfPCalAlgorithm ( moduleAsString ) ) ; } catch ( BadLocationException e ) { e . printStackTrace ( ) ; } return - 1 ; }
returns the line number ( in java coordinates / zero based ) of the line containing the first " - - algorithm " or " - - fair algorithm " token ( s ) that begin ( s ) a pluscal algorithm . returns - 1 if there is none .
