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 #43968] 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.


<!-- Add code template -->
<extension point="org.eclipse.ui.editors.templates">
<template autoinsert="true"
description="TestTag Description"
<testTag style="background: ${color}"></testTag>


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:View source for plugins not in target platform
Next Topic:How do I update an Eclipse template variable at runtime?
Goto Forum:

Current Time: Sat Jul 24 13:34:38 GMT 2021

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

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

Back to the top