Author: ljelinko
Date: 2011-11-21 08:41:12 -0500 (Mon, 21 Nov 2011)
New Revision: 36487
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/workspace/ExistingFileMatcher.java
Log:
changed the implementation
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/workspace/ExistingFileMatcher.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/workspace/ExistingFileMatcher.java 2011-11-21
13:08:49 UTC (rev 36486)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/workspace/ExistingFileMatcher.java 2011-11-21
13:41:12 UTC (rev 36487)
@@ -3,7 +3,6 @@
import org.hamcrest.Description;
import org.jboss.tools.portlet.ui.bot.test.matcher.AbstractSWTMatcher;
import org.jboss.tools.ui.bot.ext.SWTBotFactory;
-import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
/**
@@ -15,7 +14,7 @@
public class ExistingFileMatcher extends AbstractSWTMatcher<String> {
private static final String FILE_SEPARATOR = "/";
-
+
private String project;
public ExistingFileMatcher(String project) {
@@ -25,12 +24,7 @@
@Override
public boolean matchesSafely(String path) {
SWTBotFactory.getOpen().perspective(ActionItem.Perspective.JAVA.LABEL);
- try {
- SWTEclipseExt.openFile(SWTBotFactory.getBot(), project, path.split(FILE_SEPARATOR));
- return true;
- } catch (Exception e){
- return false;
- }
+ return SWTBotFactory.getPackageexplorer().isFilePresent(project,
path.split(FILE_SEPARATOR));
}
@Override
Show replies by date