/** * Return <tt>null</tt> if there are no problems running gem. Otherwise * return an error message which describes the problem. */ public String getRubyGemsProblems() { return validator.getRubyGemsProblems(); }
boolean checkAndReportRubyGemsProblems() { String problems = getRubyGemsProblems(); if (problems != null) { reportRubyGemsProblem(); } return problems == null; }
void reportRubyGemsProblem() { String problems = getRubyGemsProblems(); assert problems != null : "cannot report RubyGems problems when there not any"; DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message( problems, NotifyDescriptor.Message.ERROR_MESSAGE)); } }
boolean hasRubyGemsInstalled(boolean warn) { String problems = getRubyGemsProblems(); if (problems != null && warn) { Util.notifyLocalized(RubyPlatform.class, "RubyPlatformValidator.DoesNotHaveRubyGems", // NOI18N NotifyDescriptor.WARNING_MESSAGE, platform.getLabel(), problems); } return problems == null; }