Author: max.andersen(a)jboss.com
Date: 2012-04-27 09:35:40 -0400 (Fri, 27 Apr 2012)
New Revision: 40570
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/ApplicationPropertySource.java
Log:
JBIDE-11672 openshift properties now shows port forwarding yes/no
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/ApplicationPropertySource.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/ApplicationPropertySource.java 2012-04-27
13:33:39 UTC (rev 40569)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/ApplicationPropertySource.java 2012-04-27
13:35:40 UTC (rev 40570)
@@ -46,7 +46,7 @@
new PropertyDescriptor("6.UUID", "UUID"),
new PropertyDescriptor("5.Git URI", "Git URI"),
new PropertyDescriptor("2.Type", "Type"),
- new PropertyDescriptor("4.Created on", "Created on"), new
PropertyDescriptor("7.Port Forward", "Port Forward") };
+ new PropertyDescriptor("4.Created on", "Created on"), new
PropertyDescriptor("7.Port Forwarding", "Port Forwarding") };
}
@Override
@@ -71,16 +71,19 @@
if (id.equals("5.Git URI")) {
return application.getGitUrl();
}
- if(id.equals("7.Port Forward")) {
+ if(id.equals("7.Port Forwarding")) {
try {
StringBuffer bf = new StringBuffer();
- List<IApplicationPortForwarding> forwardablePorts =
application.getForwardablePorts();
- for (IApplicationPortForwarding iApplicationPortForwarding : forwardablePorts) {
- bf.append(iApplicationPortForwarding);
+ boolean portFowardingStarted = application.isPortFowardingStarted();
+
+ if (portFowardingStarted == true) {
+ return bf.append("Yes");
+ } else if (portFowardingStarted == false) {
+ return bf.append("No");
}
- return bf.toString();
+
} catch (OpenShiftSSHOperationException e) {
- e.printStackTrace();
+ return "Unknown"; //e.printStackTrace();
}
}
Show replies by date