@@ -63,11 +63,6 @@ public class SignatureHelpContext {
63
63
*/
64
64
private String methodName ;
65
65
66
- /**
67
- * {@link #declaringTypeNames()}
68
- */
69
- private List <String > declaringTypeNames ;
70
-
71
66
/**
72
67
* {@link #arguments()}
73
68
*/
@@ -102,7 +97,6 @@ public void resolve(int triggerOffset, ICompilationUnit unit, IProgressMonitor m
102
97
}
103
98
findTargetNode (root , unit , triggerOffset );
104
99
resolveMethodName (this .targetNode );
105
- resolveDeclaringTypeName (this .targetNode );
106
100
this .arguments = resolveArguments (this .targetNode );
107
101
resolveParameterTypes (this .targetNode );
108
102
guessCompletionOffset (this .targetNode , unit );
@@ -323,50 +317,6 @@ private void resolveMethodName(ASTNode node) {
323
317
}
324
318
}
325
319
326
- /**
327
- * Get the declaring type names of the method-like node. Following names will be added:
328
- * <ul>
329
- * <li> The declaring type</li>
330
- * <li> All the super types</li>
331
- * <li> All the interfaces</li>
332
- * </ul>
333
- *
334
- * @param node
335
- */
336
- private void resolveDeclaringTypeName (ASTNode node ) {
337
- if (node == null ) {
338
- return ;
339
- }
340
-
341
- IMethodBinding methodBinding = null ;
342
- if (node instanceof MethodInvocation methodInvocation ) {
343
- methodBinding = methodInvocation .resolveMethodBinding ();
344
- } else if (node instanceof ClassInstanceCreation classInstanceCreation ) {
345
- methodBinding = classInstanceCreation .resolveConstructorBinding ();
346
- } else if (node instanceof SuperMethodInvocation superMethodInvocation ) {
347
- methodBinding = superMethodInvocation .resolveMethodBinding ();
348
- } else if (node instanceof SuperConstructorInvocation superConstructorInvocation ) {
349
- methodBinding = superConstructorInvocation .resolveConstructorBinding ();
350
- } else if (node instanceof ConstructorInvocation constructorInvocation ) {
351
- methodBinding = constructorInvocation .resolveConstructorBinding ();
352
- }
353
-
354
- if (methodBinding != null ) {
355
- ITypeBinding declaringType = methodBinding .getDeclaringClass ();
356
- List <String > typeNames = new ArrayList <>();
357
- for (ITypeBinding mInterface : declaringType .getInterfaces ()) {
358
- String unqualifiedName = mInterface .getErasure ().getName ().replace (";" , "" );
359
- typeNames .add (unqualifiedName );
360
- }
361
- while (declaringType != null ) {
362
- String unqualifiedName = declaringType .getErasure ().getName ().replace (";" , "" );
363
- typeNames .add (unqualifiedName );
364
- declaringType = declaringType .getSuperclass ();
365
- }
366
- this .declaringTypeNames = typeNames ;
367
- }
368
- }
369
-
370
320
/**
371
321
* Get the argument list of the input method-like node.
372
322
* @param node
@@ -682,14 +632,6 @@ public String methodName() {
682
632
return methodName ;
683
633
}
684
634
685
- /**
686
- * The declaring type name of the method invocation. It's used to filter methods from
687
- * different types but with same names that provided by the completion engine.
688
- */
689
- public List <String > declaringTypeNames () {
690
- return declaringTypeNames ;
691
- }
692
-
693
635
/**
694
636
* The argument nodes parsed from AST.
695
637
*/
0 commit comments