本文整理汇总了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);
}
}
}
示例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;
}
示例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;
}
示例4: TableViewerBuilder
import org.eclipse.jface.viewers.ArrayContentProvider; //导入方法依赖的package包/类
/***/
public TableViewerBuilder(final List<String> columnLabels) {
super(columnLabels, ArrayContentProvider.getInstance());
}
示例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());
}
示例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());
}
示例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;
}