Skip to main content
aboutsummaryrefslogblamecommitdiffstats
blob: 79c66b75d93300e4a132614c316f2da936d91298 (plain) (tree)
1
2
3
4
5
6
7
8






                                      
                            








                                                                         
                                                                                        
         











                                                                                            
 



                                                                                         


 
package org.eclipse.cdt.internal.ui;

/*
 * (c) Copyright IBM Corp. 2000, 2001.
 * All Rights Reserved.
 */

import org.eclipse.cdt.ui.*;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;

/**
 * Convenience class for error exceptions thrown inside JavaUI plugin.
 */
public class CUIStatus extends Status {

	public CUIStatus(int code, String message, Throwable throwable) {
		super(IStatus.ERROR, CUIPlugin.getPluginId(), code, message, throwable);
	}
	
	private CUIStatus(int severity, int code, String message, Throwable throwable) {
		super(severity, CUIPlugin.getPluginId(), code, message, throwable);
	}
	
	public static IStatus createError(int code, String message, Throwable throwable) {
		return new CUIStatus(IStatus.ERROR, code, message, throwable);
	}
	
	public static IStatus createWarning(int code, String message, Throwable throwable) {
		return new CUIStatus(IStatus.WARNING, code, message, throwable);
	}

	public static IStatus createInfo(int code, String message, Throwable throwable) {
		return new CUIStatus(IStatus.INFO, code, message, throwable);
	}
	
}


Back to the top