Java Code Examples for org.eclipse.jdt.internal.ui.JavaUIMessages#JavaEditor_codeassist_noCompletions
The following examples show how to use
org.eclipse.jdt.internal.ui.JavaUIMessages#JavaEditor_codeassist_noCompletions .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FieldNameProcessor.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
public ICompletionProposal[] computeCompletionProposals(IContentAssistSubjectControl contentAssistSubject, int documentOffset) { if (fFieldNameProposals.length == 0) return null; String input= contentAssistSubject.getDocument().get(); ArrayList<JavaCompletionProposal> proposals= new ArrayList<JavaCompletionProposal>(); String prefix= input.substring(0, documentOffset); ImageDescriptor imageDescriptor= JavaElementImageProvider.getFieldImageDescriptor(false, fRefactoring.getVisibility()); Image image= fImageRegistry.get(imageDescriptor); for (int i= 0; i < fFieldNameProposals.length; i++) { String tempName= fFieldNameProposals[i]; if (tempName.length() == 0 || ! tempName.startsWith(prefix)) continue; JavaCompletionProposal proposal= new JavaCompletionProposal(tempName, 0, input.length(), image, tempName, 0); proposals.add(proposal); } fErrorMessage= proposals.size() > 0 ? null : JavaUIMessages.JavaEditor_codeassist_noCompletions; return proposals.toArray(new ICompletionProposal[proposals.size()]); }
Example 2
Source File: VariableNamesProcessor.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
public ICompletionProposal[] computeCompletionProposals(IContentAssistSubjectControl contentAssistSubject, int documentOffset) { if (fTempNameProposals.length == 0) return null; String input= contentAssistSubject.getDocument().get(); ArrayList<JavaCompletionProposal> proposals= new ArrayList<JavaCompletionProposal>(); String prefix= input.substring(0, documentOffset); Image image= fImageRegistry.get(fProposalImageDescriptor); for (int i= 0; i < fTempNameProposals.length; i++) { String tempName= fTempNameProposals[i]; if (tempName.length() == 0 || ! tempName.startsWith(prefix)) continue; JavaCompletionProposal proposal= new JavaCompletionProposal(tempName, 0, input.length(), image, tempName, 0); proposals.add(proposal); } fErrorMessage= proposals.size() > 0 ? null : JavaUIMessages.JavaEditor_codeassist_noCompletions; return proposals.toArray(new ICompletionProposal[proposals.size()]); }
Example 3
Source File: ContentAssistProcessor.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
public String getErrorMessage() { if (fErrorMessage != null) return fErrorMessage; if (fNumberOfComputedResults > 0) return null; return JavaUIMessages.JavaEditor_codeassist_noCompletions; }
Example 4
Source File: PatternExpressionCompletionProcessor.java From bonita-studio with GNU General Public License v2.0 | 4 votes |
@Override public String getErrorMessage() { return JavaUIMessages.JavaEditor_codeassist_noCompletions; }