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


Java ArrayContentProvider.getInstance方法代码示例

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


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

示例1: clearHistory

import org.eclipse.jface.viewers.ArrayContentProvider; //导入方法依赖的package包/类
private void clearHistory(BuildJob[] buildJobs, BuildJob[] selectedJobs) {
    Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
    ListSelectionDialog dialog = new ListSelectionDialog(shell, buildJobs, ArrayContentProvider.getInstance(),
            new BuildJobLabelProvider(), "Select Doxyfiles you want to remove from history");
    dialog.setTitle("Clear History");
    if ((selectedJobs != null) && (selectedJobs.length > 0)) {
        dialog.setInitialSelections(selectedJobs);
    }
    if (dialog.open() == Window.OK) {
        Object[] result = dialog.getResult();
        if (result.length > 0) {
            BuildJob[] clearJobs = new BuildJob[result.length];
            System.arraycopy(result, 0, clearJobs, 0, result.length);
            Plugin.getDefault().getBuildManager().removeAll(clearJobs);
        }
    }
}
 
开发者ID:anb0s,项目名称:eclox,代码行数:18,代码来源:BuildActionDelegate.java

示例2: createDialog

import org.eclipse.jface.viewers.ArrayContentProvider; //导入方法依赖的package包/类
/**
 * Creates the dialog for working set assignment.
 *
 * @param workingSets
 *            All the working set the user should be able to select from
 * @param numberOfSelectedProjects
 *            The number of selected projects
 */
private ListSelectionDialog createDialog(Collection<WorkingSet> workingSets, int numberOfSelectedProjects) {
	// Filter 'Other Projects' working set
	List<WorkingSet> selectableWorkingSets = workingSets.stream()
			.filter(set -> !set.getId().equals(WorkingSet.OTHERS_WORKING_SET_ID)).collect(Collectors.toList());

	String message = String.format(DIALOG_SUBTITLE, numberOfSelectedProjects);

	ListSelectionDialog dialog = new NonEmptyListSelectionDialog(site.getShell(),
			selectableWorkingSets, ArrayContentProvider.getInstance(), WorkingSetLabelProvider.INSTANCE, message);

	dialog.setTitle(DIALOG_TITLE);
	return dialog;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:22,代码来源:AssignWorkingSetsAction.java

示例3: getElements

import org.eclipse.jface.viewers.ArrayContentProvider; //导入方法依赖的package包/类
@Override
public Object[] getElements(Object inputElement) {
	ArrayContentProvider.getInstance();
	if(inputElement instanceof Collection){
		return ((Collection) inputElement).toArray();
	}
	return null;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:9,代码来源:TableContentProvider.java

示例4: TableViewerBuilder

import org.eclipse.jface.viewers.ArrayContentProvider; //导入方法依赖的package包/类
/***/
public TableViewerBuilder(final List<String> columnLabels) {
	super(columnLabels, ArrayContentProvider.getInstance());
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:5,代码来源:TableViewerBuilder.java

示例5: ContentTypesBindingWidget

import org.eclipse.jface.viewers.ArrayContentProvider; //导入方法依赖的package包/类
public ContentTypesBindingWidget(Composite parent, int style) {
	super(parent, style, TMUIMessages.ContentTypesBindingWidget_description);
	super.setContentProvider(ArrayContentProvider.getInstance());
	super.setLabelProvider(new ContentTypeLabelProvider());
}
 
开发者ID:eclipse,项目名称:tm4e,代码行数:6,代码来源:ContentTypesBindingWidget.java

示例6: ThemeAssociationsWidget

import org.eclipse.jface.viewers.ArrayContentProvider; //导入方法依赖的package包/类
public ThemeAssociationsWidget(IThemeManager themeManager, Composite parent, int style) {
	super(parent, style, TMUIMessages.ThemeAssociationsWidget_description);
	this.themeManager = themeManager;
	super.setContentProvider(ArrayContentProvider.getInstance());
	super.setLabelProvider(new ThemeAssociationLabelProvider());
}
 
开发者ID:eclipse,项目名称:tm4e,代码行数:7,代码来源:ThemeAssociationsWidget.java

示例7: MergeSessionsDialog

import org.eclipse.jface.viewers.ArrayContentProvider; //导入方法依赖的package包/类
/**
 * Creates a new dialog with the given session list and description preset.
 *
 * @param parent
 *          parent shell
 * @param sessions
 *          List of session the user can select from
 * @param description
 *          Preset value for the description
 */
public MergeSessionsDialog(Shell parent, List<ICoverageSession> sessions,
    String description) {
  super(parent, sessions, ArrayContentProvider.getInstance(),
      new WorkbenchLabelProvider(),
      UIMessages.MergeSessionsDialogSelection_label);
  setTitle(UIMessages.MergeSessionsDialog_title);
  setInitialSelections(sessions.toArray());
  this.description = description;
}
 
开发者ID:eclipse,项目名称:eclemma,代码行数:20,代码来源:MergeSessionsDialog.java


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