Label label = new Label(page, SWT.LEFT);
//label.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false));
label.setText("Bookmarks ");
label.pack();
IBookmarkService bookmarkService = BookmarksPlugin.getBookmarkService();
listenService(true);
comboViewer = new ComboViewer(page, SWT.READ_ONLY);
comboViewer.setContentProvider(new ArrayContentProvider());
comboViewer.setLabelProvider(new LabelProvider(){
@Override
public String getText( Object element ) {
if (element instanceof IBookmark) {
IBookmark bookmark = (IBookmark) element;
return bookmark.getName();
}
return super.getText(element);
}
});
List<IBookmark> bookmarks = (List<IBookmark>)bookmarkService.getBookmarks();
comboViewer.setInput(bookmarks);
comboViewer.addSelectionChangedListener(comboListener);
if (strategy != null ){