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

Bug 321352

Summary: [compiler][reconciler] reporting of non-externalized string constants in role files
Product: [Tools] Objectteams Reporter: Stephan Herrmann <stephan.herrmann>
Component: OTJAssignee: Stephan Herrmann <stephan.herrmann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.7   
Target Milestone: 0.7.1   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
test and fix none

Description Stephan Herrmann CLA 2010-07-30 10:47:04 EDT
If a role file contains non-externalized string constants and if these
should be reported as warnings or errors, the following issues are observed:
- the $NON-NLS-<n>$ doesn't silence a warning
- compiler and reconciler behave differently
Comment 1 Stephan Herrmann CLA 2010-07-30 11:06:04 EDT
Created attachment 175584 [details]
test and fix

Tests are OTReconcilerTests.testNLSinRoFi1 f. and testA113_suppressWarnings1 f.

The issue was caused by multiply processing the same CUD, which caused trouble 
because the nlsTags are consumed during analysis, thus subsequent analysis 
would no longer find the tags to silence the warning:
 - TypeDeclaration.resolve caused duplication (class/ifc part)
 - the reconciler additionally calls CompilationUnitDeclaration.resolve
   (compiler normally descends via team unit -> team type -> role type)

Fixed by additional guards before calling unit.reportNLSProblems()
Comment 2 Stephan Herrmann CLA 2010-07-30 11:07:40 EDT
Patch has been committed as r648 f.
Comment 3 Stephan Herrmann CLA 2010-09-23 07:36:30 EDT
Verified using I201009211735