Skip to content

Remove dead code un UIManager #18143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: Pharo14
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/Debugger-Oups-Tests/OupsDummyDebuggerSystem.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ OupsDummyDebuggerSystem >> defaultUIManager [
^ customUIManager
]

{ #category : 'open debugger' }
OupsDummyDebuggerSystem >> logDebugRequest: aDebugRequest withUIManager: aCommandLineUIManager [

self openDebuggerOnRequest: aDebugRequest
]

{ #category : 'open debugger' }
OupsDummyDebuggerSystem >> openDebuggerOnRequest: aDebugRequest [
self callsToHandleDebugRequest: self callsToHandleDebugRequest + 1.
Expand Down
11 changes: 0 additions & 11 deletions src/Debugger-Oups/OupsDebuggerSystem.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,6 @@ OupsDebuggerSystem >> handleWarningDebugRequest: aWarningDebugRequest [
do: [ self signalDebuggerError: aWarningDebugRequest ]
]

{ #category : 'open debugger' }
OupsDebuggerSystem >> logDebugRequest: aDebugRequest withUIManager: aCommandLineUIManager [

aCommandLineUIManager
debugProcess: aDebugRequest process
context: aDebugRequest exception signalerContext
label: aDebugRequest exception description
fullView: false
notification: aDebugRequest exception description
]

{ #category : 'open debugger' }
OupsDebuggerSystem >> openDebuggerOnRequest: aDebugRequest [
"Prepare the opening of a debugger, and delegate the debugger selection and opening to a strategy"
Expand Down
5 changes: 0 additions & 5 deletions src/Files-Prompt/DummyUIManager.extension.st

This file was deleted.

7 changes: 0 additions & 7 deletions src/Files-Prompt/UIManager.extension.st

This file was deleted.

22 changes: 0 additions & 22 deletions src/Polymorph-Widgets/MorphicUIManager.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,6 @@ MorphicUIManager >> deactivate [
self currentWorld worldState worldRenderer: (NullWorldRenderer forWorld: self currentWorld)
]

{ #category : 'debug' }
MorphicUIManager >> debugProcess: process context: context label: title fullView: bool notification: notificationString [

(OupsDebugRequest newForContext: context)
process: process;
label: title;
submit
]

{ #category : 'ui process' }
MorphicUIManager >> defer: aValuable [
"aValuable will be executed in the next UI rendering cycle"
Expand Down Expand Up @@ -345,12 +336,6 @@ MorphicUIManager >> enterOrRequestFrom: labelList values: valueList lines: lines
lines: linesArray
]

{ #category : 'handle debug requests' }
MorphicUIManager >> handleDebugRequest: aDebugRequest fromDebuggerSystem: anOupsDebuggerSystem [
<debuggerCompleteToSender>
anOupsDebuggerSystem openDebuggerOnRequest: aDebugRequest
]

{ #category : 'error handling' }
MorphicUIManager >> handleError: anError log: shouldLog [

Expand Down Expand Up @@ -626,13 +611,6 @@ MorphicUIManager >> uiProcess [
^ UIProcess
]

{ #category : 'ui requests' }
MorphicUIManager >> unhandledErrorDefaultAction: anException [

"The current computation is terminated. The cause of the error should be logged or reported to the user. If the program is operating in an interactive debugging environment the computation should be suspended and the debugger activated."
anException debug
]

{ #category : 'global state' }
MorphicUIManager >> world [
^ self currentWorld
Expand Down
34 changes: 0 additions & 34 deletions src/UIManager/CommandLineUIManager.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -141,24 +141,6 @@ CommandLineUIManager >> confirm: queryString trueChoice: trueLabel falseChoice:
^ self choose: questions title: queryString
]

{ #category : 'debug' }
CommandLineUIManager >> debugProcess: process context: context label: title fullView: bool notification: notificationString [
| description |
description := String streamContents: [ :stream |
stream
nextPutAll: 'debugging process: ';
nextPutAll: process name;
cr;
nextPutAll: 'context:';
cr;
print: context.
notificationString ifNotNil: [ stream nextPutAll: notificationString ] ].
self
logTitle: title
andDescription: description
to: self stderr
]

{ #category : 'ui TEasilyThemed' }
CommandLineUIManager >> deny: aStringOrText [
"Open a denial dialog."
Expand All @@ -182,14 +164,6 @@ CommandLineUIManager >> exitFailure [
]
]

{ #category : 'handle debug requests' }
CommandLineUIManager >> handleDebugRequest: aDebugRequest fromDebuggerSystem: anOupsDebuggerSystem [

anOupsDebuggerSystem
logDebugRequest: aDebugRequest
withUIManager: self
]

{ #category : 'error handling' }
CommandLineUIManager >> handleError: anError log: shouldLog [

Expand Down Expand Up @@ -427,11 +401,3 @@ CommandLineUIManager >> textEntry: aStringOrText title: aString [
CommandLineUIManager >> textEntry: aStringOrText title: aString entryText: defaultEntryText [
"Open a text entry dialog."
]

{ #category : 'default actions' }
CommandLineUIManager >> unhandledErrorDefaultAction: anException [

self quitFrom: anException signalerContext withMessage: anException description.


]
16 changes: 0 additions & 16 deletions src/UIManager/DummyUIManager.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ DummyUIManager >> confirm: aString orCancel: cancelBlock [
self error: 'No user response possible'
]

{ #category : 'debug' }
DummyUIManager >> debugProcess: process context: context label: title fullView: bool notification: notificationString [
Warning signal: 'Trying to debug the process ', title
]

{ #category : 'ui requests' }
DummyUIManager >> edit: aText label: labelString accept: aBlockOrNil [

Expand Down Expand Up @@ -153,14 +148,3 @@ DummyUIManager >> traceCr: aString [
logger nextPutAll: aString;
cr ]
]

{ #category : 'default actions' }
DummyUIManager >> unhandledErrorDefaultAction: anException [
self traceCr: '*** EXCEPTION ***'.
self traceCr: anException.
self
trace:
(String
streamContents: [ :stream | anException signalerContext errorReportOn: stream ]).
Smalltalk exitFailure
]
5 changes: 0 additions & 5 deletions src/UIManager/NonInteractiveUIManager.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,6 @@ NonInteractiveUIManager >> confirm: queryString trueChoice: trueChoice falseChoi
^ self nonInteractiveRequest: queryString
]

{ #category : 'debug' }
NonInteractiveUIManager >> debugProcess: process context: context label: title fullView: bool notification: notificationString [
^ self nonInteractiveWarning: 'Opening Debugger'
]

{ #category : 'ui requests' }
NonInteractiveUIManager >> edit: aText label: labelString accept: aBlockOrNil [
"Open an editor on the given string/text"
Expand Down
23 changes: 0 additions & 23 deletions src/UIManager/UIManager.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,6 @@ UIManager >> confirm: queryString trueChoice: trueChoice falseChoice: falseChoic
UIManager >> deactivate [
]

{ #category : 'debug' }
UIManager >> debugProcess: process context: context label: title fullView: bool notification: notificationString [

self subclassResponsibility
]

{ #category : 'ui process' }
UIManager >> defer: aBlock [
"Evaluate the given Block in the UI thread as soon as there is nothing scheduled.
Expand Down Expand Up @@ -386,17 +380,6 @@ UIManager >> edit: aText label: labelString accept: aBlockOrNil [
^self subclassResponsibility
]

{ #category : 'debug requests' }
UIManager >> handleDebugRequest: aDebugRequest fromDebuggerSystem: anOupsDebuggerSystem [
"Provide a default handling for unhandled error.
We should never reach this code, because it should be overridden by subclasses.
(but we can't put 'self subclassResponsibility' , because it will cause infinite loop,
in case if current ui manager having no override of this method).
This method is only for documentation purposes."
self flag: 'Code smell: can someone explain why we have this code if we should never reach it? And if we do, why quitting without any information? Finally, why the self subclassResponsibility produces an infinite loop?'.
Smalltalk snapshot: false andQuit: true
]

{ #category : 'error handling' }
UIManager >> handleError: anError [

Expand Down Expand Up @@ -537,12 +520,6 @@ UIManager >> onFontsChanged [
UIManager >> onPrimitiveError: aString [
]

{ #category : 'ui requests' }
UIManager >> openComparisionFrom: targetMethodSource to: originalMethodSource belongingTo: aClass from: aChange [

^self subclassResponsibility
]

{ #category : 'ui TEasilyThemed' }
UIManager >> proceed: aStringOrText [
"Open a proceed dialog."
Expand Down