Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbwatt2013-05-31 20:39:58 +0000
committerbwatt2013-05-31 20:39:58 +0000
commit845e438e4fe64ca046d270f7ec5db2234cd6fe01 (patch)
treecdda268abc610fbaec728cf95e22ec5172c0a1ea
parente349f4f5ed12d88e81fa7127de0fc0e12e95adfc (diff)
downloadorg.eclipse.ptp-845e438e4fe64ca046d270f7ec5db2234cd6fe01.tar.gz
org.eclipse.ptp-845e438e4fe64ca046d270f7ec5db2234cd6fe01.tar.xz
org.eclipse.ptp-845e438e4fe64ca046d270f7ec5db2234cd6fe01.zip
Bug 408269 - [LSF] [JAXB] Fix LSF submission script - Repair Application
Profile List button by reading from stderr, and also remove unused messages.
-rw-r--r--rms/org.eclipse.ptp.rm.ibm.platform.lsf.ui/src/org/eclipse/ptp/rm/ibm/lsf/ui/widgets/ApplicationQueryControl.java31
-rw-r--r--rms/org.eclipse.ptp.rm.ibm.platform.lsf.ui/src/org/eclipse/ptp/rm/ibm/lsf/ui/widgets/Messages.java2
-rw-r--r--rms/org.eclipse.ptp.rm.ibm.platform.lsf.ui/src/org/eclipse/ptp/rm/ibm/lsf/ui/widgets/messages.properties10
3 files changed, 27 insertions, 16 deletions
diff --git a/rms/org.eclipse.ptp.rm.ibm.platform.lsf.ui/src/org/eclipse/ptp/rm/ibm/lsf/ui/widgets/ApplicationQueryControl.java b/rms/org.eclipse.ptp.rm.ibm.platform.lsf.ui/src/org/eclipse/ptp/rm/ibm/lsf/ui/widgets/ApplicationQueryControl.java
index 04cbb6a5c..36914ed2f 100644
--- a/rms/org.eclipse.ptp.rm.ibm.platform.lsf.ui/src/org/eclipse/ptp/rm/ibm/lsf/ui/widgets/ApplicationQueryControl.java
+++ b/rms/org.eclipse.ptp.rm.ibm.platform.lsf.ui/src/org/eclipse/ptp/rm/ibm/lsf/ui/widgets/ApplicationQueryControl.java
@@ -80,8 +80,7 @@ public class ApplicationQueryControl extends LSFQueryControl {
IRemoteProcess process;
remoteServices = connection.getRemoteServices();
- processBuilder = remoteServices.getProcessBuilder(connection,
- "bapp", "-w"); //$NON-NLS-1$ //$NON-NLS-2$
+ processBuilder = remoteServices.getProcessBuilder(connection, "bapp", "-w"); //$NON-NLS-1$ //$NON-NLS-2$
process = null;
try {
BufferedReader reader;
@@ -98,24 +97,40 @@ public class ApplicationQueryControl extends LSFQueryControl {
String columnData[];
/*
- * Read stdout and tokenize each line of data into an array of
- * blank-delimited strings. The first line of output is the
- * column headings. Subsequent lines are reservation data.
+ * Read stderr and check for "No application profiles found."
+ * as the first line of output. Subsequent lines are ignored.
*/
reader = new BufferedReader(new InputStreamReader(
- process.getInputStream()));
+ process.getErrorStream()));
data = reader.readLine();
headerLine = true;
- commandResponse.clear();
while (data != null) {
if (headerLine) {
- if (data.equals("No application profiles found")) { //$NON-NLS-1$
+ if (data.equals("No application profiles found.")) { //$NON-NLS-1$
MessageDialog.openWarning(getShell(),
Messages.ApplicationQueryControl_2,
Messages.ApplicationQueryControl_3);
reader.close();
return false;
}
+ headerLine = false;
+ }
+ data = reader.readLine();
+ }
+ reader.close();
+
+ /*
+ * Read stdout and tokenize each line of data into an array of
+ * blank-delimited strings. The first line of output is the
+ * column headings. Subsequent lines are reservation data.
+ */
+ reader = new BufferedReader(new InputStreamReader(
+ process.getInputStream()));
+ data = reader.readLine();
+ headerLine = true;
+ commandResponse.clear();
+ while (data != null) {
+ if (headerLine) {
columnLabels = data.split(" +"); //$NON-NLS-1$
headerLine = false;
} else {
diff --git a/rms/org.eclipse.ptp.rm.ibm.platform.lsf.ui/src/org/eclipse/ptp/rm/ibm/lsf/ui/widgets/Messages.java b/rms/org.eclipse.ptp.rm.ibm.platform.lsf.ui/src/org/eclipse/ptp/rm/ibm/lsf/ui/widgets/Messages.java
index 753daa87b..951ef71f7 100644
--- a/rms/org.eclipse.ptp.rm.ibm.platform.lsf.ui/src/org/eclipse/ptp/rm/ibm/lsf/ui/widgets/Messages.java
+++ b/rms/org.eclipse.ptp.rm.ibm.platform.lsf.ui/src/org/eclipse/ptp/rm/ibm/lsf/ui/widgets/Messages.java
@@ -8,8 +8,6 @@ public class Messages extends NLS {
public static String ApplicationQueryControl_3;
private static final String BUNDLE_NAME = "org.eclipse.ptp.rm.ibm.lsf.ui.widgets.messages"; //$NON-NLS-1$
public static String QueueQueryControl_0;
- public static String QueueQueryControl_2;
- public static String QueueQueryControl_3;
public static String ReservationQueryControl_0;
public static String ReservationQueryControl_2;
public static String ReservationQueryControl_3;
diff --git a/rms/org.eclipse.ptp.rm.ibm.platform.lsf.ui/src/org/eclipse/ptp/rm/ibm/lsf/ui/widgets/messages.properties b/rms/org.eclipse.ptp.rm.ibm.platform.lsf.ui/src/org/eclipse/ptp/rm/ibm/lsf/ui/widgets/messages.properties
index 3ecab5dd6..813f02ad0 100644
--- a/rms/org.eclipse.ptp.rm.ibm.platform.lsf.ui/src/org/eclipse/ptp/rm/ibm/lsf/ui/widgets/messages.properties
+++ b/rms/org.eclipse.ptp.rm.ibm.platform.lsf.ui/src/org/eclipse/ptp/rm/ibm/lsf/ui/widgets/messages.properties
@@ -1,9 +1,7 @@
-ApplicationQueryControl_0=Application Information
+ApplicationQueryControl_0=Application Profile Information
ApplicationQueryControl_2=Warning
-ApplicationQueryControl_3=No applications found
+ApplicationQueryControl_3=No application profiles found
QueueQueryControl_0=Job Queue Information
-QueueQueryControl_2=Warning
-QueueQueryControl_3=No reservations found
-ReservationQueryControl_0=Reservation Information
+ReservationQueryControl_0=Reservation Id Information
ReservationQueryControl_2=Warning
-ReservationQueryControl_3=No reservations found
+ReservationQueryControl_3=No reservation ids found

Back to the top