Lines 44-50
Link Here
|
44 |
|
44 |
|
45 |
package org.netbeans.spi.editor.completion; |
45 |
package org.netbeans.spi.editor.completion; |
46 |
|
46 |
|
|
|
47 |
import java.lang.annotation.ElementType; |
48 |
import java.lang.annotation.Retention; |
49 |
import java.lang.annotation.RetentionPolicy; |
50 |
import java.lang.annotation.Target; |
47 |
import javax.swing.text.JTextComponent; |
51 |
import javax.swing.text.JTextComponent; |
|
|
52 |
import org.netbeans.spi.editor.mimelookup.MimeLookupRegistrationMetaAnnotation; |
48 |
|
53 |
|
49 |
/** |
54 |
/** |
50 |
* The basic interface for providing code completion items. You should implement this interface |
55 |
* The basic interface for providing code completion items. You should implement this interface |
Lines 130-133
Link Here
|
130 |
*/ |
135 |
*/ |
131 |
public int getAutoQueryTypes(JTextComponent component, String typedText); |
136 |
public int getAutoQueryTypes(JTextComponent component, String typedText); |
132 |
|
137 |
|
|
|
138 |
/** |
139 |
* Registration annotation for {@link CompletionProvider}s. |
140 |
* @since 1.23 |
141 |
*/ |
142 |
@Retention(RetentionPolicy.SOURCE) |
143 |
@Target({ElementType.TYPE, ElementType.METHOD}) |
144 |
@MimeLookupRegistrationMetaAnnotation(targetPackage="org.netbeans.modules.editor.completion", subfolderName="CompletionProviders", clazz=CompletionProvider.class) |
145 |
public static @interface Registration { |
146 |
/** |
147 |
* Mime type to which should be the given provider registered. |
148 |
*/ |
149 |
public String mimeType(); |
150 |
/** |
151 |
* Position of the provider in the list of providers. |
152 |
*/ |
153 |
public int position() default Integer.MAX_VALUE; |
154 |
/** |
155 |
* Superseded providers. |
156 |
*/ |
157 |
public String[] supersedes() default {}; |
158 |
} |
159 |
|
133 |
} |
160 |
} |