- Status Closed
- Percent Complete
- Task Type Bug Report
- Category Enhanced Syntax Highlighting
- Priority Very Low
- Reported Version 1.0.0.4253
- Due in Version Undecided
- Votes
- Private
Attached to Project: Codinion
Opened by wmj - 14.01.2017
Last edited by Martin Topfstedt - 18.02.2017
Opened by wmj - 14.01.2017
Last edited by Martin Topfstedt - 18.02.2017
FS#87 - Syntax highlighting could be broken when editing document with conditional compilation instructions
While I was editing code files with #if...#else...#endif instructions, the highlighting feature became not working after inserting and deleting some characters.
Please check to see whether this issue could be fixed.
Closed by Martin Topfstedt
18.02.2017 14:53
Reason for closing: Fixed
Additional comments about closing: Version 1.0.0.4753
18.02.2017 14:53
Reason for closing: Fixed
Additional comments about closing: Version 1.0.0.4753
Hi,
could it be that you added the file new to the project or renamed it or moved it around?
No new file was added to the project.
The solution had two projects, which contained identical code files, except the first project which had no conditional compilation and the second one had a condition, which differed effective range of the #if...#else...#endif instructions.
Ok, is the highlighting just inside the pre processor condition missing?
Hi,
could you check if the highlighting is just wrong inside the preprocessor statements?
Yes, it was wrong just inside the preprocessor statements.
Hi,
ok do they contain copies of the files or is one project linking the files of the other project? If they link the files Codinion determines which file is opened by the Project DropDown of the File Tab (Navigation Bar of the Text Editor). This bar is important, if the bar is disabled Codinion takes the first project it finds which contains that file.
Do you have the NavigationBar disabled? For that i have already a bug to find out how i can determine the active project without the ProjectDorop Down (FS#54)
Both projects shared the SAME code files.
The only difference was that project A and B used different compilation conditions.
NavBar was never disabled.
Hi,
i found a bug where the highlighting got stuck when changing between projects through the navbar.
I attached a version where this shoulb be fixed.
Thank you for addressing this problem.
Another bug was found after installing the attached vsix above.
You can see that the NoWorking and Print method was not highlighted.
Steps to reproduce the above:
The workaround for the above problem can be saving the new solution to the disk and reopening it from VS.
Let's get back to the issue "Syntax highlighting could be broken when editing document with conditional compilation instructions".
MultiConfig.7z contains a solution with two projects, which have the same code file except that the MultiConfig.B project has a compiler condition "B" defined.
When I opened the solution, and clicked on the Program.cs under the first project, like A.png showed, the highlight was correct. But when I clicked the Program.cs under the MultiConfig.B project, like B.png, the highlight was not working as expected.
I think the problem is that for some reason in screenshot B the Project is still "MultiConfig" instead of "MultiConfig.B"
Furthermore, i found another bug that codinion didn't recognized project property changes (conditional symbols). It just worked with reloading the project for now. I have fixed this now.
Thanks for providing this small example. I tried it with my newest version and it worked like expected, except the first time i loaded the solution there it didn't recognized the projects at all 0.o. I will investigate that and report back.
Ok, i could fix the loading problem as well. It was caused by already haveing a solution opened and than open a second solution which loads very fast :) and no events are send.
I attached a new version with the fixes.
Great! Thank you for the fix.
It seemed that the highlight was correct now :)