| Summary: | The code generator should mark string constants with the $NON-NLS comment | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Marcelo Paternostro <marcelo.paternostro> |
| Component: | Sapphire | Assignee: | Konstantin Komissarchik <konstantin> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | konstantin |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
I am surprised that JDT doesn't ignore derived files for validation such as this, but this is easy enough to fix on our end... Fixed in 0.3.1 and 0.4 streams. Please verify. Problem fixed. Thnaks! * And I agree that JDT should filter out derived resources. Closing. |
One of the JDT compiler preferences allows a developer to flag the use of hard-coded strings without the //$NON-NLS comment as a warning or even an error. Particularly in the last case, the code that Sapphire currently generates will be flagged with problems. As an example, the following generated snippet public void setValue( String value ) { synchronized( root() ) { if( value != null && value.equals( "" ) ) { value = null; } could be public void setValue( String value ) { synchronized( root() ) { if( value != null && value.equals( "" ) ) //$NON-NLS-1$ { value = null; }