@Override public StyledString getStyledDisplayString() { final StyledString origin = super.getStyledDisplayString(); return subwordsContext.getStyledDisplayString(origin); }
public ProcessableAnonymousTypeCompletionProposal(CompletionProposal coreProposal, JavaCompletionProposal uiProposal, JavaContentAssistInvocationContext context) throws JavaModelException { super(context.getProject(), context.getCompilationUnit(), context, coreProposal.getReplaceStart(), uiProposal .getReplacementLength(), String.valueOf(coreProposal.getCompletion()), uiProposal .getStyledDisplayString(), String.valueOf(coreProposal.getDeclarationSignature()), (IType) context .getProject().findElement(String.valueOf(coreProposal.getDeclarationKey()), null), uiProposal .getRelevance()); this.coreProposal = coreProposal; }
protected ProcessableJavaFieldWithCastedReceiverCompletionProposal(CompletionProposal coreProposal, JavaCompletionProposal uiProposal, JavaContentAssistInvocationContext context) throws JavaModelException { super(uiProposal.getDisplayString(), uiProposal.getReplacementOffset(), uiProposal.getReplacementLength(), uiProposal.getImage(), uiProposal.getStyledDisplayString(), uiProposal.getRelevance(), true, context, coreProposal); this.coreProposal = coreProposal; }
protected ProcessableJavaCompletionProposal(CompletionProposal coreProposal, JavaCompletionProposal uiProposal, JavaContentAssistInvocationContext context) throws JavaModelException { super(uiProposal.getReplacementString(), coreProposal.getReplaceStart(), uiProposal.getReplacementLength(), uiProposal.getImage(), uiProposal.getStyledDisplayString(), uiProposal.getRelevance(), true, context); this.coreProposal = coreProposal; }
@Override public StyledString getStyledDisplayString(IDocument document, int offset, BoldStylerProvider boldStylerProvider) { StyledString styledDisplayString= new StyledString(); styledDisplayString.append(getStyledDisplayString()); String displayString= styledDisplayString.getString(); if (isInJavadoc() && displayString.indexOf('<') == 0) {
@Override public StyledString getStyledDisplayString(IDocument document, int offset, BoldStylerProvider boldStylerProvider) { StyledString styledDisplayString= new StyledString(); styledDisplayString.append(getStyledDisplayString()); String displayString= styledDisplayString.getString(); if (isInJavadoc() && displayString.indexOf('<') == 0) {
public ProcessableOverrideCompletionProposal(CompletionProposal coreProposal, JavaCompletionProposal uiProposal, JavaContentAssistInvocationContext context) { super(context.getProject(), context.getCompilationUnit(), String.valueOf(coreProposal.getName()), computeParamTypes(coreProposal), coreProposal.getReplaceStart(), uiProposal.getReplacementLength(), uiProposal.getStyledDisplayString(), String.valueOf(coreProposal.getCompletion())); this.coreProposal = coreProposal; final Image image = uiProposal.getImage(); setImage(image); setRelevance(uiProposal.getRelevance()); }
public static SwAnonymousTypeCompletionProposal createAnonymousTypeCompletionProposal( final SubwordsProposalContext subwordsContext) throws JavaModelException { final JavaContentAssistInvocationContext context = subwordsContext.getContext(); final CompletionProposal proposal = subwordsContext.getProposal(); final JavaCompletionProposal jdtProposal = subwordsContext.getJdtProposal(); final IJavaProject project = context.getProject(); final String declarationSignature = String.valueOf(proposal.getDeclarationSignature()); final String declarationKey = String.valueOf(proposal.getDeclarationKey()); final String completionText = String.valueOf(proposal.getCompletion()); return new SwAnonymousTypeCompletionProposal(project, context.getCompilationUnit(), context, proposal.getReplaceStart(), jdtProposal.getReplacementLength(), completionText, jdtProposal.getStyledDisplayString(), declarationSignature, (IType) project.findElement(declarationKey, null), jdtProposal.getRelevance(), subwordsContext); }
public static SwJavaFieldWithCastedReceiverCompletionProposal createJavaFieldWithCastedReceiverCompletionProposal( final SubwordsProposalContext subwordsContext) { final JavaCompletionProposal jdtProposal = subwordsContext.getJdtProposal(); final int relevance = subwordsContext.calculateRelevance(); return new SwJavaFieldWithCastedReceiverCompletionProposal(jdtProposal.getDisplayString(), jdtProposal.getReplacementOffset(), jdtProposal.getReplacementLength(), jdtProposal.getImage(), jdtProposal.getStyledDisplayString(), relevance, true, subwordsContext.getContext(), subwordsContext.getProposal(), subwordsContext); }
public static SwJavaCompletionProposal createJavaCompletionProposal(final SubwordsProposalContext subwordsContext) { final JavaCompletionProposal jdtProposal = subwordsContext.getJdtProposal(); final int relevance = subwordsContext.calculateRelevance(); return new SwJavaCompletionProposal(jdtProposal.getReplacementString(), subwordsContext.getProposal() .getReplaceStart(), jdtProposal.getReplacementLength(), jdtProposal.getImage(), jdtProposal.getStyledDisplayString(), relevance, true, subwordsContext.getContext(), subwordsContext); }
public static SwOverrideCompletionProposal createOverrideCompletionProposal( final SubwordsProposalContext subwordsContext) { final JavaContentAssistInvocationContext context = subwordsContext.getContext(); final JavaCompletionProposal jdtProposal = subwordsContext.getJdtProposal(); final CompletionProposal proposal = subwordsContext.getProposal(); final String completionText = String.valueOf(proposal.getCompletion()); final String proposalName = String.valueOf(proposal.getName()); // parameter types do not contain any ; and don't start with L: String[] paramTypes = Signature.getParameterTypes(String.valueOf(proposal.getSignature())); for (int index = 0; index < paramTypes.length; index++) paramTypes[index] = Signature.toString(paramTypes[index]); final SwOverrideCompletionProposal res = new SwOverrideCompletionProposal(context.getProject(), context.getCompilationUnit(), proposalName, paramTypes, proposal.getReplaceStart(), jdtProposal.getReplacementLength(), jdtProposal.getStyledDisplayString(), completionText, subwordsContext); final Image image = jdtProposal.getImage(); res.setImage(image); res.setRelevance(jdtProposal.getRelevance()); return res; } }