How can I access the IDEA Settings?

Hello,

is it possible to access the Settings of the IDE? I want to get the FileHeader from File and Code Templates. 

regards

Chris

0
2 comments

Try 

FileTemplate defaultTemplate = FileTemplateManager.getInstance(project).getDefaultTemplate(FileTemplateManager.FILE_HEADER_TEMPLATE_NAME);
1

Hello, this was helpfull but with:

FileTemplate defaultTemplate = FileTemplateManager.getInstance(project).getDefaultTemplate(FileTemplateManager.FILE_HEADER_TEMPLATE_NAME);

you get a null for myText. But with:

FileTemplate fileTemplate = FileTemplateManager.getInstance(project).getPattern(FileTemplateManager.FILE_HEADER_TEMPLATE_NAME);

you get the Content of FileHeader.

This is a little bit weird.

 

0

Please sign in to leave a comment.