Skip to content

Commit

Permalink
onIdleEntered didn't handle nil session
Browse files Browse the repository at this point in the history
Also, variables tab was broken in last commit (#040b78d6).

Test cleanup.
  • Loading branch information
Eric Winger authored and Eric Winger committed Jan 8, 2019
1 parent 040b78d commit d170f11
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
12 changes: 7 additions & 5 deletions sources/JadeTranscript.cls
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,14 @@ onCloseRequested: boolValueHolder
temp forceLogout]!

onIdleEntered
"gciSession might be nil on a fast moving test"

gciSession isCallInProgress ifFalse: [
Cursor current ifNotNil: [
[Cursor current ifNotNil: [Cursor current: nil]] forkAt: Processor userBackgroundPriority.
].
].
| shouldUpdateCursor |
shouldUpdateCursor := gciSession ifNil: [true] ifNotNil: [gciSession isCallInProgress not].
shouldUpdateCursor
ifTrue:
[Cursor current
ifNotNil: [[Cursor current ifNotNil: [Cursor current: nil]] forkAt: Processor userBackgroundPriority]].
^super onIdleEntered!

onViewOpened
Expand Down
5 changes: 3 additions & 2 deletions sources/JadeiteDebuggerTestCase.cls
Original file line number Diff line number Diff line change
Expand Up @@ -798,9 +798,10 @@ testUnsavedChangesActionChangeFrame
self assert: debugger frameListPresenter selectionByIndex equals: 4.
debugger methodSourcePresenter documentPresenter value: 'new text'.
debugger methodSourcePresenter documentPresenter view isModified: true.
TestMessageBox plannedResult: #no. "answer that we want to stay on frame"
TestMessageBox plannedResult: #no. "ignore changes"
self debuggerDo: [[debugger stepOver] forkAt: Processor activePriority + 1].
self assert: debugger frameListPresenter selectionByIndex equals: 4. ]
(Delay forMilliseconds: 50) wait.
self assert: debugger frameListPresenter selectionByIndex equals: 1. ]
ensure: [TestMessageBox disableJadeiteTestMessageBox]!

testUnsavedChangesActionChangeToHomeFrame
Expand Down
3 changes: 1 addition & 2 deletions sources/JadeiteProjectBrowserTestCase.cls
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ test_blankCategoryRenameInvalid
TestMessageBox enableJadeiteTestMessageBox.
TestMessageBox plannedResult: #ok.
[self projectsPresenter basicRenameCategoryFrom: 'accessing' to: String new.
self assert: self categoryListPresenter list size equals: 1.
self assert: self categoryListPresenter selection equals: 'accessing']
ensure: [TestMessageBox disableJadeiteTestMessageBox]!

Expand Down Expand Up @@ -2729,7 +2728,7 @@ test_twoBrowsersUpdateHierarchy
test_UnsavedChangesActionChangeSelectionIgnoreChanges
self testsIssue: #issue388
withTitle: '(3.0.53) useful to be able to open method browser on selected methods in project browser'.

TestMessageBox enableJadeiteTestMessageBox.
[| source |
self selectServiceNamed: 'RowanSample1' in: self projectListPresenter.
self selectServiceNamed: 'RowanSample1-Core' in: self packageListPresenter.
Expand Down
8 changes: 4 additions & 4 deletions sources/JadeiteProjectsBrowserPresenter.cls
Original file line number Diff line number Diff line change
Expand Up @@ -955,11 +955,11 @@ pkgsMenuStrings
populateFilterList
self isCategoryTabSelected
ifTrue:
[categoryListPresenter list: (ListModel new searchPolicy: SearchPolicy equality).
categoryListPresenter list addAll: self selectedClass categories]
[categoryListPresenter model: (ListModel new searchPolicy: SearchPolicy equality).
categoryListPresenter model addAll: self selectedClass categories]
ifFalse:
[variableListPresenter list: (ListModel new searchPolicy: SearchPolicy equality).
variableListPresenter list addAll: self selectedClass categories]!
[variableListPresenter model: (ListModel new searchPolicy: SearchPolicy equality).
variableListPresenter model addAll: self selectedClass variables]!
postOkToChangeEvent
| service |
Expand Down

0 comments on commit d170f11

Please sign in to comment.