KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > ui > text > javadoc > JavadocCompletionProposalComputer


1 /*******************************************************************************
2  * Copyright (c) 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.internal.ui.text.javadoc;
12
13 import org.eclipse.jdt.core.CompletionProposal;
14
15 import org.eclipse.jdt.ui.text.java.CompletionProposalCollector;
16 import org.eclipse.jdt.ui.text.java.JavaContentAssistInvocationContext;
17
18 import org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposalComputer;
19
20 /**
21  *
22  * @since 3.2
23  */

24 public class JavadocCompletionProposalComputer extends JavaCompletionProposalComputer {
25     /*
26      * @see org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposalComputer#createCollector(org.eclipse.jdt.ui.text.java.JavaContentAssistInvocationContext)
27      */

28     protected CompletionProposalCollector createCollector(JavaContentAssistInvocationContext context) {
29         CompletionProposalCollector collector= super.createCollector(context);
30         collector.setIgnored(CompletionProposal.ANNOTATION_ATTRIBUTE_REF, true);
31         collector.setIgnored(CompletionProposal.ANONYMOUS_CLASS_DECLARATION, true);
32         collector.setIgnored(CompletionProposal.FIELD_REF, false);
33         collector.setIgnored(CompletionProposal.KEYWORD, true);
34         collector.setIgnored(CompletionProposal.LABEL_REF, true);
35         collector.setIgnored(CompletionProposal.LOCAL_VARIABLE_REF, true);
36         collector.setIgnored(CompletionProposal.METHOD_DECLARATION, true);
37         collector.setIgnored(CompletionProposal.METHOD_NAME_REFERENCE, true);
38         collector.setIgnored(CompletionProposal.METHOD_REF, false);
39         collector.setIgnored(CompletionProposal.PACKAGE_REF, true);
40         collector.setIgnored(CompletionProposal.POTENTIAL_METHOD_DECLARATION, true);
41         collector.setIgnored(CompletionProposal.VARIABLE_DECLARATION, true);
42         collector.setIgnored(CompletionProposal.JAVADOC_TYPE_REF, false);
43         collector.setIgnored(CompletionProposal.JAVADOC_FIELD_REF, false);
44         collector.setIgnored(CompletionProposal.JAVADOC_METHOD_REF, false);
45         collector.setIgnored(CompletionProposal.JAVADOC_PARAM_REF, false);
46         collector.setIgnored(CompletionProposal.JAVADOC_VALUE_REF, false);
47         collector.setIgnored(CompletionProposal.TYPE_REF, false);
48         return collector;
49     }
50 }
51
Popular Tags