Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
AW: [cdt-dev] Setting Binary Parsers

Hello Chad,
 
I am a little surprised to hear that you are creating your special settings programatically. I work on an application where we need to set specific binary parsers (and a bunch of other settings) when creating a new project and I did it by creating a new project type as described in the "CDT extensibility guide" (http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/cdt-home/user/Reference%20Documents/Managed_Build_21/Managed_Build_Extensibility.html?cvsroot=Tools_Project). Did you consider that approach?
 
Programatically, here is how to go. You need to get at the IProject that represents the project you are working in.
 
  IProject project = ... ;
 
The org.eclipse.cdt.managedbuilder.core.ManagedBuildManager has a static method to get the IManagedBuildInfo for the project.

  IManagedBuildInfo info =  ManagedBuildManager.getBuildInfo(project);
 
From the info you go to toolchain --> target platform and set the list of binary parser ids.

  info.getDefaultConfiguration().getToolChain().getTargetPlatform().setBinaryParserList(new String[]{ ... });
 
Hope this helps & works.
 
 
Norbert



Von: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] Im Auftrag von cebarne2@xxxxxxxxxxxxxxxxxxx
Gesendet: Montag, 13. Juni 2005 20:14
An: cdt-dev@xxxxxxxxxxx
Betreff: [cdt-dev] Setting Binary Parsers


We have a plug-in that extends the NewCProject wizard.  Our wizards create projects for specific toolchains and pre-populate the projects with compilable source code for the toolchain.  We want to set the active binary parsers during this phase.  Is there a good example of changing the active binary parsers for a given project, programmatically?

Thanks,

Chad Barnes
Rockwell Collins, Inc.

Back to the top