本文整理汇总了Java中org.eclipse.che.ide.api.editor.partition.DocumentPartitioner类的典型用法代码示例。如果您正苦于以下问题:Java DocumentPartitioner类的具体用法?Java DocumentPartitioner怎么用?Java DocumentPartitioner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DocumentPartitioner类属于org.eclipse.che.ide.api.editor.partition包,在下文中一共展示了DocumentPartitioner类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configurePartitioner
import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; //导入依赖的package包/类
/**
* Configures the editor's DocumentPartitioner.
*
* @param documentHandle the handle to the document
*/
private void configurePartitioner(final DocumentHandle documentHandle) {
final DocumentPartitioner partitioner = configuration.getPartitioner();
if (partitioner != null) {
partitioner.setDocumentHandle(documentHandle);
documentHandle.getDocEventBus().addHandler(DocumentChangedEvent.TYPE, partitioner);
partitioner.initialize();
}
}
示例2: CodeAssistantImpl
import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; //导入依赖的package包/类
@AssistedInject
public CodeAssistantImpl(
@Assisted final DocumentPartitioner partitioner,
@Assisted TextEditor textEditor,
NotificationManager notificationManager) {
this.notificationManager = notificationManager;
processors = new HashMap<>();
res.defaultSimpleListCss().ensureInjected();
res.autocompleteComponentCss().ensureInjected();
res.popupCss().ensureInjected();
this.partitioner = partitioner;
this.textEditor = textEditor;
}
示例3: ReconcilerWithAutoSave
import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; //导入依赖的package包/类
@AssistedInject
public ReconcilerWithAutoSave(
@Assisted final String partition, @Assisted final DocumentPartitioner partitioner) {
this.partition = partition;
strategies = new HashMap<>();
this.partitioner = partitioner;
}
示例4: DefaultReconciler
import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; //导入依赖的package包/类
@AssistedInject
public DefaultReconciler(
@Assisted final String partition, @Assisted final DocumentPartitioner partitioner) {
this.partition = partition;
this.partitioner = partitioner;
strategies = new HashMap<>();
}
示例5: getContentAssistantProcessors
import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; //导入依赖的package包/类
@Override
public Map<String, CodeAssistProcessor> getContentAssistantProcessors() {
Map<String, CodeAssistProcessor> map = new HashMap<>();
map.put(DocumentPartitioner.DEFAULT_CONTENT_TYPE, codeAssistProcessor);
return map;
}
示例6: getContentAssistantProcessors
import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; //导入依赖的package包/类
@Override
public Map<String, CodeAssistProcessor> getContentAssistantProcessors() {
if (defaultProcessor.getProcessors() == null || defaultProcessor.getProcessors().size() == 0) {
return null;
}
Map<String, CodeAssistProcessor> map = new HashMap<>();
map.put(DocumentPartitioner.DEFAULT_CONTENT_TYPE, defaultProcessor);
return map;
}
示例7: LanguageServerEditorConfiguration
import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; //导入依赖的package包/类
@Inject
public LanguageServerEditorConfiguration(
@Assisted TextEditor editor,
LanguageServerCodeassistProcessorFactory codeAssistProcessor,
LanguageServerQuickAssistProcessorFactory quickAssistProcessorFactory,
Provider<DocumentPositionMap> docPositionMapProvider,
LanguageServerAnnotationModelFactory annotationModelFactory,
LanguageServerReconcileStrategyFactory reconcileStrategyProviderFactory,
LanguageServerFormatterFactory formatterFactory,
LanguageServerSignatureHelpFactory signatureHelpFactory,
@Assisted ServerCapabilities serverCapabilities) {
codeAssistProcessorFactory = codeAssistProcessor;
quickAssistProcessor = quickAssistProcessorFactory.create(editor);
if ((serverCapabilities.getDocumentFormattingProvider() != null
&& serverCapabilities.getDocumentFormattingProvider())
|| (serverCapabilities.getDocumentRangeFormattingProvider() != null
&& serverCapabilities.getDocumentRangeFormattingProvider())
|| serverCapabilities.getDocumentOnTypeFormattingProvider() != null) {
this.formatter = formatterFactory.create(serverCapabilities);
} else {
this.formatter = null;
}
this.serverCapabilities = serverCapabilities;
DocumentPositionMap documentPositionMap = docPositionMapProvider.get();
documentPositionMap.addPositionCategory(DocumentPositionMap.Categories.DEFAULT_CATEGORY);
this.annotationModel = annotationModelFactory.get(documentPositionMap);
this.reconciler =
new DefaultReconciler(DocumentPartitioner.DEFAULT_CONTENT_TYPE, getPartitioner());
reconciler.addReconcilingStrategy(
DocumentPartitioner.DEFAULT_CONTENT_TYPE,
reconcileStrategyProviderFactory.build(serverCapabilities));
if (serverCapabilities.getSignatureHelpProvider() != null) {
signatureHelpProvider = signatureHelpFactory.create(serverCapabilities);
} else {
signatureHelpProvider = null;
}
}
示例8: getContentAssistantProcessors
import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; //导入依赖的package包/类
@Override
public Map<String, CodeAssistProcessor> getContentAssistantProcessors() {
if (serverCapabilities.getCompletionProvider() != null) {
Map<String, CodeAssistProcessor> map = new HashMap<>();
map.put(
DocumentPartitioner.DEFAULT_CONTENT_TYPE,
codeAssistProcessorFactory.create(serverCapabilities));
return map;
}
return null;
}
示例9: JsonExampleEditorConfiguration
import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; //导入依赖的package包/类
public JsonExampleEditorConfiguration(
JsonExampleCodeAssistProcessor jsonExampleCodeAssistProcessor) {
codeAssist = new LinkedHashMap<>();
codeAssist.put(DocumentPartitioner.DEFAULT_CONTENT_TYPE, jsonExampleCodeAssistProcessor);
}
示例10: getPartitioner
import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; //导入依赖的package包/类
@Override
public DocumentPartitioner getPartitioner() {
return partitioner == null ? partitioner = new ConstantPartitioner() : partitioner;
}
示例11: create
import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; //导入依赖的package包/类
@Override
public DocumentPartitioner create(final DocumentPositionMap documentPositionMap) {
return new DefaultPartitioner(this.scanner, LEGAL_CONTENT_TYPES, documentPositionMap);
}
示例12: create
import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; //导入依赖的package包/类
/**
* Create a {@link CodeAssistant} for the given editor.
*
* @param textEditor the editor
* @param partitioner the partitioner
* @return a {@link CodeAssistant}
*/
CodeAssistant create(TextEditor textEditor, DocumentPartitioner partitioner);
示例13: getPartitioner
import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; //导入依赖的package包/类
/**
* Returns the document partitioner.
*
* @return the document partitioner
*/
@NotNull
DocumentPartitioner getPartitioner();
示例14: create
import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; //导入依赖的package包/类
Reconciler create(String partitioning, DocumentPartitioner partitioner);