Refactory: remove unused classes, imports, fields and methods.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / corext / util / PHPUIStatus.java
1 /*
2  * (c) Copyright IBM Corp. 2000, 2001.
3  * All Rights Reserved.
4  */
5 package net.sourceforge.phpdt.internal.corext.util;
6
7 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
8 //import net.sourceforge.phpeclipse.ui.WebUI;
9
10 import org.eclipse.core.runtime.IStatus;
11 import org.eclipse.core.runtime.Status;
12
13 //incastrix to be renamed
14 /**
15  * Convenience class for error exceptions thrown inside PHPeclipse plugin.
16  */
17 public class PHPUIStatus extends Status {
18
19 //      public PHPUIStatus(int code) {
20 //              this(code, ""); //$NON-NLS-1$
21 //      }
22
23         private PHPUIStatus(int severity, int code, String message,
24                         Throwable throwable) {
25                 super(severity, PHPeclipsePlugin.getPluginId(), code, message,
26                                 throwable);
27         }
28
29 //      public PHPUIStatus(int code, String message) {
30 //              this(code, message, null);
31 //      }
32
33 //      public PHPUIStatus(int code, String message, Throwable throwable) {
34 //              super(IStatus.ERROR, PHPeclipsePlugin.getPluginId(), code, message,
35 //                              throwable);
36 //      }
37
38         public static IStatus createError(int code, Throwable throwable) {
39                 String message = throwable.getMessage();
40                 if (message == null) {
41                         message = throwable.getClass().getName();
42                 }
43                 return new PHPUIStatus(IStatus.ERROR, code, message, throwable);
44         }
45
46 //      public static IStatus createError(int code, String message,
47 //                      Throwable throwable) {
48 //              return new PHPUIStatus(IStatus.ERROR, code, message, throwable);
49 //      }
50
51 //      public static IStatus createInfo(int code, String message,
52 //                      Throwable throwable) {
53 //              return new PHPUIStatus(IStatus.INFO, code, message, throwable);
54 //      }
55
56 //      public static IStatus createWarning(int code, String message,
57 //                      Throwable throwable) {
58 //              return new PHPUIStatus(IStatus.WARNING, code, message, throwable);
59 //      }
60 }