Author: fbricon
Date: 2012-03-01 10:53:55 -0500 (Thu, 01 Mar 2012)
New Revision: 39228
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesRequirementsPage.java
Log:
JBIDE-11130 : Better handle unavailable downloadable runtimes
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesRequirementsPage.java
===================================================================
---
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesRequirementsPage.java 2012-03-01
15:35:18 UTC (rev 39227)
+++
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesRequirementsPage.java 2012-03-01
15:53:55 UTC (rev 39228)
@@ -313,18 +313,21 @@
Object object = selection.getFirstElement();
if (object instanceof ProjectFix) {
ProjectFix fix = (ProjectFix) object;
- if (!unsatisfiedFixes.contains(fix) &&
!(ProjectFix.WTP_RUNTIME.equals(fix.getType())
- || ProjectFix.SEAM_RUNTIME.equals(fix.getType()))) {
+ String fixType = fix.getType();
+ if (!unsatisfiedFixes.contains(fix) &&
!(ProjectFix.WTP_RUNTIME.equals(fixType)
+ || ProjectFix.SEAM_RUNTIME.equals(fixType))) {
return;
}
- if (ProjectFix.WTP_RUNTIME.equals(fix.getType())
- || ProjectFix.SEAM_RUNTIME.equals(fix.getType())) {
+ if (ProjectFix.WTP_RUNTIME.equals(fixType)
+ || ProjectFix.SEAM_RUNTIME.equals(fixType)) {
DownloadRuntime downloadRuntime = getDownloadRuntime(fix);
- downloadAndInstall.setEnabled(downloadRuntime != null);
- downloadAndInstall.setToolTipText("Download and install " +
downloadRuntime.getName());
+ if (downloadRuntime != null) {
+ downloadAndInstall.setEnabled(true);
+ downloadAndInstall.setToolTipText("Download and install " +
downloadRuntime.getName());
+ }
install.setEnabled(true);
install.setToolTipText("JBoss Runtime Detection");
- } else if (ProjectFix.PLUGIN_TYPE.equals(fix.getType())) {
+ } else if (ProjectFix.PLUGIN_TYPE.equals(fixType)) {
install.setEnabled(fix.getProperties().get(ProjectFix.CONNECTOR_ID) != null);
install.setToolTipText("Install required feature(s)");
}
Show replies by date