本文整理匯總了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;
}