package org.eclipse.jdt.internal.debug.ui.display; | |
/* | |
* (c) Copyright IBM Corp. 2000, 2001. | |
* All Rights Reserved. | |
*/ | |
import org.eclipse.jdt.internal.debug.ui.JDIContentAssistPreference; | |
import org.eclipse.jdt.internal.ui.JavaPlugin; | |
import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration; | |
import org.eclipse.jface.text.IDocument; | |
import org.eclipse.jface.text.contentassist.ContentAssistant; | |
import org.eclipse.jface.text.contentassist.IContentAssistProcessor; | |
import org.eclipse.jface.text.contentassist.IContentAssistant; | |
import org.eclipse.jface.text.source.ISourceViewer; | |
/** | |
* The source viewer configuration for the Display view | |
*/ | |
public class DisplayViewerConfiguration extends JavaSourceViewerConfiguration { | |
public DisplayViewerConfiguration() { | |
super(JavaPlugin.getDefault().getJavaTextTools(), null); | |
} | |
/** | |
* @see JDIViewerConfiguration#getContentAssistantProcessor() | |
*/ | |
public IContentAssistProcessor getContentAssistantProcessor() { | |
return new DisplayCompletionProcessor(); | |
} | |
/** | |
* @see SourceViewerConfiguration#getContentAssistant(ISourceViewer) | |
*/ | |
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) { | |
ContentAssistant assistant = new ContentAssistant(); | |
assistant.setContentAssistProcessor( | |
getContentAssistantProcessor(), | |
IDocument.DEFAULT_CONTENT_TYPE); | |
JDIContentAssistPreference.configure(assistant, getColorManager()); | |
assistant.setContextInformationPopupOrientation(assistant.CONTEXT_INFO_ABOVE); | |
assistant.setInformationControlCreator( | |
getInformationControlCreator(sourceViewer)); | |
return assistant; | |
} | |
} |