/** * Sets the input for the table in the tab item. * * @param assignments * Assignments as input. */ public void setInput(List<AbstractClassSensorAssignment<?>> assignments) { tableViewer.setInput(assignments); tableViewer.setSelection(StructuredSelection.EMPTY); }
/** * {@inheritDoc} */ @Override public void selectElement(Object element) { StructuredSelection ss = new StructuredSelection(element); tableViewer.setSelection(ss, true); }
public void selectElements(ISelection selection) { fSelectionWhenEnabled= selection; if (isOkToUse(fTableControl)) { fTable.setSelection(selection, true); } }
@Override public boolean setFormInput(Object object) { if (object instanceof IPluginExtensionPoint) { pointTable.setSelection(new StructuredSelection(object), true); return true; } return false; }
@Override public boolean setFormInput(Object object) { if (object instanceof IFeaturePlugin) { fPluginViewer.setSelection(new StructuredSelection(object), true); return true; } return false; }
public void setInput(List<ParameterInfo> parameterInfos) { Assert.isNotNull(parameterInfos); fParameterInfos= parameterInfos; fTableViewer.setInput(fParameterInfos); if (fParameterInfos.size() > 0) fTableViewer.setSelection(new StructuredSelection(fParameterInfos.get(0))); }
/** * Updates the entries to the entries in the given list */ private void setEntries(List<AntTargetNode> list) { fTargets = list.toArray(new AntTargetNode[list.size()]); fViewer.setInput(fTargets); // update all selection listeners fViewer.setSelection(fViewer.getSelection()); }
@Override public boolean setFormInput(Object input) { if (input instanceof IProductPlugin) { fRepositoryTable.setSelection(new StructuredSelection(input), true); return true; } return super.setFormInput(input); }
public void onSetActive() { if (tableViewer == null) return; Object obj = tableViewer.getElementAt(0); if (obj != null) tableViewer.setSelection(new StructuredSelection(obj)); }
public void widgetSelected( SelectionEvent e ) { ExtendedOperation newExtendedOperation = new ExtendedOperation( getNewName() ); extendedOperations.add( newExtendedOperation ); viewer.refresh(); viewer.setSelection( new StructuredSelection( newExtendedOperation ) ); setEditorDirty(); } } );
public void widgetSelected( SelectionEvent e ) { Interceptor newInterceptor = new Interceptor( getNewName() ); interceptors.add( newInterceptor ); viewer.refresh(); viewer.setSelection( new StructuredSelection( newInterceptor ) ); setEditorDirty(); } } );
/** * Deselects all elements in the file table viewer. */ public void widgetSelected(SelectionEvent e) { fileTable.getTable().deselectAll(); fileTable.setSelection(fileTable.getSelection()); } });
private void selectFirstExtensionPoint() { Table table = pointTable.getTable(); TableItem[] items = table.getItems(); if (items.length == 0) return; TableItem firstItem = items[0]; Object obj = firstItem.getData(); pointTable.setSelection(new StructuredSelection(obj)); }
public void create() { super.create(); List initialSelection= getInitialElementSelections(); if (initialSelection != null) fViewer.setSelection(new StructuredSelection(initialSelection)); validateDialogState(); }
public void widgetSelected(SelectionEvent e) { IStructuredSelection sel = (IStructuredSelection) monitorTableViewer.getSelection(); IMonitoredServerPort msp = (IMonitoredServerPort) sel.getFirstElement(); smm.stopMonitor(msp); monitorTableViewer.refresh(msp); monitorTableViewer.setSelection(new StructuredSelection(msp)); } });
public void modifyText( ModifyEvent e ) { availableObjectClassesViewer.refresh(); if ( availableObjectClassesViewer.getTable().getItemCount() >= 1 ) { Object item = availableObjectClassesViewer.getElementAt( 0 ); availableObjectClassesViewer.setSelection( new StructuredSelection( item ) ); } } } );
protected void selectArchetype(String groupId, String artifactId, String version) { Archetype archetype = findArchetype(groupId, artifactId, version); Table table = viewer.getTable(); if(archetype != null) { viewer.setSelection(new StructuredSelection(archetype), true); int n = table.getSelectionIndex(); table.setSelection(n); } }
@Override protected void createButtonsForButtonBar(Composite parent) { super.createButtonsForButtonBar(parent); Table table = fViewer.getTable(); if(table.getItemCount() > 0) { fViewer.setSelection(new StructuredSelection(table.getItem(0).getData())); } }
public void editParameter(ParameterInfo info) { fTableViewer.getControl().setFocus(); if (! info.isDeleted()) { fTableViewer.setSelection(new StructuredSelection(info), true); updateButtonsEnabledState(); editColumnOrNextPossible(NEWNAME_PROP); return; } }
private void handleAdd() { clearEditors(); RepositoryDialog dialog = new RepositoryDialog(PDEPlugin.getActiveWorkbenchShell(), null); if (dialog.open() == Window.OK) { IRepositoryInfo result = dialog.getResult(); if (result != null) { fRepositoryTable.refresh(); fRepositoryTable.setSelection(new StructuredSelection(result)); updateButtons(); } } }