/** * Returns the selection provider that is the source of this event. * * @return the originating selection provider */ public ISelectionProvider getSelectionProvider() { return (ISelectionProvider) getSource(); } }
/** * Returns the selection provider that is the source of this event. * * @return the originating selection provider */ public ISelectionProvider getSelectionProvider() { return (ISelectionProvider) getSource(); } }
/** * Returns the selection provider that is the source of this event. * * @return the originating selection provider */ public ISelectionProvider getSelectionProvider() { return (ISelectionProvider) getSource(); } }
public void selectionChanged(final SelectionChangedEvent event) { Object selection = ((StructuredSelection) event.getSelection()).getFirstElement(); if (selection != null) { boolean state = !checkboxTreeViewer.getChecked(selection); checkboxTreeViewer.setChecked(selection, state); checkboxTreeViewer.setSelection(StructuredSelection.EMPTY); checkStateListener.checkStateChanged(new CheckStateChangedEvent((ICheckable) event.getSource(), selection, state)); } }
@Override public void selectionChanged(SelectionChangedEvent event) { fireChange(event.getSource(), null); }
@Override public void selectionChanged(SelectionChangedEvent event) { if (tablesEnabled) { if (event.getSource() == propertyTableViewer) { propertyTableSelectionChanged((IStructuredSelection) event.getSelection()); } else if (event.getSource() == fileTableViewer) { fileTableSelectionChanged((IStructuredSelection) event.getSelection()); } } } };
public void selectionChanged(SelectionChangedEvent event) { if (event.getSource() == categoryTableViewer) { ISelection selection = event.getSelection(); if (selection instanceof StructuredSelection) { Object obj = ((StructuredSelection) selection).getFirstElement(); if (obj instanceof SpecificationForExtensionsSchema) { SpecificationForExtensionsSchema spec = (SpecificationForExtensionsSchema) obj; currentExtCategory = spec; refreshElementsViewer(spec); if ( spec.isDefautSchema() ){ editButton.setEnabled(false); removeButton.setEnabled(false); } else{ editButton.setEnabled(true); removeButton.setEnabled(true); } getButton(IDialogConstants.OK_ID).setEnabled(false); } } } }
@Override public void selectionChanged(SelectionChangedEvent event) { // only handle selection changed from parent's selection provider if (event.getSource() == fParent.getSite().getSelectionProvider()) { MemoryBlocksTreeViewPane.this.selectionChanged(fParent, event.getSelection()); } }
public void selectionChanged(SelectionChangedEvent event) { final IStructuredSelection selection= (IStructuredSelection)event.getSelection(); if (selection.isEmpty() || !(selection.getFirstElement() instanceof Node)) return; final Node selected= (Node)selection.getFirstElement(); if (selected == null || selected == fLastSelected) return; if (event.getSource() == fInnerViewer && selected instanceof InnerNode) { fLastSelected= (InnerNode)selected; fDialogSettings.put(PREF_INNER_INDEX, selected.index); innerViewerChanged((InnerNode)selected); } else if (event.getSource() == fOptionsViewer && selected instanceof OptionNode) fDialogSettings.put(PREF_OPTION_INDEX, selected.index); }
@Override public void selectionChanged(SelectionChangedEvent event) { final IStructuredSelection selection= (IStructuredSelection)event.getSelection(); if (selection.isEmpty() || !(selection.getFirstElement() instanceof Node)) return; final Node selected= (Node)selection.getFirstElement(); if (selected == null || selected == fLastSelected) return; if (event.getSource() == fInnerViewer && selected instanceof InnerNode) { fLastSelected= (InnerNode)selected; fDialogSettings.put(PREF_INNER_INDEX, selected.index); innerViewerChanged((InnerNode)selected); } else if (event.getSource() == fOptionsViewer && selected instanceof OptionNode) fDialogSettings.put(PREF_OPTION_INDEX, selected.index); }
@Override public final void selectionChanged(SelectionChangedEvent event) { if (event.getSource() == getSelectionProvider()) return; ISelection sel = event.getSelection(); if (sel instanceof IStructuredSelection) { IStructuredSelection structuredSel = (IStructuredSelection) sel; // Store the selected object to save us having to do this again. setSelectedObject(structuredSel.getFirstElement()); } else if (sel instanceof ITextSelection) { ITextSelection textSel = (ITextSelection) sel; setSelectedObject(getRangeElement(textSel.getOffset(), false)); } else fSelection = null; }
if (event.getSource() != getTextEditor().getSelectionProvider() && makeSelection)
if (event.getSource() != internalSelectionProvider) if (((getInput() instanceof IModel) && (event.getSource() instanceof ADTContentOutlinePage)) || (!(getInput() instanceof IModel))) if (((IGraphElement)selectedObject).isFocusAllowed() && (event.getSource() instanceof ADTContentOutlinePage)) if ( (field.isGlobal() && (getInput() instanceof IModel) && (event.getSource() instanceof ADTContentOutlinePage)) || ( (field.isGlobal() && !(getInput() instanceof IModel))))
fPluginViewer.addSelectionChangedListener(e -> { fRestoreSelectedDefaultButton.setEnabled(true); CheckboxTableViewer tableViewer = (CheckboxTableViewer) e.getSource(); boolean selected = tableViewer.getChecked(getSelectedModel()); pluginSelected(getSelectedModel(), selected);