--- a/AbstractFileBrowser.st Sun Jan 29 12:56:58 2012 +0000
+++ b/AbstractFileBrowser.st Sun Jan 29 15:33:37 2012 +0000
@@ -17,7 +17,8 @@
LastEnforcedNameSpace CommandHistory DefaultCommandPerSuffix
CommandHistorySize LastFileDiffFile DefaultFilters RootHolder
LastFileSelection LastMoveDestination LastScriptBlockString
- LastMustMatchPattern'
+ LastMustMatchPattern LastFileDiffDirectory
+ LastMercurialRepository'
poolDictionaries:''
category:'Interface-Tools-File'
!
@@ -542,9 +543,10 @@
sortDirectoriesBeforeFiles true
openAlwaysInTextEditor false
sortCaseless false
+ useCodeView2InTools true
)
- "Modified: / 03-04-2007 / 08:47:45 / cg"
+ "Modified: / 06-10-2011 / 11:30:09 / cg"
! !
!AbstractFileBrowser class methodsFor:'help specs'!
@@ -554,110 +556,116 @@
^ super flyByHelpSpec addPairsFrom:#(
+#lockFileEncoding
+'Do not guess the encoding from the file''s contents.'
+
#closeTabButton
-'Close this Tab'
+'Close this tab'
#addTerminal
-'Shell Terminal'
+'Add a Shell terminal view'
#make
-'Make'
+'Call the make command'
#searchFile
-'Search a File'
+'Search a file'
#directoryUp
-'Directory Up'
+'Directory up'
#directoryBack
-'Directory Back'
+'Directory back'
#directoryForward
-'Directory Forward'
+'Directory forward'
#directoryHistory
'Directory'
#copyFile
-'Copy the Selected File(s)'
+'Copy the selected file(s)'
#cutFile
-'Cut the Selected File(s)'
+'Cut the selected file(s)'
#editFile
-'Edit the Selected File'
+'Edit the selected file'
#fileHome
-'Goto Home Directory'
+'Goto home directory'
#fileDesktop
-'Goto Desktop Directory'
+'Goto desktop directory'
#fileGotoDefault
-'Goto Default Directory (ST/X Start Directory)'
+'Goto default directory (ST/X start directory)'
#fileGotoSmalltalkDirectory
-'Goto Smalltalk Directory (ST/X Application)'
+'Goto Smalltalk directory (ST/X application)'
#fileGotoDefaultDirectory
-'Goto Current Directory'
+'Goto current directory'
#pasteFile
-'Paste File(s)'
+'Paste file(s)'
#deleteFile
-'Delete the Selected File(s)'
+'Delete the selected file(s)'
#fileIn
-'File In'
+'File in'
#fileHistory
-'File History'
+'File history'
#fileGotoBookmark
-'Goto Bookmarked Directory'
+'Goto bookmarked directory'
#hideToolBar
-'Hide Toolbar'
+'Hide toolbar'
#hideFilenameEntryField
-'Hide Filename & Filter Fields'
+'Hide filename & filter fields'
#openChangeBrowser
-'Open a ChangeBrowser on File'
+'Open a Changebrowser on file'
#showFileDetails
-'Show File Details'
+'Show file details'
#hideFileDetails
-'Hide File Details'
+'Hide file details'
#toggleDetails
-'Show/Hide File Details'
+'Show/hide file details'
#viewDetails
-'Show/Hide File Details'
+'Show/hide file details'
#selectDetails
-'Select File Details to be Shown'
+'Select file details to be shown'
#showDifferences
-'Show Differences between File and Editor Versions'
+'Show differences between file and editor versions'
#toggleHexDisplay
-'Toggle between Hexadecimal and Textual Representation'
+'Toggle between hexadecimal and textual representation'
#findInBrowser
-'Navigate the Browsers File List to the Edited File'
+'Navigate the browser''s file list to the edited file'
#saveFile
-'Save the Editor''s Contents into the File'
+'Save the editor''s contents into the file'
+
+#saveFileAs
+'Save the editor''s contents into another file'
#reloadFile
-'Reload from the File'
+'Reload from the file'
#print
-'Send to the Printer'
+'Send to the printer'
).
@@ -665,7 +673,7 @@
self flyByHelpSpec
"
- "Modified: / 03-11-2007 / 12:05:01 / cg"
+ "Modified: / 06-10-2011 / 14:55:27 / cg"
!
flyByHelpSpec
@@ -693,27 +701,6 @@
"
"Modified: / 03-11-2007 / 12:05:01 / cg"
-!
-
-helpSpec
- "This resource specification was automatically generated
- by the UIHelpTool of ST/X."
-
- "Do not manually edit this!! If it is corrupted,
- the UIHelpTool may not be able to read the specification."
-
- "
- UIHelpTool openOnClass:AbstractFileBrowser
- "
-
- <resource: #help>
-
- ^ super helpSpec addPairsFrom:#(
-
-#lockFileEncoding
-'Do not guess the encoding from the files contents.'
-
-)
! !
!AbstractFileBrowser class methodsFor:'image specs'!
@@ -957,7 +944,7 @@
(SpecCollection
collection: (
(LabelSpec
- label: 'Select the External (File-) Encoding'
+ label: 'Select the External (File-) Encoding:'
name: 'Label1'
layout: (LayoutFrame 0 0 0 0 0 1 30 0)
translateLabel: true
@@ -970,14 +957,12 @@
hasHorizontalScrollBar: true
hasVerticalScrollBar: true
dataList: encodingList
- has3Dsepartors: true
has3Dseparators: true
columns:
- (OrderedCollection
+ (Array
(DataSetColumnSpec
label: 'Encoding'
- translateLabel: true
labelButtonType: Button
model: at:
canSelect: false
@@ -987,7 +972,6 @@
)
(DataSetColumnSpec
label: 'Description'
- translateLabel: true
labelButtonType: Button
model: at:
canSelect: false
@@ -1040,6 +1024,239 @@
)
)
+
+ "Modified: / 06-01-2012 / 15:40:54 / cg"
+!
+
+lineEndConventionDialogSpec
+ "This resource specification was automatically generated
+ by the UIPainter of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the UIPainter may not be able to read the specification."
+
+ "
+ UIPainter new openOnClass:AbstractFileBrowser andSelector:#lineEndConventionDialogSpec
+ AbstractFileBrowser new openInterface:#lineEndConventionDialogSpec
+ "
+
+ <resource: #canvas>
+
+ ^
+ #(FullSpec
+ name: lineEndConventionDialogSpec
+ window:
+ (WindowSpec
+ label: 'Line-End Convention'
+ name: 'Line-End Convention'
+ min: (Point 10 10)
+ bounds: (Rectangle 0 0 379 239)
+ )
+ component:
+ (SpecCollection
+ collection: (
+ (LabelSpec
+ label: 'Select the Line-End Convention:'
+ name: 'Label1'
+ layout: (LayoutFrame 0 0 0 0 0 1 30 0)
+ translateLabel: true
+ adjust: left
+ )
+ (VerticalPanelViewSpec
+ name: 'VerticalPanel1'
+ layout: (LayoutFrame 0 0 30 0 0 1 -30 1)
+ horizontalLayout: center
+ verticalLayout: center
+ horizontalSpace: 3
+ verticalSpace: 3
+ component:
+ (SpecCollection
+ collection: (
+ (RadioButtonSpec
+ label: 'NL (Unix)'
+ name: 'RadioButton1'
+ translateLabel: true
+ model: lineEndConvention
+ isTriggerOnDown: true
+ select: nl
+ extent: (Point 136 22)
+ )
+ (RadioButtonSpec
+ label: 'CR-NL (MSDOS)'
+ name: 'RadioButton4'
+ translateLabel: true
+ model: lineEndConvention
+ isTriggerOnDown: true
+ select: crnl
+ extent: (Point 136 22)
+ )
+ (RadioButtonSpec
+ label: 'CR (Mac)'
+ name: 'RadioButton5'
+ translateLabel: true
+ model: lineEndConvention
+ isTriggerOnDown: true
+ select: cr
+ extent: (Point 136 22)
+ )
+ (RadioButtonSpec
+ label: 'EOL'
+ name: 'RadioButton6'
+ translateLabel: true
+ model: lineEndConvention
+ isTriggerOnDown: true
+ select: eol
+ extent: (Point 136 22)
+ )
+ (RadioButtonSpec
+ label: 'EOT'
+ name: 'RadioButton7'
+ translateLabel: true
+ model: lineEndConvention
+ isTriggerOnDown: true
+ select: eot
+ extent: (Point 136 22)
+ )
+ )
+
+ )
+ )
+ (HorizontalPanelViewSpec
+ name: 'ButtonPanel'
+ layout: (LayoutFrame 0 0 -30 1 0 1 0 1)
+ horizontalLayout: fitSpace
+ verticalLayout: center
+ horizontalSpace: 3
+ verticalSpace: 3
+ reverseOrderIfOKAtLeft: true
+ component:
+ (SpecCollection
+ collection: (
+ (ActionButtonSpec
+ label: 'Cancel'
+ name: 'Button2'
+ translateLabel: true
+ model: cancel
+ extent: (Point 185 22)
+ )
+ (ActionButtonSpec
+ label: 'OK'
+ name: 'Button1'
+ translateLabel: true
+ model: accept
+ isDefault: true
+ extent: (Point 185 22)
+ )
+ )
+
+ )
+ )
+ )
+
+ )
+ )
+!
+
+tabStopConversionDialogSpec
+ "This resource specification was automatically generated
+ by the UIPainter of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the UIPainter may not be able to read the specification."
+
+ "
+ UIPainter new openOnClass:AbstractFileBrowser andSelector:#tabStopConversionDialogSpec
+ AbstractFileBrowser new openInterface:#tabStopConversionDialogSpec
+ "
+
+ <resource: #canvas>
+
+ ^
+ #(FullSpec
+ name: 'tabStopConversionDialogSpec'
+ window:
+ (WindowSpec
+ label: 'Tab-Stop Conversion'
+ name: 'Tab-Stop Conversion'
+ min: (Point 10 10)
+ bounds: (Rectangle 0 0 379 239)
+ )
+ component:
+ (SpecCollection
+ collection: (
+ (LabelSpec
+ label: 'Select the Tab-Stop Conversion:'
+ name: 'Label1'
+ layout: (LayoutFrame 0 0 0 0 0 1 30 0)
+ translateLabel: true
+ adjust: left
+ )
+ (VerticalPanelViewSpec
+ name: 'VerticalPanel1'
+ layout: (LayoutFrame 0 0 30 0 0 1 -30 1)
+ horizontalLayout: center
+ verticalLayout: center
+ horizontalSpace: 3
+ verticalSpace: 3
+ component:
+ (SpecCollection
+ collection: (
+ (RadioButtonSpec
+ label: '4'
+ name: 'RadioButton1'
+ translateLabel: true
+ model: tabStops
+ isTriggerOnDown: true
+ select: 4
+ extent: (Point 136 22)
+ )
+ (RadioButtonSpec
+ label: '8'
+ name: 'RadioButton4'
+ translateLabel: true
+ model: tabStops
+ isTriggerOnDown: true
+ select: 8
+ extent: (Point 136 22)
+ )
+ )
+
+ )
+ )
+ (HorizontalPanelViewSpec
+ name: 'ButtonPanel'
+ layout: (LayoutFrame 0 0 -30 1 0 1 0 1)
+ horizontalLayout: fitSpace
+ verticalLayout: center
+ horizontalSpace: 3
+ verticalSpace: 3
+ reverseOrderIfOKAtLeft: true
+ component:
+ (SpecCollection
+ collection: (
+ (ActionButtonSpec
+ label: 'Cancel'
+ name: 'Button2'
+ translateLabel: true
+ model: cancel
+ extent: (Point 185 22)
+ )
+ (ActionButtonSpec
+ label: 'OK'
+ name: 'Button1'
+ translateLabel: true
+ model: accept
+ isDefault: true
+ extent: (Point 185 22)
+ )
+ )
+
+ )
+ )
+ )
+
+ )
+ )
! !
!AbstractFileBrowser class methodsFor:'menu specs'!
@@ -1128,6 +1345,7 @@
"Do not manually edit this!! If it is corrupted,
the MenuEditor may not be able to read the specification."
+
"
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#browserMenu
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser browserMenu)) startUp
@@ -1149,13 +1367,12 @@
itemValue: doOpenExplorer
translateLabel: true
isVisible: systemIsDOS
- shortcutKey: Ctrle
)
(MenuItem
label: 'C Browser'
itemValue: doOpenCBrowser
translateLabel: true
- isVisible: cBrowserLoaded
+ isVisible: cBrowserMenuItemVisible
)
(MenuItem
label: '-'
@@ -1166,34 +1383,48 @@
translateLabel: true
shortcutKey: Ctrlt
)
-"/ (MenuItem
-"/ label: 'Add XML-Tree Page'
-"/ itemValue: newTextEditor
-"/ translateLabel: true
-"/ shortcutKey: Ctrlt
-"/ )
(MenuItem
label: 'Add Shell Terminal Page'
itemValue: doAddTerminal
translateLabel: true
)
(MenuItem
+ label: 'Add Archiver Page'
+ itemValue: doAddArchiver
+ translateLabel: true
+ )
+ (MenuItem
label: 'Add Search Page'
itemValue: doOpenSearchFile
translateLabel: true
)
(MenuItem
label: '-'
+ isVisible: false
)
(MenuItem
label: 'Settings...'
itemValue: doOpenSettings
translateLabel: true
+ isVisible: false
)
(MenuItem
label: 'Encoding...'
itemValue: fileEncodingDialog
translateLabel: true
+ isVisible: false
+ )
+ (MenuItem
+ label: 'Line End Convention...'
+ itemValue: lineEndConventionDialog
+ translateLabel: true
+ isVisible: false
+ )
+ (MenuItem
+ label: 'Tab Stop Conversion...'
+ itemValue: tabStopConversionDialog
+ translateLabel: true
+ isVisible: false
)
(MenuItem
label: '-'
@@ -1208,98 +1439,7 @@
nil
)
- "Modified: / 17-02-2011 / 13:23:47 / cg"
-!
-
-cvsMenu
- "This resource specification was automatically generated
- by the MenuEditor of ST/X."
-
- "Do not manually edit this!! If it is corrupted,
- the MenuEditor may not be able to read the specification."
-
- "
- MenuEditor new openOnClass:AbstractFileBrowser andSelector:#cvsMenu
- (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser cvsMenu)) startUp
- "
-
- <resource: #menu>
-
- ^
- #(#Menu
- #(
- #(#MenuItem
- #label: 'Commit (CVS)...'
- #itemValue: #cvsCommit
- #translateLabel: true
- )
- #(#MenuItem
- #enabled: #canCvsAddAndCommit
- #label: 'Add && Commit...'
- #itemValue: #cvsAddAndCommit
- #translateLabel: true
- )
- #(#MenuItem
- #enabled: #canCvsAddAndCommit
- #label: 'Add as Binary && Commit...'
- #itemValue: #cvsAddBinaryAndCommit
- #translateLabel: true
- )
- #(#MenuItem
- #label: '-'
- )
- #(#MenuItem
- #enabled: #hasSelection
- #label: 'Tag...'
- #itemValue: #cvsTagSelection
- #translateLabel: true
- )
- #(#MenuItem
- #enabled: #hasSelection
- #label: 'Revision Log'
- #itemValue: #cvsRevisionLog
- #translateLabel: true
- )
- #(#MenuItem
- #enabled: #hasSelection
- #label: 'Compare with newest in Repository'
- #itemValue: #cvsCompareWithNewest
- #translateLabel: true
- )
- #(#MenuItem
- #label: '-'
- )
- #(#MenuItem
- #enabled: #hasSelection
- #label: 'Update selected Files/Directories'
- #itemValue: #cvsUpdateSelection
- #translateLabel: true
- )
- #(#MenuItem
- #label: 'Update Directory Local'
- #itemValue: #cvsUpdateAll
- #translateLabel: true
- )
- #(#MenuItem
- #label: 'Update Directory Recursive'
- #itemValue: #cvsUpdateAllRecursive
- #translateLabel: true
- )
- #(#MenuItem
- #label: '-'
- )
- #(#MenuItem
- #enabled: #canRemoveCVSContainer
- #label: 'Remove File && CVS Container...'
- #itemValue: #cvsRemoveFileAndCVSContainer
- #translateLabel: true
- )
- )
- nil
- nil
- )
-
- "Modified: / 08-08-2011 / 19:30:45 / cg"
+ "Modified: / 07-01-2012 / 12:51:20 / cg"
!
directoryMenu
@@ -1464,6 +1604,53 @@
)
!
+extraMenu
+ "This resource specification was automatically generated
+ by the MenuEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the MenuEditor may not be able to read the specification."
+
+
+ "
+ MenuEditor new openOnClass:AbstractFileBrowser andSelector:#extraMenu
+ (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser extraMenu)) startUp
+ "
+
+ <resource: #menu>
+
+ ^
+ #(Menu
+ (
+ (MenuItem
+ label: 'Encoding...'
+ itemValue: fileEncodingDialog
+ translateLabel: true
+ )
+ (MenuItem
+ label: 'Line End Convention...'
+ itemValue: lineEndConventionDialog
+ translateLabel: true
+ )
+ (MenuItem
+ label: 'Tab Stop Conversion...'
+ itemValue: tabStopConversionDialog
+ translateLabel: true
+ )
+ (MenuItem
+ label: '-'
+ )
+ (MenuItem
+ label: 'Settings...'
+ itemValue: doOpenSettings
+ translateLabel: true
+ )
+ )
+ nil
+ nil
+ )
+!
+
fileMenu
"This resource specification was automatically generated
by the MenuEditor of ST/X."
@@ -2354,6 +2541,183 @@
)
! !
+!AbstractFileBrowser class methodsFor:'menu specs-scm'!
+
+cvsMenu
+ "This resource specification was automatically generated
+ by the MenuEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the MenuEditor may not be able to read the specification."
+
+
+ "
+ MenuEditor new openOnClass:AbstractFileBrowser andSelector:#cvsMenu
+ (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser cvsMenu)) startUp
+ "
+
+ <resource: #menu>
+
+ ^
+ #(Menu
+ (
+ (MenuItem
+ label: 'Commit (CVS)...'
+ itemValue: cvsCommit
+ translateLabel: true
+ )
+ (MenuItem
+ enabled: canCvsAddAndCommit
+ label: 'Add && Commit...'
+ itemValue: cvsAddAndCommit
+ translateLabel: true
+ )
+ (MenuItem
+ enabled: canCvsAddAndCommit
+ label: 'Add as Binary && Commit...'
+ itemValue: cvsAddBinaryAndCommit
+ translateLabel: true
+ )
+ (MenuItem
+ label: '-'
+ )
+ (MenuItem
+ enabled: hasSelection
+ label: 'Update selected Files/Directories'
+ itemValue: cvsUpdateSelection
+ translateLabel: true
+ )
+ (MenuItem
+ label: 'Update Directory Local'
+ itemValue: cvsUpdateAll
+ translateLabel: true
+ )
+ (MenuItem
+ label: 'Update Directory Recursive'
+ itemValue: cvsUpdateAllRecursive
+ translateLabel: true
+ )
+ (MenuItem
+ label: '-'
+ )
+ (MenuItem
+ enabled: hasSelection
+ label: 'Tag...'
+ itemValue: cvsTagSelection
+ translateLabel: true
+ )
+ (MenuItem
+ enabled: hasSelection
+ label: 'Revision Log'
+ itemValue: cvsRevisionLog
+ translateLabel: true
+ )
+ (MenuItem
+ enabled: hasSelection
+ label: 'Compare with newest in Repository'
+ itemValue: cvsCompareWithNewest
+ translateLabel: true
+ )
+ (MenuItem
+ label: '-'
+ )
+ (MenuItem
+ enabled: canRemoveCVSContainer
+ label: 'Remove File && CVS Container...'
+ itemValue: cvsRemoveFileAndCVSContainer
+ translateLabel: true
+ )
+ )
+ nil
+ nil
+ )
+!
+
+mercurialMenu
+ "This resource specification was automatically generated
+ by the MenuEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the MenuEditor may not be able to read the specification."
+
+
+ "
+ MenuEditor new openOnClass:AbstractFileBrowser andSelector:#mercurialMenu
+ (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser mercurialMenu)) startUp
+ "
+
+ <resource: #menu>
+
+ ^
+ #(Menu
+ (
+ (MenuItem
+ label: 'Add'
+ itemValue: mercurialAdd
+ translateLabel: true
+ )
+ (MenuItem
+ label: 'Commit Changes'
+ itemValue: mercurialCommit
+ translateLabel: true
+ )
+ (MenuItem
+ label: 'Push...'
+ itemValue: mercurialPush
+ translateLabel: true
+ )
+ (MenuItem
+ label: 'Status'
+ itemValue: mercurialStatus
+ translateLabel: true
+ )
+ (MenuItem
+ label: '-'
+ )
+ (MenuItem
+ label: 'Init'
+ itemValue: mercurialInit
+ translateLabel: true
+ )
+ )
+ nil
+ nil
+ )
+
+ "Modified: / 17-01-2012 / 15:57:40 / cg"
+!
+
+perforceMenu
+ "This resource specification was automatically generated
+ by the MenuEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the MenuEditor may not be able to read the specification."
+
+
+ "
+ MenuEditor new openOnClass:AbstractFileBrowser andSelector:#perforceMenu
+ (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser perforceMenu)) startUp
+ "
+
+ <resource: #menu>
+
+ ^
+ #(Menu
+ (
+ (MenuItem
+ label: 'Commit'
+ itemValue: perforceCommit
+ translateLabel: true
+ )
+ )
+ nil
+ nil
+ )
+
+ "Created: / 15-01-2012 / 13:12:30 / cg"
+! !
+
!AbstractFileBrowser class methodsFor:'misc'!
newLock
@@ -2549,6 +2913,22 @@
].
!
+doAddArchiver
+ |files|
+
+ files := self currentSelectedFiles.
+ files size == 1 ifFalse:[
+ Dialog information:'Select exactly one archive.'.
+ ^ self
+ ].
+
+ self
+ applicationNamed:#FileApplicationNoteBook
+ ifPresentDo:[:appl | appl doAddArchiverOn:files first].
+
+ "Created: / 29-11-2011 / 19:01:31 / cg"
+!
+
doAddTerminal
|dir|
@@ -2634,6 +3014,23 @@
"Modified: / 29-12-2010 / 11:04:29 / cg"
!
+lineEndConventionDialog
+ "open a dialog to allow change of the line end conventions
+ (when writing files)"
+
+ |bindings|
+
+ bindings := IdentityDictionary new.
+ bindings at:#lineEndConvention put:(self lineEndConvention asValue).
+
+ (self openDialogInterface:#lineEndConventionDialogSpec withBindings:bindings)
+ ifTrue:[
+ self lineEndConventionHolder value:(bindings at:#lineEndConvention) value
+ ].
+
+ "Created: / 06-01-2012 / 15:34:51 / cg"
+!
+
newTextEditor
self
applicationNamed:#FileApplicationNoteBook
@@ -2645,10 +3042,11 @@
openApplByFileItem:anItem
"/ q: is the following always wanted ?
self window sensor shiftDown ifFalse:[
- anItem fileName isExecutableProgram ifTrue:[
- self executeCommand:anItem fileName pathName.
- ^ self.
- ].
+ "/ cg: no - batch and shell scripts are to be
+"/ anItem fileName isExecutableProgram ifTrue:[
+"/ self executeCommand:anItem fileName pathName.
+"/ ^ self.
+"/ ].
"/ OperatingSystem isMSWINDOWSlike ifTrue:[
"/ Error handle:[:ex |
@@ -2667,6 +3065,8 @@
^ self
applicationNamed:#FileApplicationNoteBook
ifPresentDo:[:appl | appl openApplByFileItem:anItem].
+
+ "Modified: / 06-09-2011 / 11:11:15 / cg"
!
openApplForFile:aFilename
@@ -2726,6 +3126,22 @@
self currentFileNameHolder value:aCollectionOfFilenames.
!
+tabStopConversionDialog
+ "open a dialog to allow change of the tab stop conversion (when reading/writing files)"
+
+ |bindings|
+
+ bindings := IdentityDictionary new.
+ bindings at:#tabStops put:(self inputTabColumnConversion asValue).
+
+ (self openDialogInterface:#tabStopConversionDialogSpec withBindings:bindings)
+ ifTrue:[
+ self inputTabColumnConversionHolder value:(bindings at:#tabStops) value
+ ].
+
+ "Created: / 06-01-2012 / 15:36:06 / cg"
+!
+
updateAndSelect:aColOfFiles
self updateCurrentDirectory.
aColOfFiles notNil ifTrue:[
@@ -3119,6 +3535,42 @@
"Modified: / 20-05-2010 / 10:46:08 / cg"
!
+inputTabColumnConversion
+ ^ self inputTabColumnConversionHolder value
+
+ "Created: / 06-01-2012 / 15:25:56 / cg"
+!
+
+inputTabColumnConversionHolder
+ ^ self
+ aspectFor:#inputTabColumnConversionHolder
+ ifAbsent:[
+ self
+ applicationNamed:#FileApplicationNoteBook
+ ifPresentDo:[:appl | appl inputTabColumnConversionHolder].
+ ]
+
+ "Created: / 06-01-2012 / 15:26:16 / cg"
+!
+
+lineEndConvention
+ ^ self lineEndConventionHolder value
+
+ "Created: / 06-01-2012 / 13:05:14 / cg"
+!
+
+lineEndConventionHolder
+ ^ self
+ aspectFor:#lineEndConventionHolder
+ ifAbsent:[
+ self
+ applicationNamed:#FileApplicationNoteBook
+ ifPresentDo:[:appl | appl lineEndConventionHolder].
+ ]
+
+ "Created: / 06-01-2012 / 13:02:51 / cg"
+!
+
lockFileEncoding:aBoolean
self lockFileEncodingHolder value:aBoolean.
@@ -3145,7 +3597,11 @@
!
notify:aString
+ "aString is shown in the lower pane"
+
self notifyChannel value:aString
+
+ "Modified (comment): / 11-01-2012 / 21:46:55 / cg"
!
notifyChannel
@@ -3408,6 +3864,19 @@
^ Screen current ctrlDown.
!
+cvsMenusAreShown
+ ^ ConfigurableFeatures includesFeature: #CVSSupportEnabled
+
+ "Created: / 15-01-2012 / 13:00:05 / cg"
+ "Modified: / 19-01-2012 / 10:43:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+mercurialMenusAreShown
+ ^ ConfigurableFeatures hasMercurialSupportEnabled
+
+ "Created: / 15-01-2012 / 13:00:00 / cg"
+!
+
openAlwaysInTextEditor
" aspect for open every file in TextEditor dont use e.g. HtmlEditor for *.html'"
@@ -3422,6 +3891,13 @@
^ self aspectFor:#openMultipleApplicationsForType ifAbsent:[ false asValue ].
!
+perforceMenusAreShown
+ ^ ConfigurableFeatures includesFeature: #PerforceSupportEnabled
+
+ "Created: / 15-01-2012 / 13:12:11 / cg"
+ "Modified: / 19-01-2012 / 10:43:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
showDirectoryTree
^ self aspectFor:#showDirectoryTree ifAbsent:[ true asValue ]
@@ -3450,15 +3926,28 @@
self aspectFor:#shownFiles put:aHolder.
!
+svnMenusAreShown
+ ^ ConfigurableFeatures includesFeature: #SubversionSupportEnabled
+
+ "Created: / 15-01-2012 / 13:02:03 / cg"
+ "Modified: / 19-01-2012 / 10:43:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
tagsBrowserVisibleHolder
masterApplication notNil ifTrue:[
- ^ masterApplication tagsBrowserVisibleHolder
- ].
- ^ self aspectFor:#tagsBrowserVisibleHolder ifAbsent:[ false asValue ].
+ ^ masterApplication perform:#tagsBrowserVisibleHolder ifNotUnderstood:false
+ ].
+ ^ self aspectFor:#tagsBrowserVisibleHolder ifAbsent:[ FileApplicationNoteBook::TextEditor defaultTagsBrowserVisible asValue ].
"Created: / 27-06-2011 / 16:02:59 / cg"
!
+useCodeView2InTools
+ ^ self aspectFor:#useCodeView2InTools ifAbsent:[ UserPreferences current useCodeView2InTools asValue ].
+
+ "Created: / 06-10-2011 / 11:45:58 / cg"
+!
+
userContextAvailable
" aspect for show group and user columns in contents view
@@ -4491,7 +4980,7 @@
menu findGuiResourcesIn:self.
^ menu
- "Modified: / 27-03-2007 / 10:55:08 / cg"
+ "Modified: / 14-01-2012 / 21:14:03 / cg"
!
canBackward
@@ -4528,7 +5017,7 @@
menu findGuiResourcesIn:self.
^ menu
- "Modified: / 27-03-2007 / 10:54:50 / cg"
+ "Modified: / 14-01-2012 / 21:13:58 / cg"
!
menuDirHistory:backOrForward
@@ -4791,7 +5280,65 @@
"Created: / 29-12-2010 / 11:03:00 / cg"
! !
-!AbstractFileBrowser methodsFor:'menu actions-cvs'!
+!AbstractFileBrowser methodsFor:'menu actions-file'!
+
+copyFiles
+ self
+ withSelectedFilesOrDirectoriesDo:[:filesOrDirs | self copyFilesToClipBoard:filesOrDirs]
+!
+
+cutFiles
+ self
+ withSelectedFilesOrDirectoriesDo:[:filesOrDirs | self cutFilesToClipBoard:filesOrDirs]
+!
+
+deleteFiles
+ self
+ withSelectedFilesOrDirectoriesDo:[:filesOrDirs | self deleteFiles:filesOrDirs]
+!
+
+eraseFiles
+ self
+ withSelectedFilesOrDirectoriesDo:[:filesOrDirs | self eraseFiles:filesOrDirs]
+!
+
+openSettingsDialog
+ |dialog|
+
+ dialog := FileBrowserV2SettingsDialog new.
+ dialog settingsDialog:self.
+ dialog allButOpen.
+ dialog doReload.
+ dialog openWindow
+!
+
+withSelectedFilesOrDirectoriesDo:aBlock
+ |files dirs|
+
+ files := self currentSelectedFiles.
+ files notEmpty ifTrue:[
+ aBlock value:files.
+ ] ifFalse:[
+ dirs := self currentSelectedDirectories.
+ dirs notEmpty ifTrue:[
+ aBlock value:dirs.
+ ].
+ ].
+! !
+
+!AbstractFileBrowser methodsFor:'menu actions-help'!
+
+openAboutThisApplication
+ "opens an about box for this application."
+
+ Dialog aboutClass:self class.
+!
+
+openHTMLDocument:relativeDocPath
+ HTMLDocumentView openFullOnDocumentationFile:relativeDocPath
+! !
+
+!AbstractFileBrowser methodsFor:'menu actions-scm-cvs'!
cvsAddAndCommit
self cvsAddAndCommitAsBinary:false
@@ -4801,7 +5348,7 @@
|sel log logArg binArg cmd dir executionBlock nameString|
log := Dialog
- requestText:(resources string:'Enter initial log message')
+ requestText:(resources string:'Enter initial log message:')
lines:10
columns:70
initialAnswer:nil.
@@ -4818,36 +5365,39 @@
binArg := '-kb '.
].
sel := self currentSelectedFiles.
- executionBlock := [ : stream |
- log notNil ifTrue:[
- sel size > 0 ifTrue:[
- sel do:[:fn |
- |nameArg|
-
- nameArg := '"',fn baseName,'"'.
-
- dir := self getDirWithoutFileName:fn.
- cmd := 'cvs add ',logArg,' ',binArg,nameArg.
- (self getExecutionBlockForCommand:cmd inDirectory:dir) value:stream.
-
- cmd := ('cvs commit -l ',logArg,' ',nameArg).
- (self getExecutionBlockForCommand:cmd inDirectory:dir) value:stream.
- "/ mhmh - it seems that only old CVS implementations (at least turqoise)
- "/ support and need the 'admin -kb' command.
- "/ newer ones use the '-kb' option in the 'cvs add' command
- asBinary ifTrue:[
- cmd := ('cvs admin -kb ' , nameArg).
+ executionBlock :=
+ [:stream |
+ log notNil ifTrue:[
+ sel size > 0 ifTrue:[
+ sel do:[:fn |
+ |nameArg|
+
+ nameArg := '"',fn baseName,'"'.
+
+ dir := self getDirWithoutFileName:fn.
+ cmd := 'cvs add ',logArg,' ',binArg,nameArg.
+ (self getExecutionBlockForCommand:cmd inDirectory:dir) value:stream.
+
+ cmd := ('cvs commit -l ',logArg,' ',nameArg).
(self getExecutionBlockForCommand:cmd inDirectory:dir) value:stream.
-
- cmd := ('cvs upd ' , nameArg).
- (self getExecutionBlockForCommand:cmd inDirectory:dir) value:stream.
- ].
- ]
- ]
- ]
- ].
+ "/ mhmh - it seems that only old CVS implementations (at least turqoise)
+ "/ support and need the 'admin -kb' command.
+ "/ newer ones use the '-kb' option in the 'cvs add' command
+ asBinary ifTrue:[
+ cmd := ('cvs admin -kb ' , nameArg).
+ (self getExecutionBlockForCommand:cmd inDirectory:dir) value:stream.
+
+ cmd := ('cvs upd ' , nameArg).
+ (self getExecutionBlockForCommand:cmd inDirectory:dir) value:stream.
+ ].
+ ]
+ ]
+ ]
+ ].
nameString := 'Command> cvs add and commit'.
self makeExecutionResultProcessFor:executionBlock withName:nameString.
+
+ "Modified (format): / 15-01-2012 / 16:02:07 / cg"
!
cvsAddBinaryAndCommit
@@ -4912,8 +5462,18 @@
selectedFiles:= self currentSelectedFiles.
selectedFiles do:[:each |
-self halt.
- ].
+ |out diffs|
+
+ out := WriteStream on:(String new:100).
+ OperatingSystem
+ executeCommand:'cvs diff -b ',each baseName
+ outputTo:out
+ inDirectory:each directoryName.
+ diffs := out contents.
+ TextView openWith:diffs.
+ ].
+
+ "Modified: / 23-01-2012 / 14:08:28 / cg"
!
cvsRemoveAndRemoveFromCVS:filesToRemove
@@ -5083,62 +5643,153 @@
^ stream contents.
! !
-!AbstractFileBrowser methodsFor:'menu actions-file'!
-
-copyFiles
- self
- withSelectedFilesOrDirectoriesDo:[:filesOrDirs | self copyFilesToClipBoard:filesOrDirs]
-!
-
-cutFiles
- self
- withSelectedFilesOrDirectoriesDo:[:filesOrDirs | self cutFilesToClipBoard:filesOrDirs]
-!
-
-deleteFiles
- self
- withSelectedFilesOrDirectoriesDo:[:filesOrDirs | self deleteFiles:filesOrDirs]
-!
-
-eraseFiles
- self
- withSelectedFilesOrDirectoriesDo:[:filesOrDirs | self eraseFiles:filesOrDirs]
-!
-
-openSettingsDialog
- |dialog|
-
- dialog := FileBrowserV2SettingsDialog new.
- dialog settingsDialog:self.
- dialog allButOpen.
- dialog doReload.
- dialog openWindow
-!
-
-withSelectedFilesOrDirectoriesDo:aBlock
- |files dirs|
-
- files := self currentSelectedFiles.
- files notEmpty ifTrue:[
- aBlock value:files.
- ] ifFalse:[
- dirs := self currentSelectedDirectories.
- dirs notEmpty ifTrue:[
- aBlock value:dirs.
+!AbstractFileBrowser methodsFor:'menu actions-scm-mercurial'!
+
+mercurialAdd
+ |executionBlock sel maxCmdSize|
+
+ maxCmdSize := 512.
+
+ sel := self currentSelectedObjects.
+ sel isEmptyOrNil ifTrue:[
+ ^ self
+ ].
+
+ executionBlock :=
+ [:stream |
+ |prevDir cmd|
+
+ prevDir := nil.
+ sel do:[:fn |
+ |nameArg dir|
+
+ nameArg := '"',fn baseName,'"'.
+ dir := fn directory.
+ (dir ~= prevDir or:[ (cmd size + nameArg size) > maxCmdSize]) ifTrue:[
+ "/ flush
+ cmd notNil ifTrue:[
+ (self getExecutionBlockForCommand:cmd inDirectory:prevDir) value:stream.
+ cmd := nil.
+ ]
+ ].
+ cmd isNil ifTrue:[
+ cmd := 'hg add'.
+ ].
+ cmd := cmd,' ',nameArg.
+ prevDir := dir.
+ ].
+ cmd notNil ifTrue:[
+ (self getExecutionBlockForCommand:cmd inDirectory:prevDir) value:stream.
+ cmd := nil.
+ ].
+ stream nextPutLine:'Commit to finish the transaction'.
+ ].
+
+ self makeExecutionResultProcessFor:executionBlock withName:'Command> hg add'.
+
+ "Created: / 15-01-2012 / 15:55:47 / cg"
+!
+
+mercurialCommit
+ |dir executionBlock|
+
+"/ dir := self currentDirectory.
+ dir := self directoryContentsBrowser directory.
+ executionBlock :=
+ [:stream |
+ (self getExecutionBlockForCommand:'hg commit'
+ inDirectory:dir) value:stream.
+ stream nextPutLine:'Push to sync other repositories'.
].
- ].
-! !
-
-!AbstractFileBrowser methodsFor:'menu actions-help'!
-
-openAboutThisApplication
- "opens an about box for this application."
-
- Dialog aboutClass:self class.
-!
-
-openHTMLDocument:relativeDocPath
- HTMLDocumentView openFullOnDocumentationFile:relativeDocPath
+
+ self makeExecutionResultProcessFor:executionBlock withName:'Command> hg commit'.
+
+ "Created: / 15-01-2012 / 16:21:27 / cg"
+!
+
+mercurialInit
+ |dir executionBlock|
+
+ dir := self directoryContentsBrowser directory.
+
+ (Dialog confirm:(resources
+ string:'Initialize new Mercurial Repository in %1?'
+ with:dir baseName)) ifFalse:[^ self].
+
+ executionBlock :=
+ [:stream |
+ (self getExecutionBlockForCommand:('hg init')
+ inDirectory:dir) value:stream.
+ ].
+
+ self makeExecutionResultProcessFor:executionBlock withName:'Command> hg init'.
+
+ "Created: / 17-01-2012 / 15:58:46 / cg"
+!
+
+mercurialPush
+ |destination dir executionBlock|
+
+ destination := Dialog request:'Mercurial Repository'
+ initialAnswer:(LastMercurialRepository ? MercurialSourceCodeManager repositoryName).
+ destination isEmptyOrNil ifTrue:[^ self].
+
+ LastMercurialRepository := destination.
+
+ dir := self directoryContentsBrowser directory.
+ executionBlock :=
+ [:stream |
+ (self getExecutionBlockForCommand:('hg push "%1"' bindWith:destination)
+ inDirectory:dir) value:stream.
+ ].
+
+ self makeExecutionResultProcessFor:executionBlock withName:'Command> hg push'.
+
+ "Created: / 15-01-2012 / 16:29:41 / cg"
+!
+
+mercurialStatus
+ |executionBlock sel maxCmdSize|
+
+ maxCmdSize := 512.
+
+ sel := self currentSelectedObjects.
+ sel isEmptyOrNil ifTrue:[
+ ^ self
+ ].
+
+ executionBlock :=
+ [:stream |
+ |prevDir cmd|
+
+ prevDir := nil.
+ sel do:[:fn |
+ |nameArg dir|
+
+ nameArg := '"',fn baseName,'"'.
+ dir := fn directory.
+ (dir ~= prevDir or:[ (cmd size + nameArg size) > maxCmdSize]) ifTrue:[
+ "/ flush
+ cmd notNil ifTrue:[
+ (self getExecutionBlockForCommand:cmd inDirectory:prevDir) value:stream.
+ cmd := nil.
+ ]
+ ].
+ cmd isNil ifTrue:[
+ cmd := 'hg status'.
+ ].
+ cmd := cmd,' ',nameArg.
+ prevDir := dir.
+ ].
+ cmd notNil ifTrue:[
+ (self getExecutionBlockForCommand:cmd inDirectory:prevDir) value:stream.
+ cmd := nil.
+ ].
+ ].
+
+ self makeExecutionResultProcessFor:executionBlock withName:'Command> hg status'.
+
+ "Created: / 15-01-2012 / 19:43:08 / cg"
! !
!AbstractFileBrowser methodsFor:'menu actions-tools'!
@@ -5522,8 +6173,13 @@
doOpenCBrowser
|destDir|
+ (CBrowser isNil or:[ CBrowser::Browser isNil ]) ifTrue:[
+ Smalltalk loadPackage:'exept:CC'
+ ].
destDir := self currentDirectory.
CBrowser::Browser openIn:destDir pathName
+
+ "Modified: / 04-10-2011 / 13:41:31 / cg"
!
doOpenExplorer
@@ -6543,7 +7199,7 @@
"open a diff-view"
|name1 name2 text1 text2 d err nm l1 files title
- defaultName lastFile sameContents msg|
+ defaultName defaultDir lastFile sameContents msg|
files := self currentSelectedObjects.
files isEmpty ifTrue:[
@@ -6556,25 +7212,29 @@
name2 := files first.
] ifFalse:[
LastFileDiffFile notNil ifTrue:[
- | directory |
- directory := self currentDirectory.
- directory notNil ifTrue:[
- lastFile := directory asFilename construct:(LastFileDiffFile baseName).
- (lastFile exists and:[lastFile isReadable]) ifTrue:[
- name1 := lastFile.
- ]
- ]
+ LastFileDiffFile exists ifTrue:[
+ name1 := LastFileDiffFile.
+ ].
+"/ | directory |
+"/ directory := self currentDirectory.
+"/ directory notNil ifTrue:[
+"/ lastFile := directory asFilename construct:(LastFileDiffFile baseName).
+"/ (lastFile exists and:[lastFile isReadable]) ifTrue:[
+"/ name1 := lastFile.
+"/ ]
+"/ ]
].
name2 := files first.
title := resources string:'Show differences between "%1" and:' with:name2 baseName.
defaultName := name1 notNil ifTrue:[name1 baseName] ifFalse:[nil].
+ defaultDir := name1 notNil ifTrue:[name1 directory] ifFalse:[self currentDirectory].
name1 := DialogBox
requestFileName:title
default:defaultName
ok:(resources string:'OK')
abort:(resources string:'Compare against File List')
pattern:'*'
- fromDirectory:(name2 asFilename directory).
+ fromDirectory:defaultDir.
].
self withWaitCursorDo:[
@@ -6661,7 +7321,7 @@
]
]
- "Modified: / 25-07-2006 / 09:07:37 / cg"
+ "Modified: / 05-01-2012 / 14:26:20 / cg"
!
openDirectoryDiffView
@@ -6670,99 +7330,37 @@
|name1 name2 files|
files := self currentSelectedObjects.
- (files size == 2) ifFalse:[
- Dialog warn:(resources string:'You have to select exactly 2 directories').
- ^ self.
- ].
- name1 := files last.
- name2 := files first.
- self information:'Sorry - not yet implemented'.
-
-"/ self withWaitCursorDo:[
-"/ (name1 isNil or:[name1 asString isEmpty]) ifTrue:[
-"/ text1 := self getAllFilesAsStrings asStringCollection withTabs.
-"/ text1 := text1 collect:[:l | l isNil ifTrue:[' '] ifFalse:[l]].
-"/ name1 := nil.
-"/ l1 := 'browser contents'
-"/ ] ifFalse:[
-"/ name1 := name1 asFilename.
-"/ LastFileDiffFile := name1.
-"/ name1 isReadable ifFalse:[
-"/ nm := name1.
-"/ name1 exists ifFalse:[
-"/ err := '"%1" does not exist.'.
-"/ ] ifTrue:[
-"/ err := '"%1" is not readable.'
-"/ ].
-"/ ].
-"/ l1 := name1 pathName
-"/ ].
-"/
-"/ err isNil ifTrue:[
-"/ name2 isReadable ifFalse:[
-"/ nm := name2.
-"/ name2 exists ifFalse:[
-"/ err := '"%1" does not exist.'.
-"/ ] ifTrue:[
-"/ err := '"%1" is not readable.'
-"/ ].
-"/ ].
-"/ ].
-"/ err notNil ifTrue:[
-"/ Dialog warn:(resources string:err with:nm pathName allBold).
-"/ ^ self
-"/ ].
-"/
-"/ self withActivityIndicationDo:[
-"/ ((name1 notNil and:[name1 fileSize > (1024*1024*8)])
-"/ or:[ name2 fileSize > (1024*1024*8) ]) ifTrue:[
-"/ name1 fileSize = name2 fileSize ifTrue:[
-"/ ProgressIndicator
-"/ displayBusyIndicator:'Comparing...'
-"/ at:(Screen default center)
-"/ during:[
-"/ sameContents := (name1 sameContentsAs:name2).
-"/ ].
-"/ sameContents ifTrue:[
-"/ self information:'Same contents.'
-"/ ] ifFalse:[
-"/ self information:'Different contents (File(s) too big for more details).'
-"/ ].
-"/ ] ifFalse:[
-"/ self information:'Different size (File(s) too big for more details).'
-"/ ].
-"/ ^ self.
-"/ ].
-"/
-"/ name1 notNil ifTrue:[
-"/ name1 isDirectory ifTrue:[
-"/ text1 := name1 directoryContents asString.
-"/ ] ifFalse:[
-"/ text1 := name1 contents.
-"/ ]
-"/ ].
-"/ name2 isDirectory ifTrue:[
-"/ text2 := name2 directoryContents asString.
-"/ ] ifFalse:[
-"/ text2 := name2 contents.
-"/ ].
-"/ text1 = text2 ifTrue:[
-"/ (name1 isDirectory or:[name2 isDirectory]) ifTrue:[
-"/ msg := 'Same filename lists.'
-"/ ] ifFalse:[
-"/ msg := 'Same contents.'
-"/ ].
-"/ self information:(resources string:msg)
-"/ ] ifFalse:[
-"/ d := DiffTextView
-"/ openOn:text1 label:l1
-"/ and:text2 label:name2 pathName.
-"/ d topView label:(resources string:'File Differences').
-"/ ]
-"/ ]
-"/ ]
-"/
-"/
+ files notEmpty ifTrue:[
+ name1 := files first asFilename.
+ name1 asFilename isDirectory ifFalse:[
+ name1 := name1 directory
+ ].
+ ].
+
+ (files size == 2) ifTrue:[
+ name2 := files second.
+ ] ifFalse:[
+ (files size ~= 1) ifTrue:[
+ Dialog warn:(resources string:'Please select one or two directories.').
+ ^ self.
+ ].
+ name2 := Dialog
+ requestDirectoryName:(resources
+ string:'Recursive compare "%1" with folder:'
+ with:name1 asFilename baseName)
+ default:(LastFileDiffDirectory ? self currentDirectory).
+ name2 isEmptyOrNil ifTrue:[^ self].
+ LastFileDiffDirectory := name2.
+ ].
+ name2 := name2 asFilename.
+
+ name2 asFilename isDirectory ifFalse:[
+ name2 := name2 directory
+ ].
+
+ self
+ applicationNamed:#FileApplicationNoteBook
+ ifPresentDo:[:appl | ^ appl openCompareDirectory:name1 with:name2].
"Created: / 20-05-2010 / 15:01:17 / cg"
!
@@ -7105,60 +7703,64 @@
isRedef := false.
sig := ex signal.
- (sig == NoHandlerError and:[ex parameter rejected]) ifTrue:[
- ex reject
- ].
- sig == Class methodRedefinitionNotification ifTrue:[
- msg := 'trying to overwrite method:\\ ' , ex oldMethod whoString , '\\in package '''
- , ex oldPackage , ''' with method from package ''' , ex newPackage , ''''.
- label := 'Method redefinition in fileIn'.
- redefKind := 'method'.
- isRedef := true.
- ] ifFalse:[sig == Class classRedefinitionNotification ifTrue:[
- msg := 'trying to redefine class: ' , ex oldClass name allBold , '\\in package '''
- , ex oldPackage , ''' with new definition from package ''' , ex newPackage , ''''.
- label := 'Class redefinition in fileIn'.
- redefKind := 'class'.
- isRedef := true.
- ] ifFalse:[sig == HaltInterrupt ifTrue:[ |sender|
- label := msg := 'Breakpoint/Halt in fileIn'.
- sender := ex suspendedContext.
- msg := msg , '\\in ' , sender receiver class name , '>>' , sender sender selector
+ (dontAskSignals notNil and:[dontAskSignals includesKey:sig]) ifTrue:[
+ action := #continue
] ifFalse:[
- label := 'Error in fileIn'.
- msg := 'error in fileIn: %1'
- ]]].
-
- msg := msg bindWith:ex description.
-
- labels := #('Cancel' 'Skip' 'Debug' 'Compare Sources').
- values := #(abort skip debug compareSources).
-
- isRedef ifTrue:[
- msg := msg, ('%<cr>%<cr>Continue will install the change and assign the %1 to the new package.
-Keep Package will install the change, but keep the %1 in the old package.' bindWith:redefKind).
-
- labels := labels , #('Keep Package' ).
- values := values , #(keep).
+ (sig == NoHandlerError and:[ex parameter rejected]) ifTrue:[
+ ex reject
+ ].
+ sig == Class methodRedefinitionNotification ifTrue:[
+ msg := 'trying to overwrite method:\\ ' , ex oldMethod whoString , '\\in package '''
+ , ex oldPackage , ''' with method from package ''' , ex newPackage , ''''.
+ label := 'Method redefinition in fileIn'.
+ redefKind := 'method'.
+ isRedef := true.
+ ] ifFalse:[sig == Class classRedefinitionNotification ifTrue:[
+ msg := 'trying to redefine class: ' , ex oldClass name allBold , '\\in package '''
+ , ex oldPackage , ''' with new definition from package ''' , ex newPackage , ''''.
+ label := 'Class redefinition in fileIn'.
+ redefKind := 'class'.
+ isRedef := true.
+ ] ifFalse:[sig == HaltInterrupt ifTrue:[ |sender|
+ label := msg := 'Breakpoint/Halt in fileIn'.
+ sender := ex suspendedContext.
+ msg := msg , '\\in ' , sender receiver class name , '>>' , sender sender selector
+ ] ifFalse:[
+ label := 'Error in fileIn'.
+ msg := 'error in fileIn: %1'
+ ]]].
+
+ msg := msg bindWith:ex description.
+
+ labels := #('Cancel' 'Skip' 'Debug' 'Compare Sources').
+ values := #(abort skip debug compareSources).
+
+ isRedef ifTrue:[
+ msg := msg, ('%<cr>%<cr>Continue will install the change and assign the %1 to the new package.
+ Keep Package will install the change, but keep the %1 in the old package.' bindWith:redefKind).
+
+ labels := labels , #('Keep Package' ).
+ values := values , #(keep).
+ ].
+
+ labels := labels , #( 'Continue' 'ContinueForAll').
+ values := values , #( continue continueForAll).
+
+ AbortAllOperationWantedQuery query ifTrue:[
+ labels := #('Cancel All') , labels.
+ values := #(cancelAll) , values.
+ ].
+
+ action := Dialog
+ choose:(msg withCRs)
+ label:label
+ image:(WarningBox iconBitmap)
+ labels:labels
+ values:values
+ default:#continue
+ onCancel:#abort.
].
- labels := labels , #( 'Continue' 'ContinueForAll').
- values := values , #( continue continueForAll).
-
- AbortAllOperationWantedQuery query ifTrue:[
- labels := #('Cancel All') , labels.
- values := #(cancelAll) , values.
- ].
-
- action := Dialog
- choose:(msg withCRs)
- label:label
- image:(WarningBox iconBitmap)
- labels:labels
- values:values
- default:#continue
- onCancel:#abort.
-
action == #continueForAll ifTrue:[
dontAskSignals isNil ifTrue:[
dontAskSignals := IdentityDictionary new.
@@ -7197,7 +7799,7 @@
ex reject
]
- "Modified: / 09-02-2011 / 13:52:54 / cg"
+ "Modified: / 22-11-2011 / 13:52:17 / cg"
!
splitFile:infile intoPiecesOfSize:kiloBytes
@@ -7504,7 +8106,6 @@
^ false
! !
-
!AbstractFileBrowser methodsFor:'presentation'!
getModeString:modeBits
@@ -7568,6 +8169,12 @@
^ CBrowser::Browser notNil
!
+cBrowserMenuItemVisible
+ ^ self cBrowserLoaded or:[ OperatingSystem getLoginName = 'cg' ]
+
+ "Created: / 04-10-2011 / 13:40:38 / cg"
+!
+
getAllFilesAsStrings
"raise an error: must be redefined in concrete subclass(es)"
@@ -7676,10 +8283,11 @@
!
hasSubversionSupport
-
- ^(Smalltalk classNamed: #'SVN::RepositoryManager') notNil
+ ^ ConfigurableFeatures includesFeature: #SubversionSupport
"Created: / 24-06-2010 / 19:59:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 07-09-2011 / 10:41:19 / cg"
+ "Modified: / 19-01-2012 / 10:43:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
hasSubversionWorkingCopySelected
@@ -8420,9 +9028,9 @@
!AbstractFileBrowser class methodsFor:'documentation'!
version
- ^ '$Id: AbstractFileBrowser.st 7810 2011-08-12 14:54:02Z vranyj1 $'
+ ^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.489 2012/01/23 13:33:32 cg Exp $'
!
version_CVS
- ^ '§Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.467 2011/08/08 17:34:48 cg Exp §'
-! !
\ No newline at end of file
+ ^ '§Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.489 2012/01/23 13:33:32 cg Exp §'
+! !