Ejemplo n.º 1
0
  /** Machine-generated. */
  public void pass4Button_ActionPerformed(java.awt.event.ActionEvent actionEvent) {

    pass2Button_ActionPerformed(actionEvent);

    Color color = Color.green;

    Verifier v = VerifierFactory.getVerifier(class_name);
    VerificationResult vr = v.doPass2();
    if (vr.getStatus() == VerificationResult.VERIFIED_OK) {
      JavaClass jc = Repository.lookupClass(class_name);
      int nr = jc.getMethods().length;
      for (int i = 0; i < nr; i++) {
        vr = v.doPass3b(i);
        if (vr.getStatus() != VerificationResult.VERIFIED_OK) {
          color = Color.red;
          break;
        }
      }
    } else {
      color = Color.yellow;
    }

    getPass3Panel().setBackground(color);
    getPass3Panel().repaint();
  }
Ejemplo n.º 2
0
 /** Machine-generated. */
 public void flushButton_ActionPerformed(java.awt.event.ActionEvent actionEvent) {
   VerifierFactory.getVerifier(class_name).flush();
   Repository.removeClass(class_name); // Make sure it will be reloaded.
   getPass1Panel().setBackground(Color.gray);
   getPass1Panel().repaint();
   getPass2Panel().setBackground(Color.gray);
   getPass2Panel().repaint();
   getPass3Panel().setBackground(Color.gray);
   getPass3Panel().repaint();
 }
Ejemplo n.º 3
0
 /** Machine-generated. */
 public void pass1Button_ActionPerformed(java.awt.event.ActionEvent actionEvent) {
   Verifier v = VerifierFactory.getVerifier(class_name);
   VerificationResult vr = v.doPass1();
   if (vr.getStatus() == VerificationResult.VERIFIED_OK) {
     getPass1Panel().setBackground(Color.green);
     getPass1Panel().repaint();
   }
   if (vr.getStatus() == VerificationResult.VERIFIED_REJECTED) {
     getPass1Panel().setBackground(Color.red);
     getPass1Panel().repaint();
   }
 }
  public synchronized void update(String s) {
    int size = listeners.size();

    Verifier[] verifiers = VerifierFactory.getVerifiers();
    int num_of_verifiers = verifiers.length;
    cache.clear();
    for (int i = 0; i < num_of_verifiers; i++) {
      cache.add(verifiers[i].getClassName());
    }

    for (int i = 0; i < size; i++) {
      ListDataEvent e =
          new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, 0, num_of_verifiers - 1);
      ((javax.swing.event.ListDataListener) (listeners.get(i))).contentsChanged(e);
    }
  }
 public VerifierFactoryListModel() {
   VerifierFactory.attach(this);
   update(null); // fill cache.
 }