true
iff assist node is inside an annotation.
+ */
+public boolean isCompletionInsideAnnotation(){
+ if( this.completionElementKindStack == null ) return false;
+ int i = this.completionElementKindStack.length - 1;
+ while( i > -1 ){
+ if(completionElementKindStack[i] == K_BETWEEN_ANNOTATION_NAME_AND_RPAREN)
+ return true;
+ i--;
+ }
+ return false;
+
+}
protected boolean isIndirectlyInsideBlock(){
int i = elementPtr;
while(i > -1) {
@@ -3343,6 +3414,7 @@
this.assistNode = fr;
this.lastCheckPoint = fr.sourceEnd + 1;
identifierLengthPtr--;
+ populateCompletionElementKind();
if (isSuperAccess) { //considerates the fieldReference beginning at the 'super' ....
fr.sourceStart = intStack[intPtr--];
fr.receiver = new SuperReference(fr.sourceStart, endPosition);
@@ -3365,6 +3437,7 @@
/* generate a pseudo field with a completion on type reference */
currentElement.add(
new CompletionOnFieldType(this.getTypeReference(0), false), 0);
+ populateCompletionElementKind();
return;
}
if (!diet) return; // only record references attached to types
@@ -3537,6 +3610,7 @@
CompletionOnLocalName local = new CompletionOnLocalName(assistName, sourceStart, sourceEnd);
this.assistNode = local;
this.lastCheckPoint = sourceEnd + 1;
+ populateCompletionElementKind();
return local;
}
}
@@ -3548,7 +3622,21 @@
CompletionOnFieldName field = new CompletionOnFieldName(assistName, sourceStart, sourceEnd);
this.assistNode = field;
this.lastCheckPoint = sourceEnd + 1;
+ populateCompletionElementKind();
return field;
}
}
+
+/**
+ * Record the element kind stack when we first hit the completion
+ * site.
+ */
+private void populateCompletionElementKind()
+{
+ if(this.completionElementKindStack == null && elementPtr >= 0){
+ int len = elementPtr + 1;
+ this.completionElementKindStack = new int[len];
+ System.arraycopy(this.elementKindStack, 0, this.completionElementKindStack, 0, len);
+ }
+}
}
Index: compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java
===================================================================
RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java,v
retrieving revision 1.37.2.3
diff -u -r1.37.2.3 Annotation.java
--- compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java 3 Jun 2005 08:25:44 -0000 1.37.2.3
+++ compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java 2 Aug 2005 01:43:15 -0000
@@ -380,6 +380,8 @@
public SourceAnnotation getCompilerAnnotation()
{
+ if( this.compilerAnnotation == null && this.resolvedType != null )
+ this.compilerAnnotation = new SourceAnnotation(this);
return this.compilerAnnotation;
}
Index: dom/org/eclipse/jdt/core/dom/ASTConverter.java
===================================================================
RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java,v
retrieving revision 1.202.2.3
diff -u -r1.202.2.3 ASTConverter.java
--- dom/org/eclipse/jdt/core/dom/ASTConverter.java 1 Jul 2005 17:57:49 -0000 1.202.2.3
+++ dom/org/eclipse/jdt/core/dom/ASTConverter.java 2 Aug 2005 01:43:17 -0000
@@ -1432,6 +1432,8 @@
}
public Expression convert(org.eclipse.jdt.internal.compiler.ast.Expression expression) {
+ if(expression == null)
+ return null;
if ((expression.bits & org.eclipse.jdt.internal.compiler.ast.ASTNode.ParenthesizedMASK) != 0) {
return convertToParenthesizedExpression(expression);
}
@@ -4669,7 +4671,8 @@
int end = (int)(positions[0] & 0xFFFFFFFF);
firstToken.setSourceRange(start, end - start + 1);
final SimpleName secondToken = new SimpleName(this.ast);
- secondToken.internalSetIdentifier(new String(typeName[1]));
+ final String secondID = length > 1 ? new String(typeName[1]) : ""; //$NON-NLS-1$
+ secondToken.internalSetIdentifier(secondID);
secondToken.index = 2;
start = (int)(positions[1]>>>32);
end = (int)(positions[1] & 0xFFFFFFFF);
Index: dom/org/eclipse/jdt/core/dom/ResolvedAnnotation.java
===================================================================
RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Attic/ResolvedAnnotation.java,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 ResolvedAnnotation.java
--- dom/org/eclipse/jdt/core/dom/ResolvedAnnotation.java 12 May 2005 11:01:56 -0000 1.1.2.2
+++ dom/org/eclipse/jdt/core/dom/ResolvedAnnotation.java 2 Aug 2005 01:43:17 -0000
@@ -42,7 +42,10 @@
public ITypeBinding getAnnotationType() {
final ITypeBinding binding =
this.bindingResolver.getTypeBinding(this.internalAnnotation.getAnnotationType());
- return binding.isAnnotation() ? binding : null;
+ if( binding == null || !binding.isAnnotation() )
+ return null;
+ else
+ return binding;
}
public IResolvedMemberValuePair[] getDeclaredMemberValuePairs() {
Index: model/org/eclipse/jdt/core/JavaCore.java
===================================================================
RCS file: /home/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java,v
retrieving revision 1.450.2.6
diff -u -r1.450.2.6 JavaCore.java
--- model/org/eclipse/jdt/core/JavaCore.java 1 Jul 2005 17:57:50 -0000 1.450.2.6
+++ model/org/eclipse/jdt/core/JavaCore.java 2 Aug 2005 01:43:18 -0000
@@ -65,6 +65,7 @@
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jdt.core.compiler.ICompilationParticipant;
+import org.eclipse.jdt.core.completion.ICompletionParticipant;
import org.eclipse.jdt.core.search.IJavaSearchConstants;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.core.search.SearchEngine;
@@ -1040,6 +1041,17 @@
public static void addCompilationParticipant(ICompilationParticipant icp, int eventMask) {
JavaModelManager.getJavaModelManager().getCompilationParticipants().add(icp, eventMask);
}
+
+ /**
+ * Add a completion participant listener dynamically. It is not necessary
+ * to call this for listeners registered with the completionParticipant
+ * extension point.
+ *
+ * @param icp the listener
+ */
+ public static void addCompletionParticipant(ICompletionParticipant icp) {
+ JavaModelManager.getJavaModelManager().getCompletionParticipantManager().add(icp);
+ }
/**
* Adds the given listener for changes to Java elements.
@@ -1576,6 +1588,12 @@
return JavaModelManager.getJavaModelManager().getCompilationParticipants().getCompilationParticipants(eventMask, project);
}
+ public static List getCompletionParticipants(final IJavaProject project ){
+ return JavaModelManager.getJavaModelManager().getCompletionParticipantManager().getCompletionParticipants(project);
+ }
+
+
+
/**
* Returns a table of all known configurable options with their default values.
* These options allow to configure the behaviour of the underlying components.
@@ -3707,6 +3725,17 @@
public static void removeCompilationParticipant(ICompilationParticipant icp) {
JavaModelManager.getJavaModelManager().getCompilationParticipants().remove(icp);
}
+
+ /**
+ * Removes the specified completion participant listener. Has no effect
+ * if the listener was not on the list, or if it was registered via the
+ * compilationParticipant extension point rather than a call to
+ * addCompilationParticipant.
+ * @param icp the listener to remove
+ */
+ public static void removeCompletionParticipant(ICompletionParticipant icp) {
+ JavaModelManager.getJavaModelManager().getCompletionParticipantManager().remove(icp);
+ }
/**
* Removes the given element changed listener.
Index: model/org/eclipse/jdt/internal/core/JavaModelManager.java
===================================================================
RCS file: /home/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java,v
retrieving revision 1.256.2.5
diff -u -r1.256.2.5 JavaModelManager.java
--- model/org/eclipse/jdt/internal/core/JavaModelManager.java 1 Jul 2005 17:57:49 -0000 1.256.2.5
+++ model/org/eclipse/jdt/internal/core/JavaModelManager.java 2 Aug 2005 01:43:20 -0000
@@ -29,6 +29,7 @@
import org.eclipse.jdt.core.compiler.CharOperation;
import org.eclipse.jdt.core.compiler.ICompilationParticipant;
import org.eclipse.jdt.core.compiler.IProblem;
+import org.eclipse.jdt.core.completion.ICompletionParticipant;
import org.eclipse.jdt.internal.codeassist.CompletionEngine;
import org.eclipse.jdt.internal.codeassist.SelectionEngine;
import org.eclipse.jdt.internal.compiler.Compiler;
@@ -125,6 +126,11 @@
public static final String COMPILATION_PARTICIPANT_EXTPOINT_ID = "compilationParticipant" ; //$NON-NLS-1$
/**
+ * Name of the extension point for contributing a completion participant
+ */
+ public static final String COMPLETION_PARTICIPANT_EXTPOINT_ID = "completionParticipant" ; //$NON-NLS-1$
+
+ /**
* Value of the content-type for Java source files
*/
public static final String JAVA_SOURCE_CONTENT_TYPE = JavaCore.PLUGIN_ID+".javaSource" ; //$NON-NLS-1$
@@ -296,8 +302,108 @@
}
}
+ public class CompletionParticipantManager {
+ /** Set
+ * The initialization of ICompletionParticipant
s is synchronized. A deadlock may
+ * occur if all of the following conditions are true:
+ *
+ *
ICompletionParticipant
start()
method spawns a thread which causes
+ * getCompletionParticipants()
to be invokedstart()
method blocks waiting for the spawned thread to complete.getCompletionParticpants()
to
+ * be called.
+ *
+ * @return an immutable List
of ICompletionParticipants.
+ */
+ public List getCompletionParticipants(final IJavaProject project) {
+ initPlugins();
+ List filteredICPs = new ArrayList();
+
+ synchronized(this) {
+ for(Iterator it = dynamicCPs.iterator(); it.hasNext(); ){
+ ICompletionParticipant participant = (ICompletionParticipant)it.next();
+ if( participant.doesParticipateInProject(project))
+ filteredICPs.add(participant);
+ }
+ }
+
+ for(Iterator it = pluginCPs.iterator(); it.hasNext(); ){
+ ICompletionParticipant participant = (ICompletionParticipant)it.next();
+ if( participant.doesParticipateInProject(project))
+ filteredICPs.add(participant);
+ }
+
+ return Collections.unmodifiableList(filteredICPs);
+ }
+
+ private synchronized void initPlugins() {
+ if (null != pluginCPs) {
+ return;
+ }
+ pluginCPs = new HashSet();
+
+ IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(
+ JavaCore.PLUGIN_ID, COMPLETION_PARTICIPANT_EXTPOINT_ID);
+ if (extension == null)
+ return;
+ IExtension[] extensions = extension.getExtensions();
+ for(int iExtension = 0; iExtension < extensions.length; iExtension++){
+ // for all extensions of this point...
+ for(int i = 0; i < extensions.length; i++){
+ IConfigurationElement [] configElements = extensions[i].getConfigurationElements();
+ // for all config elements named "compilationParticipant"
+ for(int j = 0; j < configElements.length; j++){
+ String elementName = configElements[j].getName();
+ if (!(COMPLETION_PARTICIPANT_EXTPOINT_ID.equals(elementName))) { //$NON-NLS-1$ - name of configElement
+ continue;
+ }
+ try{
+ Object execExt = configElements[j].createExecutableExtension("class"); //$NON-NLS-1$ - attribute class
+ pluginCPs.add(execExt);
+ }
+ catch(CoreException e) {
+ // TODO: what is the right way to handle exceptions?
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+ }
+ }
+
private final CompilationParticipants compilationParticipants = new CompilationParticipants();
+ private final CompletionParticipantManager completionParticipants = new CompletionParticipantManager();
+
/**
* Returns whether the given full path (for a package) conflicts with the output location
* of the given project.
@@ -1171,6 +1277,10 @@
public CompilationParticipants getCompilationParticipants() {
return compilationParticipants;
}
+
+ public CompletionParticipantManager getCompletionParticipantManager() {
+ return completionParticipants;
+ }
public DeltaProcessor getDeltaProcessor() {
return this.deltaState.getDeltaProcessor();
Index: codeassist/org/eclipse/jdt/internal/codeassist/JavaCompletionEvent.java
===================================================================
RCS file: codeassist/org/eclipse/jdt/internal/codeassist/JavaCompletionEvent.java
diff -N codeassist/org/eclipse/jdt/internal/codeassist/JavaCompletionEvent.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ codeassist/org/eclipse/jdt/internal/codeassist/JavaCompletionEvent.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,412 @@
+/*******************************************************************************
+ * Copyright (c) 2005 BEA Systems, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * tyeung@bea.com - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.codeassist;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jdt.core.CompletionProposal;
+import org.eclipse.jdt.core.CompletionRequestor;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.completion.ICompletionEvent;
+import org.eclipse.jdt.core.completion.ICompletionParticipant;
+import org.eclipse.jdt.internal.codeassist.complete.CompletionOnFieldType;
+import org.eclipse.jdt.internal.codeassist.complete.CompletionOnMarkerAnnotationName;
+import org.eclipse.jdt.internal.codeassist.complete.CompletionOnMethodReturnType;
+import org.eclipse.jdt.internal.compiler.ast.ASTNode;
+import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
+import org.eclipse.jdt.internal.compiler.env.ICompilationUnit;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+
+class JavaCompletionEvent implements ICompletionEvent
+{
+ /**
+ * @param unit
+ * @param completionNode the node where code completion occurs
+ * @return the completion event or null if it cannot be created.
+ */
+ static JavaCompletionEvent createCompletionEvent(final CompilationUnitDeclaration unit,
+ final ICompilationUnit workingCopy,
+ final ASTNode completionNode,
+ final CompilerOptions compilerOptions,
+ final char[] source,
+ final int actualCompletionPosition,
+ final IJavaProject javaProj,
+ final CompletionRequestor requestor)
+ {
+ if( unit == null || completionNode == null ||
+ !(workingCopy instanceof org.eclipse.jdt.internal.core.CompilationUnit))
+ return null;
+ final org.eclipse.jdt.internal.core.CompilationUnit internalUnit =
+ (org.eclipse.jdt.internal.core.CompilationUnit)workingCopy;
+ final org.eclipse.jdt.core.dom.CompilationUnit domUnit =
+ convert2Dom(source, unit, internalUnit, compilerOptions);
+
+ final ASTNode tightCompletionNode =
+ getTighterNodeForCompletion(completionNode);
+
+ final org.eclipse.jdt.core.dom.ASTNode domNode = findNodeByOffset(domUnit, actualCompletionPosition + 1);
+
+ return new JavaCompletionEvent(tightCompletionNode, actualCompletionPosition + 1,
+ domNode, (IFile)internalUnit.getResource(),
+ javaProj, requestor);
+ }
+
+ private final IFile ifile;
+ private final org.eclipse.jdt.core.dom.ASTNode domASTNode;
+ protected List filters = null;
+ private final CompletionRequestor requestor;
+ private final IJavaProject javaProj;
+ private final int actualCompletionPosition;
+
+
+ private JavaCompletionEvent(ASTNode internalNode,
+ int actualCompletionPosition,
+ org.eclipse.jdt.core.dom.ASTNode domNode,
+ IFile ifile,
+ IJavaProject proj,
+ CompletionRequestor requestor)
+ {
+ if( domNode == null )
+ throw new IllegalArgumentException("domNode cannot be null"); //$NON-NLS-1$
+ this.domASTNode = domNode;
+ this.ifile = ifile;
+ this.actualCompletionPosition = actualCompletionPosition;
+ this.javaProj = proj;
+ this.requestor = requestor;
+ }
+
+ public IFile getIFile()
+ {
+ return ifile;
+ }
+
+ public int getCompletionOffset()
+ {
+ return this.actualCompletionPosition;
+ }
+
+ public IJavaProject getJavaProject(){
+ return this.javaProj;
+ }
+
+ public org.eclipse.jdt.core.dom.ASTNode getRecoveredASTNode(){
+ return domASTNode;
+ }
+
+ public boolean ignore(int proposalType){
+ return this.requestor.isIgnored(proposalType);
+ }
+
+ public void accept(CompletionProposal proposal){
+ if( proposal == null || ignore(proposal.getKind()) ) return;
+ //noProposal = false;
+ this.requestor.accept(proposal);
+ }
+
+ protected void addFilter(ICompletionParticipant.ICompletionFilter filter){
+ if( filter == null ) return;
+ if( filters == null )
+ filters = new ArrayList(4);
+ filters.add(filter);
+ }
+
+ private static ASTNode getTighterNodeForCompletion(final ASTNode astNode )
+ {
+ ASTNode result = astNode;
+ if (astNode instanceof CompletionOnFieldType) {
+ CompletionOnFieldType field = (CompletionOnFieldType) astNode;
+ result = field.type;
+ }
+ else if( astNode instanceof CompletionOnMethodReturnType ){
+ CompletionOnMethodReturnType method = (CompletionOnMethodReturnType) astNode;
+ result = method.returnType;
+ }
+ else if(astNode instanceof CompletionOnMarkerAnnotationName) {
+ CompletionOnMarkerAnnotationName annot = (CompletionOnMarkerAnnotationName) astNode;
+ result = annot.type;
+ }
+ return result;
+ }
+
+ private static org.eclipse.jdt.core.dom.CompilationUnit convert2Dom(
+ final char[] source,
+ final CompilationUnitDeclaration unit,
+ final org.eclipse.jdt.internal.core.CompilationUnit workingCopy,
+ final CompilerOptions compilerOptions){
+
+ return org.eclipse.jdt.core.dom.AST.convertCompilationUnit(
+ org.eclipse.jdt.core.dom.AST.JLS3, unit, source,
+ compilerOptions.getMap(),
+ true, workingCopy, null);
+ }
+
+ private static org.eclipse.jdt.core.dom.ASTNode findNodeByOffset(
+ final org.eclipse.jdt.core.dom.ASTNode node,
+ final int target)
+ {
+ final int nodeStart = node.getStartPosition();
+ final int nodeEnd = nodeStart + node.getLength();
+
+ // 'node' is a possible best match
+ if( nodeStart <= target && nodeEnd >= target) {
+
+ List children = getChildren(node);
+ for( int i=0, len = children.size(); iICompletionParticipant
should use this
+ * as a reference but not a definite answer.
+ *
+ * @return the ast node where completion is requested.
+ */
+ ASTNode getRecoveredASTNode();
+
+ /**
+ * @return the offset where completion is requested.
+ */
+ int getCompletionOffset();
+
+ /**
+ * Used by clients to determine the type of completion requested.
+ * Clients should only propose completions whose type is not
+ * ignored. i.e. When this method is invoked on the proposal's type, it
+ * should always return true
+ *
+ * @param proposalType one of CompletionProposal
+ * @return true
iff the given type of completion proposal is
+ * required. Return false
+ */
+ boolean ignore(int proposalType);
+
+ /**
+ * Reporting a completion proposal. The type of the proposal
+ * should not be one of those ignored type. If so, the proposal
+ * will simply be dropped.
+ *
+ * @param propsoal the proposed completion.
+ * @see #ignore(int)
+ */
+ void accept(CompletionProposal propsoal);
+}
Index: model/org/eclipse/jdt/core/completion/ICompletionParticipant.java
===================================================================
RCS file: model/org/eclipse/jdt/core/completion/ICompletionParticipant.java
diff -N model/org/eclipse/jdt/core/completion/ICompletionParticipant.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ model/org/eclipse/jdt/core/completion/ICompletionParticipant.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2005 BEA Systems, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * tyeung@bea.com - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.completion;
+
+import org.eclipse.jdt.core.CompletionProposal;
+import org.eclipse.jdt.core.IJavaProject;
+
+/**
+ * Interface to be implemented by client that wants to participate in the
+ * code completion process. All registered participants will be consulted
+ * for completion proposal when code assist is requested. Participants will
+ * also be given a chance to filter out jdt proposed completions.
+ *
+ * Completion participants are registered through the extension point
+ * "org.eclipse.jdt.core.completionParticipant".
+ */
+public interface ICompletionParticipant {
+
+ /**
+ * Indicate participant is interested in all completion events.
+ */
+ public static final int COMPLETION_ALL = 0xFFFF ;
+ /**
+ * Indicate participant is interested only in completion inside annotation.
+ */
+ public static final int COMPLETION_INSIDE_ANNOTATION = 0x01;
+
+
+ /**
+ * During completion, this method is called on the completion
+ * participant to discover if it is interested in this project.+ * + * For efficiency, participants that are not interested in a + * given project should return false for that project.
+ */
+ public boolean doesParticipateInProject( IJavaProject project );
+
+ /**
+ * During completion, this method is called on the completion participant
+ * to discover the type of completion event that it is interested to
+ * participate.
+ *
+ * The return value should be the logical OR of one or all of the constants
+ * defined above.
+ * {@link #complete(ICompletionEvent) } and {@link #getCompletionFilter(ICompletionEvent)}
+ * will only be invoked if this call returns a value that matches the completion event
+ * that are to occur.
+ *
+ * @return the logical OR of event mask that it is interested to participate.
+ */
+ public int getSupportedEventMask();
+
+ /**
+ * Called when completion are requested and participant has expressed
+ * interest in the event.
+ * This method is guaranteed to be called only once per
+ * completion event that it participates in.
+ * Participants will be asked to filter jdt compiler proposals first
+ * before given a chance to proposal completions of their own.
+ *
+ * @param event the completion event
+ * @see #getCompletionFilter(ICompletionEvent)
+ * @see #getSupportedEventMask()
+ * @see #doesParticipateInProject(IJavaProject)
+ */
+ void complete(ICompletionEvent event);
+
+ /**
+ * Allow participant to filter out completion proposal generated by the jdt compiler.
+ * If null
is returned all completion proposals generated by
+ * the jdt compiler will be included in the final list of proposal iff
+ * accepted.
+ *
+ * This method is guaranteed to be called only once per completion event
+ * that it participates in. And the same completion filter will be used
+ * to filter all proposals generated by the jdt compiler.
+ *
+ * @param event the completion event
+ * @return null
to indicate acceptance of all jdt
+ * proposed compiler or a completion filter examine jdt proposed completions.
+ * @see #doesParticipateInProject(IJavaProject)
+ * @see #getSupportedEventMask()
+ */
+ ICompletionFilter getCompletionFilter(ICompletionEvent event);
+
+ /**
+ * Called when the completion event is done.
+ * @param event the completion event
+ */
+ void endOfEvent(ICompletionEvent event);
+
+ interface ICompletionFilter{
+
+ /**
+ * @param proposal generated by the jdt compiler.
+ * @return true
to indicate proposal should be included and
+ * false
to indicate proposal should be excluded.
+ */
+ boolean accept(CompletionProposal proposal);
+ }
+}