1) Moved net.sourceforge.phpeclipse.ui\src\net\sourceforge\phpdt back to net.sourcefo...
[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
9 import org.eclipse.core.runtime.IStatus;
10 import org.eclipse.core.runtime.Status;
11
12 //incastrix to be renamed
13 /**
14  * Convenience class for error exceptions thrown inside PHPeclipse plugin.
15  */
16 public class PHPUIStatus extends Status {
17
18 //      public PHPUIStatus(int code) {
19 //              this(code, ""); //$NON-NLS-1$
20 //      }
21
22         private PHPUIStatus(int severity, int code, String message,
23                         Throwable throwable) {
24                 super(severity, PHPeclipsePlugin.getPluginId(), code, message,
25                                 throwable);
26         }
27
28 //      public PHPUIStatus(int code, String message) {
29 //              this(code, message, null);
30 //      }
31
32 //      public PHPUIStatus(int code, String message, Throwable throwable) {
33 //              super(IStatus.ERROR, PHPeclipsePlugin.getPluginId(), code, message,
34 //                              throwable);
35 //      }
36
37         public static IStatus createError(int code, Throwable throwable) {
38                 String message = throwable.getMessage();
39                 if (message == null) {
40                         message = throwable.getClass().getName();
41                 }
42                 return new PHPUIStatus(IStatus.ERROR, code, message, throwable);
43         }
44
45 //      public static IStatus createError(int code, String message,
46 //                      Throwable throwable) {
47 //              return new PHPUIStatus(IStatus.ERROR, code, message, throwable);
48 //      }
49
50 //      public static IStatus createInfo(int code, String message,
51 //                      Throwable throwable) {
52 //              return new PHPUIStatus(IStatus.INFO, code, message, throwable);
53 //      }
54
55 //      public static IStatus createWarning(int code, String message,
56 //                      Throwable throwable) {
57 //              return new PHPUIStatus(IStatus.WARNING, code, message, throwable);
58 //      }
59 }