IStructuredSelection
This class is not intended to be subclassed.
839840841842843844845846847848849
/* Viewer */ fViewer = new TableViewer(customTable.getControl()) { @Override public ISelection getSelection() { StructuredSelection selection = (StructuredSelection) super.getSelection(); return convertToNews(selection); } }; fViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); fViewer.setUseHashlookup(true);
881882883884885886887
for (Object selectedElement : selectedElements) { ScoredNews scoredNews = (ScoredNews) selectedElement; selectedNews.add(scoredNews.getNews()); } return new StructuredSelection(selectedNews); }
103510361037103810391040104110421043
else if (event.button == 1 && item.getImageBounds(COL_STICKY).contains(p)) { Object data = item.getData(); /* Toggle State between Sticky / Not Sticky */ if (data instanceof ScoredNews) { new MakeTypesStickyAction(new StructuredSelection(((ScoredNews) data).getNews())).run(); } } }
1082108310841085108610871088
ScoredNews scoredNews = (ScoredNews) selectedElement; selectedNews.add(scoredNews.getNews()); } /* Open News */ new OpenNewsAction(new StructuredSelection(selectedNews), getShell()).run(); }
546547548549550551552553
if (!fSelectedBookMarkSet.equals(child)) changeSet((IFolder) child); /* Set Selection */ fViewer.setSelection(new StructuredSelection(mark), true); } }
14471448144914501451145214531454145514561457
private void performNavigation(ITreeNode targetNode, boolean newsScoped, boolean unread) { IMark mark = (IMark) targetNode.getData(); /* Set Selection to Mark */ ISelection selection = new StructuredSelection(mark); fViewer.setSelection(selection); /* Open in FeedView */ try { PerformAfterInputSet perform = null;
9596979899100101102103104105
new EntityGroupItem(group, label2); new EntityGroupItem(group, label3); Object selectedItems[] = new Object[] { label1, group }; IStructuredSelection sel = new StructuredSelection(selectedItems); List<IEntity> entities = ModelUtils.getEntities(sel); assertEquals(3, entities.size()); int l1 = 0, l2 = 0, l3 = 0;
133134135136137138139140141142143
new EntityGroupItem(group, label2); new EntityGroupItem(group, label3); Object selectedItems[] = new Object[] { label1, feed1, group }; IStructuredSelection sel = new StructuredSelection(selectedItems); List<ILabel> labels = ModelUtils.getEntities(sel, ILabel.class); assertEquals(3, labels.size()); int l1 = 0, l2 = 0, l3 = 0;
11891190119111921193119411951196119711981199
/* Viewer */ fResultViewer = new TableViewer(customTable.getControl()) { @Override public ISelection getSelection() { StructuredSelection selection = (StructuredSelection) super.getSelection(); return convertToNews(selection); } }; fResultViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); fResultViewer.setUseHashlookup(true);
1246124712481249125012511252