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

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

Introduction

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

Prototype

@Override
    public void setErrorMessage(String message) 

Source Link

Usage

From source file:org.apache.sling.ide.eclipse.ui.dnd.assistant.StatusLineUtils.java

License:Apache License

private static void doSetErrorMessage(final String message) {
    final IStatusLineManager statusLineManager = getStatusLineManager();
    if (statusLineManager != null) {
        Display.getDefault().syncExec(new Runnable() {

            @Override/*from w w w .  j  a va2 s . c  o  m*/
            public void run() {
                if (statusLineManager instanceof SubContributionManager) {
                    SubContributionManager sub = (SubContributionManager) statusLineManager;
                    StatusLineManager parent = (StatusLineManager) sub.getParent();
                    parent.setErrorMessage(message);
                    parent.update(true);
                } else {
                    statusLineManager.setErrorMessage(message);
                    statusLineManager.update(true);
                }
            }
        });
    }
}