protected IContextInformation computeContextInformation() { try { fContextInformationPosition= getReplacementOffset() - 1; CompletionProposal proposal= ((MemberProposalInfo)getProposalInfo()).fProposal; // no context information for METHOD_NAME_REF proposals (e.g. for static imports) // https://bugs.eclipse.org/bugs/show_bug.cgi?id=94654 if (hasParameters() && (getReplacementString().endsWith(")") || getReplacementString().length() == 0)) { //$NON-NLS-1$ ProposalContextInformation contextInformation= new ProposalContextInformation(proposal); fContextInformationPosition= getReplacementOffset() + getCursorPosition(); if (fContextInformationPosition != 0 && proposal.getCompletion().length == 0) contextInformation.setContextInformationPosition(fContextInformationPosition); return contextInformation; } return null; } finally { fIsContextInformationComputed= true; } }
protected IContextInformation computeContextInformation() { try { fContextInformationPosition= getReplacementOffset() - 1; CompletionProposal proposal= ((MemberProposalInfo)getProposalInfo()).fProposal; // no context information for METHOD_NAME_REF proposals (e.g. for static imports) // https://bugs.eclipse.org/bugs/show_bug.cgi?id=94654 if (hasParameters() && (getReplacementString().endsWith(")") || getReplacementString().length() == 0)) { //$NON-NLS-1$ ProposalContextInformation contextInformation= new ProposalContextInformation(proposal); fContextInformationPosition= getReplacementOffset() + getCursorPosition(); if (fContextInformationPosition != 0 && proposal.getCompletion().length == 0) contextInformation.setContextInformationPosition(fContextInformationPosition); return contextInformation; } return null; } finally { fIsContextInformationComputed= true; } }