Package org.eclipse.jface.action

Examples of org.eclipse.jface.action.IStatusLineManager


      public void selectionChanged(SelectionChangedEvent event) {
        IStructuredSelection sel = (IStructuredSelection) event.getSelection();
        if(sel != null) {
          int size = sel.toArray().length;
          if(size > 0) {
            IStatusLineManager slManager = getViewSite().getActionBars().getStatusLineManager();
            slManager.setMessage("Selected " + size + (size > 1 ? " entries." : "entry."));
          }
        }
      }
    });
   
View Full Code Here


                        for (int i = 0; i < selected.length; i++) {
                            ViewMatch vm = (ViewMatch) selected[i];
                            if (vm.isDone()) done++;
                            if (vm.isSafe()) safe++;
                        }
                        IStatusLineManager slManager = getViewSite().getActionBars()
                            .getStatusLineManager();
                        slManager.setMessage("Selected " + size
                            + (size > 1 ? " entries." : " entry.") + done
                            + " elements are checked." + safe + " elements are safe.");
                    }
                }
            }
View Full Code Here

    }
    super.setActiveEditor(activeEditor);

    IActionBars actionBars = getActionBars();
    if (actionBars != null) {
      IStatusLineManager statusLineManager = actionBars.getStatusLineManager();
      if (statusLineManager != null) {
        statusLineManager.setMessage(null);
        statusLineManager.setErrorMessage(null);
      }
    }

    ITextEditor textEditor = getTextEditor(activeEditor);
View Full Code Here

    }
   
   
    if(view != null) {
      IActionBars bars = view.getView(true).getViewSite().getActionBars();
      IStatusLineManager statusLine = bars.getStatusLineManager();
      pm = statusLine.getProgressMonitor();
     

    }
  }
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

   * <!-- 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

   * <!-- 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

   * <!-- 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

   * <!-- 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

        }
       
       
        if(view != null) {
          IActionBars bars = view.getView(false).getViewSite().getActionBars();
          IStatusLineManager statusLine = bars.getStatusLineManager();
          pm = statusLine.getProgressMonitor();
          pm.beginTask("Refreshing chart:", IProgressMonitor.UNKNOWN);
          pm.worked(1);
        }
       
        ResultSetMetaData metadata;
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.