|Templates and Template Preferences [message #674539]
||Fri, 27 May 2011 09:47
| Steven Lilley
Registered: May 2011
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
Powered by FUDForum
. Page generated in 0.01949 seconds