當前位置: 首頁>>代碼示例>>Java>>正文


Java IDocument.DEFAULT_CONTENT_TYPE屬性代碼示例

本文整理匯總了Java中org.eclipse.jface.text.IDocument.DEFAULT_CONTENT_TYPE屬性的典型用法代碼示例。如果您正苦於以下問題:Java IDocument.DEFAULT_CONTENT_TYPE屬性的具體用法?Java IDocument.DEFAULT_CONTENT_TYPE怎麽用?Java IDocument.DEFAULT_CONTENT_TYPE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.eclipse.jface.text.IDocument的用法示例。


在下文中一共展示了IDocument.DEFAULT_CONTENT_TYPE屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getPartitionType

/**
 * All {@link PseudoTokens} are considered to be contained in the default partition except for
 * {@link PseudoTokens#JS_DOC_TOKEN}.
 */
@Override
public String getPartitionType(int antlrTokenType) {
	if (antlrTokenType == PseudoTokens.JS_DOC_TOKEN) {
		return JS_DOC_PARTITION;
	}
	if (antlrTokenType >= PseudoTokens.PSEUDO_TOKEN_START) {
		return IDocument.DEFAULT_CONTENT_TYPE;
	}
	return super.getPartitionType(antlrTokenType);
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:14,代碼來源:TokenTypeToPartitionMapper.java

示例2: getConfiguredContentTypes

public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
	return new String[] { IDocument.DEFAULT_CONTENT_TYPE,
			XMLPartitionScanner.XML_COMMENT, XMLPartitionScanner.XML_TAG };
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:4,代碼來源:XMLConfiguration.java

示例3: getContentAssistant

@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;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:35,代碼來源:HydrographJavaSourceViewerConfiguration.java


注:本文中的org.eclipse.jface.text.IDocument.DEFAULT_CONTENT_TYPE屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。