AbstractFileBrowser.st
branchjv
changeset 12431 9f0c59c742d5
parent 12401 4714b9640528
child 12435 1f1faf35be04
equal deleted inserted replaced
12430:4579351ee2cb 12431:9f0c59c742d5
    96     Especially the fact, that AbstractFileBrowser defines things both as abstract superclass
    96     Especially the fact, that AbstractFileBrowser defines things both as abstract superclass
    97     and as a container is almost incomprehensable...
    97     and as a container is almost incomprehensable...
    98 "
    98 "
    99 ! !
    99 ! !
   100 
   100 
   101 
       
   102 !AbstractFileBrowser class methodsFor:'accessing'!
   101 !AbstractFileBrowser class methodsFor:'accessing'!
   103 
   102 
   104 currentSelection
   103 currentSelection
   105 
   104 
   106     LastFileSelection isNil ifTrue:[
   105     LastFileSelection isNil ifTrue:[
   144 
   143 
   145 rootHolder:aRoot
   144 rootHolder:aRoot
   146 
   145 
   147     RootHolder := aRoot
   146     RootHolder := aRoot
   148 ! !
   147 ! !
   149 
       
   150 
   148 
   151 !AbstractFileBrowser class methodsFor:'accessing-bookmarks'!
   149 !AbstractFileBrowser class methodsFor:'accessing-bookmarks'!
   152 
   150 
   153 addBookmark:aDirectoryPath
   151 addBookmark:aDirectoryPath
   154     "add aDirectoryPath to the list of our known bookmarks.
   152     "add aDirectoryPath to the list of our known bookmarks.
   297 
   295 
   298 saveBookmarksInDefaultBookmarksFile
   296 saveBookmarksInDefaultBookmarksFile
   299     self saveBookmarksIn:(self defaultBookMarksFileDirectory construct:self defaultBookMarksFilename)
   297     self saveBookmarksIn:(self defaultBookMarksFileDirectory construct:self defaultBookMarksFilename)
   300 ! !
   298 ! !
   301 
   299 
   302 
       
   303 !AbstractFileBrowser class methodsFor:'accessing-classes'!
   300 !AbstractFileBrowser class methodsFor:'accessing-classes'!
   304 
   301 
   305 directoryHistoryClass
   302 directoryHistoryClass
   306     ^ DirectoryHistory
   303     ^ DirectoryHistory
   307 
   304 
   308     "Modified: / 21-11-2012 / 08:46:34 / cg"
   305     "Modified: / 21-11-2012 / 08:46:34 / cg"
   309 ! !
   306 ! !
   310 
       
   311 
   307 
   312 !AbstractFileBrowser class methodsFor:'defaults'!
   308 !AbstractFileBrowser class methodsFor:'defaults'!
   313 
   309 
   314 commandHistory
   310 commandHistory
   315 
   311 
   556       )
   552       )
   557 
   553 
   558     "Modified: / 11-05-2012 / 09:22:04 / cg"
   554     "Modified: / 11-05-2012 / 09:22:04 / cg"
   559 ! !
   555 ! !
   560 
   556 
   561 
       
   562 !AbstractFileBrowser class methodsFor:'help specs'!
   557 !AbstractFileBrowser class methodsFor:'help specs'!
   563 
   558 
   564 basicFlyByHelpSpec
   559 basicFlyByHelpSpec
   565     <resource: #help>
   560     <resource: #help>
   566 
   561 
   710      self flyByHelpSpec
   705      self flyByHelpSpec
   711     "
   706     "
   712 
   707 
   713     "Modified: / 03-11-2007 / 12:05:01 / cg"
   708     "Modified: / 03-11-2007 / 12:05:01 / cg"
   714 ! !
   709 ! !
   715 
       
   716 
   710 
   717 !AbstractFileBrowser class methodsFor:'image specs'!
   711 !AbstractFileBrowser class methodsFor:'image specs'!
   718 
   712 
   719 clearHistoryIcon
   713 clearHistoryIcon
   720     <resource: #programImage>
   714     <resource: #programImage>
   922 vt100Terminal
   916 vt100Terminal
   923     <resource: #programImage>
   917     <resource: #programImage>
   924 
   918 
   925     ^ ToolbarIconLibrary shell20x20Icon
   919     ^ ToolbarIconLibrary shell20x20Icon
   926 ! !
   920 ! !
   927 
       
   928 
   921 
   929 !AbstractFileBrowser class methodsFor:'interface specs'!
   922 !AbstractFileBrowser class methodsFor:'interface specs'!
   930 
   923 
   931 encodingDialogSpec
   924 encodingDialogSpec
   932     "This resource specification was automatically generated
   925     "This resource specification was automatically generated
  1272         )
  1265         )
  1273       )
  1266       )
  1274 
  1267 
  1275     "Modified: / 28-02-2012 / 11:12:38 / cg"
  1268     "Modified: / 28-02-2012 / 11:12:38 / cg"
  1276 ! !
  1269 ! !
  1277 
       
  1278 
  1270 
  1279 !AbstractFileBrowser class methodsFor:'menu specs'!
  1271 !AbstractFileBrowser class methodsFor:'menu specs'!
  1280 
  1272 
  1281 baseBookmarksMenuSpec
  1273 baseBookmarksMenuSpec
  1282     "This resource specification was automatically generated
  1274     "This resource specification was automatically generated
  2593         nil
  2585         nil
  2594         nil
  2586         nil
  2595       )
  2587       )
  2596 ! !
  2588 ! !
  2597 
  2589 
  2598 
       
  2599 !AbstractFileBrowser class methodsFor:'menu specs-scm'!
  2590 !AbstractFileBrowser class methodsFor:'menu specs-scm'!
  2600 
  2591 
  2601 cvsMenu
  2592 cvsMenu
  2602     "This resource specification was automatically generated
  2593     "This resource specification was automatically generated
  2603      by the MenuEditor of ST/X."
  2594      by the MenuEditor of ST/X."
  2771       )
  2762       )
  2772 
  2763 
  2773     "Created: / 15-01-2012 / 13:12:30 / cg"
  2764     "Created: / 15-01-2012 / 13:12:30 / cg"
  2774 ! !
  2765 ! !
  2775 
  2766 
  2776 
       
  2777 !AbstractFileBrowser class methodsFor:'misc'!
  2767 !AbstractFileBrowser class methodsFor:'misc'!
  2778 
  2768 
  2779 newLock
  2769 newLock
  2780     ^ CodeExecutionLock new
  2770     ^ CodeExecutionLock new
  2781 ! !
  2771 ! !
  2782 
  2772 
  2783 
       
  2784 !AbstractFileBrowser class methodsFor:'resources'!
  2773 !AbstractFileBrowser class methodsFor:'resources'!
  2785 
  2774 
  2786 classResources
  2775 classResources
  2787     ^ FileBrowser classResources
  2776     ^ FileBrowser classResources
  2788 ! !
  2777 ! !
  2789 
       
  2790 
  2778 
  2791 !AbstractFileBrowser class methodsFor:'utilities'!
  2779 !AbstractFileBrowser class methodsFor:'utilities'!
  2792 
  2780 
  2793 contentsOfBytesAsHexDump:data numberOfAddressDigits:addrDigits addressStart:virtualStart
  2781 contentsOfBytesAsHexDump:data numberOfAddressDigits:addrDigits addressStart:virtualStart
  2794     "utility helper: generate a hexDump with addresses"
  2782     "utility helper: generate a hexDump with addresses"
  2955         addressStart:0
  2943         addressStart:0
  2956 
  2944 
  2957     "Modified: / 13-02-2012 / 15:01:19 / cg"
  2945     "Modified: / 13-02-2012 / 15:01:19 / cg"
  2958 ! !
  2946 ! !
  2959 
  2947 
  2960 
       
  2961 !AbstractFileBrowser methodsFor:'actions'!
  2948 !AbstractFileBrowser methodsFor:'actions'!
  2962 
  2949 
  2963 askForCommandFor:fileName thenDo:aBlock
  2950 askForCommandFor:fileName thenDo:aBlock
  2964     "setup and launch a querybox to ask for a unix command.
  2951     "setup and launch a querybox to ask for a unix command.
  2965      Then evaluate aBlock passing the command-string as argument."
  2952      Then evaluate aBlock passing the command-string as argument."
  3307     ] ensure:[
  3294     ] ensure:[
  3308         self activityVisibilityChannel value:false.
  3295         self activityVisibilityChannel value:false.
  3309     ]
  3296     ]
  3310 ! !
  3297 ! !
  3311 
  3298 
  3312 
       
  3313 !AbstractFileBrowser methodsFor:'actions bookmarks'!
  3299 !AbstractFileBrowser methodsFor:'actions bookmarks'!
  3314 
  3300 
  3315 addBookmark
  3301 addBookmark
  3316     self currentFilesAreInSameDirectory ifFalse:[^ self].
  3302     self currentFilesAreInSameDirectory ifFalse:[^ self].
  3317     self addBookmarks:(self currentSelectedDirectories).
  3303     self addBookmarks:(self currentSelectedDirectories).
  3352 !
  3338 !
  3353 
  3339 
  3354 saveBookmarks
  3340 saveBookmarks
  3355      self class saveBookmarks
  3341      self class saveBookmarks
  3356 ! !
  3342 ! !
  3357 
       
  3358 
  3343 
  3359 !AbstractFileBrowser methodsFor:'actions history'!
  3344 !AbstractFileBrowser methodsFor:'actions history'!
  3360 
  3345 
  3361 addToCommandHistory:aCommandString for:aFilename
  3346 addToCommandHistory:aCommandString for:aFilename
  3362     |cmd suffix cmdHist historySize|
  3347     |cmd suffix cmdHist historySize|
  3406         self enableForward value:false.
  3391         self enableForward value:false.
  3407 
  3392 
  3408     ].
  3393     ].
  3409 ! !
  3394 ! !
  3410 
  3395 
  3411 
       
  3412 !AbstractFileBrowser methodsFor:'applications'!
  3396 !AbstractFileBrowser methodsFor:'applications'!
  3413 
  3397 
  3414 applicationNamed:anApplicationName ifPresentDo:aBlock
  3398 applicationNamed:anApplicationName ifPresentDo:aBlock
  3415     |appl|
  3399     |appl|
  3416 
  3400 
  3422 !
  3406 !
  3423 
  3407 
  3424 directoryContentsBrowser
  3408 directoryContentsBrowser
  3425     ^ self applications at:#DirectoryContentsBrowser ifAbsent:nil.
  3409     ^ self applications at:#DirectoryContentsBrowser ifAbsent:nil.
  3426 ! !
  3410 ! !
  3427 
       
  3428 
  3411 
  3429 !AbstractFileBrowser methodsFor:'aspects'!
  3412 !AbstractFileBrowser methodsFor:'aspects'!
  3430 
  3413 
  3431 applications
  3414 applications
  3432     ^ aspects at:#applications
  3415     ^ aspects at:#applications
  3780 rootHolder:aHolder
  3763 rootHolder:aHolder
  3781 
  3764 
  3782     self aspectFor:#rootHolder put:aHolder
  3765     self aspectFor:#rootHolder put:aHolder
  3783 ! !
  3766 ! !
  3784 
  3767 
  3785 
       
  3786 !AbstractFileBrowser methodsFor:'aspects handling'!
  3768 !AbstractFileBrowser methodsFor:'aspects handling'!
  3787 
  3769 
  3788 aspectFor:something ifAbsent:aBlock
  3770 aspectFor:something ifAbsent:aBlock
  3789     "returns the model for an aspect; these are stored in a common dictionary"
  3771     "returns the model for an aspect; these are stored in a common dictionary"
  3790 
  3772 
  3890         ifAbsent:nil "(self class userPreferencesAspectList at:something)".
  3872         ifAbsent:nil "(self class userPreferencesAspectList at:something)".
  3891 
  3873 
  3892     "Modified: / 14-10-2010 / 19:16:38 / cg"
  3874     "Modified: / 14-10-2010 / 19:16:38 / cg"
  3893 ! !
  3875 ! !
  3894 
  3876 
  3895 
       
  3896 !AbstractFileBrowser methodsFor:'aspects-filter'!
  3877 !AbstractFileBrowser methodsFor:'aspects-filter'!
  3897 
  3878 
  3898 filter:aString
  3879 filter:aString
  3899     self filterModel value:aString
  3880     self filterModel value:aString
  3900 !
  3881 !
  4013 
  3994 
  4014 fileHistory
  3995 fileHistory
  4015     ^ self aspectFor:#fileHistory ifAbsent:[OrderedSet new]
  3996     ^ self aspectFor:#fileHistory ifAbsent:[OrderedSet new]
  4016 ! !
  3997 ! !
  4017 
  3998 
  4018 
       
  4019 !AbstractFileBrowser methodsFor:'aspects-visibility'!
  3999 !AbstractFileBrowser methodsFor:'aspects-visibility'!
  4020 
  4000 
  4021 activityVisibilityChannel
  4001 activityVisibilityChannel
  4022     " activityVisibilityChannel switches the activity indicator on/off"
  4002     " activityVisibilityChannel switches the activity indicator on/off"
  4023 
  4003 
  4242 viewType
  4222 viewType
  4243     " aspect for show suffix (type) information in DirectoryContentsBrowser"
  4223     " aspect for show suffix (type) information in DirectoryContentsBrowser"
  4244 
  4224 
  4245     ^ self directoryContentsBrowser viewType
  4225     ^ self directoryContentsBrowser viewType
  4246 ! !
  4226 ! !
  4247 
       
  4248 
  4227 
  4249 !AbstractFileBrowser methodsFor:'background processing'!
  4228 !AbstractFileBrowser methodsFor:'background processing'!
  4250 
  4229 
  4251 executeCommand:cmd
  4230 executeCommand:cmd
  4252 
  4231 
  4326     self backgroundProcesses add:process.
  4305     self backgroundProcesses add:process.
  4327     appl process value:process.
  4306     appl process value:process.
  4328     process resume.
  4307     process resume.
  4329 ! !
  4308 ! !
  4330 
  4309 
  4331 
       
  4332 !AbstractFileBrowser methodsFor:'change & update'!
  4310 !AbstractFileBrowser methodsFor:'change & update'!
  4333 
  4311 
  4334 currentFileNameHolderChanged
  4312 currentFileNameHolderChanged
  4335     "/ self currentFileNameHolderChangedForCommon
  4313     "/ self currentFileNameHolderChangedForCommon
  4336 !
  4314 !
  4454 
  4432 
  4455 updateListAfterDelete:colOfFiles
  4433 updateListAfterDelete:colOfFiles
  4456     self updateCurrentDirectory
  4434     self updateCurrentDirectory
  4457 ! !
  4435 ! !
  4458 
  4436 
  4459 
       
  4460 !AbstractFileBrowser methodsFor:'clipboard'!
  4437 !AbstractFileBrowser methodsFor:'clipboard'!
  4461 
  4438 
  4462 canPaste
  4439 canPaste
  4463 
  4440 
  4464     ^ self aspectFor:#canPaste ifAbsent:[ false asValue ].
  4441     ^ self aspectFor:#canPaste ifAbsent:[ false asValue ].
  4505     self notify:stream contents.
  4482     self notify:stream contents.
  4506     stream close.
  4483     stream close.
  4507     clp files:colOfFiles.
  4484     clp files:colOfFiles.
  4508     self canPaste value:true.
  4485     self canPaste value:true.
  4509 ! !
  4486 ! !
  4510 
       
  4511 
  4487 
  4512 !AbstractFileBrowser methodsFor:'drag & drop'!
  4488 !AbstractFileBrowser methodsFor:'drag & drop'!
  4513 
  4489 
  4514 canDropFiles:dropedObjects for:filename 
  4490 canDropFiles:dropedObjects for:filename 
  4515     |filenameDirString filenameDir|
  4491     |filenameDirString filenameDir|
  4637             wakeUp
  4613             wakeUp
  4638     ].
  4614     ].
  4639 
  4615 
  4640     "Created: / 13-10-2006 / 18:26:41 / cg"
  4616     "Created: / 13-10-2006 / 18:26:41 / cg"
  4641 ! !
  4617 ! !
  4642 
       
  4643 
  4618 
  4644 !AbstractFileBrowser methodsFor:'file operations'!
  4619 !AbstractFileBrowser methodsFor:'file operations'!
  4645 
  4620 
  4646 copyFile:aSourceFile to:aDestFile
  4621 copyFile:aSourceFile to:aDestFile
  4647     "copy to"
  4622     "copy to"
  5152     ].
  5127     ].
  5153 
  5128 
  5154     "Modified: / 04-12-2006 / 13:15:24 / cg"
  5129     "Modified: / 04-12-2006 / 13:15:24 / cg"
  5155 ! !
  5130 ! !
  5156 
  5131 
  5157 
       
  5158 !AbstractFileBrowser methodsFor:'menu accessing'!
  5132 !AbstractFileBrowser methodsFor:'menu accessing'!
  5159 
  5133 
  5160 bookmarksMenu
  5134 bookmarksMenu
  5161     <resource: #programMenu>
  5135     <resource: #programMenu>
  5162 
  5136 
  5386     menu findGuiResourcesIn:self.
  5360     menu findGuiResourcesIn:self.
  5387     ^ menu
  5361     ^ menu
  5388 
  5362 
  5389     "Modified: / 09-09-2012 / 13:07:45 / cg"
  5363     "Modified: / 09-09-2012 / 13:07:45 / cg"
  5390 ! !
  5364 ! !
  5391 
       
  5392 
  5365 
  5393 !AbstractFileBrowser methodsFor:'menu actions'!
  5366 !AbstractFileBrowser methodsFor:'menu actions'!
  5394 
  5367 
  5395 doCompareTwoFiles
  5368 doCompareTwoFiles
  5396     self openDiffView.
  5369     self openDiffView.
  5478     ^ Filename tempDirectory.
  5451     ^ Filename tempDirectory.
  5479 
  5452 
  5480     "Created: / 29-12-2010 / 11:03:00 / cg"
  5453     "Created: / 29-12-2010 / 11:03:00 / cg"
  5481 ! !
  5454 ! !
  5482 
  5455 
  5483 
       
  5484 !AbstractFileBrowser methodsFor:'menu actions-file'!
  5456 !AbstractFileBrowser methodsFor:'menu actions-file'!
  5485 
  5457 
  5486 copyFiles
  5458 copyFiles
  5487     self 
  5459     self 
  5488         withSelectedFilesOrDirectoriesDo:[:filesOrDirs | self copyFilesToClipBoard:filesOrDirs]
  5460         withSelectedFilesOrDirectoriesDo:[:filesOrDirs | self copyFilesToClipBoard:filesOrDirs]
  5525             aBlock value:dirs.        
  5497             aBlock value:dirs.        
  5526         ].
  5498         ].
  5527     ].
  5499     ].
  5528 ! !
  5500 ! !
  5529 
  5501 
  5530 
       
  5531 !AbstractFileBrowser methodsFor:'menu actions-help'!
  5502 !AbstractFileBrowser methodsFor:'menu actions-help'!
  5532 
  5503 
  5533 openAboutThisApplication
  5504 openAboutThisApplication
  5534     "opens an about box for this application."
  5505     "opens an about box for this application."
  5535 
  5506 
  5537 !
  5508 !
  5538 
  5509 
  5539 openHTMLDocument:relativeDocPath
  5510 openHTMLDocument:relativeDocPath
  5540     HTMLDocumentView openFullOnDocumentationFile:relativeDocPath
  5511     HTMLDocumentView openFullOnDocumentationFile:relativeDocPath
  5541 ! !
  5512 ! !
  5542 
       
  5543 
  5513 
  5544 !AbstractFileBrowser methodsFor:'menu actions-scm-cvs'!
  5514 !AbstractFileBrowser methodsFor:'menu actions-scm-cvs'!
  5545 
  5515 
  5546 cvsAddAndCommit
  5516 cvsAddAndCommit
  5547     self cvsAddAndCommitAsBinary:false
  5517     self cvsAddAndCommitAsBinary:false
  8115     self notify:nil.
  8085     self notify:nil.
  8116 
  8086 
  8117     "Modified: / 04-12-2006 / 13:15:28 / cg"
  8087     "Modified: / 04-12-2006 / 13:15:28 / cg"
  8118 ! !
  8088 ! !
  8119 
  8089 
  8120 
       
  8121 !AbstractFileBrowser methodsFor:'menu queries-cvs'!
  8090 !AbstractFileBrowser methodsFor:'menu queries-cvs'!
  8122 
  8091 
  8123 canCvsAddAndCommit
  8092 canCvsAddAndCommit
  8124 
  8093 
  8125     |selectedFiles|
  8094     |selectedFiles|
  8136             dirOfFile := self getDirWithoutFileName:fileName.
  8105             dirOfFile := self getDirWithoutFileName:fileName.
  8137             cvsDir := dirOfFile construct:'CVS'.
  8106             cvsDir := dirOfFile construct:'CVS'.
  8138             cvsDir isDirectory
  8107             cvsDir isDirectory
  8139         ].
  8108         ].
  8140 ! !
  8109 ! !
  8141 
       
  8142 
  8110 
  8143 !AbstractFileBrowser methodsFor:'menu queries-tools'!
  8111 !AbstractFileBrowser methodsFor:'menu queries-tools'!
  8144 
  8112 
  8145 anySTFilesOrDirectoriesPresent
  8113 anySTFilesOrDirectoriesPresent
  8146     ^ self anyDirectoriesOrFilesPresentWithSuffix:'st'
  8114     ^ self anyDirectoriesOrFilesPresentWithSuffix:'st'
  8328 
  8296 
  8329     ^ false
  8297     ^ false
  8330 ! !
  8298 ! !
  8331 
  8299 
  8332 
  8300 
       
  8301 
       
  8302 
  8333 !AbstractFileBrowser methodsFor:'presentation'!
  8303 !AbstractFileBrowser methodsFor:'presentation'!
  8334 
  8304 
  8335 getModeString:modeBits
  8305 getModeString:modeBits
  8336     "convert file-mode bits into a more user-friendly string.
  8306     "convert file-mode bits into a more user-friendly string.
  8337      This is wrong here - should be moved into OperatingSystem."
  8307      This is wrong here - should be moved into OperatingSystem."
  8367         ]
  8337         ]
  8368     ].
  8338     ].
  8369     ^ modeString
  8339     ^ modeString
  8370 ! !
  8340 ! !
  8371 
  8341 
  8372 
       
  8373 !AbstractFileBrowser methodsFor:'private'!
  8342 !AbstractFileBrowser methodsFor:'private'!
  8374 
  8343 
  8375 theSingleSelectedDirectoryOrHomeDir
  8344 theSingleSelectedDirectoryOrHomeDir
  8376     |dir|
  8345     |dir|
  8377 
  8346 
  8385 
  8354 
  8386     dirs := self currentSelectedDirectories.
  8355     dirs := self currentSelectedDirectories.
  8387     dirs size ~= 1 ifTrue:[ ^ nil].
  8356     dirs size ~= 1 ifTrue:[ ^ nil].
  8388     ^ dirs anElement.
  8357     ^ dirs anElement.
  8389 ! !
  8358 ! !
  8390 
       
  8391 
  8359 
  8392 !AbstractFileBrowser methodsFor:'queries'!
  8360 !AbstractFileBrowser methodsFor:'queries'!
  8393 
  8361 
  8394 cBrowserLoaded
  8362 cBrowserLoaded
  8395     ^ CBrowser::Browser notNil
  8363     ^ CBrowser::Browser notNil
  8533 !
  8501 !
  8534 
  8502 
  8535 systemIsUnix
  8503 systemIsUnix
  8536     ^ OperatingSystem isUNIXlike
  8504     ^ OperatingSystem isUNIXlike
  8537 ! !
  8505 ! !
  8538 
       
  8539 
  8506 
  8540 !AbstractFileBrowser methodsFor:'queries-file'!
  8507 !AbstractFileBrowser methodsFor:'queries-file'!
  8541 
  8508 
  8542 allItemsOfCurrentDirectory
  8509 allItemsOfCurrentDirectory
  8543     self 
  8510     self 
  8718 
  8685 
  8719 recursiveAnySTFilesPresent
  8686 recursiveAnySTFilesPresent
  8720     ^ self recursiveAnyFilesPresentWithSuffix:'st'
  8687     ^ self recursiveAnyFilesPresentWithSuffix:'st'
  8721 ! !
  8688 ! !
  8722 
  8689 
  8723 
       
  8724 !AbstractFileBrowser methodsFor:'selection'!
  8690 !AbstractFileBrowser methodsFor:'selection'!
  8725 
  8691 
  8726 currentSelectedDirectories
  8692 currentSelectedDirectories
  8727     ^ self currentDirectoriesValue.
  8693     ^ self currentDirectoriesValue.
  8728 !
  8694 !
  8771     ^ self currentSelectedObjects size == 2 
  8737     ^ self currentSelectedObjects size == 2 
  8772         and:[self hasOnlyFilesSelected]
  8738         and:[self hasOnlyFilesSelected]
  8773 
  8739 
  8774     "Modified: / 04-12-2006 / 13:15:04 / cg"
  8740     "Modified: / 04-12-2006 / 13:15:04 / cg"
  8775 ! !
  8741 ! !
  8776 
       
  8777 
  8742 
  8778 !AbstractFileBrowser methodsFor:'sorting'!
  8743 !AbstractFileBrowser methodsFor:'sorting'!
  8779 
  8744 
  8780 currentSortOrder
  8745 currentSortOrder
  8781     ^ self aspectFor:#currentSortOrder ifAbsent:[ Dictionary new asValue ].
  8746     ^ self aspectFor:#currentSortOrder ifAbsent:[ Dictionary new asValue ].
  8855     self sortBlockHolder value:sorter.
  8820     self sortBlockHolder value:sorter.
  8856 
  8821 
  8857     "Modified: / 18-09-2007 / 09:42:47 / cg"
  8822     "Modified: / 18-09-2007 / 09:42:47 / cg"
  8858 ! !
  8823 ! !
  8859 
  8824 
  8860 
       
  8861 !AbstractFileBrowser methodsFor:'startup & release'!
  8825 !AbstractFileBrowser methodsFor:'startup & release'!
  8862 
  8826 
  8863 makeDependent
  8827 makeDependent
  8864     self filterModel addDependent:self.            
  8828     self filterModel addDependent:self.            
  8865     self currentFileNameHolder addDependent:self.
  8829     self currentFileNameHolder addDependent:self.
  8897     self windowGroup showWaitCursorWhenBusyForMillis:100.
  8861     self windowGroup showWaitCursorWhenBusyForMillis:100.
  8898 
  8862 
  8899     "Modified: / 25-07-2006 / 09:12:45 / cg"
  8863     "Modified: / 25-07-2006 / 09:12:45 / cg"
  8900 ! !
  8864 ! !
  8901 
  8865 
  8902 
       
  8903 !AbstractFileBrowser::Clipboard methodsFor:'accessing'!
  8866 !AbstractFileBrowser::Clipboard methodsFor:'accessing'!
  8904 
  8867 
  8905 files
  8868 files
  8906     "return the value of the instance variable 'files' (automatically generated)"
  8869     "return the value of the instance variable 'files' (automatically generated)"
  8907 
  8870 
  8924     "set the value of the instance variable 'method' (automatically generated)"
  8887     "set the value of the instance variable 'method' (automatically generated)"
  8925 
  8888 
  8926     method := something.
  8889     method := something.
  8927 ! !
  8890 ! !
  8928 
  8891 
  8929 
       
  8930 !AbstractFileBrowser::CodeExecutionLock methodsFor:'accessing'!
  8892 !AbstractFileBrowser::CodeExecutionLock methodsFor:'accessing'!
  8931 
  8893 
  8932 locked
  8894 locked
  8933     "return the value of the instance variable 'locked' (automatically generated)"
  8895     "return the value of the instance variable 'locked' (automatically generated)"
  8934 
  8896 
  8935     locked isNil ifTrue:[
  8897     locked isNil ifTrue:[
  8936         locked := false.
  8898         locked := false.
  8937     ].
  8899     ].
  8938     ^ locked
  8900     ^ locked
  8939 ! !
  8901 ! !
  8940 
       
  8941 
  8902 
  8942 !AbstractFileBrowser::CodeExecutionLock methodsFor:'actions'!
  8903 !AbstractFileBrowser::CodeExecutionLock methodsFor:'actions'!
  8943 
  8904 
  8944 doIfUnLocked:aBlock
  8905 doIfUnLocked:aBlock
  8945 
  8906 
  8954     aBlock ensure:[
  8915     aBlock ensure:[
  8955         locked := false.
  8916         locked := false.
  8956     ]
  8917     ]
  8957 ! !
  8918 ! !
  8958 
  8919 
  8959 
       
  8960 !AbstractFileBrowser::DirectoryHistory class methodsFor:'defaults'!
  8920 !AbstractFileBrowser::DirectoryHistory class methodsFor:'defaults'!
  8961 
  8921 
  8962 defaultHistorySize
  8922 defaultHistorySize
  8963     ^ 50
  8923     ^ 50
  8964 ! !
  8924 ! !
  8965 
  8925 
  8966 
       
  8967 !AbstractFileBrowser::DirectoryHistory class methodsFor:'instance creation'!
  8926 !AbstractFileBrowser::DirectoryHistory class methodsFor:'instance creation'!
  8968 
  8927 
  8969 new
  8928 new
  8970     ^ (super new) initializeHistory.
  8929     ^ (super new) initializeHistory.
  8971 ! !
  8930 ! !
  8972 
  8931 
  8973 
       
  8974 !AbstractFileBrowser::DirectoryHistory methodsFor:'accessing'!
  8932 !AbstractFileBrowser::DirectoryHistory methodsFor:'accessing'!
  8975 
  8933 
  8976 historySize
  8934 historySize
  8977     historySize isNil ifTrue:[^ self class defaultHistorySize].
  8935     historySize isNil ifTrue:[^ self class defaultHistorySize].
  8978     ^ historySize
  8936     ^ historySize
  8979 !
  8937 !
  8980 
  8938 
  8981 historySize:aNumber
  8939 historySize:aNumber
  8982     historySize := aNumber
  8940     historySize := aNumber
  8983 ! !
  8941 ! !
  8984 
       
  8985 
  8942 
  8986 !AbstractFileBrowser::DirectoryHistory methodsFor:'actions'!
  8943 !AbstractFileBrowser::DirectoryHistory methodsFor:'actions'!
  8987 
  8944 
  8988 addToHistory:aPath
  8945 addToHistory:aPath
  8989     | item pathToAdd |
  8946     | item pathToAdd |
  9074             item position:aPosition.
  9031             item position:aPosition.
  9075         ]
  9032         ]
  9076     ].
  9033     ].
  9077 ! !
  9034 ! !
  9078 
  9035 
  9079 
       
  9080 !AbstractFileBrowser::DirectoryHistory methodsFor:'initialization'!
  9036 !AbstractFileBrowser::DirectoryHistory methodsFor:'initialization'!
  9081 
  9037 
  9082 initializeHistory
  9038 initializeHistory
  9083 
  9039 
  9084     backForwardList := OrderedCollection new.
  9040     backForwardList := OrderedCollection new.
  9085     self reverseDo:[:el|
  9041     self reverseDo:[:el|
  9086         backForwardList add:el path.
  9042         backForwardList add:el path.
  9087     ].
  9043     ].
  9088     backForwardIndex := backForwardList size.
  9044     backForwardIndex := backForwardList size.
  9089 ! !
  9045 ! !
  9090 
       
  9091 
  9046 
  9092 !AbstractFileBrowser::DirectoryHistory methodsFor:'queries'!
  9047 !AbstractFileBrowser::DirectoryHistory methodsFor:'queries'!
  9093 
  9048 
  9094 canBackward
  9049 canBackward
  9095 
  9050 
  9172         retPath := backForwardList at:backForwardIndex + 1.
  9127         retPath := backForwardList at:backForwardIndex + 1.
  9173     ].
  9128     ].
  9174     ^ retPath.
  9129     ^ retPath.
  9175 ! !
  9130 ! !
  9176 
  9131 
  9177 
       
  9178 !AbstractFileBrowser::DirectoryHistory::DirectoryHistoryItem class methodsFor:'instance creation'!
  9132 !AbstractFileBrowser::DirectoryHistory::DirectoryHistoryItem class methodsFor:'instance creation'!
  9179 
  9133 
  9180 path:aPath
  9134 path:aPath
  9181 
  9135 
  9182     ^ self new path:aPath
  9136     ^ self new path:aPath
  9183 ! !
  9137 ! !
  9184 
  9138 
  9185 
       
  9186 !AbstractFileBrowser::DirectoryHistory::DirectoryHistoryItem methodsFor:'accessing'!
  9139 !AbstractFileBrowser::DirectoryHistory::DirectoryHistoryItem methodsFor:'accessing'!
  9187 
  9140 
  9188 asFilename
  9141 asFilename
  9189     ^ path asFilename
  9142     ^ path asFilename
  9190 !
  9143 !
  9215 
  9168 
  9216 printString
  9169 printString
  9217 
  9170 
  9218     ^ self path asString
  9171     ^ self path asString
  9219 ! !
  9172 ! !
  9220 
       
  9221 
  9173 
  9222 !AbstractFileBrowser::SaveAspectItem class methodsFor:'instance creation'!
  9174 !AbstractFileBrowser::SaveAspectItem class methodsFor:'instance creation'!
  9223 
  9175 
  9224 withValue:aValue isHolder:aBoolean
  9176 withValue:aValue isHolder:aBoolean
  9225 
  9177 
  9229     instance value:aValue.
  9181     instance value:aValue.
  9230     instance isHolder:aBoolean.
  9182     instance isHolder:aBoolean.
  9231     ^ instance
  9183     ^ instance
  9232 ! !
  9184 ! !
  9233 
  9185 
  9234 
       
  9235 !AbstractFileBrowser::SaveAspectItem methodsFor:'accessing'!
  9186 !AbstractFileBrowser::SaveAspectItem methodsFor:'accessing'!
  9236 
  9187 
  9237 isHolder
  9188 isHolder
  9238     "return the value of the instance variable 'isHolder' (automatically generated)"
  9189     "return the value of the instance variable 'isHolder' (automatically generated)"
  9239 
  9190 
  9256     "set the value of the instance variable 'value' (automatically generated)"
  9207     "set the value of the instance variable 'value' (automatically generated)"
  9257 
  9208 
  9258     value := something.
  9209     value := something.
  9259 ! !
  9210 ! !
  9260 
  9211 
  9261 
       
  9262 !AbstractFileBrowser class methodsFor:'documentation'!
  9212 !AbstractFileBrowser class methodsFor:'documentation'!
  9263 
  9213 
  9264 version
  9214 version
  9265     ^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.507 2013-01-15 14:07:08 stefan Exp $'
  9215     ^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.507 2013-01-15 14:07:08 stefan Exp $'
  9266 !
  9216 !
  9267 
  9217 
  9268 version_CVS
  9218 version_CVS
  9269     ^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.507 2013-01-15 14:07:08 stefan Exp $'
  9219     ^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.507 2013-01-15 14:07:08 stefan Exp $'
       
  9220 !
       
  9221 
       
  9222 version_HG
       
  9223 
       
  9224     ^ '$Changeset: <not expanded> $'
  9270 !
  9225 !
  9271 
  9226 
  9272 version_SVN
  9227 version_SVN
  9273     ^ '$Id: AbstractFileBrowser.st 8084 2013-01-14 12:06:02Z vranyj1 $'
  9228     ^ '$Id: AbstractFileBrowser.st 8084 2013-01-14 12:06:02Z vranyj1 $'
  9274 ! !
  9229 ! !