File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 33
33
import org .eclipse .jface .util .OpenStrategy ;
34
34
import org .eclipse .jface .util .Policy ;
35
35
import org .eclipse .jface .util .SafeRunnable ;
36
+ import org .eclipse .jface .viewers .internal .ExpandableNode ;
36
37
import org .eclipse .swt .SWT ;
37
38
import org .eclipse .swt .dnd .DragSource ;
38
39
import org .eclipse .swt .dnd .DragSourceListener ;
@@ -814,6 +815,11 @@ public void run() {
814
815
* @see #addPostSelectionChangedListener(ISelectionChangedListener)
815
816
*/
816
817
protected void firePostSelectionChanged (final SelectionChangedEvent event ) {
818
+ // do not inform client listeners on ExpandableNode selection
819
+ if (event .getSelection () instanceof StructuredSelection sel
820
+ && sel .getFirstElement () instanceof ExpandableNode ) {
821
+ return ;
822
+ }
817
823
for (ISelectionChangedListener l : postSelectionChangedListeners ) {
818
824
SafeRunnable .run (new SafeRunnable () {
819
825
@ Override
Original file line number Diff line number Diff line change 17
17
import org .eclipse .core .runtime .Assert ;
18
18
import org .eclipse .core .runtime .ListenerList ;
19
19
import org .eclipse .jface .util .SafeRunnable ;
20
+ import org .eclipse .jface .viewers .internal .ExpandableNode ;
20
21
import org .eclipse .swt .events .HelpEvent ;
21
22
import org .eclipse .swt .events .HelpListener ;
22
23
import org .eclipse .swt .widgets .Control ;
@@ -144,6 +145,13 @@ protected void fireHelpRequested(HelpEvent event) {
144
145
* @see ISelectionChangedListener#selectionChanged
145
146
*/
146
147
protected void fireSelectionChanged (final SelectionChangedEvent event ) {
148
+
149
+ // do not inform client listeners on ExpandableNode selection
150
+ if (event .getSelection () instanceof StructuredSelection sel
151
+ && sel .getFirstElement () instanceof ExpandableNode ) {
152
+ return ;
153
+ }
154
+
147
155
for (ISelectionChangedListener l : selectionChangedListeners ) {
148
156
SafeRunnable .run (new SafeRunnable () {
149
157
@ Override
You can’t perform that action at this time.
0 commit comments