Add diamond operator Java 7 tests
diff --git a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/usage/Java7ClassUsageTests.java b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/usage/Java7ClassUsageTests.java
index fbb5765..b2894d2 100644
--- a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/usage/Java7ClassUsageTests.java
+++ b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/usage/Java7ClassUsageTests.java
@@ -67,7 +67,6 @@
 		x1(true);
 	}
 	
-	
 	private void x1(boolean inc) {
 		setExpectedProblemIds(new int[] {
 				getProblemId(IApiProblem.ILLEGAL_INSTANTIATE, IApiProblem.NO_FLAGS),
@@ -99,7 +98,6 @@
 		x2(true);
 	}
 	
-	
 	private void x2(boolean inc) {
 		String exceptionTypeName = "ExceptionA";
 		setExpectedProblemIds(new int[] {
@@ -130,7 +128,6 @@
 		x3(true);
 	}
 	
-	
 	private void x3(boolean inc) {
 		String resourceTypeName = "TryWithResourcesClass";
 		setExpectedProblemIds(new int[] {
@@ -145,4 +142,31 @@
 		deployUsageTest(typename, inc);
 	}
 	
+	/**
+	 * Tests illegal use of classes instantiated with the diamond operator
+	 * (full)
+	 */
+	public void testDiamondF() {
+		x4(false);
+	}
+	
+	/**
+	 * Tests illegal use of classes instantiated with the diamond operator
+	 * (incremental)
+	 */
+	public void testDiamondI() {
+		x4(true);
+	}
+	
+	private void x4(boolean inc) {
+		String resourceTypeName = "GenericClassUsageClass<T>";
+		setExpectedProblemIds(new int[] {
+				getProblemId(IApiProblem.ILLEGAL_INSTANTIATE, IApiProblem.NO_FLAGS)
+		});
+		String typename = "testCDiamond";
+		setExpectedMessageArgs(new String[][] {
+				{resourceTypeName, typename}
+		});
+		deployUsageTest(typename, inc);
+	}
 }
diff --git a/apitools/org.eclipse.pde.api.tools.tests/test-builder/usage/java7/testCDiamond.java b/apitools/org.eclipse.pde.api.tools.tests/test-builder/usage/java7/testCDiamond.java
new file mode 100755
index 0000000..f49250d
--- /dev/null
+++ b/apitools/org.eclipse.pde.api.tools.tests/test-builder/usage/java7/testCDiamond.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package x.y.z;
+
+import c.GenericClassUsageClass;
+
+/**
+ *
+ */
+public class testCDiamond {
+
+	public void m1() {
+		GenericClassUsageClass<Number> clazz = new GenericClassUsageClass<>();
+	}
+}