Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
t-rufang committed Aug 25, 2021
1 parent c35fef4 commit c8b29b0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@
</grid>
</children>
</grid>
<component id="fab29" class="com.microsoft.intellij.ui.JTextAreaWithTheme" binding="validationErrorMessageField">
<component id="fab29" class="com.microsoft.intellij.ui.ErrorTextArea" binding="validationErrorMessageField">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="2" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import com.microsoft.intellij.hdinsight.messages.HDInsightBundle;
import com.microsoft.intellij.rxjava.IdeaSchedulers;
import com.microsoft.intellij.ui.HintTextField;
import com.microsoft.intellij.ui.JTextAreaWithTheme;
import com.microsoft.intellij.ui.ErrorTextArea;
import com.microsoft.tooling.msservices.serviceexplorer.RefreshableNode;
import org.apache.commons.lang3.StringUtils;
import org.joda.time.DateTime;
Expand Down Expand Up @@ -70,7 +70,7 @@ public class AddNewClusterForm extends DialogWrapper implements SettableControl<
protected JTextField clusterNameOrUrlField;
private JPanel livyServiceCard;
protected JTextField livyEndpointField;
protected JTextAreaWithTheme validationErrorMessageField;
protected ErrorTextArea validationErrorMessageField;
private JPanel authComboBoxPanel;
protected JComboBox<AuthType> authComboBox;
protected JPanel authCardsPanel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ import com.microsoft.intellij.forms.dsl.panel
import com.microsoft.intellij.lang.containsInvisibleChars
import com.microsoft.intellij.lang.tagInvisibleChars
import com.microsoft.intellij.rxjava.DisposableObservers
import com.microsoft.intellij.ui.JLabelWithTheme
import com.microsoft.intellij.ui.ErrorLabel
import com.microsoft.intellij.ui.util.findFirst
import org.apache.commons.lang3.StringUtils
import java.awt.Dimension
Expand Down Expand Up @@ -103,14 +103,14 @@ open class SparkSubmissionContentPanel(private val myProject: Project, val type:

// All view components
private val errorMessageLabels = arrayOf(
JLabelWithTheme(getErrorMessageClusterNameNull(isSignedIn)),
JLabelWithTheme("Artifact should not be null!"),
JLabelWithTheme("Could not find the local jar package for Artifact"),
JLabelWithTheme("Main class name should not be null")
ErrorLabel(getErrorMessageClusterNameNull(isSignedIn)),
ErrorLabel("Artifact should not be null!"),
ErrorLabel("Could not find the local jar package for Artifact"),
ErrorLabel("Main class name should not be null")
.apply {
isVisible = true
},
JLabelWithTheme()
ErrorLabel()
// Don't add more we won't like to add more message labels
)

Expand Down Expand Up @@ -138,7 +138,7 @@ open class SparkSubmissionContentPanel(private val myProject: Project, val type:
}}

private val hdiReaderErrorLabel: JLabel =
JLabelWithTheme("No Ambari permission to submit job to the selected cluster...").apply {
ErrorLabel("No Ambari permission to submit job to the selected cluster...").apply {
toolTipText = "No Ambari permission to submit job to the selected cluster. Please ask the cluster owner or user access administrator to upgrade your role to HDInsight Cluster Operator in the Azure Portal, or link to the selected cluster."
isVisible = false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import com.microsoft.azure.hdinsight.common.DarkThemeManager
import org.apache.commons.lang3.StringUtils
import javax.swing.JLabel

class JLabelWithTheme(text: String = ""): JLabel(text) {
class ErrorLabel(text: String = ""): JLabel(text) {
override fun setText(text: String?) {
foreground = DarkThemeManager.getInstance().errorMessageColor
background = if (StringUtils.isEmpty(text)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import com.microsoft.azure.hdinsight.common.DarkThemeManager
import org.apache.commons.lang3.StringUtils
import javax.swing.JTextArea

class JTextAreaWithTheme : JTextArea() {
class ErrorTextArea : JTextArea() {
override fun setText(text: String?) {
foreground = DarkThemeManager.getInstance().errorMessageColor
background = if (StringUtils.isEmpty(text)) {
Expand Down

0 comments on commit c8b29b0

Please sign in to comment.