Bug 85502 [5.0][syntax coloring] Coloring of unboxing/boxing: Missing cases
20050216 The following cases seem to be missed by the boxing/unboxing syntax colorer: (enable compiler warning for (un)boxing to see where boxing occurs) public class A { private void foo1() { int a= 9; if (a == new Integer(9)) { } } private void foo2() { Integer x= 'c'; } private void foo3() { int si= true ? new Integer(0) : new Character('x'); } private void foo4() { Integer x= new Integer(9); x += 9; } private void foo5() { Integer[] a= {1, 2, 3}; int[] b= {a[0]}; } private void foo6() { Integer y= new Integer(9); switch (y) { } } private int foo7() { Integer y= new Integer(9); return y; } private Integer foo8() { int count= 9; return count; } }
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightings.java
}
			throw new IllegalArgumentException("not a method-like node: " + methodLike); 
		}
		/**
		 * Returns the method binding of a method-like <code>ASTNode</code>.
		 * Method-like nodes are:
		 * <ul>
		 * <li>{@link MethodInvocation}</li>
		 * <li>{@link SuperMethodInvocation}</li>
		 * <li>{@link ClassInstanceCreation}</li>
		 * <li>{@link ConstructorInvocation}</li>
		 * <li>{@link SuperConstructorInvocation}</li>
		 * <li>{@link EnumConstantDeclaration}</li>
		 * </ul>
		 *
		 * @param methodLike the method-like <code>ASTNode</code> to get the
		 *        method binding of
		 * @return the method binding of <code>methodLike</code> or
		 *         <code>null</code> if it is not available
		 * @throws IllegalArgumentException if <code>methodLike</code> is not
		 *         a method like <code>ASTNode</code>
		 */
		private IMethodBinding getMethodBinding(ASTNode methodLike) throws IllegalArgumentException {
			switch (methodLike.getNodeType()) {
				case ASTNode.METHOD_INVOCATION :
					return ((MethodInvocation) methodLike).resolveMethodBinding();
				case ASTNode.SUPER_METHOD_INVOCATION :
					return ((SuperMethodInvocation) methodLike).resolveMethodBinding();
				case ASTNode.CLASS_INSTANCE_CREATION :
					return ((ClassInstanceCreation) methodLike).resolveConstructorBinding();