-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #634 from JetBrains/bug/debug-players
Fix listing of Unity players in Attach to Unity Process dialog
- Loading branch information
Showing
10 changed files
with
53 additions
and
70 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
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
17 changes: 17 additions & 0 deletions
17
...c/main/kotlin/com/jetbrains/rider/plugins/unity/run/attach/UnityAttachDebuggerProvider.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,17 @@ | ||
package com.jetbrains.rider.plugins.unity.run.attach | ||
|
||
import com.intellij.execution.process.ProcessInfo | ||
import com.intellij.openapi.project.Project | ||
import com.intellij.openapi.util.UserDataHolder | ||
import com.intellij.xdebugger.attach.* | ||
|
||
class UnityAttachDebuggerProvider : XAttachDebuggerProvider { | ||
override fun getAvailableDebuggers(project: Project, host: XAttachHost, process: ProcessInfo, userData: UserDataHolder): MutableList<XAttachDebugger> { | ||
if (UnityRunUtil.isUnityEditorProcess(process)) | ||
return mutableListOf(UnityAttachDebugger()) | ||
return mutableListOf() | ||
} | ||
|
||
override fun isAttachHostApplicable(host: XAttachHost) = host is LocalAttachHost | ||
override fun getPresentationGroup(): XAttachPresentationGroup<ProcessInfo> = UnityAttachPresentationGroup | ||
} |
24 changes: 0 additions & 24 deletions
24
rider/src/main/kotlin/com/jetbrains/rider/plugins/unity/run/attach/UnityAttachGroup.kt
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
.../main/kotlin/com/jetbrains/rider/plugins/unity/run/attach/UnityAttachPresentationGroup.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,18 @@ | ||
package com.jetbrains.rider.plugins.unity.run.attach | ||
|
||
import com.intellij.execution.process.ProcessInfo | ||
import com.intellij.openapi.project.Project | ||
import com.intellij.openapi.util.UserDataHolder | ||
import com.intellij.xdebugger.attach.XAttachProcessPresentationGroup | ||
import com.jetbrains.rider.plugins.unity.util.UnityIcons | ||
|
||
object UnityAttachPresentationGroup : XAttachProcessPresentationGroup { | ||
override fun getOrder(): Int = 3 | ||
override fun getGroupName(): String = "Local Unity processes" | ||
override fun getItemIcon(project: Project, process: ProcessInfo, userData: UserDataHolder) = UnityIcons.Icons.UnityLogo | ||
override fun getItemDisplayText(project: Project, process: ProcessInfo, userData: UserDataHolder) = process.executableDisplayName | ||
override fun compare(p1: ProcessInfo, p2: ProcessInfo) = p1.pid.compareTo(p2.pid) | ||
|
||
override fun getProcessDisplayText(p0: Project, p1: ProcessInfo, p2: UserDataHolder) = throw UnsupportedOperationException("Should not use this method") | ||
override fun getProcessIcon(p0: Project, p1: ProcessInfo, p2: UserDataHolder) = throw UnsupportedOperationException("Should not use this method") | ||
} |
20 changes: 0 additions & 20 deletions
20
rider/src/main/kotlin/com/jetbrains/rider/plugins/unity/run/attach/UnityAttachProvider.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
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