KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > ui > editor > validation > IValidatorMessageHandler


1 /*******************************************************************************
2  * Copyright (c) 2007 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
12 package org.eclipse.pde.internal.ui.editor.validation;
13
14 import org.eclipse.ui.forms.IManagedForm;
15 import org.eclipse.ui.forms.IMessageManager;
16
17 /**
18  * IValidatorMessageHandler
19  *
20  */

21 public interface IValidatorMessageHandler {
22
23     /**
24      * Report a message with a given severity and associate it with a key
25      * @param key
26      * @param messageText
27      * @param messageType
28      */

29     public void addMessage(Object JavaDoc key, String JavaDoc messageText, int messageType);
30     
31     /**
32      * Report a message with a given severity. The message will be associated
33      * with a default message key
34      * @param messageText
35      * @param messageType
36      */

37     public void addMessage(String JavaDoc messageText, int messageType);
38     
39     /**
40      * Remove a previously reported message associated with the given key
41      * @param key
42      */

43     public void removeMessage(Object JavaDoc key);
44     
45     /**
46      * Set an optional message prefix to be prepended to all messages on report
47      * @param prefix
48      */

49     public void setMessagePrefix(String JavaDoc prefix);
50     
51     /**
52      * Get the managed form.
53      * @return
54      */

55     public IManagedForm getManagedForm();
56     
57     /**
58      * Get the message manager.
59      * @return
60      */

61     public IMessageManager getMessageManager();
62     
63     /**
64      * Get the optional message prefix.
65      * @return
66      */

67     public String JavaDoc getMessagePrefix();
68
69 }
70
Popular Tags