Tabnine Logo
TextViewer.fireSelectionChanged
Code IndexAdd Tabnine to your IDE (free)

How to use
fireSelectionChanged
method
in
org.eclipse.jface.text.TextViewer

Best Java code snippets using org.eclipse.jface.text.TextViewer.fireSelectionChanged (Showing top 12 results out of 315)

origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Sends out a text selection changed event to all registered listeners and
 * registers the selection changed event to be sent out to all post selection
 * listeners.
 *
 * @param offset the offset of the newly selected range in the visible document
 * @param length the length of the newly selected range in the visible document
 */
protected void selectionChanged(int offset, int length) {
  queuePostSelectionChanged(true);
  fireSelectionChanged(offset, length);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Sends out a text selection changed event to all registered listeners and
 * registers the selection changed event to be sent out to all post selection
 * listeners.
 *
 * @param offset the offset of the newly selected range in the visible document
 * @param length the length of the newly selected range in the visible document
 */
protected void selectionChanged(int offset, int length) {
  queuePostSelectionChanged(true);
  fireSelectionChanged(offset, length);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

private void delete() {
  if (!fTextWidget.getBlockSelection()) {
    fTextWidget.invokeAction(ST.DELETE_NEXT);
  } else {
    wrapCompoundChange(new Runnable(){
      @Override
      public void run() {
        try {
          new SelectionProcessor(TextViewer.this).doDelete(getSelection());
        } catch (BadLocationException e) {
          if (TRACE_ERRORS)
            System.out.println(JFaceTextMessages.getString("TextViewer.error.bad_location.delete")); //$NON-NLS-1$
        }
      }
    });
  }
  Point selection= fTextWidget.getSelectionRange();
  fireSelectionChanged(selection.x, selection.y);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

fireSelectionChanged(selection.x, selection.y);
origin: org.eclipse.platform/org.eclipse.jface.text

fireSelectionChanged(selection.x, selection.y);
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Sends out a text selection changed event to all registered listeners.
 *
 * @param offset the offset of the newly selected range in the visible document
 * @param length the length of the newly selected range in the visible document
 * @since 3.0
 */
protected void fireSelectionChanged(int offset, int length) {
  if (redraws()) {
    if (length < 0) {
      length= -length;
      offset= offset + length;
    }
    IRegion r= widgetRange2ModelRange(new Region(offset, length));
    if ((r != null && !r.equals(fLastSentSelectionChange)) || r == null)  {
      fLastSentSelectionChange= r;
      ISelection selection= r != null ? new TextSelection(getDocument(), r.getOffset(), r.getLength()) : TextSelection.emptySelection();
      SelectionChangedEvent event= new SelectionChangedEvent(this, selection);
      fireSelectionChanged(event);
    }
  }
}
origin: org.eclipse.platform/org.eclipse.jface.text

private void delete() {
  if (!fTextWidget.getBlockSelection()) {
    fTextWidget.invokeAction(ST.DELETE_NEXT);
  } else {
    wrapCompoundChange(() -> {
      try {
        new SelectionProcessor(TextViewer.this).doDelete(getSelection());
      } catch (BadLocationException e) {
        if (TRACE_ERRORS)
          System.out.println(JFaceTextMessages.getString("TextViewer.error.bad_location.delete")); //$NON-NLS-1$
      }
    });
  }
  Point selection= fTextWidget.getSelectionRange();
  fireSelectionChanged(selection.x, selection.y);
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Sends out a text selection changed event to all registered listeners.
 *
 * @param offset the offset of the newly selected range in the visible document
 * @param length the length of the newly selected range in the visible document
 * @since 3.0
 */
protected void fireSelectionChanged(int offset, int length) {
  if (redraws()) {
    if (length < 0) {
      length= -length;
      offset= offset + length;
    }
    IRegion r= widgetRange2ModelRange(new Region(offset, length));
    if ((r != null && !r.equals(fLastSentSelectionChange)) || r == null)  {
      fLastSentSelectionChange= r;
      ISelection selection= r != null ? new TextSelection(getDocument(), r.getOffset(), r.getLength()) : TextSelection.emptySelection();
      SelectionChangedEvent event= new SelectionChangedEvent(this, selection);
      fireSelectionChanged(event);
    }
  }
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Sends out a mark selection changed event to all registered listeners.
 *
 * @param offset the offset of the mark selection in the visible document, the offset is <code>-1</code> if the mark was cleared
 * @param length the length of the mark selection, may be negative if the caret is before the mark.
 * @since 2.0
 */
protected void markChanged(int offset, int length) {
  if (redraws()) {
    if (offset != -1) {
      IRegion r= widgetRange2ModelRange(new Region(offset, length));
      offset= r.getOffset();
      length= r.getLength();
    }
    ISelection selection= new MarkSelection(getDocument(), offset, length);
    SelectionChangedEvent event= new SelectionChangedEvent(this, selection);
    fireSelectionChanged(event);
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Sends out a mark selection changed event to all registered listeners.
 *
 * @param offset the offset of the mark selection in the visible document, the offset is <code>-1</code> if the mark was cleared
 * @param length the length of the mark selection, may be negative if the caret is before the mark.
 * @since 2.0
 */
protected void markChanged(int offset, int length) {
  if (redraws()) {
    if (offset != -1) {
      IRegion r= widgetRange2ModelRange(new Region(offset, length));
      offset= r.getOffset();
      length= r.getLength();
    }
    ISelection selection= new MarkSelection(getDocument(), offset, length);
    SelectionChangedEvent event= new SelectionChangedEvent(this, selection);
    fireSelectionChanged(event);
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

fireSelectionChanged(selection.x, selection.y);
if (fLastSentSelectionChange != null) {
  ISelection lastSelection= new TextSelection(getDocument(), fLastSentSelectionChange.getOffset(), fLastSentSelectionChange.getLength());
  fireSelectionChanged(new SelectionChangedEvent(this, lastSelection));
origin: org.eclipse.platform/org.eclipse.jface.text

fireSelectionChanged(selection.x, selection.y);
if (fLastSentSelectionChange != null) {
  ISelection lastSelection= new TextSelection(getDocument(), fLastSentSelectionChange.getOffset(), fLastSentSelectionChange.getLength());
  fireSelectionChanged(new SelectionChangedEvent(this, lastSelection));
org.eclipse.jface.textTextViewerfireSelectionChanged

Javadoc

Sends out a text selection changed event to all registered listeners.

Popular methods of TextViewer

  • getTextWidget
  • getControl
  • doOperation
  • setDocument
  • modelRange2WidgetRange
    Same as #modelRange2WidgetRange(IRegion) just for a org.eclipse.jface.text.Position.
  • getRewriteTarget
  • getSelection
  • modelLine2WidgetLine
    Implements the contract of ITextViewerExtension5#modelLine2WidgetLine(int).
  • getDocument
  • setSelectedRange
  • setSelection
  • <init>
    Create a new text viewer with the given SWT style bits. The viewer is ready to use but does not have
  • setSelection,
  • <init>,
  • canDoOperation,
  • getVisibleRegion,
  • handleDispose,
  • invalidateTextPresentation,
  • setTopIndex,
  • _getVisibleRegionOffset,
  • activatePlugins,
  • addPresentation

Popular in Java

  • Parsing JSON documents to java classes using gson
  • addToBackStack (FragmentTransaction)
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • JTable (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now