Package org.emftrace.metamodel.EMFfitModel

Examples of org.emftrace.metamodel.EMFfitModel.Link


   * returned hypertext is the same object as set by setter
   */
  @Test
  public void testSetHypertextAndGetHypertextForLinkLinkLink() {

    Link link1 = EMFfitModelFactory.eINSTANCE.createLink();
    link1.setVisibleContent("link1");
    Term term = EMFfitModelFactory.eINSTANCE.createTerm();
    term.setVisibleContent(" foo ");
    Link link2 = EMFfitModelFactory.eINSTANCE.createLink();
    link2.setVisibleContent("link2");
    testHypertext.getContent().add(link1);
    testHypertext.getContent().add(term);
    testHypertext.getContent().add(link2);

    linkedText.setHypertext(testHypertext);
View Full Code Here


   * returned hypertext is the same object as set by setter
   */
  @Test
  public void testSetHypertextAndGetHypertextForLinkTermLink() {

    Link link1 = EMFfitModelFactory.eINSTANCE.createLink();
    link1.setVisibleContent("1link1");
    Link link2 = EMFfitModelFactory.eINSTANCE.createLink();
    link2.setVisibleContent("2link2");
    Link link3 = EMFfitModelFactory.eINSTANCE.createLink();
    link3.setVisibleContent("3link3");
    testHypertext.getContent().add(link1);
    testHypertext.getContent().add(link2);
    testHypertext.getContent().add(link3);

    linkedText.setHypertext(testHypertext);
View Full Code Here

  @Test
  public void testSetHypertextAndGetHypertextForTermLinkTermLinkTermLinkTerm() {

    Term term1 = EMFfitModelFactory.eINSTANCE.createTerm();
    term1.setVisibleContent("foo1 ");
    Link link1 = EMFfitModelFactory.eINSTANCE.createLink();
    link1.setVisibleContent("link1");
    Term term2 = EMFfitModelFactory.eINSTANCE.createTerm();
    term2.setVisibleContent(" bar1 ");
    Link link2 = EMFfitModelFactory.eINSTANCE.createLink();
    link2.setVisibleContent("link2");
    Term term3 = EMFfitModelFactory.eINSTANCE.createTerm();
    term3.setVisibleContent(" bar2 ");
    Link link3 = EMFfitModelFactory.eINSTANCE.createLink();
    link3.setVisibleContent("link3");
    Term term4 = EMFfitModelFactory.eINSTANCE.createTerm();
    term4.setVisibleContent(" foo2");
    testHypertext.getContent().add(term1);
    testHypertext.getContent().add(link1);
    testHypertext.getContent().add(term2);
View Full Code Here

   */
  @Test
  public void testUnlinkWordForTermLinkTermLinkTermLinkTerm() {
    Term term1 = EMFfitModelFactory.eINSTANCE.createTerm();
    term1.setVisibleContent("foo ");
    Link link1 = EMFfitModelFactory.eINSTANCE.createLink();
    link1.setVisibleContent("link1");
    Term term2 = EMFfitModelFactory.eINSTANCE.createTerm();
    term2.setVisibleContent(" foothing ");
    Link link2 = EMFfitModelFactory.eINSTANCE.createLink();
    link2.setVisibleContent("link2");
    Term term3 = EMFfitModelFactory.eINSTANCE.createTerm();
    term3.setVisibleContent(" barthing ");
    Link link3 = EMFfitModelFactory.eINSTANCE.createLink();
    link3.setVisibleContent("link4");
    Term term4 = EMFfitModelFactory.eINSTANCE.createTerm();
    term4.setVisibleContent(" bar");

    testHypertext.getContent().add(term1);
    testHypertext.getContent().add(link1);
View Full Code Here

   * - a char was added before a link at text start
   */
  @Test
  public void testOffsetUpdate6() {
    System.out.println("testOffsetUpdate6");
    Link link = EMFfitModelFactory.eINSTANCE.createLink();
    link.setVisibleContent("link");
    Term term = EMFfitModelFactory.eINSTANCE.createTerm();
    term.setVisibleContent(" foo");

    testHypertext.getContent().add(link);
    testHypertext.getContent().add(term);
View Full Code Here

  public void testOffsetUpdate7() {
    System.out.println("testOffsetUpdate7");

    Term term = EMFfitModelFactory.eINSTANCE.createTerm();
    term.setVisibleContent("foo ");
    Link link = EMFfitModelFactory.eINSTANCE.createLink();
    link.setVisibleContent("link");

    testHypertext.getContent().add(term);
    testHypertext.getContent().add(link);

    linkedText.setHypertext(testHypertext);
View Full Code Here

   
    System.out.println("testOffsetUpdate8");

    Term term1 = EMFfitModelFactory.eINSTANCE.createTerm();
    term1.setVisibleContent("foo ");
    Link link1 = EMFfitModelFactory.eINSTANCE.createLink();
    link1.setVisibleContent("link");
    Link link2 = EMFfitModelFactory.eINSTANCE.createLink();
    link2.setVisibleContent("link");
    Term term2 = EMFfitModelFactory.eINSTANCE.createTerm();
    term2.setVisibleContent(" bar");

    testHypertext.getContent().add(term1);
    testHypertext.getContent().add(link1);
View Full Code Here

        Term term = EMFfitModelFactory.eINSTANCE.createTerm();
        term.setVisibleContent(termContent);
        newHypertext.getContent().add(term);
      }
      EmbeddedLink embededLink = offsetLinkMap.get(pos);
      Link link = EMFfitModelFactory.eINSTANCE.createLink();
      link.setVisibleContent(embededLink.getText());
      link.setTarget(embededLink.getTarget());
      newHypertext.getContent().add(link);
      startPos = pos + 1;
      pos = text.indexOf("\uFFFC", startPos);
    }
    // create terms for rest
View Full Code Here

  public void testOffsetUpdate9() {
    System.out.println("testOffsetUpdate9");

    Term term1 = EMFfitModelFactory.eINSTANCE.createTerm();
    term1.setVisibleContent("foo ");
    Link link1 = EMFfitModelFactory.eINSTANCE.createLink();
    link1.setVisibleContent("link");
    Term term2 = EMFfitModelFactory.eINSTANCE.createTerm();
    term2.setVisibleContent("x");
    Link link2 = EMFfitModelFactory.eINSTANCE.createLink();
    link2.setVisibleContent("link");
    Term term3 = EMFfitModelFactory.eINSTANCE.createTerm();
    term3.setVisibleContent(" bar");

    testHypertext.getContent().add(term1);
    testHypertext.getContent().add(link1);
View Full Code Here

  public void testOffsetUpdate10() {

    System.out.println("testOffsetUpdate10");
    Term term1 = EMFfitModelFactory.eINSTANCE.createTerm();
    term1.setVisibleContent("foo ");
    Link link1 = EMFfitModelFactory.eINSTANCE.createLink();
    link1.setVisibleContent("link1");
    Link link2 = EMFfitModelFactory.eINSTANCE.createLink();
    link2.setVisibleContent("link2");
    Link link3 = EMFfitModelFactory.eINSTANCE.createLink();
    link3.setVisibleContent("link3");
    Term term3 = EMFfitModelFactory.eINSTANCE.createTerm();
    term3.setVisibleContent(" bar");

    testHypertext.getContent().add(term1);
    testHypertext.getContent().add(link1);
View Full Code Here

TOP

Related Classes of org.emftrace.metamodel.EMFfitModel.Link

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.