Package org.emftrace.emffit.ui.commands.ftentries

Examples of org.emftrace.emffit.ui.commands.ftentries.DeleteFTEntryCommand


                .getShell(), "Delete factor category",
                "Do you really want to delete "
                    + new ShortLabelProvider()
                        .getText(category)
                    + " and all children?"))
          new DeleteFTEntryCommand(category).runAsJob();
      }

    };
  }
View Full Code Here


                "Do you really want to delete "
                    + new ShortLabelProvider()
                        .getText(factor)
                    + " and all children?"))

          new DeleteFTEntryCommand(factor).runAsJob();
      }

    };
  }
View Full Code Here

  @Test
  public void testDoRunForFactor(){
    FactorCategory fc1st  = (FactorCategory) factorTable.getEntries().get(0);
    Factor factor3rd = (Factor) fc1st.getChildren().get(2);
 
    new DeleteFTEntryCommand(factor3rd).runWithoutUnicaseCommand();
    assertEquals(3, fc1st.getChildren().size());
    assertEquals("O1.1", ((FactorCategory) fc1st.getChildren().get(0)).getNumbering());
    assertEquals("O1.2", ((Factor) fc1st.getChildren().get(1)).getNumbering());
    assertEquals("O1.3", ((Factor) fc1st.getChildren().get(2)).getNumbering());
View Full Code Here

  public void testDoRunForCategory() {
    //setup
    FactorCategory fc1st  = (FactorCategory) factorTable.getEntries().get(0);
    FactorCategory fc2nd  = (FactorCategory) factorTable.getEntries().get(1);
      //run command
    new DeleteFTEntryCommand(fc1st).runWithoutUnicaseCommand();
    //check
    assertEquals(1, factorTable.getEntries().size());
    assertEquals("O1", fc2nd.getNumbering());
    assertEquals("O1.1", fc2nd.getChildren().get(0).getNumbering());
  }
View Full Code Here

  @Override
  protected void doRun() {
    //note: GUI doesn't support List.clear() yet!
    for (int i = factorTable.getEntries().size()-1; i >=0; i--) {
      FTEntry entry = factorTable.getEntries().get(i);
      new DeleteFTEntryCommand(entry).runWithoutUnicaseCommand();
    }

  }
View Full Code Here

TOP

Related Classes of org.emftrace.emffit.ui.commands.ftentries.DeleteFTEntryCommand

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.