XMLContentAssistantProcessor.java
上传用户:fanxing
上传日期:2017-01-19
资源大小:36k
文件大小:3k
源码类别:
PlugIns编程
开发平台:
Java
- /*******************************************************************************
- * Copyright (c) 2005 Prashant Deva.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License - v 1.0
- * which is available at http://www.eclipse.org/legal/epl-v10.html
- *******************************************************************************/
- package projection_test.editors;
- import org.eclipse.jface.text.ITextViewer;
- import org.eclipse.jface.text.contentassist.CompletionProposal;
- import org.eclipse.jface.text.contentassist.ICompletionProposal;
- import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
- import org.eclipse.jface.text.contentassist.IContextInformation;
- import org.eclipse.jface.text.contentassist.IContextInformationValidator;
- public class XMLContentAssistantProcessor implements IContentAssistProcessor
- {
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)
- */
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,
- int offset)
- {
- ICompletionProposal[] completionProposals = new ICompletionProposal[1];
- completionProposals[0]=new CompletionProposal("justTesting",0,1,5);
- return completionProposals;
- }
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer, int)
- */
- public IContextInformation[] computeContextInformation(ITextViewer viewer,
- int offset)
- {
- // TODO Auto-generated method stub
- return null;
- }
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
- */
- public char[] getCompletionProposalAutoActivationCharacters()
- {
- return new char[] {'a'};
- }
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationAutoActivationCharacters()
- */
- public char[] getContextInformationAutoActivationCharacters()
- {
- // TODO Auto-generated method stub
- return null;
- }
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getErrorMessage()
- */
- public String getErrorMessage()
- {
- // TODO Auto-generated method stub
- return null;
- }
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationValidator()
- */
- public IContextInformationValidator getContextInformationValidator()
- {
- // TODO Auto-generated method stub
- return null;
- }
- }