diff --git a/sources/BrowserUpdate.cls b/sources/BrowserUpdate.cls index 2cb34f06..cef3c3ac 100644 --- a/sources/BrowserUpdate.cls +++ b/sources/BrowserUpdate.cls @@ -64,7 +64,8 @@ debug: aBoolean initialize self initializeUpdates. debug := false. - inUpdate := false! + inUpdate := false. +! initializeUpdates updates := OrderedCollection new. @@ -79,6 +80,7 @@ inUpdate: anObject issueCommand: services session: session inUpdate ifTrue: [^self]. inUpdate := true. + [[Cursor wait showWhile: [^self basicIssueCommand: services session: session]] ensure: [inUpdate := false]] ifCurtailed: [inUpdate := false]! @@ -173,7 +175,7 @@ updateService: service session: session updateServices: services session: session inUpdate ifTrue: [^self]. - services isEmpty ifTrue:[^self]. + services isEmpty ifTrue: [^self]. inUpdate := true. [[Cursor wait showWhile: [^self basicUpdateServices: services session: session]] diff --git a/sources/GciSession.cls b/sources/GciSession.cls index df0be9ae..9066cd02 100644 --- a/sources/GciSession.cls +++ b/sources/GciSession.cls @@ -83,13 +83,6 @@ beInvalidSession library := nil. ! -blocking - ^blocking ifNil: [blocking := false]! - -blockWhile: aBlock - blocking := true. - ^aBlock ensure: [blocking := false]! - briefDescription briefDescription ifNil: [ @@ -806,50 +799,17 @@ withExplanation: aString do: aBlock do: [library session: gciSessionId continue: error errorReport contextOop]! withExplanation: aString doA: aBlock - "Here we manage the UI feedback" - - | result haveResult shouldRunEventLoop dialog | - shouldRunEventLoop := true. - haveResult := false. - - [result := self handlingClientForwarderSendDo: aBlock. - haveResult := true. - shouldRunEventLoop := false. - SessionManager inputState prod] - newProcess - name: 'GciSession>>withExplanation:doA: - 1'; - resume. - - [ - [(Delay forSeconds: 1) wait. - shouldRunEventLoop := false. - SessionManager inputState prod] - newProcess - name: 'GciSession>>withExplanation:doA: - 2'; - resume. - isHandlingClientForwarderSend - ifTrue: - [SessionManager inputState loopWhile: [shouldRunEventLoop]. - shouldRunEventLoop := true] - ifFalse: - [Cursor wait showWhile: - [self blocking - ifTrue: [[haveResult] whileFalse: [(Delay forMilliseconds: 1) wait]] - ifFalse: - [SessionManager inputState loopWhile: [shouldRunEventLoop]. - shouldRunEventLoop := true]]]. - haveResult ifTrue: [^result]. - isHandlingClientForwarderSend] - whileTrue: []. - - [SessionManager inputState loopWhile: [shouldRunEventLoop]. - shouldRunEventLoop := true] - newProcess - name: 'GciSession>>withExplanation:doA: - 3'; - resume. - [result isNil] whileTrue: [(Delay forMilliseconds: 1) wait]. - SessionManager inputState pumpMessages. - ^result! ! + "We've (temporarily) eliminated the complicated monitoring loop + to eventually bring something that is less intrusive. Another + problem was that if server events got 'stacked up' the inputState + loopWhile: block would pick those up and run them in this thread + which is blocked. This caused many problems + + See https://github.com/jgfoster/Jade/blob/master/sources/GciSession.cls + for the original implementation when we're ready to implement + an improved monitoring solution" + + ^self handlingClientForwarderSendDo: aBlock! ! !GciSession categoriesFor: #_executeString:fromContextOop:environment:!private! ! !GciSession categoriesFor: #_library!accessing!private! ! !GciSession categoriesFor: #_send:to:withAll:!private! ! @@ -858,8 +818,6 @@ withExplanation: aString doA: aBlock !GciSession categoriesFor: #attemptSocket!private! ! !GciSession categoriesFor: #begin!Jade convenience!public! ! !GciSession categoriesFor: #beInvalidSession!public! ! -!GciSession categoriesFor: #blocking!accessing!public! ! -!GciSession categoriesFor: #blockWhile:!public! ! !GciSession categoriesFor: #briefDescription!public! ! !GciSession categoriesFor: #clearStack:!Jade!public! ! !GciSession categoriesFor: #clientForwardError:!public! ! diff --git a/sources/JadeNavigationInspector.cls b/sources/JadeNavigationInspector.cls index e396e181..7ecf1890 100755 --- a/sources/JadeNavigationInspector.cls +++ b/sources/JadeNavigationInspector.cls @@ -90,7 +90,7 @@ queryCommand: query ifTrue: [query isEnabled: objectIndex < oopsCollection size. ^true]. - query command == #browseClass + (query command == #browseClass or: [query command == #browseSelectedClass]) ifTrue: [query isEnabled: true. ^true]. diff --git a/sources/JadeiteDebuggerTestCase.cls b/sources/JadeiteDebuggerTestCase.cls index 42722bf0..9ca7c3cd 100644 --- a/sources/JadeiteDebuggerTestCase.cls +++ b/sources/JadeiteDebuggerTestCase.cls @@ -228,14 +228,14 @@ test_browseClass debugger documentPresenter view selectionRange: (105 to: 110). self debuggerDo: [browser := debugger methodSourcePresenter browseSelectedClass]. - [self assert: (browser isKindOf: RowanSystemBrowser). - self assert: ('*String*' match: browser currentCard selectedClasses first)] + [self assert: (browser isKindOf: RowanSystemBrowserPresenter). + self assert: ('*String*' match: browser selectedClasses first)] ensure: [self assert: browser topShell view close]. debugger documentPresenter view selectionRange: (119 to: 128). self debuggerDo: [browser := debugger methodSourcePresenter browseSelectedClass]. - [self assert: (browser isKindOf: RowanSystemBrowser). - self assert: browser currentCard selectedClassName equals: 'TranscriptStreamPortable'] + [self assert: (browser isKindOf: RowanSystemBrowserPresenter). + self assert: browser selectedClassName equals: 'TranscriptStreamPortable'] ensure: [self assert: browser topShell view close. projectsBrowser destroy]! diff --git a/sources/JadeiteMethodListBrowserTestCase.cls b/sources/JadeiteMethodListBrowserTestCase.cls index 6e410a47..6fac7f78 100644 --- a/sources/JadeiteMethodListBrowserTestCase.cls +++ b/sources/JadeiteMethodListBrowserTestCase.cls @@ -90,11 +90,11 @@ test_browseClass ensure: [projectsBrowser destroy]. self methodSourcePresenter documentPresenter view selectionRange: (55 to: 64). dictionaryPresenter := self methodSourcePresenter browseSelectedClass. - [self assert: dictionaryPresenter currentCard selectedClassName equals: 'TranscriptStreamPortable'] + [self assert: dictionaryPresenter selectedClassName equals: 'TranscriptStreamPortable'] ensure: [dictionaryPresenter topShell destroy]. self methodSourcePresenter documentPresenter view selectionRange: (90 to: 95). dictionaryPresenter := self methodSourcePresenter browseSelectedClass. - [self assert: ('String*' match: dictionaryPresenter currentCard selectedClassName)] + [self assert: ('String*' match: dictionaryPresenter selectedClassName)] ensure: [dictionaryPresenter topShell destroy]! test_doubleClickActionClassMethod diff --git a/sources/JadeiteProjectsBrowserPresenter.cls b/sources/JadeiteProjectsBrowserPresenter.cls index 7ed33a7c..56b15819 100644 --- a/sources/JadeiteProjectsBrowserPresenter.cls +++ b/sources/JadeiteProjectsBrowserPresenter.cls @@ -1374,7 +1374,7 @@ refreshClass selection updateAfterCommand: false; command: #fastRefresh. - gciSession blockWhile: [self issueCommand: (Array with: selection)]. + self issueCommand: (Array with: selection). selection updateAfterCommand: true. self updateClassInfo!