本文整理匯總了Java中org.eclipse.jface.text.contentassist.ContentAssistant.enablePrefixCompletion方法的典型用法代碼示例。如果您正苦於以下問題:Java ContentAssistant.enablePrefixCompletion方法的具體用法?Java ContentAssistant.enablePrefixCompletion怎麽用?Java ContentAssistant.enablePrefixCompletion使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.jface.text.contentassist.ContentAssistant
的用法示例。
在下文中一共展示了ContentAssistant.enablePrefixCompletion方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getContentAssistant
import org.eclipse.jface.text.contentassist.ContentAssistant; //導入方法依賴的package包/類
@Override
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
ContentAssistant ca = new ContentAssistant();
JsonContentAssistProcessor processor = createContentAssistProcessor(ca);
ca.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
ca.setInformationControlCreator(getInformationControlCreator(sourceViewer));
ca.enableAutoInsert(false);
ca.enablePrefixCompletion(false);
ca.enableAutoActivation(true);
ca.setAutoActivationDelay(100);
ca.enableColoredLabels(true);
ca.setShowEmptyList(true);
ca.setRepeatedInvocationMode(true);
ca.addCompletionListener(processor);
ca.setStatusLineVisible(true);
return ca;
}
示例2: getContentAssistant
import org.eclipse.jface.text.contentassist.ContentAssistant; //導入方法依賴的package包/類
@Override
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
ContentAssistant assistant = new ContentAssistant();
assistant.enableAutoActivation(true);
assistant.setAutoActivationDelay(300);
assistant.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
assistant.setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY);
assistant.enableAutoInsert(true);
assistant.enablePrefixCompletion(true);
IContentAssistProcessor pr = new ImpexInstructionContentAssistProcessor();
assistant.setContentAssistProcessor(pr, ImpexDocumentPartitioner.IMPEX_INSTRUCTION);
//pr = new ImpexTypeAttributeContentAssistProcessor();
pr = new ImpexTypeSystemContentAssistProcessor();
assistant.setContentAssistProcessor(pr, ImpexDocumentPartitioner.IMPEX_HEADER);
pr = new ImpexDataContentAssistProcessor();
assistant.setContentAssistProcessor(pr, ImpexDocumentPartitioner.IMPEX_DATA);
pr = new ImpexCommentContentAssistProcessor();
assistant.setContentAssistProcessor(pr, ImpexDocumentPartitioner.IMPEX_COMMENT);
pr = new ImpexCommandContentAssistProcessor();
assistant.setContentAssistProcessor(pr, IDocument.DEFAULT_CONTENT_TYPE);
assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
return assistant;
}
示例3: configure
import org.eclipse.jface.text.contentassist.ContentAssistant; //導入方法依賴的package包/類
/**
* Configure the given content assistant from the given store.
*
* @param assistant the content assistant
* @param store the preference store
*/
private void configure(ContentAssistant assistant, IPreferenceStore store) {
boolean enabled = store.getBoolean(AUTOACTIVATION);
assistant.enableAutoActivation(enabled);
int delay = store.getInt(AUTOACTIVATION_DELAY);
assistant.setAutoActivationDelay(delay);
Color c = getColor(store, PARAMETERS_FOREGROUND, colorManager);
assistant.setContextInformationPopupForeground(c);
assistant.setContextSelectorForeground(c);
c = getColor(store, PARAMETERS_BACKGROUND, colorManager);
assistant.setContextInformationPopupBackground(c);
assistant.setContextSelectorBackground(c);
enabled = store.getBoolean(AUTOINSERT);
assistant.enableAutoInsert(enabled);
enabled = store.getBoolean(PREFIX_COMPLETION);
assistant.enablePrefixCompletion(enabled);
enabled = store.getBoolean(USE_COLORED_LABELS);
assistant.enableColoredLabels(enabled);
configureTemplateProcessor(assistant, store);
}
示例4: getContentAssistant
import org.eclipse.jface.text.contentassist.ContentAssistant; //導入方法依賴的package包/類
@Override
public final IContentAssistant getContentAssistant(final ISourceViewer sourceViewer) {
final ContentAssistant contentAssistant = new ContentAssistant();
contentAssistant.enableAutoInsert(true);
contentAssistant.enableAutoActivation(true);
contentAssistant.enablePrefixCompletion(true);
contentAssistant.setContentAssistProcessor(new ContentAssistProcessor(getValidNames(), type),
"__dftl_partition_content_type");
return contentAssistant;
}
開發者ID:info-sharing-environment,項目名稱:NIEM-Modeling-Tool,代碼行數:11,代碼來源:ReferenceLibraryClassifierNameDialog.java
示例5: configure
import org.eclipse.jface.text.contentassist.ContentAssistant; //導入方法依賴的package包/類
/**
* Configure the given content assistant from the given store.
*
* @param assistant the content assistant
* @param store the preference store
*/
public static void configure(ContentAssistant assistant, IPreferenceStore store) {
JavaTextTools textTools= JavaPlugin.getDefault().getJavaTextTools();
IColorManager manager= textTools.getColorManager();
boolean enabled= store.getBoolean(AUTOACTIVATION);
assistant.enableAutoActivation(enabled);
int delay= store.getInt(AUTOACTIVATION_DELAY);
assistant.setAutoActivationDelay(delay);
Color c= getColor(store, PARAMETERS_FOREGROUND, manager);
assistant.setContextInformationPopupForeground(c);
assistant.setContextSelectorForeground(c);
c= getColor(store, PARAMETERS_BACKGROUND, manager);
assistant.setContextInformationPopupBackground(c);
assistant.setContextSelectorBackground(c);
enabled= store.getBoolean(AUTOINSERT);
assistant.enableAutoInsert(enabled);
enabled= store.getBoolean(PREFIX_COMPLETION);
assistant.enablePrefixCompletion(enabled);
enabled= store.getBoolean(USE_COLORED_LABELS);
assistant.enableColoredLabels(enabled);
configureJavaProcessor(assistant, store);
configureJavaDocProcessor(assistant, store);
}