2 * Created on 25.08.2004
4 * TODO To change the template for this generated file go to
5 * Window - Preferences - Java - Code Style - Code Templates
7 package net.sourceforge.phpeclipse.html.ui.internal.text;
9 import net.sourceforge.phpeclipse.xml.ui.internal.text.XMLConfiguration;
10 import net.sourceforge.phpeclipse.xml.ui.internal.text.XMLPartitionScanner;
11 import net.sourceforge.phpeclipse.xml.ui.text.XMLTextTools;
13 import org.eclipse.jface.text.IDocument;
14 import org.eclipse.jface.text.contentassist.ContentAssistant;
15 import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
16 import org.eclipse.jface.text.contentassist.IContentAssistant;
17 import org.eclipse.jface.text.source.ISourceViewer;
18 import org.eclipse.ui.texteditor.ITextEditor;
23 * TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates
25 public class HTMLConfiguration extends XMLConfiguration {
26 public HTMLConfiguration(XMLTextTools tools) {
30 public HTMLConfiguration(XMLTextTools tools, ITextEditor editor) {
34 public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
35 ContentAssistant assistant = new ContentAssistant();
36 assistant.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
38 IContentAssistProcessor processor = new HTMLCompletionProcessor();
39 assistant.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
40 assistant.setContentAssistProcessor(processor, XMLPartitionScanner.XML_TAG);
41 assistant.setContentAssistProcessor(processor, XMLPartitionScanner.XML_PI);
42 assistant.setContentAssistProcessor(processor, XMLPartitionScanner.XML_COMMENT);
43 assistant.setContentAssistProcessor(processor, XMLPartitionScanner.XML_DECL);
44 assistant.setContentAssistProcessor(processor, XMLPartitionScanner.XML_TAG);
45 assistant.setContentAssistProcessor(processor, XMLPartitionScanner.XML_ATTRIBUTE);
46 assistant.setContentAssistProcessor(processor, XMLPartitionScanner.XML_CDATA);
48 assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
49 assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));