本文整理汇总了Java中org.eclipse.jface.text.IDocumentExtension3.setDocumentPartitioner方法的典型用法代码示例。如果您正苦于以下问题:Java IDocumentExtension3.setDocumentPartitioner方法的具体用法?Java IDocumentExtension3.setDocumentPartitioner怎么用?Java IDocumentExtension3.setDocumentPartitioner使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.text.IDocumentExtension3
的用法示例。
在下文中一共展示了IDocumentExtension3.setDocumentPartitioner方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: inputChanged
import org.eclipse.jface.text.IDocumentExtension3; //导入方法依赖的package包/类
@Override
protected void inputChanged(Object newInput, Object oldInput) {
if (oldInput instanceof IDocumentExtension3) {
IDocumentExtension3 doc = (IDocumentExtension3) oldInput;
doc.setDocumentPartitioner(SQLEditorCommonDocumentProvider.SQL_PARTITIONING, null);
partitioner.disconnect();
}
if (newInput instanceof IDocumentExtension3) {
IDocumentExtension3 extension3 = (IDocumentExtension3) newInput;
partitioner.connect((IDocument) newInput);
extension3.setDocumentPartitioner(
SQLEditorCommonDocumentProvider.SQL_PARTITIONING, partitioner);
}
super.inputChanged(newInput, oldInput);
}
示例2: createDocument
import org.eclipse.jface.text.IDocumentExtension3; //导入方法依赖的package包/类
@Override
protected IDocument createDocument(Object element) throws CoreException {
IDocument document = super.createDocument(element);
//IDocumentPartitioner partitioner = createDocumentPartitioner();
IDocumentPartitioner partitioner = new ImpexDocumentPartitioner();
if ((document instanceof IDocumentExtension3)) {
IDocumentExtension3 extension3 = (IDocumentExtension3) document;
extension3.setDocumentPartitioner(Activator.IMPEX_PARTITIONING, partitioner);
}
else {
document.setDocumentPartitioner(partitioner);
}
partitioner.connect(document);
return document;
}
示例3: setup
import org.eclipse.jface.text.IDocumentExtension3; //导入方法依赖的package包/类
/**
* Setup the TrafficScript Partitioner for .zts files
*/
/* Override */
public void setup( IDocument document )
{
if (document instanceof IDocumentExtension3) {
IDocumentExtension3 extension3 = (IDocumentExtension3) document;
IDocumentPartitioner partitioner = new FastPartitioner(
ZXTMPlugin.getDefault().getTrafficScriptPartitioner(),
Partition.getAllPartitionIds()
);
extension3.setDocumentPartitioner(
TrafficScriptPartitioner.TS_PARTITIONER,
partitioner
);
partitioner.connect( document );
}
}
示例4: createFileInfo
import org.eclipse.jface.text.IDocumentExtension3; //导入方法依赖的package包/类
@Override
protected FileInfo createFileInfo(Object element) throws CoreException {
FileInfo info = super.createFileInfo(element);
if(info==null){
info = createEmptyFileInfo();
}
IDocument document = info.fTextFileBuffer.getDocument();
if (document != null) {
/* register your partitioner and other things here
same way as in your first document provider */
if (document instanceof IDocumentExtension3) {
IDocumentExtension3 extension3= (IDocumentExtension3) document;
IDocumentPartitioner partitioner= new FastPartitioner(RustCorePlugin.getDefault().scanners().rustPartitionScanner(), RustPartitionScanner.PARTITION_TYPES);
extension3.setDocumentPartitioner(RustConstants.RUST_PARTITIONING, partitioner);
partitioner.connect(document);
}
}
return info;
}
示例5: createDocument
import org.eclipse.jface.text.IDocumentExtension3; //导入方法依赖的package包/类
@Override
protected @Nullable IDocument createDocument(@Nullable Object element) throws CoreException {
// IDocument document = super.createDocument(element);
// if (document != null) {
// IDocumentPartitioner partitioner =
// new FastPartitioner(
// new RustPartitionScanner(),
// new String[] {
// RustPartitionScanner.RUST_MULTILINE_COMMENT });
// partitioner.connect(document);
// document.setDocumentPartitioner(partitioner);
// }
// return document;
IDocument document = super.createDocument(element);
if (document instanceof IDocumentExtension3) {
IDocumentExtension3 extension3= (IDocumentExtension3) document;
IDocumentPartitioner partitioner= new FastPartitioner(RustCorePlugin.getDefault().scanners().rustPartitionScanner(), RustPartitionScanner.PARTITION_TYPES);
extension3.setDocumentPartitioner(RustConstants.RUST_PARTITIONING, partitioner);
partitioner.connect(document);
}
return document;
}
示例6: addPartitionScanner
import org.eclipse.jface.text.IDocumentExtension3; //导入方法依赖的package包/类
/**
* @see http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/editors_documents.htm
* @see http://jroller.com/page/bobfoster - Saturday July 16, 2005
* @param document the document where we want to add the partitioner
* @return the added document partitioner (or null)
*/
public static IDocumentPartitioner addPartitionScanner(IDocument document,
IGrammarVersionProvider grammarVersionProvider) {
if (document != null) {
IDocumentExtension3 docExtension = (IDocumentExtension3) document;
IDocumentPartitioner curr = docExtension.getDocumentPartitioner(IPythonPartitions.PYTHON_PARTITION_TYPE);
if (curr == null) {
//set the new one
PyPartitioner partitioner = createPyPartitioner();
partitioner.connect(document);
docExtension.setDocumentPartitioner(IPythonPartitions.PYTHON_PARTITION_TYPE, partitioner);
return partitioner;
} else {
return curr;
}
}
return null;
}
示例7: setupDocument
import org.eclipse.jface.text.IDocumentExtension3; //导入方法依赖的package包/类
void setupDocument(IDocument document) {
if (document instanceof IDocumentExtension3) {
IDocumentExtension3 ext= (IDocumentExtension3) document;
IDocumentPartitioner partitioner= createRecipePartitioner();
partitioner.connect(document);
ext.setDocumentPartitioner(SQL_PARTITIONING, partitioner);
}
}
示例8: setup
import org.eclipse.jface.text.IDocumentExtension3; //导入方法依赖的package包/类
@Override
public void setup(IDocument document) {
/* Définit un partitionnement du document. */
IDocumentPartitioner p = new FastPartitioner(createKspPartitionScanner(), TYPES);
IDocumentExtension3 de3 = (IDocumentExtension3) document;
de3.setDocumentPartitioner(KspRegionType.PARTITIONING, p);
p.connect(document);
}
示例9: createDocument
import org.eclipse.jface.text.IDocumentExtension3; //导入方法依赖的package包/类
@Override
protected IDocument createDocument(Object element) throws CoreException {
IDocument document = super.createDocument(element);
if (document instanceof IDocumentExtension3) {
IDocumentExtension3 extension3 = (IDocumentExtension3) document;
IDocumentPartitioner partitioner = new FastPartitioner(EiffelEditorPlugin
.getPartitionScanner(), EiffelPartitionScanner.PARTITION_TYPE);
extension3.setDocumentPartitioner(EiffelEditorPlugin.MY_PARTITIONING, partitioner);
partitioner.connect(document);
}
return document;
}
示例10: setup
import org.eclipse.jface.text.IDocumentExtension3; //导入方法依赖的package包/类
@Override
public void setup(IDocument document) {
if (document instanceof IDocumentExtension3) {
IDocumentExtension3 extension3= (IDocumentExtension3) document;
IDocumentPartitioner partitioner= new FastPartitioner(SqlCommentPartitionScanner.getDefault(), SqlCommentPartitionScanner.partition_types);
extension3.setDocumentPartitioner(FtcPlugin.SQL_PARTITIONING, partitioner);
partitioner.connect(document);
}
}
示例11: setup
import org.eclipse.jface.text.IDocumentExtension3; //导入方法依赖的package包/类
public void setup(IDocument document) {
if (document instanceof IDocumentExtension3) {
IDocumentExtension3 extension3 = (IDocumentExtension3) document;
IDocumentPartitioner partitioner =
new FastPartitioner(new BibPartitionScanner(), BibPartitionScanner.BIB_PARTITION_TYPES);
extension3.setDocumentPartitioner(BibEditor.BIB_PARTITIONING, partitioner);
partitioner.connect(document);
}
}
示例12: setup
import org.eclipse.jface.text.IDocumentExtension3; //导入方法依赖的package包/类
public void setup(IDocument document) {
if (document instanceof IDocumentExtension3) {
IDocumentExtension3 extension3= (IDocumentExtension3) document;
IDocumentPartitioner partitioner =
new FastPartitioner(
new FastLaTeXPartitionScanner(),
FastLaTeXPartitionScanner.TEX_PARTITION_TYPES);
extension3.setDocumentPartitioner(TexEditor.TEX_PARTITIONING, partitioner);
partitioner.connect(document);
}
}
示例13: setup
import org.eclipse.jface.text.IDocumentExtension3; //导入方法依赖的package包/类
public void setup(IDocument document) {
if (document instanceof IDocumentExtension3) {
IDocumentExtension3 extension3= (IDocumentExtension3) document;
IDocumentPartitioner partitioner= new TLAFastPartitioner(TLAEditorActivator.getDefault().getTLAPartitionScanner(), TLAPartitionScanner.TLA_PARTITION_TYPES);
// Changed from FastPartitioner by LL on 12 Aug 2012
extension3.setDocumentPartitioner(TLAPartitionScanner.TLA_PARTITIONING, partitioner);
partitioner.connect(document);
}
}
示例14: setupDocumentPartitioner
import org.eclipse.jface.text.IDocumentExtension3; //导入方法依赖的package包/类
/**
* Sets up the document partitioner for the given document for the given partitioning.
*/
public void setupDocumentPartitioner(IDocument document, String partitioning) {
IDocumentPartitioner partitioner = createDocumentPartitioner();
if (partitioner != null) {
partitioner.connect(document);
if (document instanceof IDocumentExtension3) {
IDocumentExtension3 extension3 = (IDocumentExtension3) document;
extension3.setDocumentPartitioner(partitioning, partitioner);
} else {
document.setDocumentPartitioner(partitioner);
}
}
}
示例15: setup
import org.eclipse.jface.text.IDocumentExtension3; //导入方法依赖的package包/类
@Override
public void setup(IDocument document) {
if (document instanceof IDocumentExtension3) {
final IDocumentExtension3 ext3 = (IDocumentExtension3) document;
IDocumentPartitioner partitioner = new FastPartitioner(new BfPartitionScanner(), EditorConstants.BRAINFUCK_PARTITION_TYPES);
partitioner.connect(document);
ext3.setDocumentPartitioner(EditorConstants.BF_PARTITIONING, partitioner);
}
}