1 11 package org.eclipse.jdt.internal.ui.text.java; 12 13 import java.util.Arrays ; 14 import java.util.List ; 15 16 import org.eclipse.core.runtime.IProgressMonitor; 17 18 import org.eclipse.ui.texteditor.HippieProposalProcessor; 19 20 import org.eclipse.jdt.ui.text.java.ContentAssistInvocationContext; 21 import org.eclipse.jdt.ui.text.java.IJavaCompletionProposalComputer; 22 23 24 29 public final class HippieProposalComputer implements IJavaCompletionProposalComputer { 30 31 private final HippieProposalProcessor fProcessor= new HippieProposalProcessor(); 32 33 36 public HippieProposalComputer() { 37 } 38 39 42 public List computeCompletionProposals(ContentAssistInvocationContext context, IProgressMonitor monitor) { 43 return Arrays.asList(fProcessor.computeCompletionProposals(context.getViewer(), context.getInvocationOffset())); 44 } 45 46 49 public List computeContextInformation(ContentAssistInvocationContext context, IProgressMonitor monitor) { 50 return Arrays.asList(fProcessor.computeContextInformation(context.getViewer(), context.getInvocationOffset())); 51 } 52 53 56 public String getErrorMessage() { 57 return fProcessor.getErrorMessage(); 58 } 59 60 63 public void sessionStarted() { 64 } 65 66 69 public void sessionEnded() { 70 } 71 } 72 | Popular Tags |