summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Aubry2012-07-26 09:47:29 (EDT)
committersbernard2012-07-27 05:56:16 (EDT)
commitbcff5ec25339b8728b852d51d12d03bd8f1081fc (patch)
tree72735c567c50324efd6365d82bdc01c0bd1ed308
parent3d7ec25d853ecae75988e29e65caee922ac2034d (diff)
downloadorg.eclipse.koneki.ldt-bcff5ec25339b8728b852d51d12d03bd8f1081fc.zip
org.eclipse.koneki.ldt-bcff5ec25339b8728b852d51d12d03bd8f1081fc.tar.gz
org.eclipse.koneki.ldt-bcff5ec25339b8728b852d51d12d03bd8f1081fc.tar.bz2
Bug 385093 - Add a custom icon for luadoc templates
-rw-r--r--plugins/org.eclipse.koneki.ldt.ui/icons/obj16/template_luadoc.pngbin0 -> 439 bytes
-rw-r--r--plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/Activator.java1
-rw-r--r--plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/ImageConstants.java2
-rw-r--r--plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/editor/templates/LuaDocumentorTemplateCompletionProcessor.java8
4 files changed, 10 insertions, 1 deletions
diff --git a/plugins/org.eclipse.koneki.ldt.ui/icons/obj16/template_luadoc.png b/plugins/org.eclipse.koneki.ldt.ui/icons/obj16/template_luadoc.png
new file mode 100644
index 0000000..d244eaa
--- /dev/null
+++ b/plugins/org.eclipse.koneki.ldt.ui/icons/obj16/template_luadoc.png
Binary files differ
diff --git a/plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/Activator.java b/plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/Activator.java
index 7f7b63d..3228bfd 100644
--- a/plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/Activator.java
+++ b/plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/Activator.java
@@ -86,6 +86,7 @@ public class Activator extends AbstractUIPlugin {
reg.put(ImageConstants.MODULE_FUNCTION_OBJ16, AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, ImageConstants.MODULE_FUNCTION_OBJ16));
reg.put(ImageConstants.GLOBAL_TABLE_OBJ16, AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, ImageConstants.GLOBAL_TABLE_OBJ16));
reg.put(ImageConstants.LOCAL_TABLE_OBJ16, AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, ImageConstants.LOCAL_TABLE_OBJ16));
+ reg.put(ImageConstants.TEMPLATE_LUADOC, AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, ImageConstants.TEMPLATE_LUADOC));
}
/**
diff --git a/plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/ImageConstants.java b/plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/ImageConstants.java
index d0fbb72..520a48b 100644
--- a/plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/ImageConstants.java
+++ b/plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/ImageConstants.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.koneki.ldt.ui.internal;
-
public interface ImageConstants {
String LUA_WIZARD_BAN = "icons/wizban/lua_newprj_wiz.png"; //$NON-NLS-1$
@@ -18,5 +17,6 @@ public interface ImageConstants {
String MODULE_FUNCTION_OBJ16 = "icons/obj16/module_function.gif"; //$NON-NLS-1$
String GLOBAL_TABLE_OBJ16 = "icons/obj16/global_table.gif"; //$NON-NLS-1$
String LOCAL_TABLE_OBJ16 = "icons/obj16/local_table.gif"; //$NON-NLS-1$
+ String TEMPLATE_LUADOC = "icons/obj16/template_luadoc.png"; //$NON-NLS-1$
}
diff --git a/plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/editor/templates/LuaDocumentorTemplateCompletionProcessor.java b/plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/editor/templates/LuaDocumentorTemplateCompletionProcessor.java
index cba110d..bede968 100644
--- a/plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/editor/templates/LuaDocumentorTemplateCompletionProcessor.java
+++ b/plugins/org.eclipse.koneki.ldt.ui/src/org/eclipse/koneki/ldt/ui/internal/editor/templates/LuaDocumentorTemplateCompletionProcessor.java
@@ -20,6 +20,9 @@ import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.templates.Template;
import org.eclipse.jface.text.templates.TemplateContext;
+import org.eclipse.koneki.ldt.ui.internal.Activator;
+import org.eclipse.koneki.ldt.ui.internal.ImageConstants;
+import org.eclipse.swt.graphics.Image;
/**
* LuaDocumentor template completion processor
@@ -70,4 +73,9 @@ public class LuaDocumentorTemplateCompletionProcessor extends ScriptTemplateComp
protected ICompletionProposal createProposal(Template template, TemplateContext context, IRegion region, int relevance) {
return new LuaDocumentorTemplateProposal(template, context, region, getImage(template), relevance);
}
+
+ @Override
+ protected Image getImage(Template template) {
+ return Activator.getDefault().getImageRegistry().get(ImageConstants.TEMPLATE_LUADOC);
+ }
}