Bug 107547 [5.0] autoboxing syntax coloring fails with signed primitive value
AS IS: with 3.1.1 M20050811-0400, followed code fragment have different coloring on the auto-boxed int value, if the value has + or - sign before (in the preferences for auto-boxing: the boxed values should be bold and red). TO BE: both occurencies of value in put(..., +-value) should be colored in the same color as the first case. Example: TreeMap<String, Number> summary = new TreeMap<String, Number>(); int value = 0; summary.put("key", value); // value is shown in bold and red color - OK summary.put("key", -value); // value has usual font properties - NOK summary.put("key", +value); // value has usual font properties - NOK
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightings.java
if (desc == ArrayAccess.ARRAY_PROPERTY 
						|| desc == InfixExpression.LEFT_OPERAND_PROPERTY 
						|| desc == InfixExpression.RIGHT_OPERAND_PROPERTY
						|| desc == ConditionalExpression.THEN_EXPRESSION_PROPERTY
						|| desc == ConditionalExpression.ELSE_EXPRESSION_PROPERTY) {
					ASTNode parent= node.getParent();
					if (parent instanceof Expression)
						return isAutoUnBoxing((Expression) parent);
				}
				
				if (desc == SimpleType.NAME_PROPERTY || desc == QualifiedType.NAME_PROPERTY) {
					ASTNode parent= node.getParent();
					if (parent != null && parent.getLocationInParent() == ClassInstanceCreation.TYPE_PROPERTY) {
						parent= parent.getParent();
						if (parent instanceof Expression)
							return isAutoUnBoxing((Expression) parent);
					}
				}
			}
			return false;
		}
		
		private boolean isAutoUnBoxing(Expression expression) {
			return expression.resolveBoxing() || expression.resolveUnboxing();
		}
	}
	/**
	 * Semantic highlighting for method declarations.
	 */
	private static final class MethodDeclarationHighlighting extends SemanticHighlighting {