コード例 #1
0
  public boolean isComplete() {
    IRuntimeWorkingCopy runtime =
        (IRuntimeWorkingCopy) getTaskModel().getObject(TaskModel.TASK_RUNTIME);

    if (runtime == null) {
      return false;
    }

    IStatus status = runtime.validate(null);

    return status != null && status.getSeverity() != IStatus.ERROR;
  }
コード例 #2
0
  protected IStatus validate() {
    if (liferayRuntime == null) {
      wizard.setMessage(StringPool.EMPTY, IMessageProvider.ERROR);
      return Status.OK_STATUS;
    }

    IStatus status = runtimeWC.validate(null);

    if (status == null || status.isOK()) {
      wizard.setMessage(null, IMessageProvider.NONE);
    } else if (status.getSeverity() == IStatus.WARNING) {
      wizard.setMessage(status.getMessage(), IMessageProvider.WARNING);
    } else {
      wizard.setMessage(status.getMessage(), IMessageProvider.ERROR);
    }

    wizard.update();

    return status;
  }