/projects/aspectj-1.6.9/aspectjtools1.6.9/org/aspectj/org/eclipse/jdt/core/ICompletionRequestor.java

https://gitlab.com/essere.lab.public/qualitas.class-corpus · Java · 426 lines · 103 code · 4 blank · 319 comment · 0 complexity · 30f083c42921a12d4114d8548dea43b3 MD5 · raw file

  1. /*******************************************************************************
  2. * Copyright (c) 2000, 2006 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.aspectj.org.eclipse.jdt.core;
  12. import org.aspectj.org.eclipse.jdt.core.compiler.IProblem;
  13. /**
  14. * A completion requestor accepts results as they are computed and is aware
  15. * of source positions to complete the various different results.
  16. * <p>
  17. * This interface may be implemented by clients.
  18. * </p>
  19. *
  20. * @see ICodeAssist
  21. * @since 2.0
  22. * @deprecated Use {@link CompletionRequestor} instead.
  23. */
  24. public interface ICompletionRequestor {
  25. /**
  26. * Code assist notification of an anonymous type declaration completion.
  27. * @param superTypePackageName Name of the package that contains the super type of this
  28. * new anonymous type declaration.
  29. * @param superTypeName Name of the super type of this new anonymous type declaration.
  30. * @param parameterPackageNames Names of the packages in which the parameter types are declared.
  31. * Should contain as many elements as parameterTypeNames.
  32. * @param parameterTypeNames Names of the parameter types.
  33. * Should contain as many elements as parameterPackageNames.
  34. * @param parameterNames Names of the parameters.
  35. * Should contain as many elements as parameterPackageNames.
  36. * @param completionName The completion for the anonymous type declaration.
  37. * Can include zero, one or two brackets. If the closing bracket is included,
  38. * then the cursor should be placed before it.
  39. * @param modifiers The modifiers of the constructor.
  40. * @param completionStart The start position of insertion of the name of this new anonymous type declaration.
  41. * @param completionEnd The end position of insertion of the name of this new anonymous type declaration.
  42. * @param relevance The relevance of the completion proposal
  43. * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
  44. * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
  45. * value is higher.
  46. *
  47. * NOTE - All package and type names are presented in their readable form:
  48. * Package names are in the form "a.b.c".
  49. * Base types are in the form "int" or "boolean".
  50. * Array types are in the qualified form "M[]" or "int[]".
  51. * Nested type names are in the qualified form "A.M".
  52. * The default package is represented by an empty array.
  53. *
  54. * NOTE: parameter names can be retrieved from the source model after the user selects a specific method.
  55. *
  56. * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
  57. */
  58. void acceptAnonymousType(
  59. char[] superTypePackageName,
  60. char[] superTypeName,
  61. char[][] parameterPackageNames,
  62. char[][] parameterTypeNames,
  63. char[][] parameterNames,
  64. char[] completionName,
  65. int modifiers,
  66. int completionStart,
  67. int completionEnd,
  68. int relevance);
  69. /**
  70. * Code assist notification of a class completion.
  71. *
  72. * @param packageName Declaring package name of the class.
  73. * @param className Name of the class.
  74. * @param completionName The completion for the class. Can include ';' for imported classes.
  75. * @param modifiers The modifiers of the class.
  76. * @param completionStart The start position of insertion of the name of the class.
  77. * @param completionEnd The end position of insertion of the name of the class.
  78. * @param relevance The relevance of the completion proposal
  79. * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
  80. * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
  81. * value is higher.
  82. *
  83. * NOTE - All package and type names are presented in their readable form:
  84. * Package names are in the form "a.b.c".
  85. * Nested type names are in the qualified form "A.M".
  86. * The default package is represented by an empty array.
  87. *
  88. * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
  89. */
  90. void acceptClass(
  91. char[] packageName,
  92. char[] className,
  93. char[] completionName,
  94. int modifiers,
  95. int completionStart,
  96. int completionEnd,
  97. int relevance);
  98. /**
  99. * Code assist notification of a compilation error detected during completion.
  100. * @param error Only problems which are categorized as non-syntax errors are notified to the
  101. * requestor, warnings are silently ignored.
  102. * In case an error got signalled, no other completions might be available,
  103. * therefore the problem message should be presented to the user.
  104. * The source positions of the problem are related to the source where it was
  105. * detected (might be in another compilation unit, if it was indirectly requested
  106. * during the code assist process).
  107. * Note: the problem knows its originating file name.
  108. *
  109. * @deprecated Use {@link CompletionRequestor#completionFailure(IProblem)} instead.
  110. */
  111. void acceptError(IProblem error);
  112. /**
  113. * Code assist notification of a field completion.
  114. *
  115. * @param declaringTypePackageName Name of the package in which the type that contains this field is declared.
  116. * @param declaringTypeName Name of the type declaring this new field.
  117. * @param name Name of the field.
  118. * @param typePackageName Name of the package in which the type of this field is declared.
  119. * @param typeName Name of the type of this field.
  120. * @param completionName The completion for the field.
  121. * @param modifiers The modifiers of this field.
  122. * @param completionStart The start position of insertion of the name of this field.
  123. * @param completionEnd The end position of insertion of the name of this field.
  124. * @param relevance The relevance of the completion proposal
  125. * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
  126. * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
  127. * value is higher.
  128. *
  129. * NOTE - All package and type names are presented in their readable form:
  130. * Package names are in the form "a.b.c".
  131. * Base types are in the form "int" or "boolean".
  132. * Array types are in the qualified form "M[]" or "int[]".
  133. * Nested type names are in the qualified form "A.M".
  134. * The default package is represented by an empty array.
  135. *
  136. * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
  137. */
  138. void acceptField(
  139. char[] declaringTypePackageName,
  140. char[] declaringTypeName,
  141. char[] name,
  142. char[] typePackageName,
  143. char[] typeName,
  144. char[] completionName,
  145. int modifiers,
  146. int completionStart,
  147. int completionEnd,
  148. int relevance);
  149. /**
  150. * Code assist notification of an interface completion.
  151. *
  152. * @param packageName Declaring package name of the interface.
  153. * @param interfaceName Name of the interface.
  154. * @param completionName The completion for the interface. Can include ';' for imported interfaces.
  155. * @param modifiers The modifiers of the interface.
  156. * @param completionStart The start position of insertion of the name of the interface.
  157. * @param completionEnd The end position of insertion of the name of the interface.
  158. * @param relevance The relevance of the completion proposal
  159. * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
  160. * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
  161. * value is higher.
  162. *
  163. * NOTE - All package and type names are presented in their readable form:
  164. * Package names are in the form "a.b.c".
  165. * Nested type names are in the qualified form "A.M".
  166. * The default package is represented by an empty array.
  167. *
  168. * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
  169. */
  170. void acceptInterface(
  171. char[] packageName,
  172. char[] interfaceName,
  173. char[] completionName,
  174. int modifiers,
  175. int completionStart,
  176. int completionEnd,
  177. int relevance);
  178. /**
  179. * Code assist notification of a keyword completion.
  180. * @param keywordName The keyword source.
  181. * @param completionStart The start position of insertion of the name of this keyword.
  182. * @param completionEnd The end position of insertion of the name of this keyword.
  183. * @param relevance The relevance of the completion proposal
  184. * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
  185. * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
  186. * value is higher.
  187. * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
  188. */
  189. void acceptKeyword(char[] keywordName, int completionStart, int completionEnd, int relevance);
  190. /**
  191. * Code assist notification of a label completion.
  192. *
  193. * @param labelName The label source.
  194. * @param completionStart The start position of insertion of the name of this label.
  195. * @param completionEnd The end position of insertion of the name of this label.
  196. * @param relevance The relevance of the completion proposal
  197. * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
  198. * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
  199. * value is higher.
  200. * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
  201. */
  202. void acceptLabel(char[] labelName, int completionStart, int completionEnd, int relevance);
  203. /**
  204. * Code assist notification of a local variable completion.
  205. *
  206. * @param name Name of the new local variable.
  207. * @param typePackageName Name of the package in which the type of this new local variable is declared.
  208. * @param typeName Name of the type of this new local variable.
  209. * @param modifiers The modifiers of this new local variable.
  210. * @param completionStart The start position of insertion of the name of this new local variable.
  211. * @param completionEnd The end position of insertion of the name of this new local variable.
  212. * @param relevance The relevance of the completion proposal
  213. * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
  214. * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
  215. * value is higher.
  216. *
  217. * NOTE - All package and type names are presented in their readable form:
  218. * Package names are in the form "a.b.c".
  219. * Base types are in the form "int" or "boolean".
  220. * Array types are in the qualified form "M[]" or "int[]".
  221. * Nested type names are in the qualified form "A.M".
  222. * The default package is represented by an empty array.
  223. *
  224. * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
  225. */
  226. void acceptLocalVariable(
  227. char[] name,
  228. char[] typePackageName,
  229. char[] typeName,
  230. int modifiers,
  231. int completionStart,
  232. int completionEnd,
  233. int relevance);
  234. /**
  235. * Code assist notification of a method completion.
  236. *
  237. * @param declaringTypePackageName Name of the package in which the type that contains this new method is declared.
  238. * @param declaringTypeName Name of the type declaring this new method.
  239. * @param selector Name of the new method.
  240. * @param parameterPackageNames Names of the packages in which the parameter types are declared.
  241. * Should contain as many elements as parameterTypeNames.
  242. * @param parameterTypeNames Names of the parameter types.
  243. * Should contain as many elements as parameterPackageNames.
  244. * @param parameterNames Names of the parameters.
  245. * Should contain as many elements as parameterPackageNames.
  246. * @param returnTypePackageName Name of the package in which the return type is declared.
  247. * @param returnTypeName Name of the return type of this new method, should be <code>null</code> for a constructor.
  248. * @param completionName The completion for the method. Can include zero, one or two brackets. If the closing bracket is included, then the cursor should be placed before it.
  249. * @param modifiers The modifiers of this new method.
  250. * @param completionStart The start position of insertion of the name of this new method.
  251. * @param completionEnd The end position of insertion of the name of this new method.
  252. * @param relevance The relevance of the completion proposal
  253. * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
  254. * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
  255. * value is higher.
  256. *
  257. * NOTE - All package and type names are presented in their readable form:
  258. * Package names are in the form "a.b.c".
  259. * Base types are in the form "int" or "boolean".
  260. * Array types are in the qualified form "M[]" or "int[]".
  261. * Nested type names are in the qualified form "A.M".
  262. * The default package is represented by an empty array.
  263. *
  264. * NOTE: parameter names can be retrieved from the source model after the user selects a specific method.
  265. *
  266. * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
  267. */
  268. void acceptMethod(
  269. char[] declaringTypePackageName,
  270. char[] declaringTypeName,
  271. char[] selector,
  272. char[][] parameterPackageNames,
  273. char[][] parameterTypeNames,
  274. char[][] parameterNames,
  275. char[] returnTypePackageName,
  276. char[] returnTypeName,
  277. char[] completionName,
  278. int modifiers,
  279. int completionStart,
  280. int completionEnd,
  281. int relevance);
  282. /**
  283. * Code assist notification of a method completion.
  284. *
  285. * @param declaringTypePackageName Name of the package in which the type that contains this new method is declared.
  286. * @param declaringTypeName Name of the type declaring this new method.
  287. * @param selector Name of the new method.
  288. * @param parameterPackageNames Names of the packages in which the parameter types are declared.
  289. * Should contain as many elements as parameterTypeNames.
  290. * @param parameterTypeNames Names of the parameter types.
  291. * Should contain as many elements as parameterPackageNames.
  292. * @param parameterNames Names of the parameters.
  293. * Should contain as many elements as parameterPackageNames.
  294. * @param returnTypePackageName Name of the package in which the return type is declared.
  295. * @param returnTypeName Name of the return type of this new method, should be <code>null</code> for a constructor.
  296. * @param completionName The completion for the method. Can include zero, one or two brackets. If the closing bracket is included, then the cursor should be placed before it.
  297. * @param modifiers The modifiers of this new method.
  298. * @param completionStart The start position of insertion of the name of this new method.
  299. * @param completionEnd The end position of insertion of the name of this new method.
  300. * @param relevance The relevance of the completion proposal
  301. * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
  302. * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
  303. * value is higher.
  304. *
  305. * NOTE - All package and type names are presented in their readable form:
  306. * Package names are in the form "a.b.c".
  307. * Base types are in the form "int" or "boolean".
  308. * Array types are in the qualified form "M[]" or "int[]".
  309. * Nested type names are in the qualified form "A.M".
  310. * The default package is represented by an empty array.
  311. *
  312. * NOTE: parameter names can be retrieved from the source model after the user selects a specific method.
  313. *
  314. * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
  315. */
  316. void acceptMethodDeclaration(
  317. char[] declaringTypePackageName,
  318. char[] declaringTypeName,
  319. char[] selector,
  320. char[][] parameterPackageNames,
  321. char[][] parameterTypeNames,
  322. char[][] parameterNames,
  323. char[] returnTypePackageName,
  324. char[] returnTypeName,
  325. char[] completionName,
  326. int modifiers,
  327. int completionStart,
  328. int completionEnd,
  329. int relevance);
  330. /**
  331. * Code assist notification of a modifier completion.
  332. *
  333. * @param modifierName The new modifier.
  334. * @param completionStart The start position of insertion of the name of this new modifier.
  335. * @param completionEnd The end position of insertion of the name of this new modifier.
  336. * @param relevance The relevance of the completion proposal
  337. * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
  338. * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
  339. * value is higher.
  340. * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
  341. */
  342. void acceptModifier(char[] modifierName, int completionStart, int completionEnd, int relevance);
  343. /**
  344. * Code assist notification of a package completion.
  345. *
  346. * @param packageName The package name.
  347. * @param completionName The completion for the package. Can include '.*;' for imports.
  348. * @param completionStart The start position of insertion of the name of this new package.
  349. * @param completionEnd The end position of insertion of the name of this new package.
  350. * @param relevance The relevance of the completion proposal
  351. * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
  352. * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
  353. * value is higher.
  354. *
  355. * NOTE - All package names are presented in their readable form:
  356. * Package names are in the form "a.b.c".
  357. * The default package is represented by an empty array.
  358. * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
  359. */
  360. void acceptPackage(
  361. char[] packageName,
  362. char[] completionName,
  363. int completionStart,
  364. int completionEnd,
  365. int relevance);
  366. /**
  367. * Code assist notification of a type completion.
  368. *
  369. * @param packageName Declaring package name of the type.
  370. * @param typeName Name of the type.
  371. * @param completionName The completion for the type. Can include ';' for imported types.
  372. * @param completionStart The start position of insertion of the name of the type.
  373. * @param completionEnd The end position of insertion of the name of the type.
  374. * @param relevance The relevance of the completion proposal
  375. * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
  376. * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
  377. * value is higher.
  378. *
  379. * NOTE - All package and type names are presented in their readable form:
  380. * Package names are in the form "a.b.c".
  381. * Nested type names are in the qualified form "A.M".
  382. * The default package is represented by an empty array.
  383. * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
  384. */
  385. void acceptType(
  386. char[] packageName,
  387. char[] typeName,
  388. char[] completionName,
  389. int completionStart,
  390. int completionEnd,
  391. int relevance);
  392. /**
  393. * Code assist notification of a variable name completion.
  394. *
  395. * @param typePackageName Name of the package in which the type of this variable is declared.
  396. * @param typeName Name of the type of this variable.
  397. * @param name Name of the variable.
  398. * @param completionName The completion for the variable.
  399. * @param completionStart The start position of insertion of the name of this variable.
  400. * @param completionEnd The end position of insertion of the name of this variable.
  401. * @param relevance The relevance of the completion proposal
  402. * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
  403. * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
  404. * value is higher.
  405. *
  406. * NOTE - All package and type names are presented in their readable form:
  407. * Package names are in the form "a.b.c".
  408. * Base types are in the form "int" or "boolean".
  409. * Array types are in the qualified form "M[]" or "int[]".
  410. * Nested type names are in the qualified form "A.M".
  411. * The default package is represented by an empty array.
  412. * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
  413. */
  414. void acceptVariableName(
  415. char[] typePackageName,
  416. char[] typeName,
  417. char[] name,
  418. char[] completionName,
  419. int completionStart,
  420. int completionEnd,
  421. int relevance);
  422. }