/******************************************************************************* * Copyright (c) 2005, 2007 Spring IDE Developers * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Spring IDE Developers - initial API and implementation *******************************************************************************/ package org.springframework.ide.eclipse.beans.ui.editor.templates; import org.eclipse.jface.text.IRegion; import org.eclipse.jface.text.templates.Template; import org.eclipse.jface.text.templates.TemplateContext; import org.eclipse.jface.text.templates.TemplateProposal; import org.eclipse.swt.graphics.Image; import org.eclipse.wst.sse.ui.internal.contentassist.IRelevanceCompletionProposal; import org.springframework.ide.eclipse.beans.ui.editor.util.BeansEditorUtils; /** * Purpose of this class is to make the additional proposal info into content * fit for an HTML viewer (by escaping characters) * @author Christian Dupuis * @author Torsten Juergeleit */ @SuppressWarnings("restriction") public class BeansCustomTemplateProposal extends TemplateProposal implements IRelevanceCompletionProposal { public BeansCustomTemplateProposal(Template template, TemplateContext context, IRegion region, Image image, int relevance) { super(template, context, region, image, relevance); } @Override public String getAdditionalProposalInfo() { String additionalInfo = super.getAdditionalProposalInfo(); return BeansEditorUtils.convertToHTMLContent(additionalInfo); } }