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

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

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

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

@Override
public void setInput(Object input) {
  IDocument document= null;
  if (input instanceof IDocument)
    document= (IDocument) input;
  setDocument(document);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

@Override
public void setInput(Object input) {
  IDocument document= null;
  if (input instanceof IDocument)
    document= (IDocument) input;
  setDocument(document);
}
origin: anb0s/LogViewer

public void setDocument(IDocument document) {
  this.document = document;
  txtViewer.setDocument(document);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

@Override
public void refresh() {
  setDocument(getDocument());
}
origin: org.eclipse.platform/org.eclipse.jface.text

@Override
public void refresh() {
  setDocument(getDocument());
}
origin: org.eclipse.mylyn.commons/workbench

public void configure(final TextViewer viewer, Document document, boolean spellCheck) {
  if (spellCheck && viewer instanceof ISourceViewer) {
    configureAsEditor((ISourceViewer) viewer, document);
  } else {
    viewer.setDocument(document);
  }
  install(viewer, spellCheck);
}
origin: org.eclipse.platform/org.eclipse.debug.ui

@Override
public Control createControl(Composite parent) {
  fTextViewer = new TextViewer(parent, SWT.READ_ONLY);
  fTextViewer.setDocument(new Document());
  StyledText styleText = fTextViewer.getTextWidget();
  styleText.setText("\r\n\r\n" + DebugUIMessages.EmptyViewTab_Unable_to_create + "\n" + getRenderingName() + "\n\n" + DebugUIMessages.ErrorRendering_0 + fException.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
  return fTextViewer.getControl();
}
origin: org.eclipse.platform/org.eclipse.jface.text

@Override
public void setDocument(IDocument document, IAnnotationModel annotationModel, int modelRangeOffset, int modelRangeLength) {
  disposeVisualAnnotationModel();
  if (annotationModel != null && document != null) {
    fVisualAnnotationModel= createVisualAnnotationModel(annotationModel);
    // Make sure the visual model uses the same lock as the underlying model
    if (annotationModel instanceof ISynchronizable && fVisualAnnotationModel instanceof ISynchronizable) {
      ISynchronizable sync= (ISynchronizable)fVisualAnnotationModel;
      sync.setLockObject(((ISynchronizable)annotationModel).getLockObject());
    }
    fVisualAnnotationModel.connect(document);
  }
  if (modelRangeOffset == -1 && modelRangeLength == -1)
    super.setDocument(document);
  else
    super.setDocument(document, modelRangeOffset, modelRangeLength);
  if (fVerticalRuler != null)
    fVerticalRuler.setModel(fVisualAnnotationModel);
  if (fOverviewRuler != null)
    fOverviewRuler.setModel(fVisualAnnotationModel);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

@Override
public void setDocument(IDocument document, IAnnotationModel annotationModel, int modelRangeOffset, int modelRangeLength) {
  disposeVisualAnnotationModel();
  if (annotationModel != null && document != null) {
    fVisualAnnotationModel= createVisualAnnotationModel(annotationModel);
    // Make sure the visual model uses the same lock as the underlying model
    if (annotationModel instanceof ISynchronizable && fVisualAnnotationModel instanceof ISynchronizable) {
      ISynchronizable sync= (ISynchronizable)fVisualAnnotationModel;
      sync.setLockObject(((ISynchronizable)annotationModel).getLockObject());
    }
    fVisualAnnotationModel.connect(document);
  }
  if (modelRangeOffset == -1 && modelRangeLength == -1)
    super.setDocument(document);
  else
    super.setDocument(document, modelRangeOffset, modelRangeLength);
  if (fVerticalRuler != null)
    fVerticalRuler.setModel(fVisualAnnotationModel);
  if (fOverviewRuler != null)
    fOverviewRuler.setModel(fVisualAnnotationModel);
}
origin: org.eclipse.platform/org.eclipse.debug.ui

/**
 * Create the error page of this rendering
 *
 * @param parent the parent to add the page to
 */
private void createMessagePage(Composite parent) {
  if (fTextViewer == null) {
    fTextViewer = new TextViewer(parent, SWT.WRAP);
    fTextViewer.setDocument(new Document());
    StyledText styleText = fTextViewer.getTextWidget();
    styleText.setEditable(false);
    styleText.setEnabled(false);
  }
}
origin: org.eclipse.platform/org.eclipse.jface.text

setDocument(null);
origin: org.eclipse.platform/org.eclipse.debug.ui

/**
 * Create the error page for this rendering.
 * The error page is used to report any error resulted from
 * getting memory from a memory block.
 * @param parent the parent composite
 */
private void createErrorPage(Composite parent)
{
  if (fTextViewer == null)
  {
    fTextViewer = new TextViewer(parent, SWT.WRAP);
    fTextViewer.setDocument(new Document());
    StyledText styleText = fTextViewer.getTextWidget();
    styleText.setEditable(false);
    styleText.setEnabled(false);
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

setDocument(null);
origin: org.eclipse/org.eclipse.jdt.debug.ui

fTextViewer.setDocument(new Document());
GridData gridData = new GridData(GridData.FILL_BOTH);
gridData.widthHint= 300;
origin: org.eclipse.egit/ui

titleViewer.setDocument(new Document(text));
org.eclipse.jface.textTextViewersetDocument

Javadoc

Sets the document partitioning of this viewer. The partitioning is used by this viewer to access partitioning information of the viewers input document.

Popular methods of TextViewer

  • getTextWidget
  • getControl
  • doOperation
  • 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
  • canDoOperation
  • <init>,
  • canDoOperation,
  • getVisibleRegion,
  • handleDispose,
  • invalidateTextPresentation,
  • setTopIndex,
  • _getVisibleRegionOffset,
  • activatePlugins,
  • addPresentation

Popular in Java

  • Running tasks concurrently on multiple threads
  • startActivity (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getExternalFilesDir (Context)
  • Permission (java.security)
    Legacy security code; do not use.
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Table (org.hibernate.mapping)
    A relational table
  • Best IntelliJ 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