]> git.uio.no Git - ifi-stolz-refaktor.git/blob - case-study/jdt-before/ui/org/eclipse/jdt/ui/text/java/IJavadocCompletionProcessor.java
Case Study: adding data and statistics
[ifi-stolz-refaktor.git] / case-study / jdt-before / ui / org / eclipse / jdt / ui / text / java / IJavadocCompletionProcessor.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 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.ui.text.java;
12
13 import org.eclipse.jface.text.contentassist.IContextInformation;
14
15 import org.eclipse.jdt.core.ICompilationUnit;
16
17
18 /**
19  * A Javadoc processor proposes completions and computes
20  * context information for a particular content type.
21  * <p>
22  * This interface must be implemented by clients who extend the
23  * <code>org.eclipse.jdt.ui.javadocCompletionProcessor</code> extension-point</p>.
24  *
25  * @since 2.1
26  * @deprecated As of 3.2, replaced by <code>org.eclipse.jdt.ui.javaCompletionProposalComputer</code> extension-point</p>.
27  */
28 public interface IJavadocCompletionProcessor {
29
30         /**
31          * Flag used by <code>computeCompletionProposals</code>.
32          * Specifies that only proposals should be returned that match
33          * the case of the prefix in the code (value: <code>1</code>).
34          */
35         int RESTRICT_TO_MATCHING_CASE= 1;
36
37
38         /**
39          * Returns information about possible contexts based on the
40          * specified location within the compilation unit.
41          *
42          * @param       cu the working copy of the compilation unit which
43          *                              is used to compute the possible contexts
44          * @param       offset an offset within the compilation unit for
45          *                              which context information should be computed
46          * @return      an array of context information objects or <code>null</code>
47          *                              if no context could be found
48          */
49         IContextInformation[] computeContextInformation(ICompilationUnit cu, int offset);
50
51
52         /**
53          * Returns the completion proposals based on the specified location
54          * within the compilation unit.
55          *
56          * @param       cu the working copy of the compilation unit in which the
57          *                              completion request has been called.
58          * @param       offset an offset within the compilation unit for which
59          *                              completion proposals should be computed
60          * @param       length the length of the current selection.
61          * @param       flags settings for the code assist. Flags as defined in this interface,
62          *                              e.g. <code>RESTRICT_TO_MATCHING_CASE</code>.
63          * @return an array of completion proposals or <code>null</code> if
64          *                              no proposals could be found
65      */
66         IJavaCompletionProposal[] computeCompletionProposals(ICompilationUnit cu, int offset, int length, int flags);
67
68
69         /**
70          * Returns the reason why this completion processor was unable
71          * to produce a completion proposals or context information.
72          *
73          * @return an error message or <code>null</code> if no error occurred
74          */
75         String getErrorMessage();
76 }