當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。