本文整理匯總了Java中org.eclipse.jface.text.contentassist.ContentAssistant.setRestoreCompletionProposalSize方法的典型用法代碼示例。如果您正苦於以下問題:Java ContentAssistant.setRestoreCompletionProposalSize方法的具體用法?Java ContentAssistant.setRestoreCompletionProposalSize怎麽用?Java ContentAssistant.setRestoreCompletionProposalSize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.jface.text.contentassist.ContentAssistant
的用法示例。
在下文中一共展示了ContentAssistant.setRestoreCompletionProposalSize方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getContentAssistant
import org.eclipse.jface.text.contentassist.ContentAssistant; //導入方法依賴的package包/類
@Override
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
if (getEditor() != null) {
ContentAssistant assistant= new ContentAssistant();
assistant.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
assistant.setRestoreCompletionProposalSize(getSettings("completion_proposal_size")); //$NON-NLS-1$
IContentAssistProcessor javaProcessor= new JavaCompletionProcessor(getEditor(), assistant, IDocument.DEFAULT_CONTENT_TYPE);
assistant.setContentAssistProcessor(javaProcessor, IDocument.DEFAULT_CONTENT_TYPE);
ContentAssistProcessor singleLineProcessor= new JavaCompletionProcessor(getEditor(), assistant, IJavaPartitions.JAVA_SINGLE_LINE_COMMENT);
assistant.setContentAssistProcessor(singleLineProcessor, IJavaPartitions.JAVA_SINGLE_LINE_COMMENT);
ContentAssistProcessor stringProcessor= new JavaCompletionProcessor(getEditor(), assistant, IJavaPartitions.JAVA_STRING);
assistant.setContentAssistProcessor(stringProcessor, IJavaPartitions.JAVA_STRING);
ContentAssistProcessor multiLineProcessor= new JavaCompletionProcessor(getEditor(), assistant, IJavaPartitions.JAVA_MULTI_LINE_COMMENT);
assistant.setContentAssistProcessor(multiLineProcessor, IJavaPartitions.JAVA_MULTI_LINE_COMMENT);
ContentAssistProcessor javadocProcessor= new JavadocCompletionProcessor(getEditor(), assistant);
assistant.setContentAssistProcessor(javadocProcessor, IJavaPartitions.JAVA_DOC);
ContentAssistPreference.configure(assistant, fPreferenceStore);
assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
assistant.setInformationControlCreator(new IInformationControlCreator() {
public IInformationControl createInformationControl(Shell parent) {
return new DefaultInformationControl(parent, JavaPlugin.getAdditionalInfoAffordanceString());
}
});
return assistant;
}
return null;
}
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:40,代碼來源:JavaSourceViewerConfiguration.java
示例2: getContentAssistant
import org.eclipse.jface.text.contentassist.ContentAssistant; //導入方法依賴的package包/類
@Override
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
if (getEditor() != null) {
ContentAssistant assistant = new ContentAssistant();
assistant.enableColoredLabels(true);
assistant.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
assistant.setRestoreCompletionProposalSize(getSettings("completion_proposal_size")); //$NON-NLS-1$
IContentAssistProcessor javaProcessor = new TypeScriptCompletionProcessor(getEditor(), assistant,
IDocument.DEFAULT_CONTENT_TYPE);
assistant.setContentAssistProcessor(javaProcessor, IDocument.DEFAULT_CONTENT_TYPE);
ContentAssistProcessor singleLineProcessor = new TypeScriptCompletionProcessor(getEditor(), assistant,
IJavaScriptPartitions.JAVA_SINGLE_LINE_COMMENT);
assistant.setContentAssistProcessor(singleLineProcessor, IJavaScriptPartitions.JAVA_SINGLE_LINE_COMMENT);
ContentAssistProcessor stringProcessor = new TypeScriptCompletionProcessor(getEditor(), assistant,
IJavaScriptPartitions.JAVA_STRING);
assistant.setContentAssistProcessor(stringProcessor, IJavaScriptPartitions.JAVA_STRING);
assistant.setContentAssistProcessor(stringProcessor, IJavaScriptPartitions.JAVA_CHARACTER);
ContentAssistProcessor multiLineProcessor = new TypeScriptCompletionProcessor(getEditor(), assistant,
IJavaScriptPartitions.JAVA_MULTI_LINE_COMMENT);
assistant.setContentAssistProcessor(multiLineProcessor, IJavaScriptPartitions.JAVA_MULTI_LINE_COMMENT);
ContentAssistProcessor templateLiteralProcessor = new TypeScriptCompletionProcessor(getEditor(), assistant,
IJavaScriptPartitions.JAVASCRIPT_TEMPLATE_LITERAL);
assistant.setContentAssistProcessor(templateLiteralProcessor,
IJavaScriptPartitions.JAVASCRIPT_TEMPLATE_LITERAL);
ContentAssistProcessor jsxProcessor = new TypeScriptCompletionProcessor(getEditor(), assistant,
IJSXPartitions.JSX);
assistant.setContentAssistProcessor(jsxProcessor, IJSXPartitions.JSX);
ContentAssistProcessor javadocProcessor = new TypeScriptJavadocCompletionProcessor(getEditor(), assistant);
assistant.setContentAssistProcessor(javadocProcessor, IJavaScriptPartitions.JAVA_DOC);
ContentAssistPreference.configure(assistant, fPreferenceStore);
assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
// assistant.setContextInformationPopupOrientation(ContentAssistant.CONTEXT_INFO_BELOW);
// assistant.setProposalPopupOrientation(ContentAssistant.PROPOSAL_REMOVE);
// assistant.setAutoActivationDelay(0);
// assistant.enableColoredLabels(true);
// assistant.enableAutoActivation(true);
return assistant;
}
return null;
}
示例3: setDialogSettings
import org.eclipse.jface.text.contentassist.ContentAssistant; //導入方法依賴的package包/類
private void setDialogSettings(ContentAssistant assistant) {
if (dialogSettings != null)
assistant.setRestoreCompletionProposalSize(dialogSettings);
}
示例4: getContentAssistant
import org.eclipse.jface.text.contentassist.ContentAssistant; //導入方法依賴的package包/類
@Override
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
ContentAssistant assistant = new ContentAssistant();
assistant.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
assistant.setRestoreCompletionProposalSize(getSettings("completion_proposal_size")); //$NON-NLS-1$
IContentAssistProcessor javaProcessor = new HydrographJavaCompletionProcessor(assistant, IDocument.DEFAULT_CONTENT_TYPE);
assistant.setContentAssistProcessor(javaProcessor, IDocument.DEFAULT_CONTENT_TYPE);
ContentAssistProcessor singleLineProcessor = new HydrographJavaCompletionProcessor(assistant,
IJavaPartitions.JAVA_SINGLE_LINE_COMMENT);
assistant.setContentAssistProcessor(singleLineProcessor, IJavaPartitions.JAVA_SINGLE_LINE_COMMENT);
ContentAssistProcessor stringProcessor = new HydrographJavaCompletionProcessor(assistant, IJavaPartitions.JAVA_STRING);
assistant.setContentAssistProcessor(stringProcessor, IJavaPartitions.JAVA_STRING);
ContentAssistProcessor multiLineProcessor = new HydrographJavaCompletionProcessor(assistant,
IJavaPartitions.JAVA_MULTI_LINE_COMMENT);
assistant.setContentAssistProcessor(multiLineProcessor, IJavaPartitions.JAVA_MULTI_LINE_COMMENT);
ContentAssistProcessor javadocProcessor = new HydrographJavaCompletionProcessor(assistant,
IJavaPartitions.JAVA_DOC);
assistant.setContentAssistProcessor(javadocProcessor, IJavaPartitions.JAVA_DOC);
ContentAssistPreference.configure(assistant, fPreferenceStore);
assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
return assistant;
}