Skip to content

Commit

Permalink
Add message to display text
Browse files Browse the repository at this point in the history
  • Loading branch information
citizenmatt committed May 14, 2020
1 parent 8b3efe6 commit aa66922
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ package com.jetbrains.rider.plugins.unity.debugger.breakpoints

import com.intellij.openapi.project.Project
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.xdebugger.breakpoints.SuspendPolicy
import com.intellij.xdebugger.breakpoints.XLineBreakpoint
import com.jetbrains.rider.debugger.breakpoint.DotNetLineBreakpointProperties
import com.jetbrains.rider.debugger.breakpoint.DotNetLineBreakpointType
import icons.UnityIcons
import java.util.*
Expand All @@ -10,10 +13,12 @@ import javax.swing.Icon
class UnityPausepointBreakpointType : DotNetLineBreakpointType(Id, Title) {
companion object {
const val Id = "UnityPausepointType"
const val Title = "Unity pausepoints"
const val Title = "Unity Pausepoints"
}

override fun getTitle(): String = Title
override fun getDisplayText(breakpoint: XLineBreakpoint<DotNetLineBreakpointProperties>?): String {
return "Pause Unity editor when debugger reaches " + super.getDisplayText(breakpoint)
}

override fun getDisabledIcon(): Icon = UnityIcons.Debugger.Db_disabled_pausepoint
override fun getEnabledIcon(): Icon = UnityIcons.Debugger.Db_set_pausepoint
Expand All @@ -28,9 +33,11 @@ class UnityPausepointBreakpointType : DotNetLineBreakpointType(Id, Title) {
override fun getVerifiedIconWithNoSuspend() = UnityIcons.Debugger.Db_verified_no_suspend_pausepoint
// getPendingIcon is not overridden. Base will return null, which then uses set icon

// Don't allow adding the breakpoint manually
override fun canPutAt(file: VirtualFile, line: Int, project: Project): Boolean = false

override fun getPriority(): Int = super.getPriority() - 1
override fun getDefaultSuspendPolicy() = SuspendPolicy.NONE

override fun getVisibleStandardPanels(): EnumSet<StandardPanels> = EnumSet.of(StandardPanels.DEPENDENCY)
}

0 comments on commit aa66922

Please sign in to comment.