blob: ffd4d21956b0a94d71dbec4db1e41cf7e135c9ac [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.ui.examples.javaeditor.javadoc;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.contentassist.*;
/**
* Example Java doc completion processor.
*/
public class JavaDocCompletionProcessor implements IContentAssistProcessor {
protected final static String[] fgProposals= { "@author", "@deprecated", "@exception", "@param", "@return", "@see", "@serial", "@serialData", "@serialField", "@since", "@throws", "@version" }; //$NON-NLS-12$ //$NON-NLS-11$ //$NON-NLS-10$ //$NON-NLS-7$ //$NON-NLS-9$ //$NON-NLS-8$ //$NON-NLS-6$ //$NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
/* (non-Javadoc)
* Method declared on IContentAssistProcessor
*/
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {
ICompletionProposal[] result= new ICompletionProposal[fgProposals.length];
for (int i= 0; i < fgProposals.length; i++)
result[i]= new CompletionProposal(fgProposals[i], documentOffset, 0, fgProposals[i].length());
return result;
}
/* (non-Javadoc)
* Method declared on IContentAssistProcessor
*/
public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset) {
return null;
}
/* (non-Javadoc)
* Method declared on IContentAssistProcessor
*/
public char[] getCompletionProposalAutoActivationCharacters() {
return null;
}
/* (non-Javadoc)
* Method declared on IContentAssistProcessor
*/
public char[] getContextInformationAutoActivationCharacters() {
return null;
}
/* (non-Javadoc)
* Method declared on IContentAssistProcessor
*/
public IContextInformationValidator getContextInformationValidator() {
return null;
}
/* (non-Javadoc)
* Method declared on IContentAssistProcessor
*/
public String getErrorMessage() {
return null;
}
}