Example usage for org.eclipse.jdt.internal.core SourceMethod getNameRange

List of usage examples for org.eclipse.jdt.internal.core SourceMethod getNameRange

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.core SourceMethod getNameRange.

Prototype

@Override
public ISourceRange getNameRange() throws JavaModelException 

Source Link

Usage

From source file:org.springframework.ide.eclipse.data.jdt.core.EntityPropertyCompletionProposals.java

License:Open Source License

private List<ICompletionProposal> computeCompletionProposals(SourceMethod element,
        JavaContentAssistInvocationContext javaContext) throws JavaModelException {

    RepositoryInformation information = RepositoryInformation.create(element);
    if (information == null) {
        return Collections.emptyList();
    }/*  w  ww . j  av  a 2  s. c  o  m*/

    int offset = javaContext.getCoreContext().getOffset();
    int positionInMethodName = offset - element.getNameRange().getOffset();
    String elementName = element.getElementName();

    return computeCompletionProposals(javaContext, information, positionInMethodName, elementName);
}