1 /******************************************************************************* 2 * Copyright (c) 2000, 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 12 package org.eclipse.ui.texteditor; 13 14 import org.eclipse.swt.graphics.Image; 15 16 /** 17 * Extends {@link org.eclipse.ui.texteditor.IStatusField} with the following 18 * concepts: 19 * <ul> 20 * <li>set error text and image</li> 21 * <li>set tool tip</li> 22 * <li>control visibility</li> 23 * </ul> 24 * 25 * @since 3.0 26 */ 27 public interface IStatusFieldExtension { 28 /** 29 * Sets the text of this status field. 30 * <p> 31 * The error text overrides the current text until the error 32 * text is cleared (set to <code>null</code>). 33 * </p> 34 * 35 * @param text the error text shown in the status field or <code>null</code> to clear 36 * @see IStatusField#setText(String) 37 */ 38 void setErrorText(String text); 39 40 /** 41 * Sets the error image of this status field. 42 * <p> 43 * The error image overrides the current image until the error 44 * image is cleared (set to <code>null</code>). 45 * </p> 46 * 47 * @param image the error image shown in the status field or <code>null</code> to clear 48 * @see IStatusField#setImage(Image) 49 */ 50 void setErrorImage(Image image); 51 52 /** 53 * Sets tool tip text for this status field. 54 * 55 * @param string the new tool tip text or <code>null</code> to clear 56 */ 57 void setToolTipText (String string); 58 59 /** 60 * Sets whether this status field is visible within the status line. 61 * 62 * @param visible <code>true</code> if this item should be visible, <code>false</code> otherwise 63 */ 64 void setVisible(boolean visible); 65 } 66