1 11 12 package org.eclipse.ui.views.bookmarkexplorer; 13 14 import org.eclipse.jface.viewers.Viewer; 15 import org.eclipse.swt.widgets.Control; 16 import org.eclipse.swt.widgets.Table; 17 import org.eclipse.ui.PlatformUI; 18 import org.eclipse.ui.internal.views.bookmarkexplorer.BookmarkMessages; 19 20 23 class SelectAllAction extends BookmarkAction { 24 25 30 public SelectAllAction(BookmarkNavigator view) { 31 super(view, BookmarkMessages.SelectAll_text); 32 setToolTipText(BookmarkMessages.SelectAll_toolTip); 33 PlatformUI.getWorkbench().getHelpSystem().setHelp(this, 34 IBookmarkHelpContextIds.SELECT_ALL_BOOKMARK_ACTION); 35 setEnabled(true); 36 } 37 38 public void run() { 39 Viewer viewer = getView().getViewer(); 40 Control control = viewer.getControl(); 41 if (control instanceof Table) { 42 ((Table) control).selectAll(); 43 viewer.setSelection(viewer.getSelection(), false); 44 } 45 } 46 } 47 | Popular Tags |