tsandre / java-intelligent-tutor

Automatically exported from code.google.com/p/java-intelligent-tutor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problems with comments in the source code

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1. feed WordInfoPresenter.GetCodeToWordInfoMap(query, List<sourceCode>) with a 
list of source code, any of which has comments in it.


What is the expected output? What do you see instead?
Expected: Comments should be removed from the source code while preparing 
tutorial, but should be saved in another file. This will also help to avoid 
license infringement. Thus any tutorial should have an option of displaying the 
license (stripped off comments) along with the actual tutorial.
Current: Any file with comments creates problems in building 
CompilationInfoFacade.setLinesOfCode which is essential for building WordInfo.

Please use labels and text to provide additional information.


Original issue reported on code.google.com by aniket.a...@gmail.com on 7 Oct 2010 at 2:20

Chang made in List<sourceCode> by passing it to Convertor.FileToString(). This 
function removes the single line comments. No other option is viable since the 
ASTParser requires the code string to be converted to char[]. Thus when it 
comes across "//" it considers everything that follows as comment.

Original comment by aniket.a...@gmail.com on 20 Oct 2010 at 1:14

  • Changed state: Fixed