viewer.addSelectionChangedListener(new ISelectionChangedListener() { @Override public void selectionChanged(final SelectionChangedEvent event) { if (!event.getSelection().isEmpty()) { v.setSelection(StructuredSelection.EMPTY); } } });
public void selectionChanged(SelectionChangedEvent event) { ISelection s= event.getSelection(); if (s instanceof IStructuredSelection) { performSelectionChanged((IStructuredSelection) s); } } };
@Override public void selectionChanged(SelectionChangedEvent event) { handleEntrySelection(event.getSelection()); } };
public void selectionChanged(SelectionChangedEvent event) { IStructuredSelection selection = (IStructuredSelection)event.getSelection(); containerSelectionChanged(selection); } });
public void selectionChanged(SelectionChangedEvent event) { ISelection selection = event.getSelection(); if (selection.isEmpty()) { fRemoveImportsButton.setEnabled(false); } else { fRemoveImportsButton.setEnabled(true); } } });
public void selectionChanged(SelectionChangedEvent event) { ISelection selection = event.getSelection(); if (selection.isEmpty()) { fRemoveFilterButton.setEnabled(false); } else { fRemoveFilterButton.setEnabled(true); } } });
public void selectionChanged(SelectionChangedEvent event) { ISelection selection = event.getSelection(); if (selection instanceof TextSelection) { // only update global actions updateActions(event.getSelection()); } else if (selection.isEmpty()) { // XXX a styled text widget has lost focus, re-enable all edit actions forceEditActionsEnabled(); } }
public void selectionChanged(SelectionChangedEvent event) { ISelection selection= event.getSelection(); if (selection instanceof IStructuredSelection) { Object selectedElement= ((IStructuredSelection)selection).getFirstElement(); if (selectedElement instanceof FilterDescriptor) description.setText(((FilterDescriptor)selectedElement).getDescription()); } } });
public void selectionChanged(SelectionChangedEvent event) { IStructuredSelection s = (IStructuredSelection) event.getSelection(); Object obj = s.getFirstElement(); if (obj instanceof IWorkingSet) wsNameText.setText(((IWorkingSet) obj).getName()); } });
@Override public void selectionChanged(SelectionChangedEvent event) { String statusBarMessage= formatMessage(event.getSelection()); fStatusLineManager.setMessage(statusBarMessage); }
@Override public void selectionChanged(SelectionChangedEvent event) { setEnabled(! event.getSelection().isEmpty()); } });
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; }
private void selectionChanged(SelectionChangedEvent event) { IStructuredSelection selection= (IStructuredSelection) event.getSelection(); updateButtonStates(selection); updateSourceView(selection); }
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; }
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) { ISelection s = event.getSelection(); if (s instanceof IStructuredSelection) { IStructuredSelection ss = (IStructuredSelection) s; Object element = ss.getFirstElement(); Diff diff = findDiff(element); if (diff != null) setCurrentDiff(diff, true); } }
public void selectionChanged(SelectionChangedEvent e) { boolean ignore= false; ISelection selection= e.getSelection(); if (selection instanceof ITextSelection) { ITextSelection textSelection= (ITextSelection)selection; Point range= getSelection(); ignore= textSelection.getOffset() + textSelection.getLength() == range.x + range.y; } if (!fSearching && !ignore) leave(); }
@Override public void selectionChanged(SelectionChangedEvent e) { ISelection s= e.getSelection(); if (s == null || s.isEmpty()) feed1(s); if (isEditionSelectionDialog()) firePropertyChange(new PropertyChangeEvent(this, PROP_SELECTED_EDITION, null, getSelectedEdition())); } }
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 protected void createFormContent(IManagedForm mform) { ScrolledForm form = mform.getForm(); mform.getToolkit().decorateFormHeading(form.getForm()); initializeDialogUnits(form); fCCP.createCC(form, mform.getToolkit(), event -> updateOkButtonEnablement(event.getSelection())); applyDialogFont(form); }