⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pythonstringcompletionprocessor.java

📁 Python Development Environment (Python IDE plugin for Eclipse). Features editor, code completion, re
💻 JAVA
字号:
package org.python.pydev.editor.codecompletion;

import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jface.text.contentassist.IContextInformationValidator;
import org.python.pydev.editor.PyEdit;

public class PythonStringCompletionProcessor extends PythonCompletionProcessor{

	public PythonStringCompletionProcessor(PyEdit edit, PyContentAssistant pyContentAssistant) {
		super(edit, pyContentAssistant);
	}
	
	@Override
	public char[] getCompletionProposalAutoActivationCharacters() {
		//no auto-activation within strings.
		return new char[]{'@'};
	}

    protected IPyCodeCompletion getCodeCompletionEngine() {
        return new PyStringCodeCompletion();
    }

    /**
     * 
     * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationValidator()
     */
    public IContextInformationValidator getContextInformationValidator() {
        return new IContextInformationValidator(){

            public void install(IContextInformation info, ITextViewer viewer, int offset) {
            }

            public boolean isContextInformationValid(int offset) {
                return true;
            }
            
        };
    }
    
    public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset) {
        return new IContextInformation[]{};
    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -