Skip to content

Commit

Permalink
[lang][ui] Add basic templates.
Browse files Browse the repository at this point in the history
close #147

Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Jul 6, 2016
1 parent 46cfb96 commit dc3150d
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions eclipse-sarl/plugins/io.sarl.lang.ui/templates/templates.xml
Expand Up @@ -107,6 +107,15 @@
autoinsert="false">for (${element} : ${iterable}) {
${line_selection}${cursor}
}</template>
<template
name="fortype"
description="typed for loop over an Iterable"
id="iterable_typed_for"
context="org.eclipse.xtext.xbase.Xbase.XExpression"
enabled="true"
autoinsert="false">for (${element} as ${type} : ${iterable}) {
${line_selection}${cursor}
}</template>
<template
name="while"
description="while loop with condition"
Expand Down Expand Up @@ -187,4 +196,53 @@
context="org.eclipse.xtext.xbase.Xbase.XExpression"
enabled="true"
autoinsert="false">var ${name} = ${cursor}</template>
<template
name="agent"
description="basic agent implementation"
id="basic_agent"
context="io.sarl.lang.SARL.Type"
enabled="true"
autoinsert="false">agent ${name} {
on Initialize {
${cursor}
}
}</template>
<template
name="behavior"
description="basic behavior implementation"
id="basic_behavior"
context="io.sarl.lang.SARL.Type"
enabled="true"
autoinsert="false">behavior ${name} {
on Initialize {
${line_selection}${cursor}
}
}</template>
<template
name="capacity"
description="basic capacity implementation"
id="basic_capacity"
context="io.sarl.lang.SARL.Type"
enabled="true"
autoinsert="false">capacity ${cursor}${name} {
def ${function}
}</template>
<template
name="skill"
description="basic skill implementation"
id="basic_skill"
context="io.sarl.lang.SARL.Type"
enabled="true"
autoinsert="false">skill ${name} implements ${cursor}${capacity} {
}</template>
<template
name="event"
description="basic event implementation"
id="basic_event"
context="io.sarl.lang.SARL.Type"
enabled="true"
autoinsert="false">event ${name} {
var ${variable} : ${type}
${line_selection}${cursor}
}</template>
</templates>

0 comments on commit dc3150d

Please sign in to comment.