當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。