diff options
author | Mikhail Sennikovsky | 2007-04-26 17:07:39 +0000 |
---|---|---|
committer | Mikhail Sennikovsky | 2007-04-26 17:07:39 +0000 |
commit | c5603e5a0edba5569a4835e2ffed9d14c1958c9d (patch) | |
tree | 7fe1781e1c8833334c2b73ee9776c22369aeb56a /build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/HelloWorldCCProject | |
parent | 6741a8d019b2908ddd9ae80d086448eff4fba303 (diff) | |
download | org.eclipse.cdt-c5603e5a0edba5569a4835e2ffed9d14c1958c9d.tar.gz org.eclipse.cdt-c5603e5a0edba5569a4835e2ffed9d14c1958c9d.tar.xz org.eclipse.cdt-c5603e5a0edba5569a4835e2ffed9d14c1958c9d.zip |
Template Engine submission from Bala Torati (Symbian) with some modifications and bug-fixes (see Bug 160012)
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/HelloWorldCCProject')
2 files changed, 82 insertions, 0 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/HelloWorldCCProject/src/Basename.cpp b/build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/HelloWorldCCProject/src/Basename.cpp new file mode 100644 index 00000000000..ce61112f2af --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/HelloWorldCCProject/src/Basename.cpp @@ -0,0 +1,18 @@ +/* +============================================================================ + Name : $(baseName).cpp + Author : $(author) + Version : + Copyright : $(copyright) + Description : Exe source file +============================================================================ +*/ +/* Hello World in C++, Ansi-style */ +#include <iostream> +using namespace std; + +int main () +{ + cout << "$(message)" << endl; // prints $(message) + return 0; +} diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/HelloWorldCCProject/template.xml b/build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/HelloWorldCCProject/template.xml new file mode 100644 index 00000000000..86ab82bd611 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/HelloWorldCCProject/template.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<template type="ProjTempl" version="1.0" supplier="Eclipse.org" revision="1.0" author="Bala Torati (Symbian)" + copyright="Copyright (c) 2007 Symbian Software Limited and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available athttp://www.eclipse.org/legal/epl-v10.html" + id="HelloWorldCCProject" label="Hello World C++ Example" description="A skeletal Managed C++ Hello World project. Creates a folder for sources and another for include." + help="help.html"> + <property-group id="basics" label="Basic Settings" description="Basic properties of a project" type="PAGES-ONLY" help="help.html"> + <property id="author" + label="Author" + description="Name of the author" + type="input" + pattern=".*" + default="" + hidden="false" + persist="true"/> + <property id="copyright" + label="Copyright notice" + description="Your copyright notice" + type="input" + pattern=".*" + default="Your copyright notice" + hidden="false" + persist="true"/> + <property id="message" + label="Hello world greeting" + description="Your hello world greeting message" + type="input" + pattern=".*" + default="Hello World!!!" + hidden="false" + persist="true"/> + <property id="sourceDir" + label="Source" + description="Directory for hello world project source files" + type="input" + default="src" + pattern="[a-zA-Z0-9]+" + mandatory="true" + persist="true"/> + </property-group> + + <process type="org.eclipse.cdt.managedbuilder.core.NewManagedProject"> + <simple name="name" value="$(projectName)" /> + <simple name="artifactExtension" value="exe" /> + <simple name="isCProject" value="false" /> + </process> + + <process type="org.eclipse.cdt.core.CreateSourceFolder"> + <simple name="projectName" value="$(projectName)"/> + <simple name="path" value="$(sourceDir)"/> + </process> + + <process type="org.eclipse.cdt.core.AddFiles"> + <simple name="projectName" value="$(projectName)"/> + <complex-array name="files"> + <element> + <simple name="source" value="src/Basename.cpp"/> + <simple name="target" value="$(sourceDir)/$(projectName).cpp"/> + <simple name="replaceable" value="true"/> + </element> + </complex-array> + </process> + +</template> + |