- This topic has 12 replies, 2 voices, and was last updated 6 years, 1 month ago by beleta1.
-
AuthorPosts
-
beleta1ParticipantI noticed that some times some TS files show references annotations but I would like to know what is the rational behind this feature because:
1) References annotations are shown only on some files, but not all.
2) References annotations are shown only on some methods of a class, but not all.
3) References annotations are shown only on some properties of a class, but not all.
4) References annotations are shown on parameters of some constructors, but not all.
5) When shown I have not found any way to hide them.Regards
ignaciomModeratorHey,
Could you send to us some screenshots on what you see with References annotations for 1 to 4?
Regarding how to hide them, you can do that going to Preferences -> CodeMix -> Settings -> Workspace Settings in here use the text field to filter the properties and type “codeLens” without the quotes. You’ll see some values on true, just change them to false and the reference annotations should get removed.
Best Regards
Ignacio
beleta1ParticipantI forgot to say that in Eclipse for Mac nothing is shown.
No that’s not true, the problem is that Mac defaults were different. In Mac there is the same behavior.I am including here the screenshots you requested.
Regards
- This reply was modified 6 years, 1 month ago by beleta1.
Attachments:
You must be logged in to view attached files.
ignaciomModeratorHey,
Thanks for the screenshots, you are right this looks a bit odd, now that you mention that there are differences between osx and windows, it will help a lot if you could re-run this tests with an additional System property that generate some extra logging so we can follow the trace of this issue. To enable this property please follow these steps:
1. Shutdown your Eclipse
2. Edit the eclipse.ini file and add the following lines at the end of the file:
-Dcom.genuitec.eclipse.engine.log=true
-Dcom.genuitec.eclipse.engine.log.verbose=true
3. Start Eclipse again and try to get the reference count again in these same files you’ve taken the Screenshots.
4. This will generate some files at ~/.codemix/yyyy-mm-dd-hh-mm-ss.logOnce you are done just remove the lines from the eclipse.ini and restart your Eclipse so you don’t keep creating these extra log files. If you can, run these steps on both mac and windows.
Could you please share with us this log file, along with your workspace log files.
Best Regards
Ignacio
beleta1ParticipantI am including here the Mac logs.
Attachments:
You must be logged in to view attached files.
beleta1ParticipantAnd these are the Windows logs:
Attachments:
You must be logged in to view attached files.
ignaciomModeratorThanks for all the details, we are now looking at these files. After a quick look on the OSx one it does look like the CodeMix engine is sending some of the Typescript reference count. Could you confirm that on this last run you did not get the reference count annotations on OSx?
Out of curiosity, do you regularly use VSCode? Just asking this to know if there could be some installed extensions out of what is installed via Eclipse, using the shared ~/.vscode.
I Will get back to you once we know more about this.
Best Regards
Ignacio
beleta1ParticipantAs I said in my edited reply https://www.genuitec.com/forums/topic/code-mining/#post-600614 the problem in Mac was a configuration one, the codelens setting were set to false. I did get some references in Mac as in Windows.
Regarding VSCode, no, I just used it once or twice.
ignaciomModeratorHey,
The good news is that we are having consistent results for your project a cross different OSs. So We’ve started an investigation on what could be the issue here and found some interesting stackoverflow links talking about bad reference count, like what you have on your side, you can read about one here: https://stackoverflow.com/questions/20823805/codelens-not-showing-references
Although, the investigation did not end there, we followed on code how the references get calculated and found that, on the background is that the Typescript Language Server who is not returning a valid response when it get asked about the reference count to a given symbol in the file by sending the position where the symbol can be found in the file.
There should be something about this particular project/file reference structure that is causing the analysis to not complete. Unfortunately I can’t point you on what things to look for on your project.
Please do not hesitate to ask any other question.
Best Regards
Ignacio
beleta1ParticipantHi Ignacio,
From your comments it could be deduced that the problem I have is because there is some particular reference structure in my project.
The problem is that it seems that this or similar particular structures exist in all my projects because all them show problems in displaying references. Both on Windows and Mac.
I am including here a simple project based on the official Angular tutorial that seems quite simple. This project also shows the reference problems in several files. Would you be so kind to test it if you find the same problems as me. Im finding problems in
hero.service.ts
(no references shown after methodgetHeroes
),heroes.component.ts
(no reference after methodadd
),hero-search.component.ts
(no reference after methodsearch
),hero-detail.component.ts
(no reference shown after methodgetHero
)Thank you in advance and best regards
- This reply was modified 6 years, 1 month ago by beleta1.
- This reply was modified 6 years, 1 month ago by beleta1.
Attachments:
You must be logged in to view attached files.
ignaciomModeratorThanks for sharing this project, we do appreciate your feedback. I’ll import it to my workspace and do some more investigation, I’ll keep you posted.
Ignacio
ignaciomModeratorHey,
Seems we’ve found a fix for this issue, could you please try the following:
1. Close your eclipse.
2. On windows look for:
~/.codemix/engine/resources/app/out/vs/workbench/workbench.main.js
2. On OSx look for:
~/.codemix/engine/CodeMix Engine.app/Contents/Resources/app/out/vs/workbench/workbench.main.js
3. Replace this file with the one I’m attaching here, first uncompress it.
4. Start your eclipse, you can have a message saying that the Code Mix Engine is corrupt, lets ignore this for now.
5. Check the reference annotations. Are they better?Best Regards
IgnacioAttachments:
You must be logged in to view attached files.
beleta1ParticipantYes it seems that your finding is correct. The problem is fixed in all the files that had reference problems.
Thanks a lot.
Jose M Beleta
-
AuthorPosts