Bug 11257 Java Templates
In the build 1203 i have the following problems: 1> If i edit a template of JAVA like stderr then the dialog that gets opend will display: JAVA_DOC as type. 2> Filecomment and Typecomment are there but empty is this wanted?
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
if (context == null)
			return -1;
			
		return fContextTypes.indexOf(context);
	}
	
	protected void okPressed() {
		fTemplate.setName(fNameText.getText());
		fTemplate.setDescription(fDescriptionText.getText());
		fTemplate.setContext(fContextCombo.getText());
		fTemplate.setPattern(fPatternEditor.getTextWidget().getText());
		
		super.okPressed();
	}
	
	private void updateButtons() {		
		boolean valid= fNameText.getText().trim().length() != 0;
		StatusInfo status= new StatusInfo();
		
		if (!valid) {
			if (fSuppressError)
				status.setError(""); 							
			else
				status.setError(TemplateMessages.getString("EditTemplateDialog.error.noname")); 
 		} else if (fTranslator.getErrorMessage() != null) {
 			status.setError(fTranslator.getErrorMessage());	
		}
		updateStatus(status);
	}
}