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


Java StructuredViewer.getContentProvider方法代码示例

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


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

示例1: select

import org.eclipse.jface.viewers.StructuredViewer; //导入方法依赖的package包/类
@Override
public boolean select(Viewer viewer, Object parentElement,
		Object element) {

	StructuredViewer sviewer = (StructuredViewer) viewer;
	ITreeContentProvider provider = (ITreeContentProvider) sviewer
			.getContentProvider();
	
	if (element instanceof Group ) {
		for (Object child: provider.getChildren(element)) {
			if (select(viewer, element, child)) 
				return true; 
		}
	}
	else {
		Test test = (Test)element;
		if (test.getTestName().contains(searchTestName)) {
			return true;
		}
	}
	return false;
}
 
开发者ID:FutureProcessing,项目名称:RFRunnerPlugin,代码行数:23,代码来源:Filter.java

示例2: select

import org.eclipse.jface.viewers.StructuredViewer; //导入方法依赖的package包/类
@Override
public boolean select(Viewer viewer, Object parentElement, Object element) {

    if (element instanceof Variant || element instanceof Commentable || element instanceof SoftwareElement) {
        return true;
    } else if (element instanceof VariationPoint) {
        return select((VariationPoint) element);

    } else {
        StructuredViewer sviewer = (StructuredViewer) viewer;
        ITreeContentProvider provider = (ITreeContentProvider) sviewer.getContentProvider();
        for (Object child : provider.getChildren(element)) {
            if (select(viewer, element, child)) {
                return true;
            }
        }
        return false;
    }
}
 
开发者ID:kopl,项目名称:SPLevo,代码行数:20,代码来源:AbstractJaMoPPVPFilter.java

示例3: setGrouping

import org.eclipse.jface.viewers.StructuredViewer; //导入方法依赖的package包/类
/**
 * Precondition here: the viewer must be showing a tree with a LevelContentProvider.
 *
 * @param grouping the grouping which must be one of the <code>LEVEL_*</code> constants from
 *            {@link LevelTreeContentProvider}
 */
void setGrouping(int grouping) {
	fCurrentGrouping= grouping;
	StructuredViewer viewer= getViewer();
	LevelTreeContentProvider cp= (LevelTreeContentProvider) viewer.getContentProvider();
	cp.setLevel(grouping);
	updateGroupingActions();
	getSettings().put(KEY_GROUPING, fCurrentGrouping);
	getViewPart().updateLabel();
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:16,代码来源:JavaSearchResultPage.java

示例4: getFilteredMatchCount

import org.eclipse.jface.viewers.StructuredViewer; //导入方法依赖的package包/类
private int getFilteredMatchCount() {
	StructuredViewer viewer= getViewer();
	if (viewer instanceof TreeViewer) {
		ITreeContentProvider tp= (ITreeContentProvider) viewer.getContentProvider();
		return getMatchCount(tp, getRootElements((TreeViewer) getViewer()));
	} else {
		return getMatchCount((TableViewer) viewer);
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:10,代码来源:JavaSearchResultPage.java

示例5: getRawChildren

import org.eclipse.jface.viewers.StructuredViewer; //导入方法依赖的package包/类
private Object[] getRawChildren(StructuredViewer viewer, IPackageFragment fragment) {
	IStructuredContentProvider provider = (IStructuredContentProvider) viewer.getContentProvider();
	if (provider instanceof ITreeContentProvider) {
		return ((ITreeContentProvider)provider).getChildren(fragment);
	}
	return provider.getElements(fragment);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:8,代码来源:NonEssentialElementsFilter.java


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