Bug 112356 [syntax highlighting] Syntax highlight isn't applied to auto-unboxed expressions with a cast
In this example, neither the setBool() with explicit cast, nor the assignment to b2 indicate that the object is being auto-unboxed. It's unclear to me exactly what should be highlighted, the final term of the expression (this happens with non-casted expressions), or maybe the cast itself. --- public abstract class BoxingHighlightExample { abstract public boolean getBool(); abstract public void setBool(boolean b); public void demonstrate() { Boolean o1; Object o2; o1 = getBool(); o2 = getBool(); setBool(o1); setBool((Boolean)o2); boolean b1 = o1; boolean b2 = (Boolean)o2; } }
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightings.java
}
	/**
	 * Tests whether <code>event</code> in <code>store</code> affects the
	 * enablement of semantic highlighting.
	 *
	 * @param store the preference store where <code>event</code> was observed
	 * @param event the property change under examination
	 * @return <code>true</code> if <code>event</code> changed semantic
	 *         highlighting enablement, <code>false</code> if it did not
	 * @since 3.1
	 */
	public static boolean affectsEnablement(IPreferenceStore store, PropertyChangeEvent event) {
		String relevantKey= null;
		SemanticHighlighting[] highlightings= getSemanticHighlightings();
		for (int i= 0; i < highlightings.length; i++) {
			if (event.getProperty().equals(getEnabledPreferenceKey(highlightings[i]))) {
				relevantKey= event.getProperty();
				break;
			}
		}
		if (relevantKey == null)
			return false;
		for (int i= 0; i < highlightings.length; i++) {
			String key= getEnabledPreferenceKey(highlightings[i]);
			if (key.equals(relevantKey))
				continue;
			if (store.getBoolean(key))
				return false; 
		}