-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(intellij): support for pause and exception break points in debugger
- Loading branch information
Showing
22 changed files
with
319 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
...client/src/main/kotlin/dev/robotcode/robotcode4ij/debugging/RobotCodeBreakpointHandler.kt
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
...ent/src/main/kotlin/dev/robotcode/robotcode4ij/debugging/RobotCodeBreakpointProperties.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...n/dev/robotcode/robotcode4ij/debugging/breakpoints/RobotCodeExceptionBreakpointHandler.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package dev.robotcode.robotcode4ij.debugging.breakpoints | ||
|
||
import com.intellij.xdebugger.breakpoints.XBreakpoint | ||
import com.intellij.xdebugger.breakpoints.XBreakpointHandler | ||
import dev.robotcode.robotcode4ij.debugging.RobotCodeDebugProcess | ||
|
||
class RobotCodeExceptionBreakpointHandler(val process: RobotCodeDebugProcess) : | ||
XBreakpointHandler<XBreakpoint<RobotCodeExceptionBreakpointProperties>>(RobotCodeExceptionBreakpointType::class.java) { | ||
override fun registerBreakpoint(breakpoint: XBreakpoint<RobotCodeExceptionBreakpointProperties>) { | ||
process.registerExceptionBreakpoint(breakpoint) | ||
} | ||
|
||
override fun unregisterBreakpoint( | ||
breakpoint: XBreakpoint<RobotCodeExceptionBreakpointProperties>, temporary: Boolean | ||
) { | ||
process.unregisterExceptionBreakpoint(breakpoint) | ||
} | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
...ev/robotcode/robotcode4ij/debugging/breakpoints/RobotCodeExceptionBreakpointProperties.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package dev.robotcode.robotcode4ij.debugging.breakpoints | ||
|
||
import com.intellij.xdebugger.breakpoints.XBreakpointProperties | ||
|
||
class RobotCodeExceptionBreakpointProperties : XBreakpointProperties<RobotCodeExceptionBreakpointProperties>() { | ||
override fun getState(): RobotCodeExceptionBreakpointProperties? { | ||
return this | ||
} | ||
|
||
override fun loadState(state: RobotCodeExceptionBreakpointProperties) { | ||
TODO("Not yet implemented") | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
...tlin/dev/robotcode/robotcode4ij/debugging/breakpoints/RobotCodeExceptionBreakpointType.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package dev.robotcode.robotcode4ij.debugging.breakpoints | ||
|
||
import com.intellij.icons.AllIcons | ||
import com.intellij.openapi.project.Project | ||
import com.intellij.xdebugger.breakpoints.XBreakpoint | ||
import com.intellij.xdebugger.breakpoints.XBreakpointType | ||
import org.jetbrains.annotations.Nls | ||
import org.jetbrains.annotations.NonNls | ||
import javax.swing.Icon | ||
import javax.swing.JComponent | ||
|
||
class RobotCodeExceptionBreakpointType : | ||
XBreakpointType<XBreakpoint<RobotCodeExceptionBreakpointProperties>, RobotCodeExceptionBreakpointProperties>( | ||
ID, | ||
NAME | ||
) { | ||
|
||
companion object { | ||
private const val ID = "robotcode-exception" | ||
private const val NAME = "Robot Framework Exception Breakpoint" | ||
} | ||
|
||
override fun getDisplayText(breakpoint: XBreakpoint<RobotCodeExceptionBreakpointProperties>): @Nls String? { | ||
return "Any Exception" | ||
} | ||
|
||
override fun getEnabledIcon(): Icon { | ||
return AllIcons.Debugger.Db_exception_breakpoint | ||
} | ||
|
||
override fun getDisabledIcon(): Icon { | ||
return AllIcons.Debugger.Db_disabled_exception_breakpoint | ||
} | ||
|
||
override fun createProperties(): RobotCodeExceptionBreakpointProperties? { | ||
return RobotCodeExceptionBreakpointProperties() | ||
} | ||
|
||
override fun addBreakpoint( | ||
project: Project?, | ||
parentComponent: JComponent? | ||
): XBreakpoint<RobotCodeExceptionBreakpointProperties>? { | ||
return super.addBreakpoint(project, parentComponent) | ||
} | ||
|
||
override fun getBreakpointsDialogHelpTopic(): @NonNls String? { | ||
return "reference.dialogs.breakpoints" | ||
} | ||
|
||
override fun createDefaultBreakpoint(creator: XBreakpointCreator<RobotCodeExceptionBreakpointProperties?>): XBreakpoint<RobotCodeExceptionBreakpointProperties?>? { | ||
var breakpoint = creator.createBreakpoint(RobotCodeExceptionBreakpointProperties()) | ||
breakpoint.isEnabled = true | ||
return breakpoint | ||
} | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
...kotlin/dev/robotcode/robotcode4ij/debugging/breakpoints/RobotCodeLineBreakpointHandler.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package dev.robotcode.robotcode4ij.debugging.breakpoints | ||
|
||
import com.intellij.xdebugger.breakpoints.XBreakpointHandler | ||
import com.intellij.xdebugger.breakpoints.XLineBreakpoint | ||
import dev.robotcode.robotcode4ij.debugging.RobotCodeDebugProcess | ||
|
||
class RobotCodeLineBreakpointHandler(val process: RobotCodeDebugProcess) : | ||
XBreakpointHandler<XLineBreakpoint<RobotCodeLineBreakpointProperties>>(RobotCodeLineBreakpointType::class.java) { | ||
override fun registerBreakpoint(breakpoint: XLineBreakpoint<RobotCodeLineBreakpointProperties>) { | ||
process.registerBreakpoint(breakpoint) | ||
} | ||
|
||
override fun unregisterBreakpoint( | ||
breakpoint: XLineBreakpoint<RobotCodeLineBreakpointProperties>, | ||
temporary: Boolean | ||
) { | ||
process.unregisterBreakpoint(breakpoint) | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...lin/dev/robotcode/robotcode4ij/debugging/breakpoints/RobotCodeLineBreakpointProperties.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package dev.robotcode.robotcode4ij.debugging.breakpoints | ||
|
||
import com.intellij.xdebugger.breakpoints.XBreakpointProperties | ||
|
||
class RobotCodeLineBreakpointProperties : XBreakpointProperties<RobotCodeLineBreakpointProperties>() { | ||
|
||
override fun getState(): RobotCodeLineBreakpointProperties { | ||
return this | ||
} | ||
|
||
override fun loadState(state: RobotCodeLineBreakpointProperties) { | ||
TODO("Not yet implemented") | ||
} | ||
} |
Oops, something went wrong.