From 73241e5bd676320575dcd99a583f0c5c09206f7b Mon Sep 17 00:00:00 2001 From: David McKnight Date: Wed, 4 Oct 2006 18:03:54 +0000 Subject: [PATCH] fix for case where line is not a line --- .../model/DStoreServiceCommandShell.java | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/model/DStoreServiceCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/model/DStoreServiceCommandShell.java index aba64ee28ab..773d79f7a7e 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/model/DStoreServiceCommandShell.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/model/DStoreServiceCommandShell.java @@ -67,30 +67,49 @@ public class DStoreServiceCommandShell extends ServiceCommandShell { DataElement line = (DataElement)lineObj; String type = line.getType(); + String src = line.getSource(); if (event.isError()) { - output = new RemoteError(this, type); + output = new RemoteError(this, type); + } else { output = new RemoteOutput(this, type); } - output.setText(line.getName()); + output.setText(line.getName()); - String src = line.getSource(); int colonSep = src.indexOf(':'); // line numbers if (colonSep > 0) { + String lineNo = src.substring(colonSep + 1); String file = src.substring(0, colonSep); - output.setAbsolutePath(file); - output.setLine(Integer.parseInt(lineNo)); + int linen = 0; + try + { + linen = Integer.parseInt(lineNo); + } + catch (Exception e) + { + + } + if (linen != 0) + { + output.setAbsolutePath(file); + output.setLine(linen); + } + else + { + output.setAbsolutePath(src); + } } else { output.setAbsolutePath(src); } + addOutput(output); outputs[i] = output;