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


Java IDocumentExtension3.setDocumentPartitioner方法代码示例

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

示例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;
}
 
开发者ID:SAP,项目名称:hybris-commerce-eclipse-plugin,代码行数:19,代码来源:DocumentProvider.java

示例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 );

   }

}
 
开发者ID:brocade,项目名称:vTM-eclipse,代码行数:25,代码来源:TrafficScriptSetup.java

示例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;
}
 
开发者ID:peq,项目名称:rustyeclipse,代码行数:21,代码来源:RustTextDocumentProvider.java

示例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;
	}
 
开发者ID:peq,项目名称:rustyeclipse,代码行数:24,代码来源:RustDocumentProvider.java

示例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;
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:25,代码来源:PyPartitionScanner.java

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

示例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);
}
 
开发者ID:sebez,项目名称:vertigo-chroma-kspplugin,代码行数:9,代码来源:KspDocumentSetupParticipant.java

示例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;
}
 
开发者ID:Imhotup,项目名称:LibertyEiffel-Eclipse-Plugin,代码行数:15,代码来源:EiffelDocumentProvider.java

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

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

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

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

示例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);
		}
	}
}
 
开发者ID:grosenberg,项目名称:fluentmark,代码行数:16,代码来源:FluentMkTextTools.java

示例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);
	}
}
 
开发者ID:RichardBirenheide,项目名称:brainfuck,代码行数:12,代码来源:BfDocSetupParticipant.java


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