SQL Plugin copied from Quantum plugin and refactored for PHPEclipse
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.sql / src / net / sourceforge / phpdt / sql / view / LogProxy.java
diff --git a/archive/net.sourceforge.phpeclipse.sql/src/net/sourceforge/phpdt/sql/view/LogProxy.java b/archive/net.sourceforge.phpeclipse.sql/src/net/sourceforge/phpdt/sql/view/LogProxy.java
new file mode 100644 (file)
index 0000000..a97de7f
--- /dev/null
@@ -0,0 +1,20 @@
+package net.sourceforge.phpdt.sql.view;
+
+public class LogProxy implements LogConstants {
+       private static LogProxy instance = null;
+       private SQLLogView log = null;
+       private LogProxy() {
+       }
+       public synchronized static LogProxy getInstance() {
+               if (instance == null) {
+                       instance = new LogProxy();
+               }
+               return instance;
+       }
+       public void addText(int type, String text) {
+               log = SQLLogView.getInstance();
+               if (log != null) {
+                       log.addText(type, text);
+               }
+       }
+}