diff --git a/src/BaselineOfBasicTools/BaselineOfBasicTools.class.st b/src/BaselineOfBasicTools/BaselineOfBasicTools.class.st index 8e7cef4d2b1..1c75c40052f 100644 --- a/src/BaselineOfBasicTools/BaselineOfBasicTools.class.st +++ b/src/BaselineOfBasicTools/BaselineOfBasicTools.class.st @@ -95,7 +95,6 @@ BaselineOfBasicTools >> baseline: spec [ spec package: 'Tools-CodeNavigation'. spec package: 'Tool-Diff'. - spec package: 'Tool-FileList'. spec package: 'Tool-Finder'. spec package: 'Tool-Finder-UI'. spec package: 'Tool-ImageCleaner'. diff --git a/src/BaselineOfGeneralTests/BaselineOfGeneralTests.class.st b/src/BaselineOfGeneralTests/BaselineOfGeneralTests.class.st index 3b54b5c5db2..0e33d2392ad 100644 --- a/src/BaselineOfGeneralTests/BaselineOfGeneralTests.class.st +++ b/src/BaselineOfGeneralTests/BaselineOfGeneralTests.class.st @@ -55,7 +55,6 @@ BaselineOfGeneralTests >> baseline: spec [ package: 'System-Support-Tests'; package: 'Text-Diff-Tests'; package: 'Tool-ExternalBrowser-Tests'; - package: 'Tool-FileList-Tests'; package: 'Tool-Finder-Tests'; package: 'Tool-Profilers-Tests'; package: 'Tool-ImageCleaner-Tests'; diff --git a/src/BaselineOfIDE/BaselineOfIDE.class.st b/src/BaselineOfIDE/BaselineOfIDE.class.st index b9ef06b4583..0c0eab57b1b 100644 --- a/src/BaselineOfIDE/BaselineOfIDE.class.st +++ b/src/BaselineOfIDE/BaselineOfIDE.class.st @@ -259,7 +259,7 @@ BaselineOfIDE >> postload: loader package: packageSpec [ EpMonitor current enable. Smalltalk tools register: ExternalChangesBrowser as: #changeList. - Smalltalk tools register: FileList as: #fileList. + Smalltalk tools register: StFileSystemPresenter as: #fileList. Smalltalk tools register: Finder as: #finder. Smalltalk tools register: ProcessBrowser as: #processBrowser. diff --git a/src/Polymorph-Widgets/UITheme.class.st b/src/Polymorph-Widgets/UITheme.class.st index f0ee473878c..5e61c2dabeb 100644 --- a/src/Polymorph-Widgets/UITheme.class.st +++ b/src/Polymorph-Widgets/UITheme.class.st @@ -754,12 +754,12 @@ UITheme >> chooseColorIn: aThemedMorph title: aString color: aColor for: aBlock UITheme >> chooseDirectoryIn: aThemedMorph title: title path: path [ "Answer the result of a file dialog with the given title, choosing directories only." - | dialog | - dialog := (FileDialogWindow newWithTheme: aThemedMorph theme) - title: title; - answerDirectory. - path ifNotNil: [ dialog selectPath: path ]. - ^ dialog openModal answer + ^ StOpenDirectoryDialog new + defaultFolder: path; + title: (title ifNil: [ 'Choose Directory' translated ]); + openModal; + selectedEntry + ] { #category : 'services' } @@ -774,40 +774,58 @@ UITheme >> chooseDropListIn: aThemedMorph text: aStringOrText title: aString lis ] { #category : 'services' } -UITheme >> chooseExistingFileReferenceIn: aThemedMorph title: title extensions: exts path: path preview: preview [ - "Answer the result of a file name chooser dialog with the given title, extensions - path and preview type. - Answer nil or a filename." - - | dialog pathFileReference | - pathFileReference := path asFileReference. - dialog := FileDialogWindow basicNew - basicTheme: aThemedMorph theme; - previewType: preview; - fileNameText: pathFileReference basename; - initialize; - title: title; - answerPathName. - exts ifNotNil: [ dialog validExtensions: exts ]. - path ifNotNil: [ dialog selectPath: pathFileReference pathString ]. - ^ dialog openModal answer ifNotNil: #asFileReference +UITheme >> chooseExistingFileReferenceIn: aThemedMorph title: titleString extensions: extensions path: path preview: preview [ + "Answer the result of a file name chooser dialog with the given titleString, extensions, path and preview type. + extensions : of each one representing a file extension. + path : or . It can be a directory or a file. + If it is a directory, the dialog will open showing it. + If it is a file, the directory where the file resides will be selected and displayed. + preview : or . If it's a , try to match with a specific previewer subclass of `StFileBrowserAbstractPreviewer`. + + Answer nil or the selected ." + + | pathFileReference newDialog | + + newDialog := StOpenFileDialog new + extensions: (extensions ifNil: [ Array empty ]); + title: (titleString ifNil: [ 'Choose File' ]); + yourself. + (pathFileReference := path asFileReference) isFile + ifTrue: [ + newDialog + showDirectory: pathFileReference parent; + selectFile: pathFileReference ] + ifFalse: [ + newDialog + showDirectory: pathFileReference ]. + ^ newDialog + openModal; + selectedEntry. ] { #category : 'services' } -UITheme >> chooseFileIn: aThemedMorph title: title extensions: exts path: path preview: preview [ - "Answer the result of a file open dialog with the given title, extensions path and preview type. - Answer nil or a filename." - - | dialog | - dialog := FileDialogWindow basicNew - basicTheme: aThemedMorph theme; - previewType: preview; - initialize; - title: title; - answerFileEntry. - exts ifNotNil: [ dialog validExtensions: exts ]. - path ifNotNil: [ dialog selectPath: path ]. - ^ dialog openModal answer +UITheme >> chooseFileIn: aThemedMorph title: titleString extensions: extensions path: path preview: preview [ + "Answer the result of a file name chooser dialog with the given titleString, extensions, path and preview type. + extensions : of each one representing a file extension. + path : or . It can be a directory or a file. + If it is a directory, the dialog will open showing it. + If it is a file, the directory where the file resides will be displayed. + preview : or . If it's a , try to match with a specific previewer subclass of `StFileBrowserAbstractPreviewer`. + + Answer nil or the selected ." + + | pathFileReference newDialog | + + newDialog := StOpenFileDialog new + extensions: (extensions ifNil: [ Array empty ]); + title: (titleString ifNil: [ 'Choose File' ]); + yourself. + (pathFileReference := path asFileReference) isFile + ifTrue: [ newDialog showDirectory: pathFileReference parent ] + ifFalse: [ newDialog showDirectory: pathFileReference ]. + ^ newDialog + openModal; + selectedEntry. ] { #category : 'services' } @@ -816,37 +834,34 @@ UITheme >> chooseForSaveFileReferenceIn: aThemedMorph title: title extensions: e path and preview type. Answer nil or a filename." - | dialog pathFileReference | + | pathFileReference | + pathFileReference := path asFileReference. - dialog := (FileDialogWindow newWithTheme: aThemedMorph theme) - title: title; - fileNameText: pathFileReference basename; - answerSaveFile. - exts ifNotNil: [ dialog validExtensions: exts ]. - path ifNotNil: [ dialog selectPath: path ]. - ^ dialog openModal answer + ^ StSaveFileDialog new + setTitle: title; + showDirectory: path parent; + extensions: exts; + selectFile: pathFileReference basename; + openModal; + selectedEntry ] { #category : 'services' } UITheme >> chooseFullFileNameIn: aThemedMorph title: title patterns: patterns path: path preview: preview [ "Answer the result of a file name chooser dialog with the given title, patterns - path and preview type. - Answer nil or a filename." + path and preview type. Answer nil or a filename." | dialog | - dialog := FileDialogWindow basicNew - basicTheme: aThemedMorph theme; - previewType: preview; - initialize; - title: title; - answerPathName. - patterns - ifNotNil: [ dialog - fileSelectionBlock: [ :de | - (dialog defaultFileSelectionBlock value: de) - and: [ de isDirectory or: [ patterns anySatisfy: [ :pat | pat match: de name ] ] ] ] ]. - path ifNotNil: [ dialog selectPath: path ]. - ^ dialog openModal answer + + dialog := StOpenFileDialog new + previewer: StFileBrowserTextBasedContentPreviewer new; + setTitle: title; + yourself. + path ifNotNil: [ dialog showDirectory: path ]. + patterns ifNotNil: [ dialog extensions: patterns ]. + ^ dialog + openModal; + selectedEntry. ] { #category : 'services' } diff --git a/src/Refactoring-Core/ReHierarchyDefinesMethod.class.st b/src/Refactoring-Core/REHierarchyDefinesMethod.class.st similarity index 100% rename from src/Refactoring-Core/ReHierarchyDefinesMethod.class.st rename to src/Refactoring-Core/REHierarchyDefinesMethod.class.st diff --git a/src/Refactoring-Core/ReUpToRootDefinesMethod.class.st b/src/Refactoring-Core/REUpToRootDefinesMethod.class.st similarity index 100% rename from src/Refactoring-Core/ReUpToRootDefinesMethod.class.st rename to src/Refactoring-Core/REUpToRootDefinesMethod.class.st diff --git a/src/System-DependenciesTests/SystemDependenciesTest.class.st b/src/System-DependenciesTests/SystemDependenciesTest.class.st index 56bcb423adf..da23cfa1374 100644 --- a/src/System-DependenciesTests/SystemDependenciesTest.class.st +++ b/src/System-DependenciesTests/SystemDependenciesTest.class.st @@ -94,9 +94,7 @@ SystemDependenciesTest >> knownMorphicCoreDependencies [ SystemDependenciesTest >> knownMorphicDependencies [ "ideally this list should be empty" - ^ #( #'Refactoring-Critics' #'Refactoring-Environment' - #'Spec2-Core' #'Tool-FileList' #'Athens-Morphic' - #'Tools-CodeNavigation' 'Debugger-Oups' ) "Rubric has a dependency on It" + ^ #(#'Refactoring-Critics' #'Refactoring-Environment' #'Spec2-Core' #'Athens-Morphic' #'Tools-CodeNavigation' 'Debugger-Oups') ] { #category : 'known dependencies' } @@ -126,8 +124,7 @@ SystemDependenciesTest >> knownUIDependencies [ "ideally this list should be empty" - ^ #('AST-Core-Tests' 'Athens-Cairo' 'Athens-Core' - #'Athens-Morphic' #'Refactoring-Critics' #'Refactoring-Environment' 'Reflectivity-Tools' #Shout #'Tool-Diff' #'Tool-FileList' #'HeuristicCompletion-Model' 'NECompletion-Morphic' #VariablesLibrary #'Tools-CodeNavigation' #'Spec2-CommonWidgets') + ^ #('AST-Core-Tests' 'Athens-Cairo' 'Athens-Core' 'Athens-Morphic' 'Refactoring-Critics' 'Refactoring-Environment' 'Reflectivity-Tools' 'Shout' 'Tool-Diff' 'HeuristicCompletion-Model' 'NECompletion-Morphic' 'VariablesLibrary' 'Tools-CodeNavigation' 'Spec2-CommonWidgets') ] { #category : 'accessing' } diff --git a/src/Tool-Registry/PharoCommonTools.class.st b/src/Tool-Registry/PharoCommonTools.class.st index e102c22937d..fc887350b4b 100644 --- a/src/Tool-Registry/PharoCommonTools.class.st +++ b/src/Tool-Registry/PharoCommonTools.class.st @@ -80,9 +80,9 @@ PharoCommonTools class >> settingsOn: aBuilder [ (aBuilder pickOne: #fileListTool) target: Smalltalk; targetSelector: #tools; - label: 'Filelist'; - default: (self environment at: #FileList); - domainValues: Smalltalk tools recentFileListTools] + label: 'FileBrowser'; + default: (self environment at: #StFileSystemPresenter); + domainValues: Smalltalk tools recentFileListTools ] ] { #category : 'system startup' }