private void validateProduct() {
    WARProductValidateAction action = new WARProductValidateAction(product);
    action.addValidationListener(
        new IValidationListener() {

          public void validationFinished(final Map errors) {
            validationPage.setInput(errors);
            isProductValid = errors.size() == 0;
          }
        });
    action.run();
  }
예제 #2
0
 public void linkActivated(final HyperlinkEvent linkEvent) {
   String href = (String) linkEvent.getHref();
   if (href.equals("action.export")) { // $NON-NLS-1$
     if (getPDEEditor().isDirty()) {
       getPDEEditor().doSave(null);
     }
     new WARProductExportAction(getPDEEditor()).run();
   } else if (href.equals("action.configuration")) { // $NON-NLS-1$
     String pageId = ConfigurationPage.PLUGIN_ID;
     getEditor().setActivePage(pageId);
   } else if (href.equals("action.validate")) { // $NON-NLS-1$
     IProductModel model = (IProductModel) getPDEEditor().getAggregateModel();
     WARProductValidateAction validationAction =
         new WARProductValidateAction((IWARProduct) model.getProduct());
     IValidationListener listener = (IValidationListener) getPDEEditor();
     validationAction.addValidationListener(listener);
     validationAction.run();
   } else {
     super.linkActivated(linkEvent);
   }
 }