KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > part > components > services > IUserMessages


1 /*******************************************************************************
2  * Copyright (c) 2004, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.internal.part.components.services;
12
13 import org.eclipse.core.runtime.IStatus;
14
15 /**
16  * Interface that can be used to display messages to the user.
17  * The message does not need to be explicitly cleared. It will be cleared once
18  * the user confirms it or a certain amount of time has passed.
19  *
20  * <p>
21  * Implementations of this interface could display messages in a dialog box,
22  * log window, or time-delayed popup. This interface would not be used
23  * for writing messages to the status line, as such messages would need to be
24  * cleared programmatically rather than by the user.
25  * </p>
26  *
27  * <p>
28  * The default implementation of this interface displays each message in a modal
29  * dialog.
30  * </p>
31  *
32  * @since 3.1
33  */

34 public interface IUserMessages {
35     /**
36      * Display the given status message to the user
37      *
38      * @param message status message to display
39      */

40     public void show(IStatus message);
41     
42     /**
43      * Display the given error and optional exception.
44      *
45      * @param message error message
46      * @param cause optional cause (may be null if none)
47      */

48     public void showError(String JavaDoc message, Throwable JavaDoc cause);
49     
50     /**
51      * Display the given message with the given severity.
52      *
53      * @param severity one of the IStatus.* constants returned by <code>IStatus.getSeverity()</code>
54      * @param message message to display
55      */

56     public void show(int severity, String JavaDoc message);
57 }
58
Popular Tags