Community
Participate
Working Groups
LanguageSettingsProvider extension is a cornerstone on which all the other functionality of proposed changes in bug 290631 relies on. This extension mechanism needs to be added to CDT first in order to proceed further.
This is to extract LanguageSettingsProvider extension point from the "alpha version" bug 290631 comment 11, clean it up and submit as a first piece of the proposal.
By the way, if somebody has an idea about better name, I am all ears. I find both "ScannerDiscoveryInfo" and "LanguageSettingsEntry" metaphors equally unclear and confusing.
Created attachment 181057 [details] patch Here is the patch, the first installment toward new Scanner Discovery functionality bug 290631. Note that there are some changes in API which would require increasing major version of cdt.core. This patch introduces base interface ILanguageSettingsProvider and includes the new extension point LanguageSettingsProvider. The core interface ICConfigurationDescription added methods getLanguageSettingProviders() and setLanguageSettingProviders(...). This patch is just scaffolding not really connected to the project model yet. Neither this patch covers any caching or persistence for discovered language settings entries, follow bug 291959 for that. Also see bug 328007 for user interface.
I placed my git repository on GitHub https://github.com/angvoz/SD80. The rebased branch for this bug is sd80.Patch1.CDT. It provides API and the base extension point for further advancement. Please, see also http://wiki.eclipse.org/CDT/ScannerDiscovery61/API. This version is functional but by default the functionality is disabled. Use branch [sd80] from the git repository for the bleeding edge version with more advanced UI or [sd80.Patch#.CDT] for clean version intended for submission. See also bug 328007.
Hi Andrew, I tried the sd80 branch on Mac OS. I haven't looked at the code thoroughly but I noticed that frameworks directory get picked up as: /Library/Frameworks (framework directory) /System/Library/Frameworks (framework directory) Of course with the extra '(framework directory)', it doesn't work. It would be nice to have them. Sorry, I don't think EGit can make workspace patches... GCCBuiltinSpecsDetector.java private static final Pattern FRAMEWORK_DIRECTORY_PATTERN = Pattern.compile("\\(framework directory\\)"); //$NON-NLS-1$ ... } else if (expectingIncludes) { line.trim(); // Mac OS frameworks Matcher frameWorkMatcher = FRAMEWORK_DIRECTORY_PATTERN.matcher(line); if(frameWorkMatcher.find()) { line = line.substring(0, frameWorkMatcher.start()); line = line.trim(); } Once I see the directories in my PE, if I rebuild the index, symbols and includes are still unresolved. I assume it's not hooked up yet? Thanks for the great work!
I think you would need to use variables: '__framework__' and '__header__', as described in IScannerInfo.java Javadoc. See discussion in bug 69529. On sd80 branch, symbols and includes should be available after rebuilding the index. I was not able to create and then apply patch in egit but you can create workspace patch from command line git, see the hint on http://wiki.eclipse.org/CDT/Developer/FAQ#Git
The extension point implemented and committed to master.