Top / Eclipse / プラグイン開発のTIPS集 / エディタをつくる

org.eclipse.ui.editors.text.FileDocumentProvider? の実装クラス

この中で、IDocumentPartitioner?の実装クラスを指定する

protected IDocument createDocument(Object element) throws CoreException {
  logger.debug("createDocument(Object) - start");
  IDocument document = super.createDocument(element);
  if (document != null) {
    IDocumentPartitioner partitioner = new FastPartitioner(
        new HobePartitionScanner(),
        new String[] { HogePartitionScanner.COMMENT , HogePartitionScanner.Text});
    partitioner.connect(document);
    document.setDocumentPartitioner(partitioner);
  }
  logger.debug("createDocument(Object) - end");
  return document;
}

この記事は

選択肢 投票
おもしろかった 0  
そうでもない 0  

Top / Eclipse / プラグイン開発のTIPS集 / エディタをつくる

現在のアクセス:25843


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS