Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How do I update an Eclipse template variable at runtime?
How do I update an Eclipse template variable at runtime? [message #591082] Mon, 02 February 2009 23:28
Debajit Adhikary is currently offline Debajit AdhikaryFriend
Messages: 8
Registered: July 2009
Junior Member
I've added the following new Eclipse template via extension point. It
simply adds a template for a sample testTag tag.

<code>

<!-- Add code template -->
<extension point="org.eclipse.ui.editors.templates">
<template autoinsert="true"
contextTypeId="html_tag"
description="TestTag Description"
id="org.eclipse.jst.jsf.ui.newHtmltag"
name="testTag">
<pattern>
<![CDATA[
<testTag style="background: ${color}"></testTag>
]]>
</pattern>
</template>
<resolver
contextTypeId="html_tag"
type="src"
lass="TestTagTemplateVariableResolver">
</resolver>
</extension>

</code>

What I'd cannot figure out is how to change the value of the $(color)
variable at runtime. More specifically, when the user presses Ctrl+Space
(or the equivalent for content-assist) and types in "testTag" and presses
Enter -- instead of the "color" placeholder text, I'd like it replaced by
some other text value I have in another class. How do I do this?
Previous Topic:How do I update an Eclipse template variable at runtime?
Next Topic:Providing Images
Goto Forum:
  


Current Time: Tue Mar 19 11:38:18 GMT 2024

Powered by FUDForum. Page generated in 0.02115 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top