Package org.eclipse.jface.text

Examples of org.eclipse.jface.text.Document


  public void testQWickieJWComptWithBlanks() {
    long start = System.nanoTime();

    IFile file = project.getFile("/src/main/java/org/qwickie/test/project/issue49/Issue49.java");
    InputStream contents;
    Document document = null;
    try {
      contents = file.getContents(true);
      byte[] b = new byte[contents.available()];
      contents.read(b);
      contents.close();
      document = new Document(new String(b));
    } catch (Exception e1) {
    }
    QWickieJavaHyperlinkDetector detector = new QWickieJavaHyperlinkDetector();
    assertNull(detector.detectHyperlinks(null, null, false));
View Full Code Here


    InputStream contents = javaFile.getContents(true);
    byte[] b = new byte[contents.available()];
    contents.read(b);
    contents.close();
    javaDocument = new Document(new String(b));

  }
View Full Code Here

  public void setUp() throws Exception {
    InputStream contents = htmlFile.getContents(true);
    byte[] b = new byte[contents.available()];
    contents.read(b);
    contents.close();
    htmlDocument = new Document(new String(b));
  }
View Full Code Here

  public void setUp() throws Exception {
    InputStream contents = javaFile.getContents(true);
    byte[] b = new byte[contents.available()];
    contents.read(b);
    contents.close();
    javaDocument = new Document(new String(b));
  }
View Full Code Here

  public void setUp() throws Exception {
    InputStream contents = javaFile.getContents(true);
    byte[] b = new byte[contents.available()];
    contents.read(b);
    contents.close();
    javaDocument = new Document(new String(b));
  }
View Full Code Here

  public void setUp() throws Exception {
    InputStream contents = javaFile.getContents(true);
    byte[] b = new byte[contents.available()];
    contents.read(b);
    contents.close();
    javaDocument = new Document(new String(b));

    contents = customerFile.getContents(true);
    b = new byte[contents.available()];
    contents.read(b);
    contents.close();
    customerDocument = new Document(new String(b));

    contents = panelFile.getContents(true);
    b = new byte[contents.available()];
    contents.read(b);
    contents.close();
    panelDocument = new Document(new String(b));

    contents = htmlFile.getContents(true);
    b = new byte[contents.available()];
    contents.read(b);
    contents.close();
    htmlDocument = new Document(new String(b));
  }
View Full Code Here

  public void testDetectionPackageOne() {
    long start = System.nanoTime();

    IFile file = project.getFile("src/main/resources/org/qwickie/test/project/issue45/mobile/RegistrationPage.html");
    InputStream contents;
    Document document = null;
    try {
      contents = file.getContents(true);
      byte[] b = new byte[contents.available()];
      contents.read(b);
      contents.close();
      document = new Document(new String(b));
    } catch (Exception e1) {
    }
    QWickieHtmlHyperlinkDetector detector = new QWickieHtmlHyperlinkDetector();

    IHyperlink[] hls = detector.detectHyperlinks(null, null, false);
View Full Code Here

  public void testDetectionPackageTwo() {
    long start = System.nanoTime();

    IFile file = project.getFile("src/main/resources/org/qwickie/test/project/issue45/web/RegistrationPage.html");
    InputStream contents;
    Document document = null;
    try {
      contents = file.getContents(true);
      byte[] b = new byte[contents.available()];
      contents.read(b);
      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);
View Full Code Here

  public void testDetectionXML() {
    long start = System.nanoTime();

    IFile file = project.getFile("src/main/java/org/qwickie/test/project/xml/HomePage.html");
    InputStream contents;
    Document document = null;
    try {
      contents = file.getContents(true);
      byte[] b = new byte[contents.available()];
      contents.read(b);
      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);
View Full Code Here

      oldSideView.treeViewer.setInput(input);
      newSideView.treeViewer.setInput(input);
      oldSideView.treeViewer.expandAll();
      newSideView.treeViewer.expandAll();

      Document oldDocument;
      if (input == null) {
        oldDocument = null;
      } else {
        oldDocument = new Document(input.getOldSource().getText());
      }
      oldSideView.sourceViewer.setDocument(oldDocument);
      Document newDocument;
      if (input == null) {
        newDocument = null;
      } else {
        newDocument = new Document(input.getNewSource().getText());
      }
      newSideView.sourceViewer.setDocument(newDocument);
      if (input != null) {
        applyDiffPresentation(oldSideView.sourceViewer, newSideView.sourceViewer,
            input.getTextualDiff());
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.Document

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.