From e6e9eda16748859ee2a3607d56a06b817d95ab44 Mon Sep 17 00:00:00 2001 From: Anton Leherbauer Date: Wed, 4 Feb 2009 07:43:01 +0000 Subject: [PATCH] Restore deprecated ICompletionContributor --- .../contentassist/ICompletionContributor.java | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/contentassist/ICompletionContributor.java diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/contentassist/ICompletionContributor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/contentassist/ICompletionContributor.java new file mode 100644 index 00000000000..2b9b13b6d69 --- /dev/null +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/contentassist/ICompletionContributor.java @@ -0,0 +1,48 @@ +/******************************************************************************* + * Copyright (c) 2004, 2008 IBM Corporation and others. + * 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: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.cdt.ui.text.contentassist; + +import java.util.List; + +import org.eclipse.jface.text.ITextViewer; + +import org.eclipse.cdt.core.dom.ast.ASTCompletionNode; +import org.eclipse.cdt.core.model.IWorkingCopy; + +/** + * This interface must be implemented by clients extending the extension point + * org.eclipse.cdt.core.completionContributors. + * + * @deprecated Clients should extend the new extension point + * completionProprosalComputer and implement interface + * {@link ICompletionProposalComputer} + */ +@Deprecated +public interface ICompletionContributor { + + /** + * This method allows the contributor to add to the list of proposals + * + * @param viewer the text viewer where completion is occuring + * @param offset the offset into the text where the completion is occuring + * @param completionNode the completion node produced by the parser for the offset + * @param proposals the current list of proposals. This method should add any additional + * proposals to this list. + */ + @SuppressWarnings("unchecked") // no need to change, it's deprecated + void contributeCompletionProposals(ITextViewer viewer, + int offset, + IWorkingCopy workingCopy, + ASTCompletionNode completionNode, + String prefix, + List proposals); + +}