File tree Expand file tree Collapse file tree
plugin/src/main/java/de/sebthom/eclipse/findview Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616import org .eclipse .core .runtime .NullProgressMonitor ;
1717import org .eclipse .jdt .annotation .Nullable ;
1818import org .eclipse .jface .text .BadLocationException ;
19+ import org .eclipse .jface .text .ITextSelection ;
1920import org .eclipse .jface .text .Position ;
2021import org .eclipse .jface .text .TextSelection ;
2122import org .eclipse .jface .util .PropertyChangeEvent ;
@@ -150,7 +151,9 @@ public synchronized void replaceCurrentSelection() {
150151 return ;
151152
152153 final var selProvider = editor .getSelectionProvider ();
153- final var sel = (TextSelection ) selProvider .getSelection ();
154+ final var selection = selProvider .getSelection ();
155+ if (!(selection instanceof ITextSelection sel ))
156+ return ;
154157 if (sel .isEmpty () || sel .getLength () == 0 )
155158 return ;
156159
You can’t perform that action at this time.
0 commit comments