Problem description
When a Warning or Error is found by the Code Analyzer for an Alloy project, Warning or Error icons are placed in the code gutter in the Resources file projects instead than in the App file projects. The result is that the Project is now marked with the red/white error icon and the 'Errors in Workspace' alert is displayed every time the project is being build.
'Resources' folder is by default not visible for Alloy projects on Studio, so the default result is also that the project is marked with an error icon, but the user can't see any other red error icon next to any visible Project file.
Also, having an error or a warning reported for the Alloy compiled code in the Resources folder does not add value for the user as the intended behavior is not to manually modify the compiled code files in the Resources (user should only handle Alloy files, all included into the App folder).
Steps to reproduce
Paste the sample code. Note the code error in the controller.js , where foobar is actually not a function.
The error is correctly reported by the Code Analyzer (see the screenshot), also getting the correct position in the Alloy project.
However, in Studio the Error icon is placed in 'Resources/alloy/controllers/index.js' , which is hidden by default and should in any case manually modified by the user.
controller.js
$.mainwin.foobar({
backgroundColor : 'blue'
});
$.index.open();
index.xml
<Alloy>
<Window title="Win 1" id='mainwin'>
<Label>I am Window 1</Label>
<Button>Click</Button>
</Window>
</Alloy>
Expected
Since code processor have knowledge about the original source code and the generated source code, it is more viable for the code processor to covert the filename/filepath referenced in errors or warnings to the original code instead of referencing to generated source code.
Note
Alloy projects could also be displaying errors or warning relative to compiled code, generated by Alloy, not necessarily linked to "App" alloy files created by the user but only present in "Resources" folder.
[~bhughes] From chatting with [~mxia] it sounds as if the analyzer is already doing the mapping for the summary page, so it should be straightforward to do it here as well, but please let me know ASAP your thoughts.
Decided after discussion that Studio will do the mapping back to the original files after reading the raw data from the console.