Skip to content

Commit

Permalink
refactor(shirelang): enhance console output in HobbitHole #24
Browse files Browse the repository at this point in the history
Add ConsoleViewContentType to improve console output in HobbitHole by printing "execute" messages with appropriate content type.

This change enhances the readability of the console output by specifying the content type for the printed messages.
  • Loading branch information
phodal committed Jun 27, 2024
1 parent 4dfc458 commit 26b4430
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.phodal.shirelang.compiler.hobbit

import com.intellij.codeInsight.intention.IntentionAction
import com.intellij.execution.ui.ConsoleView
import com.intellij.execution.ui.ConsoleViewContentType
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.project.DumbAwareAction
import com.intellij.openapi.project.Project
Expand Down Expand Up @@ -107,6 +108,7 @@ open class HobbitHole(
context: PostCodeHandleContext,
) {
onStreamingEnd.forEach { funcNode ->
console?.print("execute: ${funcNode.funName}\n", ConsoleViewContentType.SYSTEM_OUTPUT)
PostProcessor.handler(funcNode.funName)?.execute(project, context, console)
}
}
Expand Down

0 comments on commit 26b4430

Please sign in to comment.