Added X-Reference support for ArrayModifiers and Exception Specifications.
Fixed Bug 41551 - HandleInclusion always throws ScannerException on local includes.
TESTS
Added CompleteParseASTTest::testArrayModExpression(), testPointerVariable() &
testExceptionSpecification().
Added constructor expression support for variables.
Added constructor chain x-reference support for methods.
TESTS
Added testBug41520() to FullParseFailedTests.java.
Added testConstructorChain() to CompleteParseASTTest.java
Added Expression x-reference support into Parser.
TESTS
Added testSimpleExpression(), testParameterExpressions() &&
testNestedNamespaceExpression() to CompleteParseASTTest.java.
In order to work through CExtensionPoint mechanism, I have to change the
existing extension point entries for the Managed and Standard builders to
the following (all future builders will have to conform to this as well):
<extension
id="ManagedBuildManager"
point="org.eclipse.cdt.core.ScannerInfoProvider">
<cextension>
<run
class="org.eclipse.cdt.core.build.managed.ManagedBuildManager">
</run>
</cextension>
</extension>
<extension
id="StandardBuildManager"
point="org.eclipse.cdt.core.ScannerInfoProvider">
<cextension>
<run
class="org.eclipse.cdt.core.build.standard.StandardBuildManager">
</run>
</cextension>
</extension>
As well, the ManagedBuildManager and StandardBuildManager must extend
AbstractCExtension.
The new project wizards for managed and standard projects have to be
modified to register the right class as the scanner info providers for the
project. The example below shows the managed project wizard code, but the
standard project wizard is similar.
try {
ICDescriptor desc =
CCorePlugin.getDefault().getCProjectDescription(project);
desc.remove(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID);
desc.create(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID,
ManagedBuildManager.INTERFACE_IDENTITY);
} <snip>
Clients use a new method defined in CCorePlugin
public IScannerInfoProvider getScannerInfoProvider(IProject project) {
IScannerInfoProvider provider = null;
if (project != null) {
try {
ICDescriptor desc = (ICDescriptor)
getCProjectDescription(project);
ICExtensionReference[] extensions =
desc.get(BUILD_SCANNER_INFO_UNIQ_ID);
if (extensions.length > 0)
provider = (IScannerInfoProvider)
extensions[0].createExtension();
} catch (CoreException e) {
}
}
return provider;
}
to get the information provider as shown in the updated JUnit test code
below:
// Find the first IScannerInfoProvider that supplies build info for the
project
IScannerInfoProvider provider =
CCorePlugin.getDefault().getScannerInfoProvider(project);
assertNotNull(provider);
As is the case now, clients implement the IScannerInfoChangeListener
interface and pass themselves to the provider in a subscription message.
There is also a new method on the IScannerInfoProvider interface that
allows the client to get information immediately as shown below:
IScannerInfo currentSettings = provider.getScannerInformation(project);
The ManagedBuildManager::getScannerInfo(IResource) method will be
deprecated, then removed before the end of this release cycle.