summaryrefslogtreecommitdiff
path: root/sources/scalac/util
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2003-10-20 17:44:18 +0000
committermichelou <michelou@epfl.ch>2003-10-20 17:44:18 +0000
commit17e61a1faa30747564438c25e54ce80e6923a79f (patch)
treecf64f90383f92bd5895ed3fd6e3047c9ea24e187 /sources/scalac/util
parent724ebb9791ec0578f37ae8612b628d845365c74d (diff)
downloadscala-17e61a1faa30747564438c25e54ce80e6923a79f.tar.gz
scala-17e61a1faa30747564438c25e54ce80e6923a79f.tar.bz2
scala-17e61a1faa30747564438c25e54ce80e6923a79f.zip
- added 'shortname' flag to control file name o...
- added 'shortname' flag to control file name output
Diffstat (limited to 'sources/scalac/util')
-rw-r--r--sources/scalac/util/Reporter.java15
1 files 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);