package org.eclipse.ui.examples.javaeditor.javadoc; | |
/* | |
* (c) Copyright IBM Corp. 2000, 2001. | |
* All Rights Reserved. | |
*/ | |
import org.eclipse.jface.text.ITextViewer; | |
import org.eclipse.jface.text.contentassist.CompletionProposal; | |
import org.eclipse.jface.text.contentassist.ICompletionProposal; | |
import org.eclipse.jface.text.contentassist.IContentAssistProcessor; | |
import org.eclipse.jface.text.contentassist.IContextInformation; | |
import org.eclipse.jface.text.contentassist.IContextInformationValidator; | |
/** | |
* 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; | |
} | |
} |