summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Aubry2012-07-26 04:50:10 (EDT)
committersbernard2012-07-26 08:51:36 (EDT)
commit9f22f780d399cc12e65b2b6180465457574a341f (patch)
treed7d1154f41f69195f27f42d5537aca4e2583f83a
parentc5d0ee87439d74b8f86a5d8c90abfb1a4c83e325 (diff)
downloadorg.eclipse.koneki.ldt-9f22f780d399cc12e65b2b6180465457574a341f.zip
org.eclipse.koneki.ldt-9f22f780d399cc12e65b2b6180465457574a341f.tar.gz
org.eclipse.koneki.ldt-9f22f780d399cc12e65b2b6180465457574a341f.tar.bz2
Bug 385093 - Template can use current module name.
-rw-r--r--plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/editor/templates/LuaDocumentorTemplateContextType.java5
-rw-r--r--plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/editor/templates/LuaUniversalTemplateContextType.java2
-rw-r--r--plugins/org.eclipse.koneki.ldt.ui/templates/luadocumentor-templates.xml6
3 files changed, 7 insertions, 6 deletions
diff --git a/plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/editor/templates/LuaDocumentorTemplateContextType.java b/plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/editor/templates/LuaDocumentorTemplateContextType.java
index 03df4c1..e3c970f 100644
--- a/plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/editor/templates/LuaDocumentorTemplateContextType.java
+++ b/plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/editor/templates/LuaDocumentorTemplateContextType.java
@@ -12,16 +12,15 @@ package org.eclipse.koneki.ldt.ui.internal.editor.templates;
import org.eclipse.dltk.core.ISourceModule;
import org.eclipse.dltk.ui.templates.ScriptTemplateContext;
-import org.eclipse.dltk.ui.templates.ScriptTemplateContextType;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.Position;
-public class LuaDocumentorTemplateContextType extends ScriptTemplateContextType {
+public class LuaDocumentorTemplateContextType extends LuaUniversalTemplateContextType {
public static final String CONTEXT_TYPE_ID = "LuaDocumentorTemplateContextType"; //$NON-NLS-1$
public LuaDocumentorTemplateContextType() {
- // empty constructor
+ super();
}
public LuaDocumentorTemplateContextType(String id) {
diff --git a/plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/editor/templates/LuaUniversalTemplateContextType.java b/plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/editor/templates/LuaUniversalTemplateContextType.java
index 966f7c3..24f2914 100644
--- a/plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/editor/templates/LuaUniversalTemplateContextType.java
+++ b/plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/editor/templates/LuaUniversalTemplateContextType.java
@@ -31,10 +31,12 @@ public class LuaUniversalTemplateContextType extends ScriptTemplateContextType {
public LuaUniversalTemplateContextType(String id, String name) {
super(id, name);
+ setupLuaResolvers();
}
public LuaUniversalTemplateContextType(String id) {
super(id);
+ setupLuaResolvers();
}
private void setupLuaResolvers() {
diff --git a/plugins/org.eclipse.koneki.ldt.ui/templates/luadocumentor-templates.xml b/plugins/org.eclipse.koneki.ldt.ui/templates/luadocumentor-templates.xml
index ec9e610..e2d01f2 100644
--- a/plugins/org.eclipse.koneki.ldt.ui/templates/luadocumentor-templates.xml
+++ b/plugins/org.eclipse.koneki.ldt.ui/templates/luadocumentor-templates.xml
@@ -4,14 +4,14 @@
context="LuaDocumentorTemplateContextType"
description="%module.description"
id="org.eclipse.koneki.ldt.ui.templates.luadocumentor.module"
- name="@module">@module ${name}</template>
+ name="@module">@module ${module_name}</template>
<template
context="LuaDocumentorTemplateContextType"
id="org.eclipse.koneki.ldt.ui.templates.luadocumentor.function"
name="@function"
description="%function.description"
- autoinsert="true">@function [parent=#${parent}] ${name}</template>
+ autoinsert="true">@function [parent=#${module_name}] ${name}</template>
<template
context="LuaDocumentorTemplateContextType"
@@ -25,7 +25,7 @@
id="org.eclipse.koneki.ldt.ui.templates.luadocumentor.field"
name="@field"
description="%field.description"
- autoinsert="true">@field [parent=#${parent}] #${type} ${name} ${description}</template>
+ autoinsert="true">@field [parent=#${module_name}] #${type} ${name} ${description}</template>
<template
context="LuaDocumentorTemplateContextType"