Hello,
Initially when I installed MCUXpresso, I was able to right click on a variable name>refactor>rename make the edit and then click on enter. This feature no longer works as I get the following error message: "the selected name could not be analysed".
I've tried to do Project>C/C++ Index>Rebuild, but it doesn't work any better.
I've also tried to go into <workspace_path>/.metadata/.plugins/org.eclipse.core.runtime/.settings/
and remove indexer from org.eclipse.cdt.core.prefs;
but that doesn't work either.
I imported my project into MCUXpresso v11.1.1 this morning and he didn't work any better.
Any other suggestions would be very much appreciated.
Regards,
Alan
I had the same issue when upgrading from MCUXpressoIDE_11.0.1_2563 to MCUXpressoIDE_11.1.1_3241. My setup contained a single workspace synced to Dropbox. On my secondary computer indexer stopped working after upgrade, but on primary computer indexer worked as expected after upgrade.
In order to fix it I did the following:
1. Deleted my workspace folder locally without removing from Dropbox on my secondary PC
2. Removed all Mcuxpresso versions from secondary pc
3. Re-synced workspace folder from Dropbox
4. Re-installed 11.1.1_3241
Hope this helps.
Thanks.
Alan
Sent from my Xperia™ smartphone
Hi Alan,
have not seen such an error, only found an old Eclipse bug report for Doug (526617 – Refactor->Rename error The selected name could not be analyzed ) which does not really help.
It indeed might be related to the Indexer: have you turned heuristics off (Fixing the Eclipse Index | MCU on Eclipse )?
Does it happen for you with all the projects (e.g. the SDK examples) too?
I hope this helps,
Erich
Hi Erich,
Thank you for getting back to me on this. My indexer settings are below.
Strangely if I import an example project from the SDK, indexing works. Have I somehow managed to corrupt a setting?
Thanks again,
Alan
Hi Alan,
not sure if this will solve it, but: I recommend disabling this option:
The heuristic is really only heuristic (or: kind of guessing) and can result in incorrect indexer information for more 'complex' projects. It might work fine for standard SDK examples as they are not really complex.
And you might disable 'index source files not included in the build' and 'index unused headers' too. Below is what I typically use:
Erich
Hi Erich,
Thanks again for getting back to me. I've setup the indexer the same way as you, but it still doesn't work.
Is there a low level settings file I can delete or something to force MCUXpresso to use the new settings?
Thanks again,
Alan
If you do a Index rebuild, it will use the new settings.
If this still does not work, I'm affraid you might do the refactoring using normal search&replace.
Hi Erich,
That didn't work either I'm afraid.
Thanks anyway,
Alan
Have you tried importing the projects into a new workspace? Either by exporting and importing, or by importing directly from the old workspace.
Hi Con Verse,
As suggested I tried importing/exporting from old workspace into a new one, but it didn't work.
Thanks again,
Alan
If you can't solve this problem any way, I suggest you fully uninstall IDE and remained folders then reinstall it.
Create a new workspace.
Create a new project in it then verify if the problem exists still. or the problem is only in one specific project.
Hi ZhangJennie,
If I create a fresh project the refactoring tool works, so I'm just going to manually copy in my code.
Thank you for your suggestion.
Regards,
Alan
You are welcome.