blob: ee2fb49662a1b9aa572a0d639c1cbb1d50bb61cc [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.internal.debug.ui.display;
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(ContentAssistant.CONTEXT_INFO_ABOVE);
assistant.setInformationControlCreator(
getInformationControlCreator(sourceViewer));
return assistant;
}
}