import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.Region;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.text.templates.Template;
import org.eclipse.jface.text.templates.TemplateCompletionProcessor;
import org.eclipse.jface.text.templates.TemplateContext;
*/
public class BasicCompletionProcessor extends TemplateCompletionProcessor {
private static final String DEFAULT_IMAGE = "icons/template.gif"; //$NON-NLS-1$
-
+ private char[] fProposalAutoActivationSet;
+// private PHPCompletionProposalComparator fComparator;
+ public BasicCompletionProcessor() {
+ super();
+// fComparator = new PHPCompletionProposalComparator();
+ }
/**
* We watch for angular brackets since those are often part of XML templates.
*/
return (ICompletionProposal[]) matches.toArray(new ICompletionProposal[matches.size()]);
}
+ /**
+ * @see IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
+ */
+ public char[] getCompletionProposalAutoActivationCharacters() {
+ return fProposalAutoActivationSet;
+ }
+
+ /**
+ * Sets this processor's set of characters triggering the activation of the
+ * completion proposal computation.
+ *
+ * @param activationSet the activation set
+ */
+ public void setCompletionProposalAutoActivationCharacters(char[] activationSet) {
+ fProposalAutoActivationSet= activationSet;
+ }
+
+ /**
+ * Order the given proposals.
+ */
+// private ICompletionProposal[] order(ICompletionProposal[] proposals) {
+// Arrays.sort(proposals, fComparator);
+// return proposals;
+// }
+
+ /**
+ * Tells this processor to order the proposals alphabetically.
+ *
+ * @param order <code>true</code> if proposals should be ordered.
+ */
+// public void orderProposalsAlphabetically(boolean order) {
+// fComparator.setOrderAlphabetically(order);
+// }
}
\ No newline at end of file