ignore warning in SWTBot tests

"This plug-in does not export all of its packages"

Change-Id: I41f3fa4896f4912de936c869e4d35ead4e847f2a
Signed-off-by: Lorenzo Bettini <lorenzo.bettini@gmail.com>
diff --git a/tests/org.eclipse.emf.parsley.tests.swtbot/launches/EmfParsleyDslWizardsTests.launch b/tests/org.eclipse.emf.parsley.tests.swtbot/launches/EmfParsleyDslWizardsTests.launch
index ee20a20..c19c3ba 100644
--- a/tests/org.eclipse.emf.parsley.tests.swtbot/launches/EmfParsleyDslWizardsTests.launch
+++ b/tests/org.eclipse.emf.parsley.tests.swtbot/launches/EmfParsleyDslWizardsTests.launch
@@ -17,10 +17,10 @@
 <booleanAttribute key="includeOptional" value="true"/>
 <stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.emf.parsley.tests.swtbot"/>
+<listEntry value="/org.eclipse.emf.parsley.tests.swtbot/xtend-gen/org/eclipse/emf/parsley/tests/swtbot/EmfParsleyDslWizardsTests.java"/>
 </listAttribute>
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
+<listEntry value="1"/>
 </listAttribute>
 <stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
 <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
diff --git a/tests/org.eclipse.emf.parsley.tests.swtbot/src/org/eclipse/emf/parsley/tests/swtbot/EmfParsleySWTBotAbstractTests.java b/tests/org.eclipse.emf.parsley.tests.swtbot/src/org/eclipse/emf/parsley/tests/swtbot/EmfParsleySWTBotAbstractTests.java
index 4973e46..945ef9c 100644
--- a/tests/org.eclipse.emf.parsley.tests.swtbot/src/org/eclipse/emf/parsley/tests/swtbot/EmfParsleySWTBotAbstractTests.java
+++ b/tests/org.eclipse.emf.parsley.tests.swtbot/src/org/eclipse/emf/parsley/tests/swtbot/EmfParsleySWTBotAbstractTests.java
@@ -1085,10 +1085,8 @@
 		List<IMarker> errorMarkers = new LinkedList<IMarker>();
 		for (int i = 0; i < markers.length; i++) {
 			IMarker iMarker = markers[i];
-			// for the moment we ignore warnings for MANIFEST of the shape
-			// 'Automatic-Module-Name' header is required for Java 9 compatibility
 			if (iMarker.getAttribute(IMarker.SEVERITY).equals(IMarker.SEVERITY_WARNING) &&
-				iMarker.getAttribute(IMarker.MESSAGE).toString().contains("'Automatic-Module-Name'")) {
+				shouldIgnoreIssue(iMarker)) {
 				continue;
 			}
 			errorMarkers.add(iMarker);
@@ -1098,6 +1096,15 @@
 				errorMarkers.size());
 	}
 
+	private boolean shouldIgnoreIssue(IMarker iMarker) throws CoreException {
+		// for the moment we ignore warnings for MANIFEST of the shape
+		// 'Automatic-Module-Name' header is required for Java 9 compatibility
+		// and 'This plug-in does not export all of its packages'
+		final String string = iMarker.getAttribute(IMarker.MESSAGE).toString();
+		return string.contains("'Automatic-Module-Name'") ||
+				string.contains("This plug-in does not export all of its packages");
+	}
+
 	protected void setEditorContentsSaveAndWaitForAutoBuild(
 			SWTBotEditor editor, CharSequence contents) throws CoreException {
 		setEditorContentsSaveAndWaitForAutoBuild(editor, contents, true);