Package org.eclipse.jface.action

Examples of org.eclipse.jface.action.IStatusLineManager


   * @since 3.0
   */
  private void statusNotFound() {
    fWorkbenchPart.getSite().getShell().getDisplay().beep();

    IStatusLineManager manager= getStatusLineManager();
    if (manager == null)
      return;

    manager.setMessage(EditorMessages.FindNext_Status_noMatch_label);
  }
View Full Code Here


  /**
   * Clears the status line.
   */
  private void statusClear() {
    IStatusLineManager manager= getStatusLineManager();
    if (manager == null)
      return;

    manager.setErrorMessage(""); //$NON-NLS-1$
    manager.setMessage(""); //$NON-NLS-1$
  }
View Full Code Here

   */
  protected IProgressMonitor getProgressMonitor() {

    IProgressMonitor pm= null;

    IStatusLineManager manager= getStatusLineManager();
    if (manager != null)
      pm= manager.getProgressMonitor();

    return pm != null ? pm : new NullProgressMonitor();
  }
View Full Code Here

   */
  public Object getAdapter(Class required) {

    if (IEditorStatusLine.class.equals(required)) {
      if (fEditorStatusLine == null) {
        IStatusLineManager statusLineManager= getStatusLineManager();
        ISelectionProvider selectionProvider= getSelectionProvider();
        if (statusLineManager != null && selectionProvider != null)
          fEditorStatusLine= new EditorStatusLine(statusLineManager, selectionProvider);
      }
      return fEditorStatusLine;
    }

    if (IVerticalRulerInfo.class.equals(required)) {
      if (fVerticalRuler != null)
        return fVerticalRuler;
    }

    if (IMarkRegionTarget.class.equals(required)) {
      if (fMarkRegionTarget == null) {
        IStatusLineManager manager= getStatusLineManager();
        if (manager != null)
          fMarkRegionTarget= (fSourceViewer == null ? null : new MarkRegionTarget(fSourceViewer, manager));
      }
      return fMarkRegionTarget;
    }

    if (DeleteLineTarget.class.equals(required)){
      if (fDeleteLineTarget == null) {
        fDeleteLineTarget= new DeleteLineTarget(fSourceViewer);
      }
      return fDeleteLineTarget;
    }

    if (IncrementalFindTarget.class.equals(required)) {
      if (fIncrementalFindTarget == null) {
        IStatusLineManager manager= getStatusLineManager();
        if (manager != null)
          fIncrementalFindTarget= (fSourceViewer == null ? null : new IncrementalFindTarget(fSourceViewer, manager));
      }
      return fIncrementalFindTarget;
    }
View Full Code Here

    }

    public void postWindowOpen() {
//        logger.debug("post window open");
       
        IStatusLineManager statusLine = getWindowConfigurer().getActionBarConfigurer().getStatusLineManager();
//        Application.getApplication().setStatusLineManager(statusLine);
    }
View Full Code Here

     */
    private IProgressMonitor getProgressMonitor() {

        IProgressMonitor pm = null;

        IStatusLineManager manager = getStatusLineManager();

        if (manager != null) {
            pm = manager.getProgressMonitor();
        }

        return pm != null ? pm : new NullProgressMonitor();
    }
View Full Code Here

   */
  public void linkEntered(HyperlinkEvent e)
    {
    if (actionBars == null)
      return;
    IStatusLineManager mng = actionBars.getStatusLineManager();
    mng.setMessage(e.getLabel());
    }
View Full Code Here

   */
  public void linkExited(HyperlinkEvent e)
    {
    if (actionBars == null)
      return;
    IStatusLineManager mng = actionBars.getStatusLineManager();
    mng.setMessage(null);
    }
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setStatusLineManager(ISelection selection) {
    IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ?
      contentOutlineStatusLineManager : getActionBars().getStatusLineManager();

    if (statusLineManager != null) {
      if (selection instanceof IStructuredSelection) {
        Collection<?> collection = ((IStructuredSelection)selection).toList();
        switch (collection.size()) {
          case 0: {
            statusLineManager.setMessage(getString("_UI_NoObjectSelected"));
            break;
          }
          case 1: {
            String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next());
            statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text));
            break;
          }
          default: {
            statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size())));
            break;
          }
        }
      }
      else {
        statusLineManager.setMessage("");
      }
    }
  }
View Full Code Here

  protected void applyStatus(IStatus[] status) {
    if (!_visible) {
      return;
    }

    IStatusLineManager statusLine = getStatusLineManager();
    if (statusLine == null) {
      return;
    }

    IStatus s;
    if (status == null || status.length == 0) {
      s = null;
    } else {
      s = StatusUtil.getMostSevere(status);
    }

    if (s == null || s.getSeverity() != IStatus.ERROR) {
      statusLine.setErrorMessage(null);
    } else {
      statusLine.setErrorMessage(s.getMessage());
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.action.IStatusLineManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.