Package org.eclipse.jface.text

Examples of org.eclipse.jface.text.TextViewer$FindReplaceTarget


        getSite().registerContextMenu(id, contextMenuManager, textViewer);
    }

    private void createTextControl() {
        textViewer = new TextViewer(stackComposite, SWT.H_SCROLL | SWT.V_SCROLL);
        textViewer.setEditable(false);
        // textViewer.setHoverControlCreator(null)

        textControl = textViewer.getTextWidget();
        IDocument document = new Document("");
View Full Code Here


    layout.marginHeight = 0;
    parent.setLayout(layout);
   
    parent.setBackground(NOTE_COLOR);
   
    textViewer = new TextViewer(parent, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
    textViewer.getControl().setFont(JFaceResources.getFont(JFaceResources.TEXT_FONT));
    textViewer.getControl().setBackground(NOTE_COLOR);
    textViewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
    textViewer.setDocument(new Document());
    textViewer.setHyperlinkPresenter(new DefaultHyperlinkPresenter(new RGB(0, 0, 255)));
View Full Code Here

    // we're cooperative and also provide our selection
    // at least for the tableviewer
    getSite().setSelectionProvider(tableviewer);

    textviewer = new TextViewer(pagebook, SWT.H_SCROLL | SWT.V_SCROLL);
    textviewer.setEditable(false);

    getSite().getWorkbenchWindow().getSelectionService().addSelectionListener(PACKAGE_EXPLORER.id, listener);
  }
View Full Code Here

    } catch (Exception e1) {
    }
    QWickieJavaHyperlinkDetector detector = new QWickieJavaHyperlinkDetector();
    assertNull(detector.detectHyperlinks(null, null, false));

    ITextViewer textViewer = new TextViewer(new Shell(), 0);
    assertNull(detector.detectHyperlinks(textViewer, null, false));
    assertNull(detector.detectHyperlinks(null, new Region(1, 1), false));

    textViewer.setDocument(document);
    final IWorkbench workbench = PlatformUI.getWorkbench();
    final IWorkbenchPage activePage = workbench.getActiveWorkbenchWindow().getActivePage();
    try {
      detector.setContext(IDE.openEditor(activePage, file));
    } catch (Exception e) {
View Full Code Here

    } catch (Exception e1) {
    }
    QWickieJavaHyperlinkDetector detector = new QWickieJavaHyperlinkDetector();
    assertNull(detector.detectHyperlinks(null, null, false));

    ITextViewer textViewer = new TextViewer(new Shell(), 0);
    assertNull(detector.detectHyperlinks(textViewer, null, false));
    assertNull(detector.detectHyperlinks(null, new Region(1, 1), false));

    textViewer.setDocument(document);
    final IWorkbench workbench = PlatformUI.getWorkbench();
    final IWorkbenchPage activePage = workbench.getActiveWorkbenchWindow().getActivePage();
    try {
      detector.setContext(IDE.openEditor(activePage, file));
    } catch (Exception e) {
View Full Code Here

    } catch (Exception e1) {
    }
    QWickieJavaHyperlinkDetector detector = new QWickieJavaHyperlinkDetector();
    assertNull(detector.detectHyperlinks(null, null, false));

    ITextViewer textViewer = new TextViewer(new Shell(), 0);
    assertNull(detector.detectHyperlinks(textViewer, null, false));
    assertNull(detector.detectHyperlinks(null, new Region(1, 1), false));

    textViewer.setDocument(document);
    final IWorkbench workbench = PlatformUI.getWorkbench();
    final IWorkbenchPage activePage = workbench.getActiveWorkbenchWindow().getActivePage();
    try {
      detector.setContext(IDE.openEditor(activePage, file));
    } catch (Exception e) {
View Full Code Here

    } catch (Exception e1) {
    }
    QWickieJavaHyperlinkDetector detector = new QWickieJavaHyperlinkDetector();
    assertNull(detector.detectHyperlinks(null, null, false));

    ITextViewer textViewer = new TextViewer(new Shell(), 0);
    assertNull(detector.detectHyperlinks(textViewer, null, false));
    assertNull(detector.detectHyperlinks(null, new Region(1, 1), false));

    textViewer.setDocument(document);
    final IWorkbench workbench = PlatformUI.getWorkbench();
    final IWorkbenchPage activePage = workbench.getActiveWorkbenchWindow().getActivePage();
    try {
      detector.setContext(IDE.openEditor(activePage, file));
    } catch (Exception e) {
View Full Code Here

    QWickieHtmlHyperlinkDetector detector = new QWickieHtmlHyperlinkDetector();

    IHyperlink[] hls = detector.detectHyperlinks(null, null, false);
    assertNull(hls);

    ITextViewer textViewer = new TextViewer(new Shell(), 0);
    hls = detector.detectHyperlinks(textViewer, null, false);
    assertNull(hls);

    hls = detector.detectHyperlinks(textViewer, new Region(10, 1), false);
    textViewer.setDocument(document);
    assertNull(hls);

    hls = detector.detectHyperlinks(textViewer, new Region(10, 1), false);
    assertNull(hls);
View Full Code Here

      contents.close();
      document = new Document(new String(b));
    } catch (Exception e1) {
    }
    QWickieHtmlHyperlinkDetector detector = new QWickieHtmlHyperlinkDetector();
    ITextViewer textViewer = new TextViewer(new Shell(), 0);
    textViewer.setDocument(document);
    IRegion region = new Region(255, 1);
    final IHyperlink[] hyperlinks = detector.detectHyperlinks(textViewer, region, false);
    assertEquals(hyperlinks.length, 1);
    final IHyperlink hyperlink = hyperlinks[0];
    assertEquals(hyperlink.getHyperlinkText(), "Open java file and jump to wicket:id \"test\"");
View Full Code Here

      contents.close();
      document = new Document(new String(b));
    } catch (Exception e1) {
    }
    QWickieHtmlHyperlinkDetector detector = new QWickieHtmlHyperlinkDetector();
    ITextViewer textViewer = new TextViewer(new Shell(), 0);
    textViewer.setDocument(document);
    IRegion region = new Region(296, 1);
    final IHyperlink[] hyperlinks = detector.detectHyperlinks(textViewer, region, false);
    assertEquals(hyperlinks.length, 1);
    final IHyperlink hyperlink = hyperlinks[0];
    assertEquals(hyperlink.getHyperlinkText(), "Open properties file and jump to wicket:id \"page.test.string\"");
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.TextViewer$FindReplaceTarget

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.