Example usage for org.eclipse.jface.action SubStatusLineManager setErrorMessage

List of usage examples for org.eclipse.jface.action SubStatusLineManager setErrorMessage

Introduction

In this page you can find the example usage for org.eclipse.jface.action SubStatusLineManager setErrorMessage.

Prototype

@Override
    public void setErrorMessage(String message) 

Source Link

Usage

From source file:net.sourceforge.texlipse.actions.editor.OpenDeclarationHandler.java

License:Open Source License

/**
 * Prints an error message on the status line and make a beep.
 * @param message the error message//ww  w .j a v  a2 s .c  o  m
 * @param editor  the editor
 */
private static void createStatusLineErrorMessage(final TexEditor editor, final String message) {
    SubStatusLineManager slm = (SubStatusLineManager) editor.getEditorSite().getActionBars()
            .getStatusLineManager();
    slm.setErrorMessage(message);
    slm.setVisible(true);

    editor.getViewer().getTextWidget().getDisplay().beep();
}

From source file:net.sourceforge.texlipse.actions.OpenDeclarationAction.java

License:Open Source License

/**
  * Prints an error message on the status line and make a beep.
  * @param message   The error message// w w  w.j a va2 s.c  om
 */
private void createStatusLineErrorMessage(String message) {
    TexEditor editor;
    if (targetEditor instanceof TexEditor) {
        editor = (TexEditor) targetEditor;

        SubStatusLineManager slm = (SubStatusLineManager) targetEditor.getEditorSite().getActionBars()
                .getStatusLineManager();
        slm.setErrorMessage(message);
        slm.setVisible(true);

        editor.getViewer().getTextWidget().getDisplay().beep();
    }
}

From source file:net.sourceforge.texlipse.model.TexDocumentModel.java

License:Open Source License

/**
 * Write a message on the status line.//from  w w  w  .  ja va2  s  .c  o m
 * @param msg the message.
 */
public void setStatusLineErrorMessage(String msg) {
    SubStatusLineManager slm = (SubStatusLineManager) editor.getEditorSite().getActionBars()
            .getStatusLineManager();
    slm.setErrorMessage(msg);
    slm.setVisible(true);
}

From source file:net.sourceforge.texlipse.model.TexDocumentModel.java

License:Open Source License

/**
 * clean the status line//from  ww w.j a  v a 2s .  c o m
 *
 */
public void removeStatusLineErrorMessage() {
    SubStatusLineManager slm = (SubStatusLineManager) editor.getEditorSite().getActionBars()
            .getStatusLineManager();
    //slm.setVisible(false);
    slm.setErrorMessage(null);
}