Bug 45517 Add a 'Field comment' code template
20031024 The user should be able to specify a 'field comment' template. See 'CodeTemplateContextType.TYPE_COMMENT' as an example You have to - define a new variable type - specify the variables avaiable in this template - create an API in Codetemplates so it can be used Users are: - AddJavadocCommentAction - JavadocTagsSubProcessor.getMissingJavadocCommentProposals
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeTemplateBlock.java
fTemplates.reset();			
		} catch (CoreException e) {
			openReadErrorDialog(e);
		}
	}
	
	private void openReadErrorDialog(CoreException e) {
		String title= PreferencesMessages.getString("CodeTemplateBlock.error.read.title"); 
		
		
		if (e.getStatus().getCode() == IJavaStatusConstants.TEMPLATE_PARSE_EXCEPTION) {
			String message= e.getStatus().getException().getLocalizedMessage();
			if (message != null)
				message= PreferencesMessages.getFormattedString("CodeTemplateBlock.error.parse.message", message); 
			else
				message= PreferencesMessages.getString("CodeTemplateBlock.error.read.message"); 
			MessageDialog.openError(getShell(), title, message);
		} else {
			String message= PreferencesMessages.getString("CodeTemplateBlock.error.read.message"); 
			ExceptionHandler.handle(e, getShell(), title, message);		
		}
	}
	
	private void openWriteErrorDialog(CoreException e) {
		String title= PreferencesMessages.getString("CodeTemplateBlock.error.write.title"); 
		String message= PreferencesMessages.getString("CodeTemplateBlock.error.write.message"); 
		ExceptionHandler.handle(e, getShell(), title, message);	
	}	
}