Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Project Template Engine -- trying to get help pages example working(The example code is not generic (real Symbian project code) and it is very sparse/incomplete)
Project Template Engine -- trying to get help pages example working [message #638648] Thu, 11 November 2010 23:45 Go to next message
Rick  is currently offline Rick Friend
Messages: 3
Registered: November 2010
Junior Member
Hi, I have about half of the Project Template Engine example working.
(from: CDT Plug-in Developer Guide > Programmer's Guide > CDT DOM > An example template):
  • The additional input pages.
  • Created custom folders, added skeletal source files (.C .h and .<custom-type>)
  • Replacement values working OK.
  • Simple exe build completes OK.


    But, I would like to:
  • Programmatically add a "prebuildStep" to the project config.
  • Add objects to the link.

I know how to do this manually, and I can see the results in the .cproject file.

The following two process sections of the example are not working correctly:
1.
    <process type="org.eclipse.cdt.managedbuilder.core.NewManagedProject">
        <simple name="name" value="$(projectName)"/>
        <simple name="targetType" value="$(targetType)"/>
        <simple name="uid2" value="$(uid2)"/>
        <simple name="uid3" value="$(uid3)"/>
        <simple name="vid" value="$(vid)"/>
    </process>


This simply does not resemble the documentation
( CDT Plug-in Developer Guide > Programmer's Guide > CDT DOM > How to develop templates):
Quote:

  • org.eclipse.cdt.managedbuilder.core.NewManagedProject: It defines all the parameters required for a new managed project and provides the fully qualified name of the class, which processes these parameters.

    Here is a list of parameters defined by this process type:
  • Name: You use this parameter to specify the name of the managed project. It is of type simple.
  • projectType: You use this parameter to specify the type of the managed project. It is of type simple.
  • location: You use this parameter to specify the location of the managed project. It is of type simple.
  • targetType: You use this parameter to specify the type of the target binary. It is of type simple.
  • configs: You use this parameter to specify the build configurations for the managed project. It is of type simple.


I believe "prebuildStep" is part of "configs:"

2.
    <process type="org.eclipse.cdt.managedbuilder.core.AppendToMBSStringListOptionValues">
        <simple name="projectName" value= "$(projectName)"/>      
        <complex-array name="resourcePaths">
            <element>
                <simple name="id" value=".*linker\.libraries\.libraries.*" />
                <simple-array name="values">
                    <element value="euser.lib" />
                </simple-array>
                <simple name="path" value="" />
            </element>
        </complex-array>
    </process>


I believe this should add to Project > Properties > C/C++ Build > Settings > [configuration] > [linker] > Libraries
If I can get this section of the example working I should be able to make adding objects to the linker work.

This is just part of a larger domain-specific language (DSL) project, using xtext to build a syntactically aware editor.
The actual DSL build is performed externally.

All help is greatly appreciated.

Rick.
-----------------------------------------------------

My environment:
OS:  Linux 2.6.34.7-0.3-desktop x86_64
  System:  openSUSE 11.3 (x86_64)
  KDE:  4.4.4 (KDE 4.4.4) "release 3"

Helios Service Release 1     Build id: 20100917-0705

  Autotools support for CDT (Incubation)	2.0.0.201009101021	org.eclipse.linuxtools.cdt.autotools.feature.group
  C/C++ Call Graph Visualization (Incubation)	0.0.2.201009101021	org.eclipse.linuxtools.callgraph.feature.group
  C/C++ Development Tools	7.0.1.201009241320	org.eclipse.cdt.feature.group
  C/C++ Development Tools SDK	7.0.1.201009241320	org.eclipse.cdt.sdk.feature.group
  C/C++ Library API Documentation Hover Help (Incubation)	0.3.0.201009101021	org.eclipse.linuxtools.cdt.libhover.feature.group
  Eclipse IDE for C/C++ Developers	1.3.1.20100916-1202	epp.package.cpp
  Eclipse Java Development Tools	3.6.1.r361_v20100714-0800-7z8XFUSFLFlmgLc5z-Bvrt8-HVkH	org.eclipse.jdt.feature.group
  Eclipse Plug-in Development Environment	3.6.1.r361_v20100727-7b7mFL-FET3dhESDgE5_bkJ	org.eclipse.pde.feature.group
  Eclipse SDK	3.6.1.M20100909-0800	org.eclipse.sdk.ide
  Eclipse XML Editors and Tools	3.2.2.v201008170029-7H7AFUQDxumQGOpBqffOY2f1qxDZ	org.eclipse.wst.xml_ui.feature.feature.group
  PDE/API Tools Environment Descriptions	1.0.0.v20100427-7C-7BF9JgLWLMBMMAMsLL	org.eclipse.pde.api.tools.ee.fragments.feature.group
  Xtext SDK	1.0.1.v201008251220	org.eclipse.xtext.sdk.feature.group

[Updated on: Thu, 11 November 2010 23:50]

Report message to a moderator

Re: Project Template Engine -- trying to get help pages example working [message #638878 is a reply to message #638648] Fri, 12 November 2010 21:07 Go to previous messageGo to next message
Rick  is currently offline Rick Friend
Messages: 3
Registered: November 2010
Junior Member
Hi, well looking through source code I have figured out a solution to my issue 2.

    <process type="org.eclipse.cdt.managedbuilder.core.SetMBSStringListOptionValues">
        <simple name="projectName" value= "$(projectName)"/>     
        <complex-array name="resourcePaths">
            <element>
                <simple name="id" value="gnu.cpp.link.option.userobjs" />
                <simple-array name="values">
                    <element value="$(testname).o" />
                </simple-array>
                <simple name="path" value="" />
            </element>
        </complex-array>
    </process>


I looked in:
org.eclipse.cdt.managedbuilder.templateengine.processes.SetM BSStringListOptionValues.java
org.eclipse.cdt.managedbuilder.templateengine.processes.Appe ndToMBSStringListOptionValues.java
org.eclipse.cdt.managedbuilder.core.IOption.java

NOTE: In both <simple> and <simple-array> the name= is not used/processed by the template engine. The ORDERING of the elements is important. And, only the contents of value= is used.

Re: Project Template Engine -- trying to get help pages example working [message #710010 is a reply to message #638878] Thu, 04 August 2011 15:25 Go to previous message
Don Porges is currently offline Don PorgesFriend
Messages: 13
Registered: July 2009
Junior Member
Just posting to thank you for this; it seems to be the ONLY example, anywhere, of how to use SetMBSStringListOptionValues.
Previous Topic:change name of project directory
Next Topic:Go to definition - HOW?
Goto Forum:
  


Current Time: Fri Apr 19 13:51:11 GMT 2024

Powered by FUDForum. Page generated in 0.01898 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top