Author: adietish
Date: 2012-05-29 09:40:11 -0400 (Tue, 29 May 2012)
New Revision: 41514
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsContentProvider.java
Log:
[JBIDE-12034] avoiding NPE if embedded cartridge has no url. Furthermore not rendering the
link if no url is present
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java 2012-05-29
13:37:41 UTC (rev 41513)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java 2012-05-29
13:40:11 UTC (rev 41514)
@@ -45,7 +45,7 @@
if (StringUtils.isEmpty(property.getValue())) {
return;
}
- final Hyperlink link = new Hyperlink((Tree) cell.getControl(),SWT.NONE);
//SWT.NO_BACKGROUND
+ final Hyperlink link = new Hyperlink((Tree) cell.getControl(), SWT.NONE); //
SWT.NO_BACKGROUND
link.setBackground(cell.getBackground());
link.setForeground(JFaceResources.getColorRegistry().get(JFacePreferences.ACTIVE_HYPERLINK_COLOR));
link.setFont(cell.getFont());
@@ -65,7 +65,7 @@
textStyle.underline = true;
}
};
- StyledString styledString = new StyledString(property.getValue(), style);
+ StyledString styledString = new
StyledString(StringUtils.null2emptyString(property.getValue()), style);
cell.setStyleRanges(styledString.getStyleRanges());
cell.setText(styledString.getString());
}
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsContentProvider.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsContentProvider.java 2012-05-29
13:37:41 UTC (rev 41513)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsContentProvider.java 2012-05-29
13:40:11 UTC (rev 41514)
@@ -3,7 +3,6 @@
*/
package org.jboss.tools.openshift.express.internal.ui.wizard;
-import static
org.jboss.tools.openshift.express.internal.ui.utils.StringUtils.null2emptyString;
import static
org.jboss.tools.openshift.express.internal.ui.utils.StringUtils.toStringOrNull;
import java.net.SocketTimeoutException;
@@ -60,7 +59,7 @@
for (IEmbeddedCartridge cartridge : application.getEmbeddedCartridges()) {
cartridgesContainer.add(
new StringElement(
- cartridge.getName(), null2emptyString(toStringOrNull(cartridge.getUrl())), true,
cartridgesContainer));
+ cartridge.getName(), toStringOrNull(cartridge.getUrl()), true,
cartridgesContainer));
}
return cartridgesContainer;
}
Show replies by date