Author Topic: Debugging code completion plugin  (Read 19615 times)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Debugging code completion plugin
« Reply #15 on: August 28, 2013, 10:02:30 pm »
In this case the issue is not a C::B or CC issue, it's a broken projectfile.
You have he same file twice in it (with different relative paths):
Code
		<Unit filename="..\..\..\..\iccv8cortex\include\CMSIS\core_cm3.h" />
<Unit filename="..\..\..\include\CMSIS\core_cm3.h" />

The issue can simply be fixed by explicitely saving the projectfile, closing and reopening it.

Nevertheless the calculating of the common toplevel path should work correctly in this case also in my opinion.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Debugging code completion plugin
« Reply #16 on: August 28, 2013, 10:43:28 pm »
Nevertheless the calculating of the common toplevel path should work correctly in this case also in my opinion.

The problem is that CalculateCommonTopLevelPath() relies on a correct relativeFilename. This will be set correctly when the project gets saved, so it must have been added in a wrong way (manually or by a plugin or whatever ? ).

To avoid this we either have to recalculate the relativeFilename when a project is opened or everytime when we use it (e.g. CalculateCommonTopLevelPath() ).
The first attempt would most likely slow down opening large projects and the second one would make storing it useless and would surely lead to more serious performance issues with large projects.