From 17e61a1faa30747564438c25e54ce80e6923a79f Mon Sep 17 00:00:00 2001 From: michelou Date: Mon, 20 Oct 2003 17:44:18 +0000 Subject: - added 'shortname' flag to control file name o... - added 'shortname' flag to control file name output --- sources/scalac/util/Reporter.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sources/scalac/util/Reporter.java b/sources/scalac/util/Reporter.java index b7d233213f..56b794233d 100644 --- a/sources/scalac/util/Reporter.java +++ b/sources/scalac/util/Reporter.java @@ -8,14 +8,14 @@ package scalac.util; -import ch.epfl.lamp.util.Position; - -import java.io.InputStreamReader; import java.io.BufferedReader; -import java.io.PrintWriter; +import java.io.InputStreamReader; import java.io.IOException; +import java.io.PrintWriter; import java.util.HashSet; +import ch.epfl.lamp.util.Position; + import scalac.ApplicationError; public class Reporter { @@ -45,6 +45,8 @@ public class Reporter { public boolean verbose; /** Whether a prompt should be displayed after errors and warnings */ public boolean prompt; + /** Whether a short file name should be displayed before errors */ + public boolean shortname; //######################################################################## // Public Constructors @@ -152,7 +154,10 @@ public class Reporter { message = " " + message; if (position.line() != 0) message = position.line() + ":" + message; - message = position.file().name() + ":" + message; + if (shortname) + message = position.file().getShortName() + ":" + message; + else + message = position.file().name() + ":" + message; } printMessage(message); printSourceLine(position); -- cgit v1.2.3