@@ -90,7 +90,6 @@ class RunnerPanel implements FocusListener, ActionListener {
9090 FailuresTableModel failuresTableModel
9191 JTable failuresTable
9292 JTextArea testFailureMessageTextArea
93- JTextArea testFailureCallerTextArea
9493 JTextArea testErrorStackTextArea
9594 JTextArea testWarningsTextArea
9695 JTextArea testServerOutputTextArea
@@ -117,7 +116,6 @@ class RunnerPanel implements FocusListener, ActionListener {
117116 failuresTableModel. model = null
118117 failuresTableModel. fireTableDataChanged
119118 testFailureMessageTextArea. text = null
120- testFailureCallerTextArea. text = null
121119 testErrorStackTextArea. text = null
122120 testWarningsTextArea. text = null
123121 testServerOutputTextArea. text = null
@@ -197,12 +195,12 @@ class RunnerPanel implements FocusListener, ActionListener {
197195 testDescriptionTextArea. caret. visible = true
198196 } else if (e. source == testFailureMessageTextArea) {
199197 testFailureMessageTextArea. caret. visible = true
200- } else if (e. source == testFailureCallerTextArea) {
201- testFailureCallerTextArea. caret. visible = true
202198 } else if (e. source == testServerOutputTextArea) {
203199 testServerOutputTextArea. caret. visible = true
204200 } else if (e. source == testErrorStackTextArea) {
205201 testErrorStackTextArea. caret. visible = true
202+ } else if (e. source == testWarningsTextArea) {
203+ testWarningsTextArea. caret. visible = true
206204 }
207205 }
208206
@@ -213,12 +211,12 @@ class RunnerPanel implements FocusListener, ActionListener {
213211 testDescriptionTextArea. caret. visible = false
214212 } else if (e. source == testFailureMessageTextArea) {
215213 testFailureMessageTextArea. caret. visible = false
216- } else if (e. source == testFailureCallerTextArea) {
217- testFailureCallerTextArea. caret. visible = false
218214 } else if (e. source == testServerOutputTextArea) {
219215 testServerOutputTextArea. caret. visible = false
220216 } else if (e. source == testErrorStackTextArea) {
221217 testErrorStackTextArea. caret. visible = false
218+ } else if (e. source == testWarningsTextArea) {
219+ testWarningsTextArea. caret. visible = false
222220 }
223221 }
224222
@@ -294,25 +292,24 @@ class RunnerPanel implements FocusListener, ActionListener {
294292 p. testOwnerTextField. text = test. ownerName
295293 p. testPackageTextField. text = test. objectName
296294 p. testProcedureTextField. text = test. procedureName
297- p. testDescriptionTextArea. text = test. description
295+ p. testDescriptionTextArea. text = test. description? . trim
298296 p. testStartTextField. text = formatDateTime(test. startTime)
299297 p. testEndTextField. text = formatDateTime(test. endTime)
300298 p. failuresTableModel. model = test. failedExpectations
301299 p. testFailureMessageTextArea. text = null
302- p. testFailureCallerTextArea. text = null
303- if (test. failedExpectations. size > 0 ) {
300+ if (test. failedExpectations !== null && test. failedExpectations. size > 0 ) {
304301 p. failuresTableModel. fireTableDataChanged
305302 p. failuresTable. setRowSelectionInterval(0 , 0 )
306303 }
307- p. testErrorStackTextArea. text = test. errorStack
308- p. testWarningsTextArea. text = test. warnings
309- p. testServerOutputTextArea. text = test. serverOutput
304+ p. testErrorStackTextArea. text = test. errorStack? . trim
305+ p. testWarningsTextArea. text = test. warnings? . trim
306+ p. testServerOutputTextArea. text = test. serverOutput? . trim
310307 var int tabIndex
311- if (test. counter. failure > 0 ) {
308+ if (test. counter? . failure !== null && test . counter . failure > 0 ) {
312309 tabIndex = 1
313- } else if (test. counter. error > 0 ) {
310+ } else if (test. counter? . error !== null && test . counter . error > 0 ) {
314311 tabIndex = 2
315- } else if (test. counter. warning > 0 ) {
312+ } else if (test. counter? . warning !== null && test . counter . warning > 0 ) {
316313 tabIndex = 3
317314 } else if (test. serverOutput !== null && test. serverOutput. length > 0 ) {
318315 tabIndex = 4
@@ -338,8 +335,7 @@ class RunnerPanel implements FocusListener, ActionListener {
338335 if (rowIndex != - 1 ) {
339336 val row = p. failuresTable. convertRowIndexToModel(rowIndex)
340337 val expectation = p. failuresTableModel. getExpectation(row)
341- p. testFailureMessageTextArea. text = expectation. message
342- p. testFailureCallerTextArea. text = expectation. caller
338+ p. testFailureMessageTextArea. text = expectation. failureText
343339 }
344340 }
345341 }
@@ -798,20 +794,6 @@ class RunnerPanel implements FocusListener, ActionListener {
798794 failuresDescription. headerRenderer = failuresTableHeaderRenderer
799795 val failuresTableScrollPane = new JScrollPane (failuresTable)
800796 // - failures details
801- val testFailuresPanel = new JPanel
802- testFailuresPanel. setLayout(new GridBagLayout ())
803- // - message
804- val testFailureMessageLabel = new JLabel (" Message" )
805- c. gridx = 0
806- c. gridy = 0
807- c. gridwidth = 1
808- c. gridheight = 1
809- c. insets = new Insets (10 , 10 , 0 , 0 ) // top, left, bottom, right
810- c. anchor = GridBagConstraints :: NORTHWEST
811- c. fill = GridBagConstraints :: NONE
812- c. weightx = 0
813- c. weighty = 0
814- testFailuresPanel. add(testFailureMessageLabel, c)
815797 testFailureMessageTextArea = new JTextArea
816798 testFailureMessageTextArea. editable = false
817799 testFailureMessageTextArea. enabled = true
@@ -828,38 +810,9 @@ class RunnerPanel implements FocusListener, ActionListener {
828810 c. fill = GridBagConstraints :: BOTH
829811 c. weightx = 1
830812 c. weighty = 6
831- testFailuresPanel. add(testFailureMessageScrollPane, c)
832- // - caller
833- val testFailureCallerLabel = new JLabel (" Caller" )
834- c. gridx = 0
835- c. gridy = 1
836- c. gridwidth = 1
837- c. gridheight = 1
838- c. insets = new Insets (5 , 10 , 10 , 0 ) // top, left, bottom, right
839- c. anchor = GridBagConstraints :: NORTHWEST
840- c. fill = GridBagConstraints :: NONE
841- c. weightx = 0
842- c. weighty = 0
843- testFailuresPanel. add(testFailureCallerLabel, c)
844- testFailureCallerTextArea = new JTextArea
845- testFailureCallerTextArea. editable = false
846- testFailureCallerTextArea. enabled = true
847- testFailureCallerTextArea. lineWrap = true
848- testFailureCallerTextArea. wrapStyleWord = true
849- testFailureCallerTextArea. addFocusListener(this )
850- val testFailureCallerScrollPane = new JScrollPane (testFailureCallerTextArea)
851- c. gridx = 1
852- c. gridy = 1
853- c. gridwidth = 1
854- c. gridheight = 1
855- c. insets = new Insets (5 , 5 , 10 , 10 ) // top, left, bottom, right
856- c. anchor = GridBagConstraints :: WEST
857- c. fill = GridBagConstraints :: BOTH
858- c. weightx = 1
859- c. weighty = 2
860- testFailuresPanel. add(testFailureCallerScrollPane, c)
813+
861814 // - split pane
862- val failuresSplitPane = new JSplitPane (SwingConstants . HORIZONTAL , failuresTableScrollPane, testFailuresPanel )
815+ val failuresSplitPane = new JSplitPane (SwingConstants . HORIZONTAL , failuresTableScrollPane, testFailureMessageScrollPane )
863816 failuresSplitPane. resizeWeight = 0.2
864817
865818 // Errors tabbed pane (Error Stack)
0 commit comments