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

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

Introduction

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

Prototype

@Override
    public void setVisible(boolean visible) 

Source Link

Usage

From source file:de.uni_hildesheim.sse.qmApp.WorkspaceUtils.java

License:Apache License

/**
 * Returns the status line manager of the active editor.
 * //from   ww  w .j a va 2 s.c  o m
 * @param setVisible turns the status line manager visible if needed
 * @return the status line manager (may be <b>null</b> if there is none)
 * @see #getActiveActionBars()
 */
public static IStatusLineManager getActiveStatusLineManager(boolean setVisible) {
    IStatusLineManager statusManager = null;
    IActionBars actionBars = getActiveActionBars();
    if (null != actionBars) {
        statusManager = actionBars.getStatusLineManager();
        if (setVisible && statusManager instanceof SubStatusLineManager) {
            SubStatusLineManager mgr = (SubStatusLineManager) statusManager;
            if (!mgr.isVisible()) {
                mgr.setVisible(true);
            }
        }
    }
    return statusManager;
}

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/*from  ww w . ja v a2  s.co  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  v a  2s. 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  ww .  j a va 2s  . co m
 * @param msg the message.
 */
public void setStatusLineErrorMessage(String msg) {
    SubStatusLineManager slm = (SubStatusLineManager) editor.getEditorSite().getActionBars()
            .getStatusLineManager();
    slm.setErrorMessage(msg);
    slm.setVisible(true);
}