Lines 18-24
Link Here
|
18 |
import java.util.Set; |
18 |
import java.util.Set; |
19 |
|
19 |
|
20 |
import org.eclipse.core.commands.common.EventManager; |
20 |
import org.eclipse.core.commands.common.EventManager; |
21 |
import org.eclipse.core.runtime.Platform; |
21 |
import org.eclipse.core.runtime.SafeRunner; |
22 |
import org.eclipse.jface.util.SafeRunnable; |
22 |
import org.eclipse.jface.util.SafeRunnable; |
23 |
import org.eclipse.jface.viewers.CheckStateChangedEvent; |
23 |
import org.eclipse.jface.viewers.CheckStateChangedEvent; |
24 |
import org.eclipse.jface.viewers.CheckboxTableViewer; |
24 |
import org.eclipse.jface.viewers.CheckboxTableViewer; |
Lines 33-39
Link Here
|
33 |
import org.eclipse.jface.viewers.SelectionChangedEvent; |
33 |
import org.eclipse.jface.viewers.SelectionChangedEvent; |
34 |
import org.eclipse.jface.viewers.StructuredSelection; |
34 |
import org.eclipse.jface.viewers.StructuredSelection; |
35 |
import org.eclipse.jface.viewers.TreeExpansionEvent; |
35 |
import org.eclipse.jface.viewers.TreeExpansionEvent; |
36 |
import org.eclipse.jface.viewers.ViewerSorter; |
36 |
import org.eclipse.jface.viewers.ViewerComparator; |
37 |
import org.eclipse.swt.SWT; |
37 |
import org.eclipse.swt.SWT; |
38 |
import org.eclipse.swt.custom.BusyIndicator; |
38 |
import org.eclipse.swt.custom.BusyIndicator; |
39 |
import org.eclipse.swt.layout.GridData; |
39 |
import org.eclipse.swt.layout.GridData; |
Lines 432-437
Link Here
|
432 |
|
432 |
|
433 |
/** |
433 |
/** |
434 |
* Set the initial checked state of the passed list element to true. |
434 |
* Set the initial checked state of the passed list element to true. |
|
|
435 |
* |
436 |
* @param element the element in the list to select |
435 |
*/ |
437 |
*/ |
436 |
public void initialCheckListItem(Object element) { |
438 |
public void initialCheckListItem(Object element) { |
437 |
Object parent = treeContentProvider.getParent(element); |
439 |
Object parent = treeContentProvider.getParent(element); |
Lines 444-449
Link Here
|
444 |
/** |
446 |
/** |
445 |
* Set the initial checked state of the passed element to true, |
447 |
* Set the initial checked state of the passed element to true, |
446 |
* as well as to all of its children and associated list elements |
448 |
* as well as to all of its children and associated list elements |
|
|
449 |
* |
450 |
* @param element the element in the tree to select |
447 |
*/ |
451 |
*/ |
448 |
public void initialCheckTreeItem(Object element) { |
452 |
public void initialCheckTreeItem(Object element) { |
449 |
treeItemChecked(element, true); |
453 |
treeItemChecked(element, true); |
Lines 498-504
Link Here
|
498 |
Object[] array = getListeners(); |
502 |
Object[] array = getListeners(); |
499 |
for (int i = 0; i < array.length; i++) { |
503 |
for (int i = 0; i < array.length; i++) { |
500 |
final ICheckStateListener l = (ICheckStateListener) array[i]; |
504 |
final ICheckStateListener l = (ICheckStateListener) array[i]; |
501 |
Platform.run(new SafeRunnable() { |
505 |
SafeRunner.run(new SafeRunnable() { |
502 |
public void run() { |
506 |
public void run() { |
503 |
l.checkStateChanged(event); |
507 |
l.checkStateChanged(event); |
504 |
} |
508 |
} |
Lines 560-565
Link Here
|
560 |
/** |
564 |
/** |
561 |
* Select or deselect all of the elements in the tree depending on the value of the selection |
565 |
* Select or deselect all of the elements in the tree depending on the value of the selection |
562 |
* boolean. Be sure to update the displayed files as well. |
566 |
* boolean. Be sure to update the displayed files as well. |
|
|
567 |
* |
568 |
* @param selection boolean indicating whether or not to select all elements |
563 |
*/ |
569 |
*/ |
564 |
public void setAllSelections(final boolean selection) { |
570 |
public void setAllSelections(final boolean selection) { |
565 |
|
571 |
|
Lines 587-595
Link Here
|
587 |
|
593 |
|
588 |
/** |
594 |
/** |
589 |
* Set the sorter that is to be applied to self's list viewer |
595 |
* Set the sorter that is to be applied to self's list viewer |
|
|
596 |
* |
597 |
* @param sorter the sorter for the list viewer |
590 |
*/ |
598 |
*/ |
591 |
public void setListSorter(ViewerSorter sorter) { |
599 |
public void setListSorter(ViewerComparator sorter) { |
592 |
listViewer.setSorter(sorter); |
600 |
listViewer.setComparator(sorter); |
593 |
} |
601 |
} |
594 |
|
602 |
|
595 |
/** |
603 |
/** |
Lines 649-657
Link Here
|
649 |
|
657 |
|
650 |
/** |
658 |
/** |
651 |
* Set the sorter that is to be applied to self's tree viewer |
659 |
* Set the sorter that is to be applied to self's tree viewer |
|
|
660 |
* |
661 |
* @param sorter the sorter for the tree |
652 |
*/ |
662 |
*/ |
653 |
public void setTreeSorter(ViewerSorter sorter) { |
663 |
public void setTreeSorter(ViewerComparator sorter) { |
654 |
treeViewer.setSorter(sorter); |
664 |
treeViewer.setComparator(sorter); |
655 |
} |
665 |
} |
656 |
|
666 |
|
657 |
/** |
667 |
/** |