本文整理汇总了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);
}
示例2: getConfiguredContentTypes
public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
return new String[] { IDocument.DEFAULT_CONTENT_TYPE,
XMLPartitionScanner.XML_COMMENT, XMLPartitionScanner.XML_TAG };
}
示例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;
}