Examples of ILabel


Examples of edu.cmu.cs.crystal.flow.ILabel

    return value;
  }
 
  @Override
  public <LE> IResult<LE> transfer(ITACBranchSensitiveTransferFunction<LE> tf, List<ILabel> labels, LE value) {
    ILabel normal = NormalLabel.getNormalLabel();
    List<ILabel> normalOnly = Collections.singletonList(normal);
   
    // this implementation makes the simplifying assumption that the last instruction
    // in the sequence relative to the analysis direction should generate results for
    // provided list of labels.  All other instructions only transfer over NormalLabel.
View Full Code Here

Examples of org.rssowl.core.model.types.ILabel

  /**
   * @throws Exception
   */
  @Test
  public void testLoadLabels() throws Exception {
    ILabel label1 = fFactory.createLabel(null, "Important");
    label1.setColor("159,63,63");
    fDao.saveLabel(label1);

    ILabel label2 = fFactory.createLabel(null, "Important");
    label2.setColor("255,153,0");
    fDao.saveLabel(label2);

    ILabel label3 = fFactory.createLabel(null, "Personal");
    label3.setColor("0,153,0");
    fDao.saveLabel(label3);

    List<ILabel> labels = fAppLayer.loadLabels();

    assertEquals(3, labels.size());
View Full Code Here

Examples of org.rssowl.core.model.types.ILabel

  /**
   *
   */
  public void testLoadLabelsActivation()    {
    String colour = "159,63,63";
    ILabel label1 = fFactory.createLabel(null, "Important");
    label1.setColor(colour);
    fDao.saveLabel(label1);
    label1 = null;
    System.gc();

    List<ILabel> labels = fAppLayer.loadLabels();
View Full Code Here

Examples of org.rssowl.core.model.types.ILabel

//      fail(e.getMessage());
//    }
//  }

  private ILabel createLabel() {
    ILabel label = fTypesFactory.createLabel(null, "someLabel");
    label.setColor("200,100,009");
    return label;
  }
View Full Code Here

Examples of org.rssowl.core.model.types.ILabel

        }
      };
      NewsModel.getDefault().addLabelListener(labelListener);
      long savedLabelId = fModelDAO.saveLabel(initialLabel).getId().longValue();
      System.gc();
      ILabel dbLabel = fModelDAO.loadLabel(savedLabelId);
      initialLabel.setId(dbLabel.getId());
      assertTrue(initialLabel.isIdentical(dbLabel));
      dbLabel.setColor("255,255,137");
      updatedLabel[0] = (Label) dbLabel;
      fModelDAO.saveLabel(dbLabel);
      assertTrue(labelAddedCalled[0]);
      assertTrue(labelUpdatedCalled[0]);
      fModelDAO.deleteLabel(new LabelReference(updatedLabel[0].getId()));
View Full Code Here

Examples of org.rssowl.core.model.types.ILabel

  @Test
  public void testFlatLabelEvents() throws Exception {
    LabelListener labelListener = null;
    try {
      /* Add */
      ILabel label = fFactory.createLabel(null, "Label Name");
      final boolean labelEvents[] = new boolean[3];
      final LabelReference labelReference[] = new LabelReference[1];
      labelListener = new LabelListener() {
        public void labelAdded(Set<LabelEvent> events) {
          for (LabelEvent event : events) {
            assertTrue("Expected this Event to be Root Event", event.isRoot());
            labelEvents[0] = true;
          }
        }

        public void labelDeleted(Set<LabelEvent> events) {
          for (LabelEvent event : events) {
            assertTrue("Expected this Event to be Root Event", event.isRoot());
            if (labelReference[0].references(event.getEntity()))
              labelEvents[1] = true;
          }
        }

        public void labelUpdated(Set<LabelEvent> events) {
          for (LabelEvent event : events) {
            assertTrue("Expected this Event to be Root Event", event.isRoot());
            if (labelReference[0].references(event.getEntity()))
              labelEvents[2] = true;
          }
        }
      };
      fModel.addLabelListener(labelListener);
      labelReference[0] = new LabelReference(fDao.saveLabel(label).getId());

      /* Update */
      label = labelReference[0].resolve();
      label.setColor("255,255,128");
      fDao.saveLabel(label);

      /* Delete */
      fDao.deleteLabel(labelReference[0]);

View Full Code Here

Examples of org.rssowl.core.model.types.ILabel

   * @throws Exception
   */
  @SuppressWarnings("null")
  @Test
  public void testEntityPropertyPage() throws Exception {
    ILabel entity1 = NewsModel.getDefault().getTypesFactory().createLabel(null, "Label1");
    ILabel entity2 = NewsModel.getDefault().getTypesFactory().createLabel(null, "Label2");
    IFeed entity3 = NewsModel.getDefault().getTypesFactory().createFeed(null, new URL("http://www.link.com"));

    /* Case 1: Single Selection */
    {
      List<IEntity> entities = new ArrayList<IEntity>();
View Full Code Here

Examples of org.rssowl.core.model.types.ILabel

  /**
   * @throws Exception
   */
  @Test
  public void testGetEntitiesFromSelection() throws Exception {
    ILabel label1 = fFactory.createLabel(null, "Label 1");
    ILabel label2 = fFactory.createLabel(null, "Label 2");
    ILabel label3 = fFactory.createLabel(null, "Label 3");

    EntityGroup group = new EntityGroup(1, "Group");
    new EntityGroupItem(group, label2);
    new EntityGroupItem(group, label3);

View Full Code Here

Examples of org.rssowl.core.persist.ILabel

  /**
   * @throws Exception
   */
  @Test
  public void testLoadLabels() throws Exception {
    ILabel label1 = fFactory.createLabel(null, "Important");
    label1.setColor("159,63,63");
    DynamicDAO.save(label1);

    ILabel label2 = fFactory.createLabel(null, "Important");
    label2.setColor("255,153,0");
    DynamicDAO.save(label2);

    ILabel label3 = fFactory.createLabel(null, "Personal");
    label3.setColor("0,153,0");
    DynamicDAO.save(label3);

    Collection<ILabel> labels = DynamicDAO.loadAll(ILabel.class);

    assertEquals(3, labels.size());
View Full Code Here

Examples of org.rssowl.core.persist.ILabel

  /**
   *
   */
  public void testLoadLabelsActivation() {
    String colour = "159,63,63";
    ILabel label1 = fFactory.createLabel(null, "Important");
    label1.setColor(colour);
    DynamicDAO.save(label1);
    label1 = null;
    System.gc();

    Collection<ILabel> labels = DynamicDAO.loadAll(ILabel.class);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.