protected void setAutoActivation(ContentAssistant assistant) { if (contentAssistProcessor != null) { boolean activated = contentAssistProcessor.getCompletionProposalAutoActivationCharacters() != null; assistant.enableAutoActivation(activated); } }
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) { ContentAssistant assistant = new ContentAssistant(); assistant.enableAutoActivation(true); assistant.enableAutoInsert(true); assistant.setContentAssistProcessor(_fTemplateProcessor, IDocument.DEFAULT_CONTENT_TYPE); return assistant; } }
@Override public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) { ContentAssistant assistant= new ContentAssistant(); assistant.enableAutoActivation(true); assistant.enableAutoInsert(true); assistant.setContentAssistProcessor(fTemplateProcessor, IDocument.DEFAULT_CONTENT_TYPE); return assistant; } };
@Override public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) { ContentAssistant assistant= new ContentAssistant(); assistant.enableAutoActivation(true); assistant.enableAutoInsert(true); assistant.setContentAssistProcessor(fTemplateProcessor, IDocument.DEFAULT_CONTENT_TYPE); return assistant; } };
protected void changeConfiguration(PropertyChangeEvent event) { String p = event.getProperty(); if (AntEditorPreferenceConstants.CODEASSIST_AUTOACTIVATION.equals(p)) { boolean enabled = fPreferenceStore.getBoolean(AntEditorPreferenceConstants.CODEASSIST_AUTOACTIVATION); fContentAssistant.enableAutoActivation(enabled); } else if (AntEditorPreferenceConstants.CODEASSIST_AUTOACTIVATION_DELAY.equals(p) && fContentAssistant != null) { int delay = fPreferenceStore.getInt(AntEditorPreferenceConstants.CODEASSIST_AUTOACTIVATION_DELAY); fContentAssistant.setAutoActivationDelay(delay); } else if (AntEditorPreferenceConstants.CODEASSIST_AUTOINSERT.equals(p) && fContentAssistant != null) { boolean enabled = fPreferenceStore.getBoolean(AntEditorPreferenceConstants.CODEASSIST_AUTOINSERT); fContentAssistant.enableAutoInsert(enabled); } else if (AntEditorPreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS.equals(p)) { changeContentAssistProcessor(); } }
/** * Changes the configuration of the given content assistant according to the given property change event and the * given preference store. */ public static void changeConfiguration(ContentAssistant assistant, IPreferenceStore store, PropertyChangeEvent event) { String p = event.getProperty(); IPreferenceStore preferenceStore = SQLEditorPlugin.getDefault().getPreferenceStore(); if (PreferenceConstants.INSERT_SINGLE_PROPOSALS_AUTO.equals(p)) { assistant.enableAutoInsert(preferenceStore.getBoolean(PreferenceConstants.INSERT_SINGLE_PROPOSALS_AUTO)); } else if (PreferenceConstants.ENABLE_AUTO_ACTIVATION.equals(p)) { assistant.enableAutoActivation(preferenceStore.getBoolean(PreferenceConstants.ENABLE_AUTO_ACTIVATION)); } else if (PreferenceConstants.AUTO_ACTIVATION_DELAY.equals(p)) { assistant.setAutoActivationDelay(preferenceStore.getInt(PreferenceConstants.AUTO_ACTIVATION_DELAY)); } }
@Override public IContentAssistant getContentAssistant(ISourceViewer viewer) { ContentAssistant assistant = new ContentAssistant(); assistant.setContentAssistProcessor(new BndCompletionProcessor(), IDocument.DEFAULT_CONTENT_TYPE); assistant.setContentAssistProcessor(new BndCompletionProcessor(), SINGLELINE_COMMENT_TYPE); assistant.enableAutoActivation(true); return assistant; } }
@Override public IContentAssistant getContentAssistant(ISourceViewer viewer) { ContentAssistant assistant = new ContentAssistant(); assistant.setContentAssistProcessor(new BndCompletionProcessor(), IDocument.DEFAULT_CONTENT_TYPE); assistant.setContentAssistProcessor(new BndCompletionProcessor(), SINGLELINE_COMMENT_TYPE); assistant.enableAutoActivation(true); return assistant; } }
assistant.enableAutoActivation(enabled); } else if (AUTOACTIVATION_DELAY.equals(p)) { int delay= store.getInt(AUTOACTIVATION_DELAY);
assistant.enableAutoActivation(enabled); } else if (PreferenceConstants.CODEASSIST_AUTOACTIVATION_DELAY.equals(p)) { int delay= store.getInt(PreferenceConstants.CODEASSIST_AUTOACTIVATION_DELAY);
@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; }
assistant.enableAutoActivation(true); assistant.enableAutoInsert(true); assistant.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
assistant.enableAutoActivation(enabled);
/** * 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); }
/** * Configure the given content assistant from the given 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, PROPOSALS_FOREGROUND, manager); assistant.setProposalSelectorForeground(c); c= getColor(store, PROPOSALS_BACKGROUND, manager); assistant.setProposalSelectorBackground(c); 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); configureJavaProcessor(assistant, store); configureJavaDocProcessor(assistant, store); }
fContentAssistant.enableAutoActivation(fPreferenceStore.getBoolean(AntEditorPreferenceConstants.CODEASSIST_AUTOACTIVATION)); fContentAssistant.setAutoActivationDelay(fPreferenceStore.getInt(AntEditorPreferenceConstants.CODEASSIST_AUTOACTIVATION_DELAY)); fContentAssistant.setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY);
/** * 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); boolean completionProposaltriggerCharsDisabled = store.getBoolean(DISABLE_COMPLETION_PROPOSAL_TRIGGER_CHARS); assistant.enableCompletionProposalTriggerChars(!completionProposaltriggerCharsDisabled); configureJavaProcessor(assistant, store); configureJavaDocProcessor(assistant, store); }
assistant.enableAutoActivation(store.getBoolean(PreferenceConstants.CODEASSIST_AUTOACTIVATION)); assistant.setAutoActivationDelay(store.getInt(PreferenceConstants.CODEASSIST_AUTOACTIVATION_DELAY)); assistant.setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY);
assistant.enableAutoActivation(store.getBoolean(PreferenceConstants.CODEASSIST_AUTOACTIVATION)); assistant.setAutoActivationDelay(store.getInt(PreferenceConstants.CODEASSIST_AUTOACTIVATION_DELAY)); assistant.setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY);
assistant.enableAutoActivation(store.getBoolean(PreferenceConstants.CODEASSIST_AUTOACTIVATION)); assistant.setAutoActivationDelay(store.getInt(PreferenceConstants.CODEASSIST_AUTOACTIVATION_DELAY)); assistant.setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY);