/** * @param input * the input used * @see StructuredViewer#setInput(Object) */ public void setInput(Object input) { viewer.setInput(input); }
/** * @param input * the input used * @see StructuredViewer#setInput(Object) */ public void setInput(Object input) { viewer.setInput(input); }
/** * @param input * the input used * @see StructuredViewer#setInput(Object) */ public void setInput(Object input) { viewer.setInput(input); }
public void setContent(List<T> content) { this.content = content; this.viewer.setInput(content.toArray()); }
fDecorationViewer.setInput(list.toArray(new Object[list.size()])); if (selection != null) fDecorationViewer.setSelection(new StructuredSelection((Object) selection), true);
fDecorationViewer.setInput(list.toArray(new Object[list.size()])); if (selection != null) fDecorationViewer.setSelection(new StructuredSelection((Object) selection), true);
public boolean selectWorkingSets(List<IWorkingSet> workingSets) { Set<IWorkingSet> defaultSets = getWorkingSets(); workingsetComboViewer.setInput(defaultSets); if(workingSets != null && workingSets.size() > 0) { if(workingSets.size() == 1) { IWorkingSet workingSet = workingSets.get(0); if(defaultSets.contains(workingSet)) { workingsetComboViewer.setSelection(new StructuredSelection(workingSet)); } } else { workingsetComboViewer.add(workingSets); workingsetComboViewer.setSelection(new StructuredSelection((Object) workingSets)); } return true; } return false; } }
fDecorationViewer.setInput(list.toArray(new Object[list.size()])); if (selection == null) selection= (String[]) list.get(0);
private void updateDecorationViewer(ListItem item, boolean changed) { // decoration selection: if the checkbox is enabled, there is // only one case where the combo is not enabled: if both the highlight and textStyle keys are null final boolean enabled= fShowInTextCheckBox.getSelection() && !(item.highlightKey == null && item.textStyleKey == null); fDecorationViewer.getControl().setEnabled(enabled); if (changed) { String[] selection= null; ArrayList<String[]> list= new ArrayList<>(); list.addAll(item.validStyles); if (getPreferenceStore().getBoolean(item.highlightKey)) selection= HIGHLIGHT; // set selection if (selection == null) { String val= getPreferenceStore().getString(item.textStyleKey); for (Iterator<String[]> iter= list.iterator(); iter.hasNext();) { String[] elem= iter.next(); if (elem[1].equals(val)) { selection= elem; break; } } } fDecorationViewer.setInput(list.toArray(new Object[list.size()])); if (selection == null) selection= list.get(0); fDecorationViewer.setSelection(new StructuredSelection((Object) selection), true); } }
public void setMapping(CDOTransferMapping mapping) { if (!ObjectUtil.equals(this.mapping, mapping)) { this.mapping = mapping; if (mapping != null) { sourcePath.setText(mapping.getSource().getPath().toString()); targetPath.setText(mapping.getFullPath().makeAbsolute().toString()); status.setText(mapping.getStatus().toString()); relativePath.setText(mapping.getRelativePath().toString()); CDOTransferType type = mapping.getTransferType(); transferType.setInput(type != CDOTransferType.FOLDER ? transferTypes : CDOTransferType.FOLDER); transferType.setSelection(new StructuredSelection(type)); transferType.getCombo().setEnabled(type != CDOTransferType.FOLDER); } else { sourcePath.setText(StringUtil.EMPTY); targetPath.setText(StringUtil.EMPTY); status.setText(StringUtil.EMPTY); relativePath.setText(StringUtil.EMPTY); transferType.setInput(TransferTypeContentProvider.NO_TANSFER_TYPES); transferType.setSelection(StructuredSelection.EMPTY); } } }
validatedHEAD = head; initialBranch.setInput(branches); if (head != null && branches.contains(head)) initialBranch.setSelection(new StructuredSelection(head));
public void widgetSelected(SelectionEvent e) { Collection<ArchetypeCatalogFactory> oldCatalogs = archetypeManager.getActiveArchetypeCatalogs(); PreferencesUtil.createPreferenceDialogOn(getShell(), "org.eclipse.m2e.core.preferences.MavenArchetypesPreferencePage", null, null).open(); //$NON-NLS-1$ Collection<ArchetypeCatalogFactory> newCatalogs = archetypeManager.getActiveArchetypeCatalogs(); //Deselect removed catalog if needed if(catalogFactory != null && !newCatalogs.contains(catalogFactory)) { catalogFactory = null; } //Select 1st new catalog ArchetypeCatalogFactory selectedCatalog = catalogFactory; for(ArchetypeCatalogFactory newCatalog : newCatalogs) { if(!oldCatalogs.contains(newCatalog)) { selectedCatalog = newCatalog; break; } } ArrayList allCatalogs = new ArrayList(newCatalogs); allCatalogs.add(0, ALL_CATALOGS); catalogsComboViewer.setInput(allCatalogs); catalogsComboViewer .setSelection(new StructuredSelection(selectedCatalog == null ? ALL_CATALOGS : selectedCatalog)); } });
viewer.setInput(registry.retrieveAllStrategies()); this.idePreferenceStore = IDEWorkbenchPlugin.getDefault().getPreferenceStore(); viewer.setSelection(
/** * */ private void fill() { fSchemeCombo.setInput(keyController.getSchemeModel()); fSchemeCombo.setSelection(new StructuredSelection(keyController.getSchemeModel().getSelectedElement())); // Apply context filters keyController.filterContexts(fFilterActionSetContexts, fFilterInternalContexts); fWhenCombo.setInput(keyController.getContextModel()); fFilteredTree.filterCategories(fPatternFilter.isFilteringCategories()); fFilteredTree.getViewer().setInput(keyController.getBindingModel()); }
public void createControl(Composite parent, FormToolkit toolkit, int style) { if (toolkit.getBorderStyle() == SWT.BORDER) { fCombo = new Combo(parent, style | SWT.BORDER); fComboViewer = new ComboViewer((Combo) fCombo); } else { fCombo = new CCombo(parent, style | SWT.FLAT); fComboViewer = new ComboViewer((CCombo) fCombo); } fObjects = new ArrayList<>(); fComboViewer.setLabelProvider(new LabelProvider()); fComboViewer.setContentProvider(ArrayContentProvider.getInstance()); fComboViewer.setInput(fObjects); }
viewer.setInput(persons);
viewer.setInput(fProviderDescriptors); viewer.refresh();
fileSystems.setInput(this); fileSystems.setSelection(new StructuredSelection( FileSystemSupportRegistry.getInstance()
private void createDetails(final SashForm form) { final Composite parent = new Composite(form, SWT.NONE); parent.setLayout(new GridLayout()); final GridDataFactory f = GridDataFactory.fillDefaults().grab(true, false); { final Group rootContainer = new Group(parent, SWT.SHADOW_ETCHED_IN); rootContainer.setText(Messages.PREFPAGE_PACKAGE_ROOT_INFO); rootContainer.setLayout(new GridLayout(2, false)); rootContainer.setLayoutData(f.create()); createLabel(rootContainer, Messages.PREFPAGE_PACKAGE_ROOT_NAME); rootName = createText(rootContainer, READ_ONLY | BORDER); createLabel(rootContainer, Messages.PREFPAGE_PACKAGE_ROOT_VERSION); rootVersion = createText(rootContainer, READ_ONLY | BORDER); createLabel(rootContainer, Messages.PREFPAGE_PACKAGE_ROOT_FINGERPRINT); rootFingerprint = createText(rootContainer, READ_ONLY | BORDER); } { final Group modelContainer = new Group(parent, SWT.SHADOW_ETCHED_IN); modelContainer.setText(Messages.PREFPAGE_MODEL_INFO); modelContainer.setLayout(new GridLayout(2, false)); modelContainer.setLayoutData(f.create()); createLabel(modelContainer, Messages.PREFPAGE_MODEL_CCORDINATE); modelCoordinate = createText(modelContainer, SWT.BORDER); createLabel(modelContainer, Messages.PREFPAGE_MODEL_RESOLUTION_STATUS); modelStatus = new ComboViewer(modelContainer, SWT.BORDER); modelStatus.setContentProvider(new ArrayContentProvider()); modelStatus.setInput(ModelArchiveResolutionStatus.values()); } }
| SWT.LEFT); colorsAndFontsThemeCombo.setContentProvider(new ArrayContentProvider()); colorsAndFontsThemeCombo.setInput(getColorsAndFontsThemes()); colorsAndFontsThemeCombo.getControl().setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); colorsAndFontsThemeCombo.addSelectionChangedListener(event -> {