Tagged: 389sports
- This topic has 6 replies, 3 voices, and was last updated 10 months, 2 weeks ago by wayne.
-
AuthorPosts
-
JBcopilotParticipantI get the following stacktrace when attempting to set the mark in a source file. This is a Copliot4Eclipse bug. I couldn’t find anywhere but this discussion forum to report the bug.
java.lang.ClassCastException: class org.eclipse.jface.text.MarkSelection cannot be cast to class org.eclipse.jface.text.ITextSelection (org.eclipse.jface.text.MarkSelection and org.eclipse.jface.text.ITextSelection are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @2387f552) at com.genuitec.copilot4eclipse.CopilotEditSession.handleSelectionEvent(Unknown Source) at com.genuitec.copilot4eclipse.CopilotEditSession$1.selectionChanged(Unknown Source)
support-swapnaModeratorHi,
Thank you for trying CoPilot and reporting this bug.
I ran few tests with adding book mark in the editor and could not replicate the problem.
Can you please clarify how you are setting the mark? If possible, please attach a screenshot to help us get a visual.
Also share the Eclipse Version and distribution details.Apologies for inconvenience caused.
–Swapna
Genuitec Support- This reply was modified 11 months, 2 weeks ago by support-swapna.
JBcopilotParticipant“Setting the mark” means typing <CTRL>-space in the java file (emacs keybinding mode). It marks the position in the text so you can then select a region with the keyboard.
You can see what the bug has to be from the stacktrace snippet I sent. It’s in genuitec code: com.genuitec.copilot4eclipse.CopilotEditSession.handleSelectionEvent
and in that code you’re casting an org.eclipse.jface.text.MarkSelection to org.eclipse.jface.text.ITextSelection
which is not a valid cast since MarkSelection is not in the type hierarchy for ITextSelection.
The type hierarchy for MarkSelection is ISelection -> IMarkSelection -> MarkSelection
ITextSelection splits off further up the tree: ISelection -> ITextSelectionHope that helps!
(Eclipse details:
Eclipse IDE for Enterprise Java and Web Developers (includes Incubating components)Version: 2023-12 (4.30.0)
Build id: 20231201-2043)- This reply was modified 11 months, 2 weeks ago by JBcopilot.
wayneModeratorThx for sharing the details. We will be investigating asap. Our next planned release is 1.0 production in early Jan. We will update you on the status of this issue as we work on a fix and when it will be available.
Wayne
JBcopilotParticipantGreat. FYI: the same bug is tickled if I type <CTRL>-s (incremental find). I guess that also sets the mark.
wayneModeratorAgain thx. Submitted a fix and should be in next release.
W -
AuthorPosts