001 package nl.cwi.sen1.tide.tool.support; 002 003 import java.io.PrintStream; 004 005 public class Info 006 { 007 PrintStream stream; 008 String subject; 009 boolean verbose; 010 011 //{{{ public Info(String subject) 012 013 public Info(String subject) 014 { 015 this.subject = subject; 016 this.stream = System.out; 017 018 verbose = "true".equals(System.getProperty("tide.develop")); 019 } 020 021 //}}} 022 023 //{{{ public void info(String what, String msg) 024 025 public void info(String what, String msg) 026 { 027 if (verbose) { 028 stream.println("[" + what + "] " + msg); 029 } 030 } 031 032 //}}} 033 //{{{ public void info(String msg) 034 035 public void info(String msg) 036 { 037 info(subject, msg); 038 } 039 040 //}}} 041 042 //{{{ public void setVerbose(boolean on) 043 044 public void setVerbose(boolean on) 045 { 046 verbose = on; 047 } 048 049 //}}} 050 } 051