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