1 11 package org.eclipse.jdt.internal.ui.search; 12 13 import org.eclipse.jface.action.Action; 14 import org.eclipse.swt.custom.BusyIndicator; 15 16 17 public class SortAction extends Action { 18 private int fSortOrder; 19 private JavaSearchResultPage fPage; 20 21 public SortAction(String label, JavaSearchResultPage page, int sortOrder) { 22 super(label); 23 fPage= page; 24 fSortOrder= sortOrder; 25 } 26 27 public void run() { 28 BusyIndicator.showWhile(fPage.getViewer().getControl().getDisplay(), new Runnable () { 29 public void run() { 30 fPage.setSortOrder(fSortOrder); 31 } 32 }); 33 } 34 35 public int getSortOrder() { 36 return fSortOrder; 37 } 38 } 39 | Popular Tags |