mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 98881 - Turned on auto activation for completion.
This commit is contained in:
parent
7425c75771
commit
856008f63f
1 changed files with 9 additions and 26 deletions
|
@ -49,6 +49,8 @@ public class CCompletionProcessor2 implements IContentAssistProcessor {
|
||||||
private IEditorPart editor;
|
private IEditorPart editor;
|
||||||
private String errorMessage;
|
private String errorMessage;
|
||||||
|
|
||||||
|
private char[] autoActivationChars;
|
||||||
|
|
||||||
// Property names
|
// Property names
|
||||||
private String assistPrefix = "CEditor.contentassist"; //$NON-NLS-1$
|
private String assistPrefix = "CEditor.contentassist"; //$NON-NLS-1$
|
||||||
private String noCompletions = assistPrefix + ".noCompletions"; //$NON-NLS-1$
|
private String noCompletions = assistPrefix + ".noCompletions"; //$NON-NLS-1$
|
||||||
|
@ -59,9 +61,6 @@ public class CCompletionProcessor2 implements IContentAssistProcessor {
|
||||||
this.editor = editor;
|
this.editor = editor;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)
|
|
||||||
*/
|
|
||||||
public ICompletionProposal[] computeCompletionProposals(final ITextViewer viewer, int offset) {
|
public ICompletionProposal[] computeCompletionProposals(final ITextViewer viewer, int offset) {
|
||||||
try {
|
try {
|
||||||
IWorkingCopy workingCopy = CUIPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(editor.getEditorInput());
|
IWorkingCopy workingCopy = CUIPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(editor.getEditorInput());
|
||||||
|
@ -185,48 +184,32 @@ public class CCompletionProcessor2 implements IContentAssistProcessor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer, int)
|
|
||||||
*/
|
|
||||||
public IContextInformation[] computeContextInformation(ITextViewer viewer,
|
public IContextInformation[] computeContextInformation(ITextViewer viewer,
|
||||||
int offset) {
|
int offset) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
|
|
||||||
*/
|
|
||||||
public char[] getCompletionProposalAutoActivationCharacters() {
|
public char[] getCompletionProposalAutoActivationCharacters() {
|
||||||
// TODO Auto-generated method stub
|
return autoActivationChars;
|
||||||
return null;
|
}
|
||||||
|
|
||||||
|
public void setCompletionProposalAutoActivationCharacters(char[] autoActivationChars) {
|
||||||
|
this.autoActivationChars = autoActivationChars;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationAutoActivationCharacters()
|
|
||||||
*/
|
|
||||||
public char[] getContextInformationAutoActivationCharacters() {
|
public char[] getContextInformationAutoActivationCharacters() {
|
||||||
// TODO Auto-generated method stub
|
return null; // none
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getErrorMessage()
|
|
||||||
*/
|
|
||||||
public String getErrorMessage() {
|
public String getErrorMessage() {
|
||||||
return errorMessage;
|
return errorMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationValidator()
|
|
||||||
*/
|
|
||||||
public IContextInformationValidator getContextInformationValidator() {
|
public IContextInformationValidator getContextInformationValidator() {
|
||||||
return new CParameterListValidator();
|
return new CParameterListValidator();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCompletionProposalAutoActivationCharacters(char[] activationSet) {
|
|
||||||
}
|
|
||||||
|
|
||||||
public void orderProposalsAlphabetically(boolean order) {
|
public void orderProposalsAlphabetically(boolean order) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue