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


Java ITextViewerExtension5.exposeModelRange方法代码示例

本文整理汇总了Java中org.eclipse.jface.text.ITextViewerExtension5.exposeModelRange方法的典型用法代码示例。如果您正苦于以下问题:Java ITextViewerExtension5.exposeModelRange方法的具体用法?Java ITextViewerExtension5.exposeModelRange怎么用?Java ITextViewerExtension5.exposeModelRange使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jface.text.ITextViewerExtension5的用法示例。


在下文中一共展示了ITextViewerExtension5.exposeModelRange方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: select

import org.eclipse.jface.text.ITextViewerExtension5; //导入方法依赖的package包/类
private void select() {
	ITextViewer viewer = fCurrentTarget.getViewer();
	if (viewer instanceof ITextViewerExtension5) {
		ITextViewerExtension5 extension5 = (ITextViewerExtension5) viewer;
		extension5.exposeModelRange(new Region(fFramePosition.offset, fFramePosition.length));
	} else if (!viewer.overlapsWithVisibleRegion(fFramePosition.offset, fFramePosition.length)) {
		viewer.resetVisibleRegion();
	}
	viewer.revealRange(fFramePosition.offset, fFramePosition.length);
	viewer.setSelectedRange(fFramePosition.offset, fFramePosition.length);
}
 
开发者ID:curiosag,项目名称:ftc,代码行数:12,代码来源:TweakedLinkedModeUI.java

示例2: adjustHighlightRange

import org.eclipse.jface.text.ITextViewerExtension5; //导入方法依赖的package包/类
/**
 * Adjusts the highlight range so that at least the specified range
 * is highlighted.
 * <p>
 * Subclasses may re-implement this method.</p>
 * @param viewer 
 *
 * @param offset the offset of the range which at least should be highlighted
 * @param length the length of the range which at least should be highlighted
 */
protected void adjustHighlightRange(ITextViewer viewer, int offset, int length) {
	if (viewer == null)
		return;

	if (viewer instanceof ITextViewerExtension5) {
		ITextViewerExtension5 extension= (ITextViewerExtension5) viewer;
		extension.exposeModelRange(new Region(offset, length));
	} else if (!isVisible(viewer, offset, length)) {
		viewer.resetVisibleRegion();
	}
}
 
开发者ID:cplutte,项目名称:bts,代码行数:22,代码来源:TextViewerJoinLinesAction.java

示例3: adjustHighlightRange

import org.eclipse.jface.text.ITextViewerExtension5; //导入方法依赖的package包/类
@Override
protected void adjustHighlightRange(int offset, int length) {
    ISourceViewer viewer = getSourceViewer();
    if (viewer instanceof ITextViewerExtension5) {
        ITextViewerExtension5 extension = (ITextViewerExtension5) viewer;
        extension.exposeModelRange(new Region(offset, length));
    }
}
 
开发者ID:forcedotcom,项目名称:idecore,代码行数:9,代码来源:ApexCodeEditor.java


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