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.ui.forms;
11:
12: import org.eclipse.swt.widgets.Control;
13:
14: /**
15: * This interface computes the prefix of a message that is created in the
16: * context of a control. Since messages are rolled up to the header in the
17: * message manager, it is important to create a prefix to indicate the context
18: * of a message in the form. Typically the prefix is computed by looking at the
19: * label that preceeds the control, if present. Alternative providers may
20: * include other text to further specify the location of the message.
21: *
22: * @see IMessageManager
23: * @see IMessage
24: * @since 3.3
25: */
26: public interface IMessagePrefixProvider {
27: /**
28: * Returns the computed prefix for the provided control.
29: *
30: * @param control
31: * the control to provide the prefix for
32: * @return the computed prefix
33: */
34: String getPrefix(Control control);
35: }
|