当前位置: 首页>>代码示例>>Java>>正文


Java DocumentPartitioner类代码示例

本文整理汇总了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();
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:14,代码来源:OrionEditorInit.java

示例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;
}
 
开发者ID:eclipse,项目名称:che,代码行数:14,代码来源:CodeAssistantImpl.java

示例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;
}
 
开发者ID:eclipse,项目名称:che,代码行数:8,代码来源:ReconcilerWithAutoSave.java

示例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<>();
}
 
开发者ID:eclipse,项目名称:che,代码行数:8,代码来源:DefaultReconciler.java

示例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;
}
 
开发者ID:eclipse,项目名称:che,代码行数:8,代码来源:MacroEditorConfiguration.java

示例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;
}
 
开发者ID:eclipse,项目名称:che,代码行数:10,代码来源:JsEditorConfiguration.java

示例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;
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:39,代码来源:LanguageServerEditorConfiguration.java

示例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;
}
 
开发者ID:eclipse,项目名称:che,代码行数:13,代码来源:LanguageServerEditorConfiguration.java

示例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);
}
 
开发者ID:eclipse,项目名称:che-archetypes,代码行数:7,代码来源:JsonExampleEditorConfiguration.java

示例10: getPartitioner

import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; //导入依赖的package包/类
@Override
public DocumentPartitioner getPartitioner() {
  return partitioner == null ? partitioner = new ConstantPartitioner() : partitioner;
}
 
开发者ID:eclipse,项目名称:che,代码行数:5,代码来源:DefaultTextEditorConfiguration.java

示例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);
}
 
开发者ID:eclipse,项目名称:che,代码行数:5,代码来源:JavaPartitionerFactory.java

示例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);
 
开发者ID:eclipse,项目名称:che,代码行数:9,代码来源:CodeAssistantFactory.java

示例13: getPartitioner

import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; //导入依赖的package包/类
/**
 * Returns the document partitioner.
 *
 * @return the document partitioner
 */
@NotNull
DocumentPartitioner getPartitioner();
 
开发者ID:eclipse,项目名称:che,代码行数:8,代码来源:TextEditorConfiguration.java

示例14: create

import org.eclipse.che.ide.api.editor.partition.DocumentPartitioner; //导入依赖的package包/类
Reconciler create(String partitioning, DocumentPartitioner partitioner); 
开发者ID:eclipse,项目名称:che,代码行数:2,代码来源:ReconcilerFactory.java


注:本文中的org.eclipse.che.ide.api.editor.partition.DocumentPartitioner类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。