Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 331729

Summary: [build path] Missing decorators on java files when there is an unbound classpath container
Product: [Eclipse Project] JDT Reporter: Matthew Martire <mmartire>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Sample workspace none

Description Matthew Martire CLA 2010-12-02 17:19:16 EST
Build Identifier: M20100909-0800

Replace the default classpath container in the .classpath file with one that does not exist, such as:

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/WebSphere Application Server v7.0 JRE">
		<attributes>
			<attribute name="owner.project.facets" value="java"/>
		</attributes>
	</classpathentry>

This creates red underlines in the java editor of a simple Java file containing a String object. Yet there is no decorator (a red X) on the java file widget in the package explorer view. 

Reproducible: Always

Steps to Reproduce:
1. Create a new java project with a simple java class containing a String object
2. Open the .classpath file and replace the default classpath container entry with the following one:

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/WebSphere Application Server v7.0 JRE">
		<attributes>
			<attribute name="owner.project.facets" value="java"/>
		</attributes>
	</classpathentry>


3.Note the red underlines in the Java editor of your test class yet no red 'x' on the widget.
Comment 1 Matthew Martire CLA 2010-12-02 17:21:29 EST
Created attachment 184421 [details]
Sample workspace

Adding a sample work space with the problem already setup.
Comment 2 Dani Megert CLA 2010-12-03 04:08:51 EST
This works as designed: Out of the box the builder aborts if there are build path errors as this would normally result in many errors being reported. You can change this on the Java > Compiler > Building preference page.

The reconciler in the editor is not affected by this preference that's why you will see the errors when you open a compilation unit.
Comment 3 Matthew Martire CLA 2010-12-03 10:55:17 EST
Ok thanks Dani, I've verified this.