Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Sennikovsky2007-04-26 17:07:39 +0000
committerMikhail Sennikovsky2007-04-26 17:07:39 +0000
commitc5603e5a0edba5569a4835e2ffed9d14c1958c9d (patch)
tree7fe1781e1c8833334c2b73ee9776c22369aeb56a /build/org.eclipse.cdt.managedbuilder.gnu.ui/templates
parent6741a8d019b2908ddd9ae80d086448eff4fba303 (diff)
downloadorg.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')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/EmptyProject/template.xml8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/HelloWorldCAnsiProject/src/Basename.cpp20
-rw-r--r--build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/HelloWorldCAnsiProject/template.xml56
-rw-r--r--build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/HelloWorldCCProject/src/Basename.cpp18
-rw-r--r--build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/HelloWorldCCProject/template.xml64
5 files changed, 166 insertions, 0 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/EmptyProject/template.xml b/build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/EmptyProject/template.xml
new file mode 100644
index 00000000000..e623b54648e
--- /dev/null
+++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/EmptyProject/template.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="ProjTempl" version="1.0" supplier="Eclipse.org" revision="1.0" author="Intel Corporation"
+ copyright="Copyright (c) 2007 Intel Corporation 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 at http://www.eclipse.org/legal/epl-v10.html"
+ id="EmptyProject" label="Empty Project" description="An empty project template"
+ help="help.html">
+
+</template>
+
diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/HelloWorldCAnsiProject/src/Basename.cpp b/build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/HelloWorldCAnsiProject/src/Basename.cpp
new file mode 100644
index 00000000000..c9fd0add173
--- /dev/null
+++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/HelloWorldCAnsiProject/src/Basename.cpp
@@ -0,0 +1,20 @@
+/*
+============================================================================
+ Name : $(baseName).cpp
+ Author : $(author)
+ Version :
+ Copyright : $(copyright)
+ Description : Exe source file
+============================================================================
+*/
+/* Hello World in C, Ansi-style */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+int main(void)
+{
+ puts("$(message)");
+ return EXIT_SUCCESS;
+}
+
diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/HelloWorldCAnsiProject/template.xml b/build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/HelloWorldCAnsiProject/template.xml
new file mode 100644
index 00000000000..c04c5adf343
--- /dev/null
+++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/HelloWorldCAnsiProject/template.xml
@@ -0,0 +1,56 @@
+<?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="HelloWorldCProject" label="Hello World ANSI 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-group>
+
+ <process type="org.eclipse.cdt.managedbuilder.core.NewManagedProject">
+ <simple name="name" value="$(projectName)" />
+ <simple name="artifactExtension" value="exe" />
+ <simple name="isCProject" value="true" />
+ </process>
+
+ <process type="org.eclipse.cdt.core.CreateSourceFolder">
+ <simple name="projectName" value="$(projectName)"/>
+ <simple name="path" value="src"/>
+ </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="src/$(projectName).cpp"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ </complex-array>
+ </process>
+
+</template>
+
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>
+

Back to the top