-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments from all code before sometimes get interpreted as JavaDoc #88
Comments
I also faced this problem and have isolated it:
I am now working on locating the root cause. |
I have located the root cause. To reproduce, I'm using this program with a
The problem is in CommentsHelper.cs at this method (where I've added a debug trace)
While converting the source, each comment that is visited calls this method and gives this trace (eol removed):
We can see that the last item found is the I don't understand why the java parser creates the nodes in this order, but there are two options to fix it:
Option 1 seems simple, but I'm not sure if it could cause potential side effects. Opion 2 seems safer, although with a little bit more performance impact. @paulirwin What do you think about that? option 1, 2 or something else? |
I'm converting a project from Java to C# and I have a specific file which is causing problems. In this file it seems that all comments get interpreted as JavaDoc comments. So every time there is a comment in the document, it gets added as a a comment to all the next properties or methods in the document.
It's pretty clear in this example:
Input:
Output:
Theese are my settings:
![JavaToCSharpGui_SHv7mAUOQM](https://private-user-images.githubusercontent.com/59084037/290783120-7486ea25-e086-441b-a9c3-5648764b191f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4OTc4ODEsIm5iZiI6MTczOTg5NzU4MSwicGF0aCI6Ii81OTA4NDAzNy8yOTA3ODMxMjAtNzQ4NmVhMjUtZTA4Ni00NDFiLWE5YzMtNTY0ODc2NGIxOTFmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE4VDE2NTMwMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdkYWVkNjA2NWJmYzI0NzJjYTY5OGY0ZjhjMGY4NDRkNWU1Y2IyNzEwMWFmMDBiYjk3YTMxNzg4MjhkMjY1MGQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.uFrC7rYLdkx0gCrKSHzoHpV7-IOthFPbh5Bn1kOErK0)
I'm using the latest release 3.0.0 on Windows 64 bit.
And here's the file that's causing trouble:
Source.zip
The text was updated successfully, but these errors were encountered: