Skip to main content



      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 05:47
Eclipse UserFriend
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 05:49] by Moderator

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


Current Time: Sat Jul 05 03:21:54 EDT 2025

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

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

Back to the top