private static void changeJavaDocProcessor(ContentAssistant assistant, IPreferenceStore store, String key) { JavadocCompletionProcessor jdcp= getJavaDocProcessor(assistant); if (jdcp == null) return; if (AUTOACTIVATION_TRIGGERS_JAVADOC.equals(key)) { String triggers= store.getString(AUTOACTIVATION_TRIGGERS_JAVADOC); if (triggers != null) jdcp.setCompletionProposalAutoActivationCharacters(triggers.toCharArray()); } else if (CASE_SENSITIVITY.equals(key)) { boolean enabled= store.getBoolean(CASE_SENSITIVITY); jdcp.restrictProposalsToMatchingCases(enabled); } }
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(getInformationControlCreator(sourceViewer)); return assistant; } return null; }
@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() { @Override public IInformationControl createInformationControl(Shell parent) { return new DefaultInformationControl(parent, JavaPlugin.getAdditionalInfoAffordanceString()); } }); return assistant; } return null; }
private static void configureJavaDocProcessor(ContentAssistant assistant, IPreferenceStore store) { JavadocCompletionProcessor jdcp= getJavaDocProcessor(assistant); if (jdcp == null) return; String triggers= store.getString(AUTOACTIVATION_TRIGGERS_JAVADOC); if (triggers != null) jdcp.setCompletionProposalAutoActivationCharacters(triggers.toCharArray()); boolean enabled= store.getBoolean(CASE_SENSITIVITY); jdcp.restrictProposalsToMatchingCases(enabled); }
@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() { @Override public IInformationControl createInformationControl(Shell parent) { return new DefaultInformationControl(parent, JavaPlugin.getAdditionalInfoAffordanceString()); } }); return assistant; } return null; }
private static void configureJavaDocProcessor(ContentAssistant assistant, IPreferenceStore store) { JavadocCompletionProcessor jdcp= getJavaDocProcessor(assistant); if (jdcp == null) return; String triggers= store.getString(AUTOACTIVATION_TRIGGERS_JAVADOC); if (triggers != null) jdcp.setCompletionProposalAutoActivationCharacters(triggers.toCharArray()); boolean enabled= store.getBoolean(CASE_SENSITIVITY); jdcp.restrictProposalsToMatchingCases(enabled); }
private static void configureJavaDocProcessor(ContentAssistant assistant, IPreferenceStore store) { JavadocCompletionProcessor jdcp= getJavaDocProcessor(assistant); if (jdcp == null) return; String triggers= store.getString(AUTOACTIVATION_TRIGGERS_JAVADOC); if (triggers != null) jdcp.setCompletionProposalAutoActivationCharacters(triggers.toCharArray()); boolean enabled= store.getBoolean(CASE_SENSITIVITY); jdcp.restrictProposalsToMatchingCases(enabled); }
private static void changeJavaDocProcessor(ContentAssistant assistant, IPreferenceStore store, String key) { JavadocCompletionProcessor jdcp= getJavaDocProcessor(assistant); if (jdcp == null) return; if (AUTOACTIVATION_TRIGGERS_JAVADOC.equals(key)) { String triggers= store.getString(AUTOACTIVATION_TRIGGERS_JAVADOC); if (triggers != null) jdcp.setCompletionProposalAutoActivationCharacters(triggers.toCharArray()); } else if (CASE_SENSITIVITY.equals(key)) { boolean enabled= store.getBoolean(CASE_SENSITIVITY); jdcp.restrictProposalsToMatchingCases(enabled); } }
private static void changeJavaDocProcessor(ContentAssistant assistant, IPreferenceStore store, String key) { JavadocCompletionProcessor jdcp= getJavaDocProcessor(assistant); if (jdcp == null) return; if (AUTOACTIVATION_TRIGGERS_JAVADOC.equals(key)) { String triggers= store.getString(AUTOACTIVATION_TRIGGERS_JAVADOC); if (triggers != null) jdcp.setCompletionProposalAutoActivationCharacters(triggers.toCharArray()); } else if (CASE_SENSITIVITY.equals(key)) { boolean enabled= store.getBoolean(CASE_SENSITIVITY); jdcp.restrictProposalsToMatchingCases(enabled); } }