01: /*******************************************************************************
02: * Copyright (c) 2007 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.ui.editor.validation;
11:
12: import org.eclipse.ui.forms.IManagedForm;
13: import org.eclipse.ui.forms.IMessageManager;
14:
15: /**
16: * IValidatorMessageHandler
17: *
18: */
19: public interface IValidatorMessageHandler {
20:
21: /**
22: * Report a message with a given severity and associate it with a key
23: * @param key
24: * @param messageText
25: * @param messageType
26: */
27: public void addMessage(Object key, String messageText,
28: int messageType);
29:
30: /**
31: * Report a message with a given severity. The message will be associated
32: * with a default message key
33: * @param messageText
34: * @param messageType
35: */
36: public void addMessage(String messageText, int messageType);
37:
38: /**
39: * Remove a previously reported message associated with the given key
40: * @param key
41: */
42: public void removeMessage(Object key);
43:
44: /**
45: * Set an optional message prefix to be prepended to all messages on report
46: * @param prefix
47: */
48: public void setMessagePrefix(String prefix);
49:
50: /**
51: * Get the managed form.
52: * @return
53: */
54: public IManagedForm getManagedForm();
55:
56: /**
57: * Get the message manager.
58: * @return
59: */
60: public IMessageManager getMessageManager();
61:
62: /**
63: * Get the optional message prefix.
64: * @return
65: */
66: public String getMessagePrefix();
67:
68: }
|