diff --git a/src/rider/main/kotlin/com/jetbrains/rider/plugins/odatacliui/dialogs/CliDialog.kt b/src/rider/main/kotlin/com/jetbrains/rider/plugins/odatacliui/dialogs/CliDialog.kt
index 1eb3555..891bbee 100644
--- a/src/rider/main/kotlin/com/jetbrains/rider/plugins/odatacliui/dialogs/CliDialog.kt
+++ b/src/rider/main/kotlin/com/jetbrains/rider/plugins/odatacliui/dialogs/CliDialog.kt
@@ -5,6 +5,7 @@ import com.intellij.openapi.ui.DialogWrapper
import com.intellij.openapi.ui.DialogPanel
import com.intellij.ui.components.JBTabbedPane
import com.intellij.ui.dsl.builder.*
+import com.jetbrains.rider.plugins.odatacliui.extensions.emptyText
import com.jetbrains.rider.plugins.odatacliui.models.CliDialogModel
import javax.swing.JComponent
@@ -52,31 +53,35 @@ class CliDialog(private val model: CliDialogModel) : DialogWrapper(false) {
row("--file-name") {
textField()
.align(AlignX.FILL)
- .comment("The name of the generated file. If not provided, then the default name 'Reference.cs' is used", Int.MAX_VALUE)
+ .emptyText("Default: Reference.cs")
+ .comment("The name of the generated file")
.bindText(model.fileName)
}
row("--namespace-prefix") {
textField()
.align(AlignX.FILL)
- .comment("The namespace of the client code generated. Example: NorthWindService.Client or it could be a name related to the OData endpoint that you are generating code for", Int.MAX_VALUE)
+ .comment("The namespace of the client code generated")
.bindText(model.namespacePrefix)
}
row("--excluded-operation-imports") {
textField()
.align(AlignX.FILL)
- .comment("Comma-separated list of the names of operation imports to exclude from the generated code. Example: ExcludedOperationImport1, ExcludedOperationImport2", Int.MAX_VALUE)
+ .emptyText("Example: ExcludedOperationImport1, ExcludedOperationImport2")
+ .comment("Comma-separated list of the names of operation imports to exclude from the generated code")
.bindText(model.excludedOperationImports)
}
row("--excluded-bound-operations") {
textField()
.align(AlignX.FILL)
- .comment("Comma-separated list of the names of bound operations to exclude from the generated code. Example: BoundOperation1, BoundOperation2", Int.MAX_VALUE)
+ .emptyText("Example: BoundOperation1, BoundOperation2")
+ .comment("Comma-separated list of the names of bound operations to exclude from the generated code")
.bindText(model.excludedBoundOperations)
}
row("--excluded-schema-types") {
textField()
.align(AlignX.FILL)
- .comment("Comma-separated list of the names of entity types to exclude from the generated code. Example: EntityType1, EntityType2, EntityType3", Int.MAX_VALUE)
+ .emptyText("Example: EntityType1, EntityType2, EntityType3")
+ .comment("Comma-separated list of the names of entity types to exclude from the generated code")
.bindText(model.excludedSchemaTypes)
}
row {
@@ -109,13 +114,15 @@ class CliDialog(private val model: CliDialogModel) : DialogWrapper(false) {
row("--custom-headers") {
textField()
.align(AlignX.FILL)
- .comment("Headers that will get sent along with the request when fetching the metadata document from the service. Format: Header1:HeaderValue, Header2:HeaderValue", Int.MAX_VALUE)
+ .emptyText("Example: Header1:HeaderValue, Header2:HeaderValue")
+ .comment("Headers that will get sent along with the request when fetching the metadata document from the service", Int.MAX_VALUE)
.bindText(model.customHeaders)
}
row("--proxy") {
textField()
.align(AlignX.FILL)
- .comment("Proxy settings. Format: domain\\\\user:password@SERVER:PORT", Int.MAX_VALUE)
+ .emptyText("Example: domain\\\\user:password@SERVER:PORT")
+ .comment("Proxy settings")
.bindText(model.proxy)
}
}
diff --git a/src/rider/main/kotlin/com/jetbrains/rider/plugins/odatacliui/extensions/UiExtensions.kt b/src/rider/main/kotlin/com/jetbrains/rider/plugins/odatacliui/extensions/UiExtensions.kt
new file mode 100644
index 0000000..8a808dd
--- /dev/null
+++ b/src/rider/main/kotlin/com/jetbrains/rider/plugins/odatacliui/extensions/UiExtensions.kt
@@ -0,0 +1,9 @@
+package com.jetbrains.rider.plugins.odatacliui.extensions
+
+import com.intellij.ui.components.JBTextField
+import com.intellij.ui.dsl.builder.Cell
+
+fun Cell.emptyText(text: String): Cell {
+ this.component.emptyText.text = text
+ return this
+}
\ No newline at end of file