Hi,
I've run into a similar problem with my AVR Plugin. As I found no
way to selectively replace symbols I just clear the whole Discovered
Paths and Symbols table and restart the ScannerConfigBuilder and the
Indexer whenever the user changes the target MCU.
Take a look at the ScannerConfigUtil.java
file from the AVR Eclipse Plugin. It uses tons of restricted API
calls and there is no guarantee that it will work with future
versions of CDT, but it seems to work with CDT 7.0 and 8.0.
Cheers,
Thomas
On 31.08.2011 19:02, Eugene Ostroukhov wrote:
It looks like symbols are not merged if I call
((PerProjectSICollector) collector).deleteAll(project); - but this
does not update values on the Paths and Symbols project property
page and does not refresh the editor/indexer.
Is there a way to refresh those when my project is rebuilt with
the new settings?
On Wed, Aug 31, 2011 at 9:56 AM, Eugene
Ostroukhov <eostroukhov@xxxxxxxxx>
wrote:
In our IDE we need to update list of
defines when user changes compiler settings. I.e. we have a
target architecture macro that needs to contain proper version
depending on compiler settings.
I created custom ScannerInfoProvider and ConsoleParser that
properly invoke our tools to gather include paths and defines.
I verified that the arrays they pass to IScannerInfoCollector
are proper ones. I verified that if I quit the IDE, delete
${workspace}/.metadata/.plugin/org.eclipse.cdt.make.core/${project}.sc
file the new macro values are proper.
The extension point uses CDT stock
org.eclipse.cdt.make.internal.core.scannerconfig2.PerProjectSICollector
that gathers the scanner information.
The problem I see is that new values do not replace the
previous list but instead get merged together - i.e. our
__ARCH__ macro now is marked as having two active values. Is
there a way to override symbols instead of merging with them?
Can I reuse PerProjectSICollector (it does the merge in
definedSymbolsNeedUpdate) or the only way is to create our
own?
Best regards,
Eugene
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
|