Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Templates and Template Preferences(Programmatically creating template and editing preferences)
Templates and Template Preferences [message #674539] Fri, 27 May 2011 09:47
Steven Lilley is currently offline Steven LilleyFriend
Messages: 1
Registered: May 2011
Location: UK
Junior Member
Hi all,

Sorry first post so this might be in teh wrong forum.....

New to developing Eclipse plugins so this question will probably be very easy to answer. I have a requirement to create a plugin which automaitcally adds templates to the CodeTemplates library for java projects. I have just about managed that I think but the next problem I am facing is making sure that everytime the eclipse work space is loaded the templates will automatically be used when, for example, creating a new type, method, etc...

I know there is a checkbox on the template preferences page which you can manually check to ensure this happens, but how can I do this programmatically?

How do I get the preferences for the current editor (what is it's name, how do I get it's class instance etc..) and if I get them is it simply a case of changing this value, and is there different pafrent classes (and as such prefereances) for the project-specific settings and global settings.

Also, while I'm on the subject, to get the CodeTemplateStore I am currently using JavaPlugin.getDefault().getCodeTemplateStore() which I am told is Discouraged access in 3.6, so what's the alternative???

Cheers in advance!

[Updated on: Fri, 27 May 2011 09:49]

Report message to a moderator

Previous Topic:Re: Eclipse API comparison tool
Next Topic:Class.forName in plugin developement
Goto Forum:

Current Time: Sun Jul 25 14:09:52 GMT 2021

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

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

Back to the top