1 11 package org.eclipse.jdt.internal.ui.text.javadoc; 12 13 14 import org.eclipse.jface.text.ITextViewer; 15 import org.eclipse.jface.text.contentassist.ContentAssistant; 16 import org.eclipse.jface.text.contentassist.IContentAssistProcessor; 17 import org.eclipse.jface.text.contentassist.IContextInformationValidator; 18 19 import org.eclipse.ui.IEditorPart; 20 21 import org.eclipse.jdt.ui.text.IJavaPartitions; 22 import org.eclipse.jdt.ui.text.java.IJavadocCompletionProcessor; 23 import org.eclipse.jdt.ui.text.java.ContentAssistInvocationContext; 24 25 import org.eclipse.jdt.internal.ui.text.java.JavaCompletionProcessor; 26 27 32 public class JavadocCompletionProcessor extends JavaCompletionProcessor { 33 34 private int fSubProcessorFlags; 35 36 public JavadocCompletionProcessor(IEditorPart editor, ContentAssistant assistant) { 37 super(editor, assistant, IJavaPartitions.JAVA_DOC); 38 fSubProcessorFlags= 0; 39 } 40 41 47 public void restrictProposalsToMatchingCases(boolean restrict) { 48 fSubProcessorFlags= restrict ? IJavadocCompletionProcessor.RESTRICT_TO_MATCHING_CASE : 0; 49 } 50 51 54 public IContextInformationValidator getContextInformationValidator() { 55 return null; 56 } 57 58 61 protected ContentAssistInvocationContext createContext(ITextViewer viewer, int offset) { 62 return new JavadocContentAssistInvocationContext(viewer, offset, fEditor, fSubProcessorFlags); 63 } 64 65 } 66 | Popular Tags |