Lines 89-101
Link Here
|
89 |
private static final boolean DEBUG= "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jdt.ui/debug/ResultCollector")); //$NON-NLS-1$//$NON-NLS-2$ |
89 |
private static final boolean DEBUG= "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jdt.ui/debug/ResultCollector")); //$NON-NLS-1$//$NON-NLS-2$ |
90 |
|
90 |
|
91 |
/** Triggers for method proposals without parameters. Do not modify. */ |
91 |
/** Triggers for method proposals without parameters. Do not modify. */ |
92 |
protected final static char[] METHOD_TRIGGERS= new char[] { ';', ',', '.', '\t', '[', ' ' }; |
92 |
protected final static char[] METHOD_TRIGGERS= new char[] { ';', ',', '.', '\t', '[', ' ', '(', '+', '-', '/', '*', '<', '>', '&', '|', '^', '?', ':', '^', '%', ']' }; |
93 |
/** Triggers for method proposals. Do not modify. */ |
93 |
/** Triggers for method proposals. Do not modify. */ |
94 |
protected final static char[] METHOD_WITH_ARGUMENTS_TRIGGERS= new char[] { '(', '-', ' ' }; |
94 |
protected final static char[] METHOD_WITH_ARGUMENTS_TRIGGERS= new char[] { '(', '-', ' ' }; |
95 |
/** Triggers for types. Do not modify. */ |
95 |
/** Triggers for types. Do not modify. */ |
96 |
protected final static char[] TYPE_TRIGGERS= new char[] { '.', '\t', '[', '(', ' ' }; |
96 |
protected final static char[] TYPE_TRIGGERS= new char[] { '.', '\t', '[', '(', ' ' }; |
97 |
/** Triggers for variables. Do not modify. */ |
97 |
/** Triggers for variables. Do not modify. */ |
98 |
protected final static char[] VAR_TRIGGER= new char[] { '\t', ' ', '=', ';', '.' }; |
98 |
protected final static char[] VAR_TRIGGERS= new char[] { '\t', ' ', '=', ';', '.', '+', '-', '/', '*', '<', '>', '&', '|', '^', '~', '?', ':', '%', ')', '}', ']', ',' }; |
|
|
99 |
/** Triggers for keywords. */ |
100 |
protected final static char[] KEYWORD_TRIGGERS= new char[] { '\t', ' ', '=', ';', '.', '&', '|', '?', ':', '(', ')', '{', '}', ']', ',', '^' }; |
99 |
|
101 |
|
100 |
private final CompletionProposalLabelProvider fLabelProvider= new CompletionProposalLabelProvider(); |
102 |
private final CompletionProposalLabelProvider fLabelProvider= new CompletionProposalLabelProvider(); |
101 |
private final ImageDescriptorRegistry fRegistry= JavaPlugin.getImageDescriptorRegistry(); |
103 |
private final ImageDescriptorRegistry fRegistry= JavaPlugin.getImageDescriptorRegistry(); |
Lines 588-594
Link Here
|
588 |
if (fJavaProject != null) |
590 |
if (fJavaProject != null) |
589 |
javaProposal.setProposalInfo(new FieldProposalInfo(fJavaProject, proposal)); |
591 |
javaProposal.setProposalInfo(new FieldProposalInfo(fJavaProject, proposal)); |
590 |
|
592 |
|
591 |
javaProposal.setTriggerCharacters(VAR_TRIGGER); |
593 |
javaProposal.setTriggerCharacters(VAR_TRIGGERS); |
592 |
|
594 |
|
593 |
return javaProposal; |
595 |
return javaProposal; |
594 |
} |
596 |
} |
Lines 599-605
Link Here
|
599 |
int length= getLength(proposal); |
601 |
int length= getLength(proposal); |
600 |
String label= fLabelProvider.createSimpleLabel(proposal); |
602 |
String label= fLabelProvider.createSimpleLabel(proposal); |
601 |
int relevance= computeRelevance(proposal); |
603 |
int relevance= computeRelevance(proposal); |
602 |
return new JavaCompletionProposal(completion, start, length, null, label, relevance); |
604 |
JavaCompletionProposal javaProposal= new JavaCompletionProposal(completion, start, length, null, label, relevance); |
|
|
605 |
javaProposal.setTriggerCharacters(KEYWORD_TRIGGERS); |
606 |
return javaProposal; |
603 |
} |
607 |
} |
604 |
|
608 |
|
605 |
private IJavaCompletionProposal createLabelProposal(CompletionProposal proposal) { |
609 |
private IJavaCompletionProposal createLabelProposal(CompletionProposal proposal) { |
Lines 621-627
Link Here
|
621 |
int relevance= computeRelevance(proposal); |
625 |
int relevance= computeRelevance(proposal); |
622 |
|
626 |
|
623 |
final JavaCompletionProposal javaProposal= new JavaCompletionProposal(completion, start, length, image, label, relevance); |
627 |
final JavaCompletionProposal javaProposal= new JavaCompletionProposal(completion, start, length, image, label, relevance); |
624 |
javaProposal.setTriggerCharacters(VAR_TRIGGER); |
628 |
javaProposal.setTriggerCharacters(VAR_TRIGGERS); |
625 |
return javaProposal; |
629 |
return javaProposal; |
626 |
} |
630 |
} |
627 |
|
631 |
|