/projects/eclipse_SDK-3.7.1/plugins/org.eclipse.jdt.core.source_3.7.1.v_B76_R37x/org/eclipse/jdt/internal/codeassist/ISelectionRequestor.java

https://gitlab.com/essere.lab.public/qualitas.class-corpus · Java · 260 lines · 54 code · 7 blank · 199 comment · 0 complexity · 3f1d67e5c1c93c5672c8b4c2e24501b7 MD5 · raw file

  1. /*******************************************************************************
  2. * Copyright (c) 2000, 2009 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.codeassist;
  12. import org.eclipse.jdt.core.compiler.CategorizedProblem;
  13. /**
  14. * A selection requestor accepts results from the selection engine.
  15. */
  16. public interface ISelectionRequestor {
  17. /**
  18. * Code assist notification of a enum selection.
  19. * @param packageName char[]
  20. * Declaring package name of the type.
  21. *
  22. * @param annotationName char[]
  23. * Name of the type.
  24. *
  25. * @param isDeclaration boolean
  26. * Answer if the selected type is a declaration
  27. *
  28. * @param genericTypeSignature
  29. * genric type signature of the selected type if it is a
  30. * parameterized type
  31. *
  32. * @param start
  33. * Start of the selection
  34. *
  35. * @param end
  36. * End of the selection
  37. *
  38. * NOTE - All package and type names are presented in their readable form:
  39. * Package names are in the form "a.b.c".
  40. * Nested type names are in the qualified form "A.M".
  41. * The default package is represented by an empty array.
  42. */
  43. void acceptType(
  44. char[] packageName,
  45. char[] annotationName,
  46. int modifiers,
  47. boolean isDeclaration,
  48. char[] genericTypeSignature,
  49. int start,
  50. int end);
  51. /**
  52. * Code assist notification of a compilation error detected during selection.
  53. * @param error CategorizedProblem
  54. * Only problems which are categorized as errors are notified to the requestor,
  55. * warnings are silently ignored.
  56. * In case an error got signaled, no other completions might be available,
  57. * therefore the problem message should be presented to the user.
  58. * The source positions of the problem are related to the source where it was
  59. * detected (might be in another compilation unit, if it was indirectly requested
  60. * during the code assist process).
  61. * Note: the problem knows its originating file name.
  62. */
  63. void acceptError(CategorizedProblem error);
  64. /**
  65. * Code assist notification of a field selection.
  66. * @param declaringTypePackageName char[]
  67. * Name of the package in which the type that contains this field is declared.
  68. *
  69. * @param declaringTypeName char[]
  70. * Name of the type declaring this new field.
  71. *
  72. * @param name char[]
  73. * Name of the field.
  74. *
  75. * @param isDeclaration boolean
  76. * Answer if the selected field is a declaration
  77. *
  78. * @param uniqueKey
  79. * unique key of this field
  80. *
  81. * @param start
  82. * Start of the selection
  83. *
  84. * @param end
  85. * End of the selection
  86. *
  87. * NOTE - All package and type names are presented in their readable form:
  88. * Package names are in the form "a.b.c".
  89. * Nested type names are in the qualified form "A.M".
  90. * The default package is represented by an empty array.
  91. */
  92. void acceptField(
  93. char[] declaringTypePackageName,
  94. char[] declaringTypeName,
  95. char[] name,
  96. boolean isDeclaration,
  97. char[] uniqueKey,
  98. int start,
  99. int end);
  100. /**
  101. * Code assist notification of a method selection.
  102. * @param declaringTypePackageName char[]
  103. * Name of the package in which the type that contains this new method is declared.
  104. *
  105. * @param declaringTypeName char[]
  106. * Name of the type declaring this new method.
  107. *
  108. * @param enclosingDeclaringTypeSignature String
  109. * Type signature of the declaring type of the declaring type or <code>null</code>
  110. * if declaring type is a top level type.
  111. *
  112. * @param selector char[]
  113. * Name of the new method.
  114. *
  115. * @param parameterPackageNames char[][]
  116. * Names of the packages in which the parameter types are declared.
  117. * Should contain as many elements as parameterTypeNames.
  118. *
  119. * @param parameterTypeNames char[][]
  120. * Names of the parameters types.
  121. * Should contain as many elements as parameterPackageNames.
  122. *
  123. * @param parameterSignatures String[]
  124. * Signature of the parameters types.
  125. * Should contain as many elements as parameterPackageNames.
  126. *
  127. * @param isConstructor boolean
  128. * Answer if the method is a constructor.
  129. *
  130. * @param isDeclaration boolean
  131. * Answer if the selected method is a declaration
  132. *
  133. * @param uniqueKey
  134. * unique key of the method
  135. *
  136. * @param start
  137. * Start of the selection
  138. *
  139. * @param end
  140. * End of the selection
  141. *
  142. * NOTE - All package and type names are presented in their readable form:
  143. * Package names are in the form "a.b.c".
  144. * Base types are in the form "int" or "boolean".
  145. * Array types are in the qualified form "M[]" or "int[]".
  146. * Nested type names are in the qualified form "A.M".
  147. * The default package is represented by an empty array.
  148. */
  149. // parameters 'isDeclaration', 'start' and 'end' are use to distinguish duplicate methods declarations
  150. void acceptMethod(
  151. char[] declaringTypePackageName,
  152. char[] declaringTypeName,
  153. String enclosingDeclaringTypeSignature,
  154. char[] selector,
  155. char[][] parameterPackageNames,
  156. char[][] parameterTypeNames,
  157. String[] parameterSignatures,
  158. char[][] typeParameterNames,
  159. char[][][] typeParameterBoundNames,
  160. boolean isConstructor,
  161. boolean isDeclaration,
  162. char[] uniqueKey,
  163. int start,
  164. int end);
  165. /**
  166. * Code assist notification of a package selection.
  167. * @param packageName char[]
  168. * The package name.
  169. *
  170. * NOTE - All package names are presented in their readable form:
  171. * Package names are in the form "a.b.c".
  172. * The default package is represented by an empty array.
  173. */
  174. void acceptPackage(char[] packageName);
  175. /**
  176. * Code assist notification of a type parameter selection.
  177. *
  178. * @param declaringTypePackageName char[]
  179. * Name of the package in which the type that contains this new method is declared.
  180. *
  181. * @param declaringTypeName char[]
  182. * Name of the type declaring this new method.
  183. *
  184. * @param typeParameterName char[]
  185. * Name of the type parameter.
  186. *
  187. * @param isDeclaration boolean
  188. * Answer if the selected type parameter is a declaration
  189. *
  190. * @param start
  191. * Start of the selection
  192. *
  193. * @param end
  194. * End of the selection
  195. *
  196. * NOTE - All package and type names are presented in their readable form:
  197. * Package names are in the form "a.b.c".
  198. * Nested type names are in the qualified form "A.M".
  199. * The default package is represented by an empty array.
  200. */
  201. void acceptTypeParameter(
  202. char[] declaringTypePackageName,
  203. char[] declaringTypeName,
  204. char[] typeParameterName,
  205. boolean isDeclaration,
  206. int start,
  207. int end);
  208. /**
  209. * Code assist notification of a type parameter selection.
  210. *
  211. * @param declaringTypePackageName char[]
  212. * Name of the package in which the type that contains this new method is declared.
  213. *
  214. * @param declaringTypeName char[]
  215. * Name of the type declaring this new method.
  216. *
  217. * @param selector char[]
  218. * Name of the declaring method.
  219. *
  220. * @param selectorStart int
  221. * Start of the selector.
  222. *
  223. * @param selectorEnd int
  224. * End of the selector.
  225. *
  226. * @param typeParameterName char[]
  227. * Name of the type parameter.
  228. *
  229. * @param isDeclaration boolean
  230. * Answer if the selected type parameter is a declaration
  231. *
  232. * @param start
  233. * Start of the selection
  234. *
  235. * @param end
  236. * End of the selection
  237. *
  238. * NOTE - All package and type names are presented in their readable form:
  239. * Package names are in the form "a.b.c".
  240. * Nested type names are in the qualified form "A.M".
  241. * The default package is represented by an empty array.
  242. */
  243. void acceptMethodTypeParameter(
  244. char[] declaringTypePackageName,
  245. char[] declaringTypeName,
  246. char[] selector,
  247. int selectorStart,
  248. int selectorEnd,
  249. char[] typeParameterName,
  250. boolean isDeclaration,
  251. int start,
  252. int end);
  253. }