Package org.emftrace.metamodel.EMFfitModel

Examples of org.emftrace.metamodel.EMFfitModel.Link


    Term term1 = EMFfitModelFactory.eINSTANCE.createTerm();
    term1.setVisibleContent("foo ");
    hyperText.getContent().add(term1);
   
    Factor target1 = EMFfitModelFactory.eINSTANCE.createFactor();
    Link link1 = EMFfitModelFactory.eINSTANCE.createLink();
    link1.setVisibleContent("link1");
    link1.setTarget(target1);
    hyperText.getContent().add(link1);
   
    Term term2 = EMFfitModelFactory.eINSTANCE.createTerm();
    term2.setVisibleContent(" bar ");
    hyperText.getContent().add(term2);
   
    Factor target2 = EMFfitModelFactory.eINSTANCE.createFactor();
    Link link2 = EMFfitModelFactory.eINSTANCE.createLink();
    link2.setVisibleContent("link2");
    link2.setTarget(target2);
    hyperText.getContent().add(link2);
   

    Term term3 = EMFfitModelFactory.eINSTANCE.createTerm();
    term3.setVisibleContent(" foo newlink bar");
View Full Code Here



  protected Hypertext createTestHypertext(){
    Hypertext hypertext = EMFfitModelFactory.eINSTANCE.createHypertext();
    Term term1 = EMFfitModelFactory.eINSTANCE.createTerm();
    Link link1 = EMFfitModelFactory.eINSTANCE.createLink();
    Term term2 = EMFfitModelFactory.eINSTANCE.createTerm();
   
    term1.setVisibleContent("foo ");
    link1.setVisibleContent("link");
    term2.setVisibleContent(" bar");
   
   
   
     hypertext.getContent().add(term1);
View Full Code Here

   * @param linkVisibleContent the VisibleContent for the new Link
   * @param target the target for the new Link
   * @return the created Link
   */
  private Link createLink(String linkVisibleContent, EObject target){
    Link newLink = EMFfitModelFactory.eINSTANCE.createLink();
    newLink.setVisibleContent(linkVisibleContent);
    newLink.setTarget(target);
    return newLink;
  }
View Full Code Here

    Term term1 = EMFfitModelFactory.eINSTANCE.createTerm();
    term1.setVisibleContent("term1 ");

    String term1Identifier = term1.getIdentifier();

    Link link = EMFfitModelFactory.eINSTANCE.createLink();
    link.setVisibleContent("link1");
    Factor linkedFactor = EMFfitModelFactory.eINSTANCE.createFactor();
    link.setTarget(linkedFactor);
    String linkIdentifier = link.getIdentifier();

    Term term2 = EMFfitModelFactory.eINSTANCE.createTerm();
    term2.setVisibleContent(" term2");
    String term2Identifier = term2.getIdentifier();

    oldHypertext.getContent().add(term1);
    oldHypertext.getContent().add(link);
    oldHypertext.getContent().add(term2);

    //setup for new changed hypertext element
    String newTerm1Content = "xxxterm1xxx xxx ";
    String newLinkContent = "newlink";
    String newTerm2Content = "xxxterm2xxx xxx";

    Hypertext newHypertext = EMFfitModelFactory.eINSTANCE.createHypertext();

    Term newTerm1 = EMFfitModelFactory.eINSTANCE.createTerm();
    newTerm1.setVisibleContent(newTerm1Content);

    Link newLink = EMFfitModelFactory.eINSTANCE.createLink();
    newLink.setVisibleContent(newLinkContent);
    Factor newLinkedFactor = EMFfitModelFactory.eINSTANCE.createFactor();
    newLink.setTarget(newLinkedFactor);

    Term newterm2 = EMFfitModelFactory.eINSTANCE.createTerm();
    newterm2.setVisibleContent(newTerm2Content);

    newHypertext.getContent().add(newTerm1);
View Full Code Here

  @Test
  public void testDoRunForTermLinkTermLinkTerm() {
   
    Hypertext hypertext = EMFfitModelFactory.eINSTANCE.createHypertext();
    Term term1 = EMFfitModelFactory.eINSTANCE.createTerm();
    Link link1 = EMFfitModelFactory.eINSTANCE.createLink();
    Term term2 = EMFfitModelFactory.eINSTANCE.createTerm();
    Link link2 = EMFfitModelFactory.eINSTANCE.createLink();
    Term term3 = EMFfitModelFactory.eINSTANCE.createTerm();
   
    term1.setVisibleContent("foo ");
    link1.setVisibleContent("link1");
    term2.setVisibleContent("");
    link2.setVisibleContent("link2");
    term3.setVisibleContent(" bar");
   
    hypertext.getContent().add(term1);
    hypertext.getContent().add(link1);
    hypertext.getContent().add(term2);
View Full Code Here

 
  @Test
  public void testDoRunForEmtpyLink() {
   
    Hypertext hypertext = EMFfitModelFactory.eINSTANCE.createHypertext();
    Link link1 = EMFfitModelFactory.eINSTANCE.createLink();
    hypertext.getContent().add(link1);
    project.addModelElement(hypertext);
   
    new DeleteHypertextEmptyTermsCommand(hypertext).runWithoutUnicaseCommand();
    assertEquals(1, hypertext.getContent().size()); //don't delete link
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.