private void format(TemplateBuffer templateBuffer) throws CoreException {
private void format(TemplateBuffer templateBuffer, JavaContext context) throws CoreException {
	private void format(TemplateBuffer templateBuffer) throws CoreException {		// XXX 4360, 15247		// workaround for code formatter limitations		// handle a special case where cursor position is surrounded by whitespaces				String string= templateBuffer.getString();		TemplatePosition[] variables= templateBuffer.getVariables();		int caretOffset= getCaretOffset(variables);		if ((caretOffset > 0) && Character.isWhitespace(string.charAt(caretOffset - 1)) &&			(caretOffset < string.length()) && Character.isWhitespace(string.charAt(caretOffset)) &&			! isInsideCommentOrString(string, caretOffset))		{			List positions= variablesToPositions(variables);		    TextEdit insert= new InsertEdit(caretOffset, MARKER);		    string= edit(string, positions, insert);			positionsToVariables(positions, variables);		    templateBuffer.setContent(string, variables);			plainFormat(templateBuffer);						string= templateBuffer.getString();			variables= templateBuffer.getVariables();			caretOffset= getCaretOffset(variables);			positions= variablesToPositions(variables);			TextEdit delete= new DeleteEdit(caretOffset, MARKER.length());		    string= edit(string, positions, delete);			positionsToVariables(positions, variables);		    		    templateBuffer.setContent(string, variables);			} else {			plainFormat(templateBuffer);					}	    	}