Skip to content

Commit a795dbf

Browse files
add warnings tab
1 parent e79e117 commit a795dbf

File tree

1 file changed

+65
-40
lines changed

1 file changed

+65
-40
lines changed

sqldev/src/main/java/org/utplsql/sqldev/ui/runner/RunnerPanel.xtend

Lines changed: 65 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ class RunnerPanel implements FocusListener {
6969
JTextArea testFailureDescriptionTextArea
7070
JTextArea testFailureMessageTextArea
7171
JTextArea testFailureCallerTextArea
72-
JTextArea testServerOutputTextArea
7372
JTextArea testErrorStackTextArea
73+
JTextArea testWarningsTextArea
74+
JTextArea testServerOutputTextArea
7475

7576
def Component getGUI() {
7677
if (basePanel === null) {
@@ -93,8 +94,9 @@ class RunnerPanel implements FocusListener {
9394
testFailureDescriptionTextArea.text = null
9495
testFailureMessageTextArea.text = null
9596
testFailureCallerTextArea.text = null
96-
testServerOutputTextArea.text = null
9797
testErrorStackTextArea.text = null
98+
testWarningsTextArea.text = null
99+
testServerOutputTextArea.text = null
98100
}
99101

100102
def update(String reporterId) {
@@ -211,8 +213,9 @@ class RunnerPanel implements FocusListener {
211213
p.testFailureMessageTextArea.text = null
212214
p.testFailureCallerTextArea.text = null
213215
}
214-
p.testServerOutputTextArea.text = test.serverOutput
215216
p.testErrorStackTextArea.text = test.errorStack
217+
p.testWarningsTextArea.text = test.warnings
218+
p.testServerOutputTextArea.text = test.serverOutput
216219
}
217220
}
218221
}
@@ -374,7 +377,7 @@ class RunnerPanel implements FocusListener {
374377
overviewTableTime.cellRenderer = timeFormatRenderer
375378
val testOverviewScrollPane = new JScrollPane(testOverviewTable)
376379

377-
// Test info tabbed pane
380+
// Test tabbed pane (Test Properties)
378381
// - Id
379382
val testInfoPanel = new ScrollablePanel
380383
testInfoPanel.setLayout(new GridBagLayout())
@@ -565,13 +568,13 @@ class RunnerPanel implements FocusListener {
565568
c.weightx = 0
566569
c.weighty = 1
567570
testInfoPanel.add(testInfoVerticalSpringLabel, c)
568-
val testInfoScrollPane = new JScrollPane(testInfoPanel)
571+
val testPropertiesScrollPane = new JScrollPane(testInfoPanel)
569572

570-
// failures tabbed pane (failed expectations)
573+
// Failures tabbed pane (failed expectations)
571574
// TODO support unbound number of failed expectations
572575
// - description
573-
val testFailurePanel = new JPanel
574-
testFailurePanel.setLayout(new GridBagLayout())
576+
val testFailuresPanel = new JPanel
577+
testFailuresPanel.setLayout(new GridBagLayout())
575578
val testFailureDescriptionLabel = new JLabel("Description")
576579
c.gridx = 0
577580
c.gridy = 0
@@ -582,7 +585,7 @@ class RunnerPanel implements FocusListener {
582585
c.fill = GridBagConstraints::NONE
583586
c.weightx = 0
584587
c.weighty = 0
585-
testFailurePanel.add(testFailureDescriptionLabel, c)
588+
testFailuresPanel.add(testFailureDescriptionLabel, c)
586589
testFailureDescriptionTextArea = new JTextArea
587590
testFailureDescriptionTextArea.editable = false
588591
testFailureDescriptionTextArea.enabled = true
@@ -599,7 +602,7 @@ class RunnerPanel implements FocusListener {
599602
c.fill = GridBagConstraints::HORIZONTAL
600603
c.weightx = 1
601604
c.weighty = 0
602-
testFailurePanel.add(testFailureDescriptionScrollPane, c)
605+
testFailuresPanel.add(testFailureDescriptionScrollPane, c)
603606
// - message
604607
val testFailureMessageLabel = new JLabel("Message")
605608
c.gridx = 0
@@ -611,7 +614,7 @@ class RunnerPanel implements FocusListener {
611614
c.fill = GridBagConstraints::NONE
612615
c.weightx = 0
613616
c.weighty = 0
614-
testFailurePanel.add(testFailureMessageLabel, c)
617+
testFailuresPanel.add(testFailureMessageLabel, c)
615618
testFailureMessageTextArea = new JTextArea
616619
testFailureMessageTextArea.editable = false
617620
testFailureMessageTextArea.enabled = true
@@ -628,7 +631,7 @@ class RunnerPanel implements FocusListener {
628631
c.fill = GridBagConstraints::BOTH
629632
c.weightx = 1
630633
c.weighty = 6
631-
testFailurePanel.add(testFailureMessageScrollPane, c)
634+
testFailuresPanel.add(testFailureMessageScrollPane, c)
632635
// - caller
633636
val testFailureCallerLabel = new JLabel("Caller")
634637
c.gridx = 0
@@ -640,7 +643,7 @@ class RunnerPanel implements FocusListener {
640643
c.fill = GridBagConstraints::NONE
641644
c.weightx = 0
642645
c.weighty = 0
643-
testFailurePanel.add(testFailureCallerLabel, c)
646+
testFailuresPanel.add(testFailureCallerLabel, c)
644647
testFailureCallerTextArea = new JTextArea
645648
testFailureCallerTextArea.editable = false
646649
testFailureCallerTextArea.enabled = true
@@ -657,30 +660,9 @@ class RunnerPanel implements FocusListener {
657660
c.fill = GridBagConstraints::BOTH
658661
c.weightx = 1
659662
c.weighty = 2
660-
testFailurePanel.add(testFailureCallerScrollPane, c)
663+
testFailuresPanel.add(testFailureCallerScrollPane, c)
661664

662-
// server output tabbed pane
663-
val testServerOutputPanel = new JPanel
664-
testServerOutputPanel.setLayout(new GridBagLayout())
665-
testServerOutputTextArea = new JTextArea
666-
testServerOutputTextArea.editable = false
667-
testServerOutputTextArea.enabled = true
668-
testServerOutputTextArea.lineWrap = true
669-
testServerOutputTextArea.wrapStyleWord = true
670-
testServerOutputTextArea.addFocusListener(this)
671-
val testServerOutputScrollPane = new JScrollPane(testServerOutputTextArea)
672-
c.gridx = 0
673-
c.gridy = 0
674-
c.gridwidth = 1
675-
c.gridheight = 1
676-
c.insets = new Insets(10, 10, 10, 10) // top, left, bottom, right
677-
c.anchor = GridBagConstraints::WEST
678-
c.fill = GridBagConstraints::BOTH
679-
c.weightx = 1
680-
c.weighty = 1
681-
testServerOutputPanel.add(testServerOutputScrollPane, c)
682-
683-
// error stack tabbed pane
665+
// Errors tabbed pane (Error Stack)
684666
val testErrorStackPanel = new JPanel
685667
testErrorStackPanel.setLayout(new GridBagLayout())
686668
testErrorStackTextArea = new JTextArea
@@ -700,13 +682,56 @@ class RunnerPanel implements FocusListener {
700682
c.weightx = 1
701683
c.weighty = 1
702684
testErrorStackPanel.add(testErrorStackScrollPane, c)
685+
686+
// Warnings tabbed pane
687+
val testWarningsPanel = new JPanel
688+
testWarningsPanel.setLayout(new GridBagLayout())
689+
testWarningsTextArea = new JTextArea
690+
testWarningsTextArea.editable = false
691+
testWarningsTextArea.enabled = true
692+
testWarningsTextArea.lineWrap = true
693+
testWarningsTextArea.wrapStyleWord = true
694+
testWarningsTextArea.addFocusListener(this)
695+
val testWarningsScrollPane = new JScrollPane(testWarningsTextArea)
696+
c.gridx = 0
697+
c.gridy = 0
698+
c.gridwidth = 1
699+
c.gridheight = 1
700+
c.insets = new Insets(10, 10, 10, 10) // top, left, bottom, right
701+
c.anchor = GridBagConstraints::WEST
702+
c.fill = GridBagConstraints::BOTH
703+
c.weightx = 1
704+
c.weighty = 1
705+
testWarningsPanel.add(testWarningsScrollPane, c)
706+
707+
// Info tabbed pane (Server Output)
708+
val testServerOutputPanel = new JPanel
709+
testServerOutputPanel.setLayout(new GridBagLayout())
710+
testServerOutputTextArea = new JTextArea
711+
testServerOutputTextArea.editable = false
712+
testServerOutputTextArea.enabled = true
713+
testServerOutputTextArea.lineWrap = true
714+
testServerOutputTextArea.wrapStyleWord = true
715+
testServerOutputTextArea.addFocusListener(this)
716+
val testServerOutputScrollPane = new JScrollPane(testServerOutputTextArea)
717+
c.gridx = 0
718+
c.gridy = 0
719+
c.gridwidth = 1
720+
c.gridheight = 1
721+
c.insets = new Insets(10, 10, 10, 10) // top, left, bottom, right
722+
c.anchor = GridBagConstraints::WEST
723+
c.fill = GridBagConstraints::BOTH
724+
c.weightx = 1
725+
c.weighty = 1
726+
testServerOutputPanel.add(testServerOutputScrollPane, c)
703727

704728
// split pane with all tabs
705729
val testDetailTabbedPane = new JTabbedPane()
706-
testDetailTabbedPane.add("Info", testInfoScrollPane)
707-
testDetailTabbedPane.add("Failures", testFailurePanel)
708-
testDetailTabbedPane.add("Server Output", testServerOutputPanel)
709-
testDetailTabbedPane.add("Error Stack", testErrorStackPanel)
730+
testDetailTabbedPane.add("Test", testPropertiesScrollPane)
731+
testDetailTabbedPane.add("Failures", testFailuresPanel)
732+
testDetailTabbedPane.add("Errors", testErrorStackPanel)
733+
testDetailTabbedPane.add("Warnings", testWarningsPanel)
734+
testDetailTabbedPane.add("Info", testServerOutputPanel)
710735
val horizontalSplitPane = new JSplitPane(SwingConstants.HORIZONTAL, testOverviewScrollPane, testDetailTabbedPane)
711736
horizontalSplitPane.resizeWeight = 0.5
712737
c.gridx = 0

0 commit comments

Comments
 (0)