Author: ldimaggio
Date: 2012-09-01 21:35:35 -0400 (Sat, 01 Sep 2012)
New Revision: 43376
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldFileAction.java
Log:
Trying a better approac to dealing with Windows dir paths
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldFileAction.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldFileAction.java 2012-09-01
21:10:03 UTC (rev 43375)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldFileAction.java 2012-09-02
01:35:35 UTC (rev 43376)
@@ -65,8 +65,19 @@
SWTBotTreeItem theProject = bot.tree(0).getTreeItem(projectName).select();
bot.menu("File").menu("Properties").click();
- baseDir = bot.textWithLabel("Location:").getText() +
System.getProperty("file.separator");
-// baseDir =
bot.textWithLabel("Location:").getText().replaceAll("\\",
"\\\\") + System.getProperty("file.separator");
+ if (System.getProperty("file.separator").equals("/")) {
+ baseDir = bot.textWithLabel("Location:").getText() +
System.getProperty("file.separator");
+ }
+ else {
+ /* Needed to avoid a syntax error with Windows \ dir path characters */
+ baseDir =
bot.textWithLabel("Location:").getText().replaceAll(System.getProperty("file.separator"),
System.getProperty("file.separator") +
System.getProperty("file.separator")) +
System.getProperty("file.separator");
+ }
+// if (System.getProperty("file.separator").equals("/")) {
+// baseDir = bot.textWithLabel("Location:").getText() +
System.getProperty("file.separator");
+// }
+// else {
+// baseDir =
bot.textWithLabel("Location:").getText().replaceAll("\\",
"\\\\") + System.getProperty("file.separator");
+// }
bot.button("OK").click();
theSWTBotView = open.viewOpen(ActionItem.View.GeneralNavigator.LABEL);
Show replies by date