Examples of IStatusLineManager


Examples of org.eclipse.jface.action.IStatusLineManager

  /**
   * @param message
   */
  protected void setErrorMessage(String message) {
    IStatusLineManager s = getStatusLineManager();
    if (s != null) {
      s.setErrorMessage(message);
    }
  }
View Full Code Here

Examples of org.eclipse.jface.action.IStatusLineManager

   */
  public static IStatusLineManager getStatusLineManager(EditPart part) {
    EditPartViewer v = part.getViewer();
    if (v instanceof IHTMLGraphicalViewer) {
      IHTMLGraphicalViewer htmlviewer = (IHTMLGraphicalViewer) v;
      IStatusLineManager m = htmlviewer.getStatusLineManager();
      if (m == null) {
        _log.info("Warn.PolicyHelper.0", (String) null); //$NON-NLS-1$
      }
      return m;
    }
View Full Code Here

Examples of org.eclipse.jface.action.IStatusLineManager

    // was caused by go to navigation
    if(fSelectionChangedFromGoto) {
      fSelectionChangedFromGoto = false;
      return;
    }
    IStatusLineManager statusLineManager = getEditorSite().getActionBars().getStatusLineManager();
    if (fStatusLineLabelProvider != null && statusLineManager != null) {
      String text = null;
      Image image = null;
      if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
        Object firstElement = ((IStructuredSelection) selection).getFirstElement();
        if (firstElement != null) {
          text = fStatusLineLabelProvider.getText(firstElement);
          image = fStatusLineLabelProvider.getImage((firstElement));
        }
      }
      if (image == null) {
        statusLineManager.setMessage(text);
      }
      else {
        statusLineManager.setMessage(image, text);
      }
    }
  }
View Full Code Here

Examples of org.eclipse.jface.action.IStatusLineManager

    // was caused by go to navigation
    if(fSelectionChangedFromGoto) {
      fSelectionChangedFromGoto = false;
      return;
    }
    IStatusLineManager statusLineManager = getEditorSite().getActionBars().getStatusLineManager();
    if (fStatusLineLabelProvider != null && statusLineManager != null) {
      String text = null;
      Image image = null;
      if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
        Object firstElement = ((IStructuredSelection) selection).getFirstElement();
        if (firstElement != null) {
          text = fStatusLineLabelProvider.getText(firstElement);
          image = fStatusLineLabelProvider.getImage((firstElement));
        }
      }
      if (image == null) {
        statusLineManager.setMessage(text);
      }
      else {
        statusLineManager.setMessage(image, text);
      }
    }
  }
View Full Code Here

Examples of org.eclipse.jface.action.IStatusLineManager

    }

    fDropTarget.dispose();
    fDragSource.dispose();

    IStatusLineManager statusLineManager = getSite().getActionBars().getStatusLineManager();
    if (statusLineManager != null) {
      statusLineManager.setMessage(null);
    }
    setConfiguration(NULL_CONFIGURATION);
    super.dispose();
  }
View Full Code Here

Examples of org.eclipse.jface.action.IStatusLineManager

      if (editorStatusLine != null) {
        editorStatusLine.setMessage(true, null, null);
        editorStatusLine.setMessage(false, null, null);
      }
      else {
        IStatusLineManager mgr = getStatusLineManager();
        if (mgr != null) {
          mgr.setErrorMessage(null);
          mgr.setMessage(null, null);
        }
      }
      if (annotation != null) {
        updateAnnotationViews(annotation);
        if (_debug) {
          System.out.println("select and reveal " + annotation.getType() + "@" + position.getOffset() + ":" + position.getLength()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        }
        getTextEditor().selectAndReveal(position.getOffset(), position.getLength());
        if (editorStatusLine != null) {
          editorStatusLine.setMessage(true, null, null);
          editorStatusLine.setMessage(false, annotation.getText(), null);
        }
        else {
          IStatusLineManager mgr = getStatusLineManager();
          if (mgr != null) {
            mgr.setErrorMessage(null);
            mgr.setMessage(null, annotation.getText());
          }
          getTextEditor().getSelectionProvider().addSelectionChangedListener(new StatusLineClearer(mgr));
        }
      }
    }
View Full Code Here

Examples of org.eclipse.jface.action.IStatusLineManager

    IEditorPart editor = getActiveEditor();
    if (editor != null) {
      ITextEditor textEditor = (ITextEditor) editor.getAdapter(ITextEditor.class);
      if (textEditor != null && textEditor instanceof StructuredTextEditor) {
        if (((StructuredTextEditor) textEditor).getTextViewer() == viewer) {
          IStatusLineManager statusLineManager = editor.getEditorSite().getActionBars().getStatusLineManager();
          if (isError)
            statusLineManager.setErrorMessage(msg);
          else
            statusLineManager.setMessage(msg);
          new OneTimeListener(viewer.getTextWidget(), new ClearStatusLine(statusLineManager, isError));
          messageShown = true;
        }
      }
    }
View Full Code Here

Examples of org.eclipse.jface.action.IStatusLineManager

    }
    setPartName(input.getName());
  }

  void updateStatusLine(ISelection selection) {
    IStatusLineManager statusLineManager = getEditorSite().getActionBars().getStatusLineManager();
    if (fStatusLineLabelProvider != null && statusLineManager != null) {
      String text = null;
      Image image = null;
      if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
        Object firstElement = ((IStructuredSelection) selection).getFirstElement();
        if (firstElement != null) {
          text = fStatusLineLabelProvider.getText(firstElement);
          image = fStatusLineLabelProvider.getImage((firstElement));
        }
      }
      if (image == null) {
        statusLineManager.setMessage(text);
      }
      else {
        statusLineManager.setMessage(image, text);
      }
    }
  }
View Full Code Here

Examples of org.eclipse.jface.action.IStatusLineManager

    }

    fDropTarget.dispose();
    fDragSource.dispose();

    IStatusLineManager statusLineManager = getSite().getActionBars().getStatusLineManager();
    if (statusLineManager != null) {
      statusLineManager.setMessage(null);
    }
    setConfiguration(NULL_CONFIGURATION);
    super.dispose();
  }
View Full Code Here

Examples of org.eclipse.jface.action.IStatusLineManager

    fViewer.addSelectionChangedListener(new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        IStructuredSelection sel = (IStructuredSelection) event.getSelection();
        HistoryDefinitionLocation match = (HistoryDefinitionLocation) sel.getFirstElement();
        if(match != null) {
          IStatusLineManager slManager = getViewSite().getActionBars().getStatusLineManager();
          slManager.setMessage(match.toString());
        }
      }
    });
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.