Bug 65284 [preferences][templates] importing template preferences does not update the template store
RC1 Importing preferences may change the custom (code) templates. However, the TemplateStore instance storing the templates for the Java editor does not update itself. Steps to reproduce: - import a preferences file with custom template for the file comment - create a new class -> the old file comment is used Solution is to create a IPropertyChangeListener in JavaPlugin and reload the (Code)TemplateStore upon a preference change.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPlugin.java
ICompilationUnit original= workingCopy.getPrimary();
				IResource resource= original.getResource();
				if (resource instanceof IFile)
					return new DocumentAdapter(workingCopy, (IFile) resource);
				return DocumentAdapter.NULL;
			}
		});
		ensurePreferenceStoreBackwardsCompatibility();
		
		getASTProvider();
		new InitializeAfterLoadJob().schedule();
	}
	 static void initializeAfterLoad(IProgressMonitor monitor) {
		OpenTypeHistory.getInstance().checkConsistency(monitor);
	}
	
	
	private static IPreferenceStore getDeprecatedWorkbenchPreferenceStore() {
		return PlatformUI.getWorkbench().getPreferenceStore();
	}
	
	
	private String DEPRECATED_EDITOR_TAB_WIDTH= PreferenceConstants.EDITOR_TAB_WIDTH;
	
	
	private String DEPRECATED_REFACTOR_ERROR_PAGE_SEVERITY_THRESHOLD= PreferenceConstants.REFACTOR_ERROR_PAGE_SEVERITY_THRESHOLD;
	
	/**
	 * Installs backwards compatibility for the preference store.
	 */