Bug 118104 - ToggleBreakpointAdapter class cast exception for ITextEditor
Summary: ToggleBreakpointAdapter class cast exception for ITextEditor
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.1.2   Edit
Assignee: Kevin Barnes CLA Friend
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-25 15:20 EST by Bruce Sutton CLA Friend
Modified: 2005-12-05 10:17 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bruce Sutton CLA Friend 2005-11-25 15:20:20 EST
I have a multipaneeditor that has the CompilationUnitEditor in one of the panes.  In my MPE's getAdapter() I pass on requests for IToggleBreakpointsTarget.class to the embedded CompilationUnitEditor.  So now the Toggle breakpoint action on the run menu is enabled when the CompilationUnitEditor is active in the MPE.
But when the action is selectioned I get the following error:
!ENTRY org.eclipse.core.runtime 4 2 2005-11-25 11:57:25.968
!MESSAGE An internal error occurred during: "Toggle Line Breakpoint".
!STACK 0
java.lang.ClassCastException: (My_MPE_type) incompatible with org/eclipse/ui/texteditor/ITextEditor
	at org.eclipse.jdt.internal.debug.ui.actions.ToggleBreakpointAdapter$2.run(ToggleBreakpointAdapter.java:160)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)


It looks like ToggleBreakpointAdapter.run() needs to call getAdapter() on the editorpart it receives.    

This same fix should be done for methods toggleLineBreakpoints, toggleMethodBreakpoints, and toogleWatchPoints.
RunToLineAdapter.runToLine() needs the same fix too.

We need this fix in Eclipse 3.1.2 if possible.
Comment 1 Darin Wright CLA Friend 2005-11-30 13:39:56 EST
Fixed in HEAD for ToggleBreakpointAdapter and RunToLineAdapter.
Comment 2 Darin Wright CLA Friend 2005-11-30 14:14:12 EST
Released to 3.1.2 branch. (did not make this week's build though).
Comment 3 Darin Wright CLA Friend 2005-11-30 14:14:27 EST
Please verify, Kevin.
Comment 4 Kevin Barnes CLA Friend 2005-12-05 10:17:14 EST
verified