private void checkSdk() { final String path = mySdkEditor.getPath(); if (StringUtil.isEmptyOrSpaces(path)) { myErrorLabel.setVisible(true); myErrorLabel.setHyperlinkText("App Engine SDK path not specified. ", "Download", ""); myMainPanel.repaint(); return; } final ValidationResult result = AppEngineSdkUtil.checkPath(path); myErrorLabel.setVisible(!result.isOk()); if (!result.isOk()) { myErrorLabel.setText("App Engine SDK path is not correct"); } myMainPanel.repaint(); }
private static ValidationResult conjunctionOf(ValidationResult a, ValidationResult b) { return a.isOk() ? b : a; }