Bug 109513 Project Specific Code Templates are not persisted across sessions
I tried changing the Code templates for a project. I enabled "Project Specific Settings" and changed the method template. It worked for that session, but if I closed Eclipse and opened it again the settings were restored to Workspace settings. I would of expected the project specific settings to be stored in the .settings directory of the project so that they can be persisted and sent to CVS. This is important to us because we do combined open source and commercial development based upon the opensource in the same workspace. The two different types of plugins require different license/copyrights at the head of new java files. We were going to use this capability of project specific template to prevent accidentally having the wrong copyright on the wrong class.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProjectTemplateStore.java
public void add(TemplatePersistenceData data) {
					internalAdd(data);
				}
				
				public void save() throws IOException {
					
					StringWriter output= new StringWriter();
					TemplateReaderWriter writer= new TemplateReaderWriter();
					writer.save(getTemplateData(false), output);
					
					projectSettings.setValue(KEY, output.toString());
				}
			};
		}
	}
	
	public static boolean hasProjectSpecificTempates(IProject project) {
		String pref= new ProjectScope(project).getNode(JavaUI.ID_PLUGIN).get(KEY, null);
		if (pref != null && pref.trim().length() > 0) {
			Reader input= new StringReader(pref);
			TemplateReaderWriter reader= new TemplateReaderWriter();
			TemplatePersistenceData[] datas;
			try {
				datas= reader.read(input);
				return datas.length > 0;
			} catch (IOException e) {
				
			}
		}
		return false;