Package org.emftrace.emffit.ui.commands.hypertexts

Examples of org.emftrace.emffit.ui.commands.hypertexts.DeleteHypertextTextElementCommand


    .runWithoutUnicaseCommand();
    }
 
  @Override
  protected void deleteTextElementFromModel(Hypertext hypertext, int offset) {
    new DeleteHypertextTextElementCommand(hypertext, offset).runWithoutUnicaseCommand();
  }
View Full Code Here


   *            the hypertext
   * @param offset
   *            the offset
   */
  protected void deleteTextElementFromModel(Hypertext hypertext, int offset) {
    new DeleteHypertextTextElementCommand(hypertext, offset).run();
  }
View Full Code Here

public class DeleteHypertextTextElementCommandTest extends EMFfitTestCase{

  @Test
  public void testDoRunForLink() {
    new DeleteHypertextTextElementCommand(issueCard.getDescription(),issueCard.getDescription().getContent().get(0)).runWithoutUnicaseCommand();
    assertEquals(0, issueCard.getDescription().getContent().size());
  }
View Full Code Here

    assertEquals(0, issueCard.getDescription().getContent().size());
  }
 
  @Test
  public void testDoRunForOffset() {
    new DeleteHypertextTextElementCommand(issueCard.getDescription(),0).runWithoutUnicaseCommand();
    assertEquals(0, issueCard.getDescription().getContent().size());
  }
View Full Code Here

    hypertext.getContent().add(term3);
   
    project.addModelElement(hypertext);
   
   
    new DeleteHypertextTextElementCommand(hypertext,5).runWithoutUnicaseCommand();
    assertEquals(4, hypertext.getContent().size());
    assertEquals("foo ", hypertext.getContent().get(0).getVisibleContent());
    assertEquals("link1", hypertext.getContent().get(1).getVisibleContent());
    assertEquals("link2", hypertext.getContent().get(2).getVisibleContent());
    assertEquals(" bar", hypertext.getContent().get(3).getVisibleContent());
View Full Code Here

    hypertext.getContent().add(term3);
   
    project.addModelElement(hypertext);
   
   
    new DeleteHypertextTextElementCommand(hypertext, 10).runWithoutUnicaseCommand();
    assertEquals(3, hypertext.getContent().size());
    assertEquals("foo ", hypertext.getContent().get(0).getVisibleContent());
    assertEquals("link1", hypertext.getContent().get(1).getVisibleContent());
    assertEquals(link1, hypertext.getContent().get(1));
    assertTrue(hypertext.getContent().get(1) instanceof Link);
View Full Code Here

    hypertext.getContent().add(term2);
   
    project.addModelElement(hypertext);
   
   
    new DeleteHypertextTextElementCommand(hypertext,5).runWithoutUnicaseCommand();
    assertEquals(4, hypertext.getContent().size());
    assertEquals("foo ", hypertext.getContent().get(0).getVisibleContent());
    assertEquals("link1", hypertext.getContent().get(1).getVisibleContent());
    assertEquals("link3", hypertext.getContent().get(2).getVisibleContent());
    assertEquals(" bar", hypertext.getContent().get(3).getVisibleContent());
View Full Code Here

TOP

Related Classes of org.emftrace.emffit.ui.commands.hypertexts.DeleteHypertextTextElementCommand

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.