Skip to content

Commit

Permalink
clear code
Browse files Browse the repository at this point in the history
  • Loading branch information
ellizio committed Mar 24, 2024
1 parent 4c89d2f commit 99d3ac9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,4 @@ class BatchCommandLine {
val commands: ArrayList<GeneralCommandLine> = arrayListOf()

fun add(command: GeneralCommandLine) = commands.add(command)

fun getCommandLineString(): String {
val sb = StringBuilder()
for (i in commands.indices) {
sb.appendLine("[$i]: ${commands[i].commandLineString}")
}

return sb.toString()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import com.intellij.openapi.wm.ToolWindowAnchor
import com.intellij.openapi.wm.ToolWindowManager
import com.jetbrains.rider.plugins.odatacliui.CliIcons
import com.jetbrains.rider.plugins.odatacliui.Constants
import com.jetbrains.rider.plugins.odatacliui.UiBundle

@Service(Service.Level.PROJECT)
class CliToolWindowManager(private val project: Project) {
Expand All @@ -26,7 +27,7 @@ class CliToolWindowManager(private val project: Project) {

fun instantiateConsole(): ConsoleView {
val consoleView = TextConsoleBuilderFactory.getInstance().createBuilder(project).console
val content = toolWindow.contentManager.factory.createContent(consoleView.component, "Generate", true)
val content = toolWindow.contentManager.factory.createContent(consoleView.component, UiBundle.text("cli.tab.generate"), true)
toolWindow.contentManager.addContent(content)
toolWindow.activate {
toolWindow.contentManager.setSelectedContent(content)
Expand Down
3 changes: 3 additions & 0 deletions src/rider/main/resources/UiBundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ cli.custom-headers.comment=Headers that will get sent along with the request whe
cli.proxy.empty-text=Example: domain\\user:password@SERVER:PORT
cli.proxy.comment=Proxy settings
cli.ok-action-button.tooltip.not-installed=OData CLI not installed

# ToolWindow
cli.tab.generate=Generate

0 comments on commit 99d3ac9

Please sign in to comment.