Refine search
@Override public void selectionChanged(SelectionChangedEvent event) { IStructuredSelection selection= (IStructuredSelection)event.getSelection(); typeSelected((ITypeBinding)selection.getFirstElement()); } };
@Override public void selectionChanged(SelectionChangedEvent event) { // forward to my listeners SelectionChangedEvent wrappedEvent= new SelectionChangedEvent(this, event.getSelection()); for (ISelectionChangedListener listener : fListeners) { listener.selectionChanged(wrappedEvent); } }
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)); } }
public void selectionChanged(SelectionChangedEvent e) { if (e.getSelectionProvider() == fCallHierarchyViewer) { methodSelectionChanged(e.getSelection()); } }
private ISourceReference getFirstSelectedSourceReference(final SelectionChangedEvent event) { final ISelection s= event.getSelection(); if (!(s instanceof IStructuredSelection)) return null; final IStructuredSelection ss= (IStructuredSelection) s; if (ss.size() != 1) return null; final Object first= ss.getFirstElement(); if (!(first instanceof ISourceReference)) return null; return (ISourceReference) first; }
public void selectionChanged(SelectionChangedEvent event) { IStructuredSelection sel= (IStructuredSelection) event.getSelection(); if (!sel.isEmpty()) { fStore.setValue(PreferenceConstants.EDITOR_FOLDING_PROVIDER, ((JavaFoldingStructureProviderDescriptor) sel.getFirstElement()).getId()); updateListDependencies(); } } });
@Override public void selectionChanged(SelectionChangedEvent event) { IStructuredSelection selection = event.getStructuredSelection(); if (!selection.isEmpty()) { LaunchShortcutExtension shortcutSource = (LaunchShortcutExtension) selection.getFirstElement(); String description = shortcutSource.getShortcutDescription(fMode); fDescriptionText.setText((description == null ? LaunchConfigurationsMessages.LaunchShortcutSelectionDialog_3 : description)); } } });
viewer.addSelectionChangedListener(new ISelectionChangedListener() { @Override public void selectionChanged(final SelectionChangedEvent event) { if (!event.getSelection().isEmpty()) { v.setSelection(StructuredSelection.EMPTY); } } });
@Override public void setSelection ( final ISelection selection ) { this.selection = selection; for ( final ISelectionChangedListener listener : this.listeners ) { listener.selectionChanged ( new SelectionChangedEvent ( this, selection ) ); } }
public void selectionChanged(SelectionChangedEvent event) { ISelection selection = event.getSelection(); if (selection instanceof IStructuredSelection) { IStructuredSelection ss = (IStructuredSelection)selection; setEnabled(!ss.isEmpty()); return; } setEnabled(false); } }
public void selectionChanged(SelectionChangedEvent event) { currentDiffs.clear(); ISelection selection = event.getSelection(); if (selection instanceof IStructuredSelection) { IStructuredSelection sel = (IStructuredSelection) selection; for (Object obj : sel.toList()) if (obj instanceof FileDiff) currentDiffs.add((FileDiff) obj); } format(); }
public void doubleClick(DoubleClickEvent event) { IStructuredSelection s = (IStructuredSelection) event.getSelection(); selectionChanged(new SelectionChangedEvent(event.getViewer(), s)); Object element = s.getFirstElement(); if (treeViewer.isExpandable(element)) { treeViewer.setExpandedState(element, !treeViewer.getExpandedState(element)); } else if (element instanceof WorkbenchWizardElement) { page.advanceToNextPageOrFinish(); } } });
void setupListeners() { wsTableViewer.addSelectionChangedListener(event -> { IStructuredSelection s = event.getStructuredSelection(); Object obj = s.getFirstElement(); if (obj instanceof IWorkingSet) wsNameText.setText(((IWorkingSet) obj).getName()); }); wsNameText.addModifyListener(e -> setErrorMessage(null)); }
/** * Responds to a selection changed event in the environment table * @param event the selection change event */ protected void handleTableSelectionChanged(SelectionChangedEvent event) { int size = event.getStructuredSelection().size(); envEditButton.setEnabled(size == 1); envRemoveButton.setEnabled(size > 0); }
final void doPostSelectionChanged(SelectionChangedEvent event) { ISelectionProvider provider= event.getSelectionProvider(); if (provider == fViewerInFocus) { firePostSelectionChanged(); } }
@Override public void selectionChanged(SelectionChangedEvent event) { fPerspectivesPanel.refreshPanel(event.getStructuredSelection()); } });
/** * Returns the selection provider that is the source of this event. * * @return the originating selection provider */ public ISelectionProvider getSelectionProvider() { return (ISelectionProvider) getSource(); } }
private IJavaElement getFirstSelectedSourceReference(SelectionChangedEvent event) { ISelection s= event.getSelection(); if (! (s instanceof IStructuredSelection)) return null; IStructuredSelection strSel= (IStructuredSelection) s; if (strSel.size() != 1) return null; Object first= strSel.getFirstElement(); if (! (first instanceof IJavaElement)) return null; return (IJavaElement) first; }
public void selectionChanged(SelectionChangedEvent event) { IStructuredSelection iss = (IStructuredSelection) event .getSelection(); if (iss != null && !iss.isEmpty()) { CPWizardNode node = (CPWizardNode) iss .getFirstElement(); setDescription(node.getProvider().getDescription()); setSelectedNode(node); } } });
@Override public void selectionChanged(SelectionChangedEvent event) { IStructuredSelection ss = event.getStructuredSelection(); if(ss != null && !ss.isEmpty()) { SelectLaunchersDialog.this.description.setText(((ILaunchDelegate)ss.getFirstElement()).getDescription()); } else { SelectLaunchersDialog.this.description.setText(IInternalDebugCoreConstants.EMPTY_STRING); } } });