Package org.eclipse.jface.text.source

Examples of org.eclipse.jface.text.source.SourceViewer


      super.createPartControl(parent);
     
      showMatchingCharacters();
     
      if (getViewer() instanceof SourceViewer) {
      SourceViewer viewer = (SourceViewer) getViewer();
 
      viewer.prependAutoEditStrategy(new CommentExtender(), HdlPartitionScanner.SINGLE_LINE_COMMENT);
    }     
  }
View Full Code Here


   *
   * @param parent the parent control
   * @return a configured source viewer
   */
  protected SourceViewer createViewer(Composite parent) {
    SourceViewer viewer= new SourceViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
    SourceViewerConfiguration configuration= new SourceViewerConfiguration();
    viewer.configure(configuration);
    IDocument document= new Document();
    viewer.setDocument(document);
    return viewer;
  }
View Full Code Here

        textEditorTab.setControl(createTextualEditor(tabFolder));
        return composite;
    }
   
    private Control createTextualEditor(Composite parent) {
        actionViewer = new SourceViewer(parent, null, SWT.BORDER);
        actionViewer.configure(new DRLSourceViewerConfig(null) {
            public IReconciler getReconciler(ISourceViewer sourceViewer) {
                return null;
            }
            public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
View Full Code Here

        textEditorTab.setControl(createTextualEditor(tabFolder));
        return composite;
    }
   
    private Control createTextualEditor(Composite parent) {
        actionViewer = new SourceViewer(parent, null, SWT.BORDER);
        actionViewer.configure(new DRLSourceViewerConfig(null) {
            public IReconciler getReconciler(ISourceViewer sourceViewer) {
                return null;
            }
            public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
View Full Code Here

    protected Point getInitialSize() {
        return new Point(600, 450);
    }

    private Control createTextualEditor(Composite parent) {
        actionViewer = new SourceViewer(parent, null, SWT.BORDER);
        actionViewer.configure(new DRLSourceViewerConfig(null) {
            public IReconciler getReconciler(ISourceViewer sourceViewer) {
                return null;
            }
            public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
View Full Code Here

      FillLayout fillLayout = new FillLayout();
      fillLayout.type = SWT.HORIZONTAL;
      fillLayout.spacing = 5;
      sourcePairComposite.setLayout(fillLayout);
    }
    SourceViewer sourceViewerLeft =
        new SourceViewer(sourcePairComposite, null, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
    sourceViewerLeft.getTextWidget().setEditable(false);
    SourceViewer sourceViewerRight =
        new SourceViewer(sourcePairComposite, null, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
    sourceViewerRight.getTextWidget().setEditable(false);

    {
      functionStatusText = new Text(composite, SWT.READ_ONLY | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
      Display display = composite.getDisplay();
      functionStatusText.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
View Full Code Here

    label.setText(TemplatesMessages.TemplatePreferencePage_preview);
    GridData data= new GridData();
    data.horizontalSpan= 2;
    label.setLayoutData(data);

    SourceViewer viewer= createViewer(parent);

    viewer.setEditable(false);
    Cursor arrowCursor= viewer.getTextWidget().getDisplay().getSystemCursor(SWT.CURSOR_ARROW);
    viewer.getTextWidget().setCursor(arrowCursor);

    // Don't set caret to 'null' as this causes https://bugs.eclipse.org/293263
//    viewer.getTextWidget().setCaret(null);

    Control control= viewer.getControl();
    data= new GridData(GridData.FILL_BOTH);
    data.horizontalSpan= 2;
    data.heightHint= convertHeightInCharsToPixels(5);
    control.setLayoutData(data);
View Full Code Here

   *
   * @param parent the parent control
   * @return a configured source viewer
   */
  protected SourceViewer createViewer(Composite parent) {
    SourceViewer viewer= new SourceViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
    SourceViewerConfiguration configuration= new SourceViewerConfiguration();
    viewer.configure(configuration);
    IDocument document= new Document();
    viewer.setDocument(document);
    return viewer;
  }
View Full Code Here

   *
   * @param parent the parent control
   * @return a configured source viewer
   */
  protected SourceViewer createPatternViewer(Composite parent) {
    SourceViewer viewer= new SourceViewer(parent, null, null, false, SWT.V_SCROLL | SWT.H_SCROLL);
    SourceViewerConfiguration configuration= new SourceViewerConfiguration();
    viewer.configure(configuration);
    IDocument document= new Document();
    viewer.setDocument(document);
    viewer.setEditable(false);
    return viewer;
  }
View Full Code Here

      composite.setForeground(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
      composite.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
    }

    // Source viewer
    fViewer= new SourceViewer(composite, null, textStyle);
    fViewer.configure(new SourceViewerConfiguration());
    fViewer.setEditable(false);

    fText= fViewer.getTextWidget();
    gd= new GridData(GridData.BEGINNING | GridData.FILL_BOTH);
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.source.SourceViewer

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.