~piastucki/bzr-eclipse/history-view-enhancements

« back to all changes in this revision

Viewing changes to org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/utils/DefaultStatus.java

  • Committer: Guillermo Gonzalez
  • Date: 2007-03-14 12:15:50 UTC
  • Revision ID: guillo.gonzo@gmail.com-20070314121550-tltk3b6f3zblf0dh
Initial commit with the new code layout.
Now starts the real work

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) 2004-2006 by Leif Frenzel - see http://leiffrenzel.de
 
2
package org.vcs.bazaar.eclipse.core.utils;
 
3
 
 
4
import org.eclipse.core.runtime.IStatus;
 
5
import org.eclipse.core.runtime.Status;
 
6
import org.vcs.bazaar.eclipse.BazaarEclipsePlugin;
 
7
 
 
8
 
 
9
/** <p>an IStatus convenience implementation.</p>
 
10
  * 
 
11
  * @author Leif Frenzel
 
12
  */
 
13
public class DefaultStatus extends Status {
 
14
 
 
15
  public DefaultStatus( final int statusCode ) {
 
16
    super( statusCode, 
 
17
           BazaarEclipsePlugin.getPluginId(), 
 
18
           IStatus.OK, 
 
19
           "",  //$NON-NLS-1$
 
20
           null );
 
21
  }
 
22
  
 
23
  public DefaultStatus() {
 
24
    this( IStatus.OK );
 
25
  }
 
26
  
 
27
  public void setInfo( final String message ) {
 
28
    setMessage( message );
 
29
    setSeverity( IStatus.INFO );
 
30
  }
 
31
  
 
32
  public void setError( final String errorMessage ) {
 
33
    setMessage( errorMessage );
 
34
    setSeverity( IStatus.ERROR );
 
35
  }  
 
36
  
 
37
  public void setError( final String errorMessage, final Throwable t) {
 
38
    setError( errorMessage );
 
39
    setException( t );
 
40
  }
 
41
}
 
 
b'\\ No newline at end of file'