Hugh,
<extension
id="com.ashling.MyGNU.GCCManagedMakePerProjectProfile"
If your plug-in id is “com.ashling.MyGNU”,
try to specify the your extension id simply as “GCCManagedMakePerProjectProfile”
instead of "com.ashling.MyGNU.GCCManagedMakePerProjectProfile",
and refer it with its full id as specified in your snip:
scannerConfigDiscoveryProfileId="com.ashling.MyGNU.GCCManagedMakePerProjectProfile"
No java code is needed in
case you only want to substitute the compiler command and use the scanner info
provider already available in CDT. I just tried to substitute the command for the
scanner discovery profile the managed builder core plug-in defines to be my-gcc
instead of gcc, and it worked correctly for me. (I mean that “my-gcc”
command was issued instead of “gcc”).
Regards,
Mikhail
From:
cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Hugh O'Keeffe
Sent: Friday, November 25, 2005
4:29 PM
To: 'CDT
General developers list.'
Subject: [cdt-dev] Problems with
ScannerConfigurationDiscoveryProfile
Hi,
Sorry, but as a follow up to other posts I'm still not groking this fully.
I have a new plugin based on org.eclipse.cdt.managedbuilder.gnu.ui_3.0.0. I
want to change the executable name for the GCC compiler (to my-gcc) as used in
the ScannerConfigurationDiscoveryProfile.
Therefore, in my plugin's manifest I have added:
<!-- ScannerConfigurationDiscoveryProfile Tool Specifications -->
<extension
id="com.ashling.MyGNU.GCCManagedMakePerProjectProfile"
name="My GNU C/C++
managed make per project SCD profile"
point="org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile">
<scannerInfoCollector
class="org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultGCCScannerInfoCollector"
scope="project"/>
<scannerInfoProvider
providerId="specsFile">
<run
arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}"
class="org.eclipse.cdt.make.internal.core.scannerconfig2.GCCSpecsRunSIProvider"
command="my-gcc"/>
<scannerInfoConsoleParser
class="org.eclipse.cdt.make.internal.core.scannerconfig.gnu.GCCSpecsConsoleParser"/>
</scannerInfoProvider>
</extension>
and
for my buildDefinitions/Toochain definitions I have set
scannerConfigDiscoveryProfileId to refer to the above:
<extension
id="cdt.managed.build.info"
name="Managed Build Tools
Description"
point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
<configuration
name="%ConfigName.Rel"
id="cdt.managedbuild.config.My.gnu.exe.release"
cleanCommand="rm
-rf"
errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser">
<toolChain
archList="all"
osList="all"
name="%ToolChainName.Rel"
targetTool="cdt.managedbuild.tool.My.gnu.c.linker.exe.release;cdt.managedbuild.tool.My.gnu.cpp.linker.exe.release"
scannerConfigDiscoveryProfileId="com.ashling.MyGNU.GCCManagedMakePerProjectProfile"
id="cdt.managedbuild.toolchain.My.gnu.exe.release">
[snip....]
Unfortunately,
this does not work. The default (gcc) is still been used by the scanner. Note:
Everything else works fine i.e. Wizard shows MyGNU and generates a Managed Make
Project which calls my versions of the gnu tools.
Obviously,
I am missing something. What's wrong ? Can this be done statically or is some
Java necessary ? Thanks in advance....
Hugh,,