Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/agent/AutAgent.java5
-rw-r--r--org.eclipse.jubula.client.cmd/src/org/eclipse/jubula/client/cmd/AbstractCmdlineClient.java12
-rw-r--r--org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/communication/AUTConnection.java2
-rw-r--r--org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/utils/StringHelper.java27
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/Plugin.java5
-rw-r--r--org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/AUTServer.java4
-rw-r--r--org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/adapter/TreeTableOperationContext.java17
7 files changed, 41 insertions, 31 deletions
diff --git a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/agent/AutAgent.java b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/agent/AutAgent.java
index 82508682d..78cd9b61c 100644
--- a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/agent/AutAgent.java
+++ b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/agent/AutAgent.java
@@ -50,6 +50,7 @@ import org.eclipse.jubula.tools.internal.utils.IsAliveThread;
import org.eclipse.jubula.tools.internal.utils.StringParsing;
import org.eclipse.jubula.tools.internal.utils.TimeUtil;
import org.osgi.framework.Bundle;
+import org.osgi.framework.Constants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -62,6 +63,7 @@ import org.slf4j.LoggerFactory;
* @created Dec 1, 2009
*/
public class AutAgent {
+
/**
* the default value to wait after a proper AUT termination (== de-registration)
*/
@@ -723,7 +725,8 @@ public class AutAgent {
0,
pathBuilder.lastIndexOf
(IStartAut.PATH_SEPARATOR)),
- bundle.getSymbolicName());
+ bundle.getHeaders()
+ .get(Constants.BUNDLE_NAME));
}
}
}
diff --git a/org.eclipse.jubula.client.cmd/src/org/eclipse/jubula/client/cmd/AbstractCmdlineClient.java b/org.eclipse.jubula.client.cmd/src/org/eclipse/jubula/client/cmd/AbstractCmdlineClient.java
index 253dfec30..0122096e9 100644
--- a/org.eclipse.jubula.client.cmd/src/org/eclipse/jubula/client/cmd/AbstractCmdlineClient.java
+++ b/org.eclipse.jubula.client.cmd/src/org/eclipse/jubula/client/cmd/AbstractCmdlineClient.java
@@ -339,12 +339,12 @@ public abstract class AbstractCmdlineClient implements IProgressConsole {
* {@inheritDoc}
*/
public void writeStatus(IStatus status) {
- printConsole(StringHelper.getStringOf(status)
- + StringConstants.NEWLINE);
+ printConsoleLn("AUT " + StringHelper.getStringOf(status, false) //$NON-NLS-1$
+ + "..." + StringConstants.NEWLINE, true); //$NON-NLS-1$
if (status.isMultiStatus()) {
for (IStatus s : status.getChildren()) {
- printConsole(StringHelper.getStringOf(s)
- + StringConstants.NEWLINE);
+ printConsoleLn("AUT " + StringHelper.getStringOf(s, false) //$NON-NLS-1$
+ + "..." + StringConstants.NEWLINE, true); //$NON-NLS-1$
}
}
}
@@ -353,11 +353,7 @@ public abstract class AbstractCmdlineClient implements IProgressConsole {
* {@inheritDoc}
*/
public void writeStatus(IStatus status, String id) {
- printConsole("Connection status of AUT: " + id //$NON-NLS-1$
- + StringConstants.NEWLINE);
writeStatus(status);
- printConsole("----------------------------------------" //$NON-NLS-1$
- + StringConstants.NEWLINE);
}
/**
diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/communication/AUTConnection.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/communication/AUTConnection.java
index 6ce6c3946..32b0cb9e2 100644
--- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/communication/AUTConnection.java
+++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/communication/AUTConnection.java
@@ -164,7 +164,7 @@ public class AUTConnection extends BaseAUTConnection {
if (isConnected()) {
TimeMultiStatus connect = new TimeMultiStatus(
Activator.PLUGIN_ID, IStatus.OK,
- "Connection to AUT: " + autId.encode() + " established", //$NON-NLS-1$ //$NON-NLS-2$
+ "Connection to AUT: \"" + autId.encode() + "\" established", //$NON-NLS-1$ //$NON-NLS-2$
null);
pc.writeStatus(connect, autId.encode());
TimeMultiStatus ext = getExtensionStatus();
diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/utils/StringHelper.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/utils/StringHelper.java
index 34854ed6f..1c7a21837 100644
--- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/utils/StringHelper.java
+++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/utils/StringHelper.java
@@ -232,40 +232,43 @@ public class StringHelper {
/**
* Gets a string representation of the given status, but this includes only
- * the severity and the message and if the Status is an ITimeStatus a time
- * stamp is also added. The pattern is yyyy-mm-dd hh:mm:ss
+ * the severity and the message and if the Status is an ITimeStatus and
+ * outputTime is true, a time stamp is also added. The pattern is yyyy-mm-dd
+ * hh:mm:ss
*
* @param s
* the status
+ * @param outputTime
+ * add Timestamp
* @return string representation
*/
- public static String getStringOf(IStatus s) {
+ public static String getStringOf(IStatus s, boolean outputTime) {
String result = ""; //$NON-NLS-1$
- if (s instanceof ITimeStatus) {
- result += DateFormatUtils.format(((ITimeStatus)s).getTime(),
- TIME_PATTERN) + " "; //$NON-NLS-1$
- }
switch (s.getSeverity()) {
case IStatus.OK:
- result += "OK"; //$NON-NLS-1$
+ result += "OK:"; //$NON-NLS-1$
break;
case IStatus.ERROR:
- result += "ERROR"; //$NON-NLS-1$
+ result += "ERROR:"; //$NON-NLS-1$
break;
case IStatus.WARNING:
- result += "WARNING"; //$NON-NLS-1$
+ result += "WARNING:"; //$NON-NLS-1$
break;
case IStatus.CANCEL:
- result += "CANCEL"; //$NON-NLS-1$
+ result += "CANCEL:"; //$NON-NLS-1$
break;
case IStatus.INFO:
- result += "INFO"; //$NON-NLS-1$
+ result += "INFO:"; //$NON-NLS-1$
break;
default:
//Don't print out severity code
break;
}
result += " " + s.getMessage(); //$NON-NLS-1$
+ if (s instanceof ITimeStatus && outputTime) {
+ result += " " + DateFormatUtils.format(((ITimeStatus)s).getTime(), //$NON-NLS-1$
+ TIME_PATTERN);
+ }
return result;
}
}
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/Plugin.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/Plugin.java
index f7dcecb45..7945c5d18 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/Plugin.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/Plugin.java
@@ -1437,11 +1437,12 @@ public class Plugin extends AbstractUIPlugin implements IProgressConsole {
*/
private void printStatus(IStatus status, MessageConsole c,
boolean activate) {
- writeLineToConsole(c, StringHelper.getStringOf(status), activate);
+ writeLineToConsole(c, StringHelper
+ .getStringOf(status, false), activate);
if (status.isMultiStatus()) {
for (IStatus s : status.getChildren()) {
writeLineToConsole(c,
- StringHelper.getStringOf(s), activate);
+ StringHelper.getStringOf(s, false), activate);
}
}
}
diff --git a/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/AUTServer.java b/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/AUTServer.java
index 28998ae69..681f771b8 100644
--- a/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/AUTServer.java
+++ b/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/AUTServer.java
@@ -567,7 +567,7 @@ public abstract class AUTServer {
.isRegistered(fac)) {
AdapterFactoryRegistry.getInstance()
.registerFactory(fac);
- m_warnings.add("Loaded: " + jars.get(new URL(url.getPath().split("!")[0]))); //$NON-NLS-1$ //$NON-NLS-2$
+ m_warnings.add("Loaded \"" + jars.get(new URL(url.getPath().split("!")[0])) + "\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
}
@@ -599,7 +599,7 @@ public abstract class AUTServer {
private void handleException(Map<URL, String> jars, List<String> errors,
URL url, Throwable t) {
try {
- String error = "Could not load: " + jars.remove(new URL(url.getPath().split("!")[0])); //$NON-NLS-1$ //$NON-NLS-2$
+ String error = "Could not load \"" + jars.remove(new URL(url.getPath().split("!")[0])) + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
errors.add(error);
log.error(error);
} catch (MalformedURLException e1) {
diff --git a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/adapter/TreeTableOperationContext.java b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/adapter/TreeTableOperationContext.java
index ac3692772..f89f162ce 100644
--- a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/adapter/TreeTableOperationContext.java
+++ b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/tester/adapter/TreeTableOperationContext.java
@@ -750,11 +750,18 @@ public class TreeTableOperationContext extends
usrIdxCol = usrIdxCol + 1;
}
int i = IndexConverter.toImplementationIndex(usrIdxCol);
- if (pathIterator.hasNext()) {
- columns = ((TreeTableColumn<?, ?>)
- columns.get(i)).getColumns();
- } else {
- column = (TreeTableColumn<?, ?>) columns.get(i);
+ try {
+ if (pathIterator.hasNext()) {
+ columns = ((TreeTableColumn<?, ?>) columns.get(i))
+ .getColumns();
+ } else {
+ column = (TreeTableColumn<?, ?>) columns.get(i);
+ }
+ } catch (IndexOutOfBoundsException e) {
+ throw new StepExecutionException(
+ "Invalid Index: " + IndexConverter.toUserIndex(i), //$NON-NLS-1$
+ EventFactory.createActionError(
+ TestErrorEvent.INVALID_INDEX));
}
} catch (NumberFormatException nfe) {
try {

Back to the top