Bug 172207

Summary: [model] Marker for deprecated classpath variable should always have WARNING severity
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.3   
Target Milestone: 3.3 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 171049    
Attachments:
Description Flags
Proposed patch none

Description Markus Keller CLA 2007-01-30 13:52:32 EST
HEAD

The problem markers generated for references to deprecated classpath variables currently have ERROR severity (at least when build path error severity is set to Error). 

The problem is maybe in JavaProject.createClasspathProblemMarker(IJavaModelStatus) where the
"switch (status.getCode())" does not have a special case for IJavaModelStatusConstants.DEPRECATED_VARIABLE and thus the JavaCore.CORE_INCOMPLETE_CLASSPATH option is consulted for the severity.

Adding
			case  IJavaModelStatusConstants.DEPRECATED_VARIABLE :
				severity = IMarker.SEVERITY_WARNING;
				break;
fixed it for me, but I'm not sure if that's the correct fix.
Comment 1 Markus Keller CLA 2007-01-30 15:50:20 EST
Actually, you should also set the path argument to the marker (like in the
default clause), so that a quick fix (e.g. for JUNIT_HOME/***) can find out
whether it is applicable.
Comment 2 Frederic Fusier CLA 2007-01-31 13:25:58 EST
Created attachment 57926 [details]
Proposed patch
Comment 3 Frederic Fusier CLA 2007-02-01 05:07:50 EST
Released for 3.3 M5 in HEAD stream.
Comment 4 Maxime Daniel CLA 2007-02-06 05:09:29 EST
Contrasted the test case results for M5 candidate (v_734) and v_733.
Verified for 3.3 M5 using build I20070205-1824.