Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Build model proposal

Chris,
 
  Our design looks very similar.  A couple of differences:
 
  1) Rather than registering each toolchain as an extension
     point, a toolchain provider is responsible for enumerating
     the toolchains it is aware of.
 
     This lets a provider (a) pull toolchain information from
     sources other than plugin code (configuration files, the
     local filesystem, etc.) and (b) associate the toolchain
     with any additional information of interest to the toolchain
     provider.
 
     In this type of setup, you would implement one extension
     point (org.eclipse.cdt.toolchain.provider) instead of two,
     and your provider would manage two IToolChain instances.
 
  2) A toolchain is comprised of individual tools.  This allows
     the assembly of disparate tools into a logical toolchain,
     and the specification of required and default parameters
     for a particular tool.
 
     In our implementation, the ITool and IToolParameter interfaces
     are effectively private - our toolchains pull this information
     from configuration files that are shipped along with the
     toolchains.
 
     Exposing these two interfaces (and providing default generic
     implementations) would allow users to mix-n-match their own
     toolchains, preferably though a Preferences UI pane.
 
     Just as an example, I have at least four Cygwin toolchains
     installed on my current Windows box: gcc-3.2, gcc-2.95.3,
     and the corresponding MinGW toolchains (which use the same
     tools, but identify gcc and g++ as having "-mno-cygwin" as
     a required parameter).
 
  Your BuildTab representation looks more sophisticated than what
we currently have - since we deal purely with GNU toolchains, we
didn't make the effort to accomidate the idea that two toolchains
might have radically different UIs for setting build properties.
 
  Having the toolchain indicate what it's various UI elements are
is, I think, a Good Thing, particularly as it eliminates the need
for a couple of extension points in the proposed model.
 
-Samrobb
-----Original Message-----
From: Chris Songer [mailto:songer@xxxxxxxxxxxxx]
Sent: Monday, December 16, 2002 8:02 PM
To: cdt-dev@xxxxxxxxxxx; cdt-dev@xxxxxxxxxxx
Subject: Re: [cdt-dev] Build model proposal

Hi,

I agree with the vision. Rather than talk in the general, I've attached the interfaces that we are using for all this. It's actually pretty simple. Comment where you think something is not open enough.

In english, a makefile generator and build property manager work with ToolChains that are contributed through extension points. A ToolChain is represented by an IToolChain interface which is responsible for providing the tabs to set tool chain properties (like compiler switches), generation of the build commands and basic file testing. More details in the files.

I'm not up on XML schemas yet so, example extension XML is below.

   <extension point="com.tensilica.xide.cdt.ToolChain">
   <params pretty_name="XtTools with XCC"
  
id="com.tensilica.xide.cdt.xttoolchain.XccToolChain"
   class="com.tensilica.xide.cdt.xttoolchain.XccToolChain" />
   </extension>

   <extension point="com.tensilica.xide.cdt.ToolChain">
   <params pretty_name="XtTools with GCC"
  
id="com.tensilica.xide.cdt.xttoolchain.GccToolChain"
   class="com.tensilica.xide.cdt.xttoolchain.GccToolChain" />
   </extension>


Back to the top