AbstractFileBrowser.st
author Claus Gittinger <cg@exept.de>
Sun, 08 Sep 2019 16:21:27 +0200
changeset 19134 6ac3cadf623d
parent 19031 346bc1b61c0a
child 19152 be7202db2c28
permissions -rw-r--r--
#TUNING by exept class: AbstractFileBrowser changed: #hgClone (send #== instead of #=) #hgInit (send #== instead of #=)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5140
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
     1
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
     2
 COPYRIGHT (c) 2002 by eXept Software AG
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
     3
              All Rights Reserved
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
     4
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
     5
 This software is furnished under a license and may be used
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
     6
 only in accordance with the terms of that license and with the
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
     8
 be provided or otherwise made available to, or used by, any
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
     9
 other person.  No title to or ownership of the software is
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
    10
 hereby transferred.
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
    11
"
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
    12
"{ Package: 'stx:libtool' }"
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
    13
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
    14
"{ NameSpace: Smalltalk }"
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
    15
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
    16
ApplicationModel subclass:#AbstractFileBrowser
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
    17
	instanceVariableNames:'aspects'
16720
f83da83ca7c3 #OTHER by stefan
Stefan Vogel <sv@exept.de>
parents: 16538
diff changeset
    18
	classVariableNames:'CommandHistory CommandHistorySize DefaultCommandPerSuffix
f83da83ca7c3 #OTHER by stefan
Stefan Vogel <sv@exept.de>
parents: 16538
diff changeset
    19
		DefaultFilters DirectoryBookmarks LastEnforcedNameSpace
f83da83ca7c3 #OTHER by stefan
Stefan Vogel <sv@exept.de>
parents: 16538
diff changeset
    20
		LastFileDiffDirectory LastFileDiffFile LastFileSelection
f83da83ca7c3 #OTHER by stefan
Stefan Vogel <sv@exept.de>
parents: 16538
diff changeset
    21
		LastMercurialRepository LastMoveDestination LastMustMatchPattern
18609
8e78a084139c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18578
diff changeset
    22
		LastScriptBlockString MaxFileSizeShownWithoutAsking RootHolder
8e78a084139c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18578
diff changeset
    23
		RuntimeAspects VisitedDirectories'
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
    24
	poolDictionaries:''
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
    25
	category:'Interface-Tools-File'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
    26
!
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    27
321c1729db5b initial checkin
penk
parents:
diff changeset
    28
AbstractFileBrowser class instanceVariableNames:'DisabledCursorImage EnabledCursorImage'
321c1729db5b initial checkin
penk
parents:
diff changeset
    29
321c1729db5b initial checkin
penk
parents:
diff changeset
    30
"
321c1729db5b initial checkin
penk
parents:
diff changeset
    31
 The following class instance variables are inherited by this class:
321c1729db5b initial checkin
penk
parents:
diff changeset
    32
14126
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    33
	ApplicationModel - ClassResources
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    34
	Model - 
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    35
	Object - 
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    36
"
321c1729db5b initial checkin
penk
parents:
diff changeset
    37
!
321c1729db5b initial checkin
penk
parents:
diff changeset
    38
321c1729db5b initial checkin
penk
parents:
diff changeset
    39
Object subclass:#Clipboard
14126
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    40
	instanceVariableNames:'method files'
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    41
	classVariableNames:''
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    42
	poolDictionaries:''
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    43
	privateIn:AbstractFileBrowser
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    44
!
321c1729db5b initial checkin
penk
parents:
diff changeset
    45
321c1729db5b initial checkin
penk
parents:
diff changeset
    46
Object subclass:#CodeExecutionLock
14126
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    47
	instanceVariableNames:'locked'
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    48
	classVariableNames:''
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    49
	poolDictionaries:''
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    50
	privateIn:AbstractFileBrowser
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    51
!
321c1729db5b initial checkin
penk
parents:
diff changeset
    52
4366
97a0311a9539 *** empty log message ***
penk
parents: 4358
diff changeset
    53
List subclass:#DirectoryHistory
14126
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    54
	instanceVariableNames:'forwardList backList lastWasForwardPath lastBackPath lastAddPath
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    55
		backForwardList backForwardIndex historySize'
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    56
	classVariableNames:'HistorySize'
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    57
	poolDictionaries:''
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    58
	privateIn:AbstractFileBrowser
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
    59
!
c04d4781a37e next stage
penk
parents: 3949
diff changeset
    60
c04d4781a37e next stage
penk
parents: 3949
diff changeset
    61
Object subclass:#DirectoryHistoryItem
14126
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    62
	instanceVariableNames:'path position'
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    63
	classVariableNames:''
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    64
	poolDictionaries:''
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    65
	privateIn:AbstractFileBrowser::DirectoryHistory
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    66
!
321c1729db5b initial checkin
penk
parents:
diff changeset
    67
321c1729db5b initial checkin
penk
parents:
diff changeset
    68
Object subclass:#SaveAspectItem
14126
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    69
	instanceVariableNames:'value isHolder'
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    70
	classVariableNames:''
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    71
	poolDictionaries:''
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
    72
	privateIn:AbstractFileBrowser
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    73
!
321c1729db5b initial checkin
penk
parents:
diff changeset
    74
5140
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
    75
!AbstractFileBrowser class methodsFor:'documentation'!
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
    76
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
    77
copyright
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
    78
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
    79
 COPYRIGHT (c) 2002 by eXept Software AG
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
    80
              All Rights Reserved
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
    81
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
    82
 This software is furnished under a license and may be used
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
    83
 only in accordance with the terms of that license and with the
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
    84
 inclusion of the above copyright notice.   This software may not
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
    85
 be provided or otherwise made available to, or used by, any
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
    86
 other person.  No title to or ownership of the software is
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
    87
 hereby transferred.
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
    88
"
5967
ff5e8356fcb7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5963
diff changeset
    89
!
ff5e8356fcb7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5963
diff changeset
    90
ff5e8356fcb7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5963
diff changeset
    91
documentation
ff5e8356fcb7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5963
diff changeset
    92
"
ff5e8356fcb7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5963
diff changeset
    93
    [Author:]
ff5e8356fcb7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5963
diff changeset
    94
        Christian Penk
9111
4566dd920e09 changes for better FileDialog
Claus Gittinger <cg@exept.de>
parents: 9108
diff changeset
    95
4566dd920e09 changes for better FileDialog
Claus Gittinger <cg@exept.de>
parents: 9108
diff changeset
    96
    Notice: this certainly needs a redesign - all those abstract-abstract classes which
4566dd920e09 changes for better FileDialog
Claus Gittinger <cg@exept.de>
parents: 9108
diff changeset
    97
    define stuff which is only needed in some parts makes this hard to understand.
4566dd920e09 changes for better FileDialog
Claus Gittinger <cg@exept.de>
parents: 9108
diff changeset
    98
    Especially the fact, that AbstractFileBrowser defines things both as abstract superclass
4566dd920e09 changes for better FileDialog
Claus Gittinger <cg@exept.de>
parents: 9108
diff changeset
    99
    and as a container is almost incomprehensable...
17768
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   100
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   101
    [class variables:]
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   102
        CommandHistory 
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   103
        CommandHistorySize 
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   104
        DefaultCommandPerSuffix
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   105
        DefaultFilters 
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   106
        DirectoryBookmarks 
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   107
        LastEnforcedNameSpace
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   108
        LastFileDiffDirectory 
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   109
        LastFileDiffFile 
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   110
        LastFileSelection
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   111
        LastMercurialRepository 
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   112
        LastMoveDestination 
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   113
        LastMustMatchPattern
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   114
        LastScriptBlockString 
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   115
        RootHolder 
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   116
        RuntimeAspects
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   117
        VisitedDirectories 
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   118
        MaxFileSizeShownWithoutAsking ..... for big files, I will ask if only the first part is
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   119
                                            to be shown. This number (if non-nil) suppresses this
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   120
                                            question for files smaller.
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   121
                                            The initial default is 1Mb (1024*1024)
5967
ff5e8356fcb7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5963
diff changeset
   122
"
5140
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5122
diff changeset
   123
! !
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   124
4672
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   125
!AbstractFileBrowser class methodsFor:'accessing'!
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
   126
4368
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
   127
currentSelection
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
   128
4800
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
   129
    LastFileSelection isNil ifTrue:[
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
   130
        LastFileSelection := #().
4368
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
   131
    ].
4800
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
   132
    ^ LastFileSelection
4368
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
   133
!
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
   134
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
   135
currentSelection:aFilenameCol
6589
fd0a284321cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6586
diff changeset
   136
    aFilenameCol notEmptyOrNil ifTrue:[
12102
9512a4336434 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 12094
diff changeset
   137
        LastFileSelection := aFilenameCol collect:[:file | (file ? '') asFilename]
6589
fd0a284321cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6586
diff changeset
   138
    ]
4368
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
   139
!
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
   140
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
   141
directoryHistory
c04d4781a37e next stage
penk
parents: 3949
diff changeset
   142
12062
0056d17cf012 conflict classVar vs. private class
Claus Gittinger <cg@exept.de>
parents: 11996
diff changeset
   143
    VisitedDirectories isNil ifTrue:[
0056d17cf012 conflict classVar vs. private class
Claus Gittinger <cg@exept.de>
parents: 11996
diff changeset
   144
        VisitedDirectories := self directoryHistoryClass new.
0056d17cf012 conflict classVar vs. private class
Claus Gittinger <cg@exept.de>
parents: 11996
diff changeset
   145
        "/ VisitedDirectories inspect.
0056d17cf012 conflict classVar vs. private class
Claus Gittinger <cg@exept.de>
parents: 11996
diff changeset
   146
    ].
0056d17cf012 conflict classVar vs. private class
Claus Gittinger <cg@exept.de>
parents: 11996
diff changeset
   147
    ^ VisitedDirectories
0056d17cf012 conflict classVar vs. private class
Claus Gittinger <cg@exept.de>
parents: 11996
diff changeset
   148
0056d17cf012 conflict classVar vs. private class
Claus Gittinger <cg@exept.de>
parents: 11996
diff changeset
   149
    "Modified: / 21-11-2012 / 08:45:49 / cg"
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
   150
!
c04d4781a37e next stage
penk
parents: 3949
diff changeset
   151
17768
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   152
maxFileSizeShownWithoutAsking
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   153
    "the max. filesize which is loaded without asking if only the first
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   154
     part should be shown"
18770
307cc2ff113f #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18751
diff changeset
   155
307cc2ff113f #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18751
diff changeset
   156
    MaxFileSizeShownWithoutAsking notNil ifTrue:[^ MaxFileSizeShownWithoutAsking]. 
307cc2ff113f #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18751
diff changeset
   157
    ExternalAddress pointerSize == 8 ifTrue:[
307cc2ff113f #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18751
diff changeset
   158
        ^ (32*1024*1024)
307cc2ff113f #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18751
diff changeset
   159
    ].
307cc2ff113f #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18751
diff changeset
   160
    ^ (4*1024*1024)
17768
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   161
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   162
    "Created: / 19-11-2017 / 14:48:19 / cg"
18770
307cc2ff113f #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18751
diff changeset
   163
    "Modified: / 22-05-2019 / 18:19:24 / Claus Gittinger"
17768
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   164
!
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   165
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   166
maxFileSizeShownWithoutAsking:anIntegerOrNilForDefault
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   167
    "the max. filesize which is loaded without asking if only the first
17769
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
   168
     part should be shown.
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
   169
     Nil resets to the default (currently 1Mb)"
17768
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   170
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   171
    MaxFileSizeShownWithoutAsking := anIntegerOrNilForDefault
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   172
17769
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
   173
    "
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
   174
     self maxFileSizeShownWithoutAsking:nil
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
   175
    "
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
   176
17768
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   177
    "Created: / 19-11-2017 / 14:48:45 / cg"
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   178
!
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
   179
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
   180
resetClassVars
12062
0056d17cf012 conflict classVar vs. private class
Claus Gittinger <cg@exept.de>
parents: 11996
diff changeset
   181
    VisitedDirectories := nil.
4800
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
   182
    LastFileSelection := nil.
5936
795ea70b2c64 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5898
diff changeset
   183
795ea70b2c64 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5898
diff changeset
   184
    "
795ea70b2c64 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5898
diff changeset
   185
     AbstractFileBrowser resetClassVars
795ea70b2c64 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5898
diff changeset
   186
    "
12062
0056d17cf012 conflict classVar vs. private class
Claus Gittinger <cg@exept.de>
parents: 11996
diff changeset
   187
0056d17cf012 conflict classVar vs. private class
Claus Gittinger <cg@exept.de>
parents: 11996
diff changeset
   188
    "Modified: / 21-11-2012 / 08:45:53 / cg"
4368
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
   189
!
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
   190
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
   191
rootHolder
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
   192
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
   193
    ^ RootHolder
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
   194
!
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
   195
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
   196
rootHolder:aRoot
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
   197
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
   198
    RootHolder := aRoot
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
   199
! !
c04d4781a37e next stage
penk
parents: 3949
diff changeset
   200
4915
be97c8dbd840 category
Claus Gittinger <cg@exept.de>
parents: 4891
diff changeset
   201
!AbstractFileBrowser class methodsFor:'accessing-bookmarks'!
4672
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   202
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   203
addBookmark:aDirectoryPath
6114
36fb19194510 Rename Base64Coder>>#decodingOf: to #decode:
Stefan Vogel <sv@exept.de>
parents: 6113
diff changeset
   204
    "add aDirectoryPath to the list of our known bookmarks.
36fb19194510 Rename Base64Coder>>#decodingOf: to #decode:
Stefan Vogel <sv@exept.de>
parents: 6113
diff changeset
   205
     Do not add duplicates."
36fb19194510 Rename Base64Coder>>#decodingOf: to #decode:
Stefan Vogel <sv@exept.de>
parents: 6113
diff changeset
   206
36fb19194510 Rename Base64Coder>>#decodingOf: to #decode:
Stefan Vogel <sv@exept.de>
parents: 6113
diff changeset
   207
    |bookmarks|
4672
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   208
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   209
    bookmarks := self directoryBookmarks.
6114
36fb19194510 Rename Base64Coder>>#decodingOf: to #decode:
Stefan Vogel <sv@exept.de>
parents: 6113
diff changeset
   210
    (bookmarks includes:aDirectoryPath) ifFalse:[
36fb19194510 Rename Base64Coder>>#decodingOf: to #decode:
Stefan Vogel <sv@exept.de>
parents: 6113
diff changeset
   211
        bookmarks add:aDirectoryPath asFilename.
4672
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   212
    ].
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   213
!
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   214
8013
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   215
bookmarksFrom:aFileNameOrString
12390
70b71b28a20f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12102
diff changeset
   216
    |bookmarks s fileName line|
8013
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   217
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   218
    fileName := aFileNameOrString asFilename.
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   219
    [
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   220
        s := fileName readStream.
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   221
    ] on:OpenError do:[:ex|
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   222
        ^ nil.
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   223
    ].
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   224
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   225
    bookmarks := OrderedCollection new.
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   226
    [s atEnd] whileFalse:[
12390
70b71b28a20f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12102
diff changeset
   227
        line := s nextLine.
70b71b28a20f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12102
diff changeset
   228
        (line startsWith:';') ifFalse:[
70b71b28a20f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12102
diff changeset
   229
            bookmarks add:(Base64Coder decode:line) asString.
70b71b28a20f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12102
diff changeset
   230
        ]
8013
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   231
    ].
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   232
    s close.
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   233
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   234
    ^ bookmarks
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   235
!
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   236
4679
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   237
defaultBookMarksFileDirectory
12390
70b71b28a20f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12102
diff changeset
   238
    "the directory, where the default bookmarks are stored (as defaultBookMarksFilename)"
70b71b28a20f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12102
diff changeset
   239
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
   240
    ^ Filename homeDirectory
4679
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   241
!
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   242
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   243
defaultBookMarksFilename
12390
70b71b28a20f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12102
diff changeset
   244
    "the filename, in which the default bookmarks are stored (in defaultBookMarksDirectory)"
70b71b28a20f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12102
diff changeset
   245
4679
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   246
    ^ '.fileBrowserBookmarks'
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   247
!
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   248
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   249
directoryBookmarks
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   250
    DirectoryBookmarks isNil ifTrue:[                     
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
   251
        self loadBookmarksFrom:(self defaultBookMarksFileDirectory construct:self defaultBookMarksFilename).
4679
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   252
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   253
        DirectoryBookmarks isEmptyOrNil ifTrue:[
17979
0854fb9b7e58 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17946
diff changeset
   254
            DirectoryBookmarks := 
0854fb9b7e58 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17946
diff changeset
   255
                OrderedCollection 
0854fb9b7e58 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17946
diff changeset
   256
                    with:(Filename homeDirectory asAbsoluteFilename)
0854fb9b7e58 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17946
diff changeset
   257
                    with:(Filename currentDirectory asAbsoluteFilename).
4679
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   258
        ]
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   259
    ].
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   260
    ^ DirectoryBookmarks
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   261
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   262
    "
5438
fa19d526d85d directoryBookmarks must be stored without lineLimit (see base64 encoder)
Claus Gittinger <cg@exept.de>
parents: 5437
diff changeset
   263
     DirectoryBookmarks := nil.
fa19d526d85d directoryBookmarks must be stored without lineLimit (see base64 encoder)
Claus Gittinger <cg@exept.de>
parents: 5437
diff changeset
   264
     self directoryBookmarks.
4679
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   265
    "
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   266
!
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   267
8013
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   268
directoryBookmarks: collectionOfFilenames
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   269
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   270
    DirectoryBookmarks := collectionOfFilenames.
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   271
    self saveBookmarksInDefaultBookmarksFile.
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   272
!
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   273
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   274
editBookmarksWithDefault: aFilenameOrNil
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   275
    | oldBookmarks newBookmarks |
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   276
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   277
    oldBookmarks := self directoryBookmarks copy.
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   278
    newBookmarks := BookmarksEditDialog openWith: oldBookmarks defaultBookmark: aFilenameOrNil.
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   279
    newBookmarks isNil ifTrue:[^ self].
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   280
    self directoryBookmarks: newBookmarks.
9681
00195b8c6cf6 comment/format in: #editBookmarksWithDefault:
Claus Gittinger <cg@exept.de>
parents: 9677
diff changeset
   281
00195b8c6cf6 comment/format in: #editBookmarksWithDefault:
Claus Gittinger <cg@exept.de>
parents: 9677
diff changeset
   282
    "Modified: / 13-01-2011 / 12:52:28 / cg"
8013
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   283
!
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   284
4672
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   285
hasBookmarks
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
   286
    ^ self directoryBookmarks notEmptyOrNil
4672
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   287
!
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   288
4679
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   289
loadBookmarksFrom:aFileNameOrString
8013
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   290
    |bookmarks|
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   291
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   292
    bookmarks := self bookmarksFrom: aFileNameOrString.
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   293
    bookmarks isNil ifTrue:[^ self].
4679
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   294
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   295
    DirectoryBookmarks := OrderedCollection new.
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   296
    bookmarks do:[:eachPath |
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   297
        self addBookmark:eachPath asFilename
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   298
    ].
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   299
!
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   300
4672
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   301
removeBookmark:aDirectoryPath
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   302
    |bookmarks|
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   303
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   304
    bookmarks := self directoryBookmarks.
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   305
    bookmarks isEmptyOrNil ifTrue:[ ^ self].
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   306
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   307
    bookmarks remove:aDirectoryPath ifAbsent:[].
4679
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   308
!
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   309
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   310
saveBookmarks
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   311
    |fn|
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   312
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   313
    fn := Dialog 
18747
138797ada819 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18746
diff changeset
   314
            requestFileNameForSave:(self resources string:'Save Bookmarks')
4679
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   315
            default:(self defaultBookMarksFilename)
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   316
            fromDirectory:(self defaultBookMarksFileDirectory).
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   317
    fn isEmptyOrNil ifTrue:[^ self].
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   318
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   319
    self saveBookmarksIn:fn
9607
63f0d2689895 changed: #saveBookmarks
Claus Gittinger <cg@exept.de>
parents: 9599
diff changeset
   320
63f0d2689895 changed: #saveBookmarks
Claus Gittinger <cg@exept.de>
parents: 9599
diff changeset
   321
    "Modified: / 27-10-2010 / 11:27:09 / cg"
18747
138797ada819 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18746
diff changeset
   322
    "Modified: / 01-05-2019 / 11:45:37 / Claus Gittinger"
4679
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   323
!
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   324
8013
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   325
saveBookmarks: bookmarks in:aFileNameOrString
6114
36fb19194510 Rename Base64Coder>>#decodingOf: to #decode:
Stefan Vogel <sv@exept.de>
parents: 6113
diff changeset
   326
    "save the bokmarks in aFileNameOrString.
36fb19194510 Rename Base64Coder>>#decodingOf: to #decode:
Stefan Vogel <sv@exept.de>
parents: 6113
diff changeset
   327
     Use Base64 coding"
36fb19194510 Rename Base64Coder>>#decodingOf: to #decode:
Stefan Vogel <sv@exept.de>
parents: 6113
diff changeset
   328
13683
e31bd21c4760 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 13677
diff changeset
   329
    |bookmarkStream fileName coder|
4679
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   330
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   331
    fileName := aFileNameOrString asFilename.
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   332
    fileName exists ifTrue:[
13683
e31bd21c4760 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 13677
diff changeset
   333
        fileName renameTo:(fileName addSuffix:'sav').
4679
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   334
    ].
6114
36fb19194510 Rename Base64Coder>>#decodingOf: to #decode:
Stefan Vogel <sv@exept.de>
parents: 6113
diff changeset
   335
    bookmarkStream := fileName writeStream.
36fb19194510 Rename Base64Coder>>#decodingOf: to #decode:
Stefan Vogel <sv@exept.de>
parents: 6113
diff changeset
   336
36fb19194510 Rename Base64Coder>>#decodingOf: to #decode:
Stefan Vogel <sv@exept.de>
parents: 6113
diff changeset
   337
    "save each bookmark in one line"
36fb19194510 Rename Base64Coder>>#decodingOf: to #decode:
Stefan Vogel <sv@exept.de>
parents: 6113
diff changeset
   338
    coder := (Base64Coder on:bookmarkStream) lineLimit:nil.
4679
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
   339
    bookmarks do:[:eachPath |
6114
36fb19194510 Rename Base64Coder>>#decodingOf: to #decode:
Stefan Vogel <sv@exept.de>
parents: 6113
diff changeset
   340
        eachPath asFilename pathName acceptVisitor:coder.
36fb19194510 Rename Base64Coder>>#decodingOf: to #decode:
Stefan Vogel <sv@exept.de>
parents: 6113
diff changeset
   341
        coder flush.
36fb19194510 Rename Base64Coder>>#decodingOf: to #decode:
Stefan Vogel <sv@exept.de>
parents: 6113
diff changeset
   342
        bookmarkStream cr.
36fb19194510 Rename Base64Coder>>#decodingOf: to #decode:
Stefan Vogel <sv@exept.de>
parents: 6113
diff changeset
   343
    ].
12391
87ca5c4d1270 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 12390
diff changeset
   344
    bookmarkStream syncData; close.
5960
aa171aa05bab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5959
diff changeset
   345
!
aa171aa05bab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5959
diff changeset
   346
8013
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   347
saveBookmarksIn:aFileNameOrString
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   348
    "save the bokmarks in aFileNameOrString.
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   349
     Use Base64 coding"
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   350
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   351
    | bookmarks |
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   352
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   353
    bookmarks := self directoryBookmarks.
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   354
    self saveBookmarks: bookmarks in:aFileNameOrString
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   355
!
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
   356
5960
aa171aa05bab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5959
diff changeset
   357
saveBookmarksInDefaultBookmarksFile
aa171aa05bab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5959
diff changeset
   358
    self saveBookmarksIn:(self defaultBookMarksFileDirectory construct:self defaultBookMarksFilename)
4672
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   359
! !
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   360
4915
be97c8dbd840 category
Claus Gittinger <cg@exept.de>
parents: 4891
diff changeset
   361
!AbstractFileBrowser class methodsFor:'accessing-classes'!
4672
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   362
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   363
directoryHistoryClass
12062
0056d17cf012 conflict classVar vs. private class
Claus Gittinger <cg@exept.de>
parents: 11996
diff changeset
   364
    ^ DirectoryHistory
0056d17cf012 conflict classVar vs. private class
Claus Gittinger <cg@exept.de>
parents: 11996
diff changeset
   365
0056d17cf012 conflict classVar vs. private class
Claus Gittinger <cg@exept.de>
parents: 11996
diff changeset
   366
    "Modified: / 21-11-2012 / 08:46:34 / cg"
4672
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   367
! !
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
   368
18820
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   369
!AbstractFileBrowser class methodsFor:'aspects-visibility'!
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   370
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   371
cvsMenusAreShown
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   372
    ^ ConfigurableFeatures includesFeature: #CVSSupportEnabled
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   373
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   374
    "Created: / 15-01-2012 / 13:00:05 / cg"
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   375
    "Modified: / 19-01-2012 / 10:43:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   376
!
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   377
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   378
gitMenusAreShown
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   379
     ^ (ConfigurableFeatures includesFeature: #GITSupportEnabled)
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   380
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   381
    "Created: / 10-06-2019 / 15:56:33 / Claus Gittinger"
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   382
!
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   383
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   384
hgMenusAreShown
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   385
     ^ (ConfigurableFeatures includesFeature: #HGSupportEnabled)
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   386
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   387
    "Created: / 14-01-2013 / 11:53:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   388
!
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   389
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   390
mercurialMenusAreShown
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   391
    ^ ConfigurableFeatures hasMercurialSupportEnabled
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   392
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   393
    "Created: / 15-01-2012 / 13:00:00 / cg"
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   394
!
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   395
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   396
perforceMenusAreShown
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   397
    ^ (ConfigurableFeatures includesFeature: #PerforceSupportEnabled)
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   398
    and:[ ConfigurableFeatures hasPerforceSupportEnabled ]
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   399
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   400
    "Created: / 15-01-2012 / 13:12:11 / cg"
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   401
    "Modified: / 19-01-2012 / 10:43:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   402
    "Modified: / 02-11-2012 / 11:19:59 / cg"
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   403
!
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   404
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   405
svnMenusAreShown
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   406
    ^ ConfigurableFeatures includesFeature: #SubversionSupportEnabled
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   407
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   408
    "Created: / 15-01-2012 / 13:02:03 / cg"
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   409
    "Modified: / 19-01-2012 / 10:43:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   410
! !
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
   411
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   412
!AbstractFileBrowser class methodsFor:'defaults'!
321c1729db5b initial checkin
penk
parents:
diff changeset
   413
321c1729db5b initial checkin
penk
parents:
diff changeset
   414
commandHistory
321c1729db5b initial checkin
penk
parents:
diff changeset
   415
321c1729db5b initial checkin
penk
parents:
diff changeset
   416
    CommandHistory isNil ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
   417
        CommandHistory := OrderedCollection new.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   418
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
   419
    ^ CommandHistory
321c1729db5b initial checkin
penk
parents:
diff changeset
   420
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   421
321c1729db5b initial checkin
penk
parents:
diff changeset
   422
commandHistorySize
4190
4b0ea23f558e *** empty log message ***
penk
parents: 4189
diff changeset
   423
    "max no of entries in the HistoryList "
6369
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
   424
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   425
    CommandHistorySize isNil ifTrue:[
6369
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
   426
        CommandHistorySize := 150
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   427
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
   428
    ^ CommandHistorySize
321c1729db5b initial checkin
penk
parents:
diff changeset
   429
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   430
321c1729db5b initial checkin
penk
parents:
diff changeset
   431
defaultFilterList
321c1729db5b initial checkin
penk
parents:
diff changeset
   432
321c1729db5b initial checkin
penk
parents:
diff changeset
   433
    DefaultFilters isNil ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
   434
        DefaultFilters := #(        '*'
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
   435
                                    '*.st' 
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
   436
                                    '*.[h,c]*' 
12760
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
   437
                                    '*.txt; *.htm*' 
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
   438
                                    '*.gif; *.xpm; *.jpg; *.png' 
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
   439
                                    '~*o; ~*.obj; ~*.dll;' 
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
   440
                                )
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   441
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
   442
    ^ DefaultFilters.
12760
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
   443
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
   444
    "
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
   445
     DefaultFilters := nil
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
   446
    "
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   447
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   448
4496
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   449
initialCommandFor:fileName in:aDirectory intoBox:aBox
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   450
    "set a useful initial command in an execute box."
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   451
4523
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
   452
    |mime cmd select path suffix baseName pathName|
4496
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   453
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   454
    path := aDirectory filenameFor:fileName.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   455
    baseName := path baseName.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   456
    suffix := path suffix.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   457
16160
ed6b8b5cb2d4 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16102
diff changeset
   458
    cmd := UserPreferences current defaultFileOpenCommandFor:suffix.
ed6b8b5cb2d4 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16102
diff changeset
   459
    cmd notNil ifTrue:[
ed6b8b5cb2d4 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16102
diff changeset
   460
        aBox initialText:(cmd bindWith:fileName pathName).
ed6b8b5cb2d4 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16102
diff changeset
   461
        ^ self
ed6b8b5cb2d4 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16102
diff changeset
   462
    ].
ed6b8b5cb2d4 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16102
diff changeset
   463
    
4496
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   464
    mime := MIMETypes mimeTypeForSuffix:suffix.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   465
"/    mime notNil ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   466
"/        cmd := self initialCommandForMIME:mime file:path
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   467
"/    ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   468
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   469
    "/ XXX should be changed to take stuff from a config file
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   470
    "/ XXX or from resources.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   471
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   472
    (path type == #regular) ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   473
        path isExecutableProgram ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   474
            aBox initialText:(path pathName , ' <arguments>').
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   475
            ^ self
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   476
        ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   477
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   478
        select := true.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   479
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   480
        "some heuristics - my personal preferences ...
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   481
         (actually this should come from a configfile)"
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   482
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   483
        (baseName endsWith:'akefile') ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   484
            aBox initialText:'make target' selectFrom:6 to:11.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   485
            ^ self
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   486
        ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   487
18264
4bf515143c81 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18248
diff changeset
   488
        cmd := MIMETypes defaultCommandTemplateToOpenMimeType:mime.
4496
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   489
        cmd notNil ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   490
            select := false
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   491
        ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   492
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   493
        cmd isNil ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   494
            suffix := path suffix.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   495
            (suffix = 'C') ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   496
                cmd := 'g++ -c %1'.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   497
                select := 6.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   498
            ] ifFalse:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   499
                suffix := suffix asLowercase.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   500
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   501
                (suffix = 'taz') ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   502
                    aBox initialText:'zcat %1 | tar tvf -'.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   503
                    select := false.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   504
                ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   505
                (suffix = 'tar') ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   506
                    cmd := 'tar tvf %1'.
18578
c707daaac50b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18525
diff changeset
   507
                    select := 'tar tvf' size
4496
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   508
                ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   509
                (suffix = 'zoo') ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   510
                    cmd := 'zoo -list %1'.
18578
c707daaac50b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18525
diff changeset
   511
                    select := 'zoo -list' size
4496
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   512
                ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   513
                (suffix = 'zip') ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   514
                    cmd := 'unzip -l %1'.
18578
c707daaac50b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18525
diff changeset
   515
                    select := 'unzip -l' size
4496
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   516
                ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   517
                (suffix = 'jar') ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   518
                    cmd := 'unzip -l %1'.
18578
c707daaac50b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18525
diff changeset
   519
                    select := 'unzip -l' size
4496
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   520
                ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   521
                (suffix = 'z') ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   522
                    (baseName asLowercase endsWith:'tar.z') ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   523
                        cmd := 'zcat %1 | tar tvf -'.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   524
                        select := false.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   525
                    ] ifFalse:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   526
                        cmd := 'uncompress %1'
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   527
                    ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   528
                ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   529
                (suffix = 'gz') ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   530
                    (baseName asLowercase endsWith:'tar.gz') ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   531
                        cmd := ('gunzip < %1 | tar tvf -' ).
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   532
                        select := false.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   533
                    ] ifFalse:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   534
                        cmd := 'gunzip %1'.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   535
                    ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   536
                ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   537
                (suffix = 'html') ifTrue:[
18578
c707daaac50b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18525
diff changeset
   538
                    "/ cmd := 'netscape %1'
c707daaac50b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18525
diff changeset
   539
                    cmd := 'firefox %1'.
c707daaac50b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18525
diff changeset
   540
                    select := 'firefox' size
4496
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   541
                ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   542
                (suffix = 'htm') ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   543
                    cmd := 'netscape %1'
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   544
                ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   545
                (suffix = 'uue') ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   546
                    cmd := 'uudecode %1'
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   547
                ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   548
                (suffix = 'c') ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   549
                    cmd := 'cc -c %1'.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   550
                    select := 5.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   551
                ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   552
                (suffix = 'cc') ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   553
                    cmd := 'g++ -c %1'.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   554
                    select := 6.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   555
                ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   556
                (suffix = 'xbm') ifTrue:[
18578
c707daaac50b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18525
diff changeset
   557
                    cmd := 'bitmap %1'.
c707daaac50b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18525
diff changeset
   558
                    select := 'bitmap' size
4496
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   559
                ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   560
                (suffix = 'ps') ifTrue:[
18578
c707daaac50b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18525
diff changeset
   561
                    cmd := 'ghostview %1'.
c707daaac50b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18525
diff changeset
   562
                    select := 'ghostview' size
4496
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   563
                ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   564
                ((suffix = '1') or:[suffix = 'man']) ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   565
                    cmd := 'nroff -man %1'.
18578
c707daaac50b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18525
diff changeset
   566
                    select := 'nroff -man' size
4496
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   567
                ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   568
            ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   569
        ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   570
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   571
        cmd isNil ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   572
            DefaultCommandPerSuffix isNil ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   573
                cmd := '<cmd>'
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   574
            ] ifFalse:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   575
                cmd := DefaultCommandPerSuffix 
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   576
                        at:suffix
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   577
                        ifAbsent:'<cmd>'.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   578
            ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   579
            cmd := cmd , ' %1'.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   580
        ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   581
4523
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
   582
        pathName := path pathName.
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
   583
        OperatingSystem isUNIXlike ifTrue:[
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
   584
            pathName includesSeparator ifTrue:[
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
   585
                pathName := '"' , pathName , '"'
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
   586
            ]
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
   587
        ].
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
   588
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
   589
        cmd := cmd bindWith:pathName.
4496
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   590
        select == false ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   591
            aBox initialText:cmd
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   592
        ] ifFalse:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   593
            select class == Interval ifTrue:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   594
                aBox initialText:cmd selectFrom:select start to:select stop
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   595
            ] ifFalse:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   596
                select isInteger ifFalse:[
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   597
                    select := (cmd indexOf:Character space ifAbsent:[cmd size + 1]) - 1.
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   598
                ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   599
                aBox initialText:cmd selectFrom:1 to:select
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   600
            ].
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   601
        ]
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   602
    ]
513e99a8621b defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents: 4491
diff changeset
   603
18264
4bf515143c81 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18248
diff changeset
   604
    "Modified: / 24-09-1997 / 16:34:52 / stefan"
4bf515143c81 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18248
diff changeset
   605
    "Modified: / 09-04-1998 / 17:15:57 / cg"
4bf515143c81 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18248
diff changeset
   606
    "Modified: / 09-07-2018 / 11:16:30 / Stefan Vogel"
18578
c707daaac50b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18525
diff changeset
   607
    "Modified: / 05-02-2019 / 10:23:20 / Claus Gittinger"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   608
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   609
5941
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
   610
listOfRuntimeValuesToRemember
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
   611
    " list of all aspects that will be remembered after closing a FileBrowserV2"
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
   612
    
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
   613
    ^ #( 
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
   614
"/        #filterModel
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
   615
        #enableFileHistory
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
   616
        #fileHistory
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
   617
        #currentSortOrder
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
   618
        #sortBlockProperty 
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
   619
       )
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   620
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   621
321c1729db5b initial checkin
penk
parents:
diff changeset
   622
resetAspects
321c1729db5b initial checkin
penk
parents:
diff changeset
   623
321c1729db5b initial checkin
penk
parents:
diff changeset
   624
    RuntimeAspects := nil.
321c1729db5b initial checkin
penk
parents:
diff changeset
   625
5941
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
   626
    "
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
   627
     self resetAspects
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
   628
    "
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   629
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   630
321c1729db5b initial checkin
penk
parents:
diff changeset
   631
runtimeAspects
321c1729db5b initial checkin
penk
parents:
diff changeset
   632
321c1729db5b initial checkin
penk
parents:
diff changeset
   633
    RuntimeAspects isNil ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
   634
        RuntimeAspects := Dictionary new.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   635
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
   636
    ^ RuntimeAspects
321c1729db5b initial checkin
penk
parents:
diff changeset
   637
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   638
4201
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
   639
userPreferencesAspectList
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
   640
    " list of all aspects that will be saved with save settings
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
   641
      that aspects will be image consistent if the settings are saved in Launcher
11501
7f8a01b9b166 class definition
Claus Gittinger <cg@exept.de>
parents: 11494
diff changeset
   642
      don't forget to add a access methods in UserPreferences if you add a aspect here
4201
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
   643
    "
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
   644
7078
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   645
    ^ Dictionary 
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   646
        withKeysAndValues:#(
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   647
           viewDirsInContentsBrowser   true
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   648
           showDirectoryTree           true
11501
7f8a01b9b166 class definition
Claus Gittinger <cg@exept.de>
parents: 11494
diff changeset
   649
           showHiddenFiles             true
7078
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   650
           viewDescription             false
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   651
           viewDetails                 true
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   652
           viewDirectoryDescription    false
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   653
           viewFilesInDirectoryTree    false
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   654
           viewGroup                   false
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   655
           viewOwner                   false
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   656
           viewPermissions             false
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   657
           viewPreview                 false
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   658
           viewSize                    true
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   659
           viewSizeInKiloBytes         false
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   660
           viewSizeInBytes             false
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   661
           viewTime                    true
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   662
           viewType                    false
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   663
           openMultipleApplicationsForType false
7788
c391cddbd84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7763
diff changeset
   664
           filenameEntryFieldVisibleHolder   true
c391cddbd84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7763
diff changeset
   665
           toolBarVisibleHolder        true
7078
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   666
           sortDirectoriesBeforeFiles  true
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   667
           openAlwaysInTextEditor      false
15111
3c2f1e7dc492 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15108
diff changeset
   668
           alwaysUseSmalltalkTools     true
7078
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   669
           sortCaseless                false
13011
fe61ebc8f857 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13000
diff changeset
   670
           "/ useCodeView2InTools         true   -- vanishes
14709
dc6998e427f4 Added option to show directories always in top of the list in directory contents view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14659
diff changeset
   671
           showDirectoriesOnTop        false 
4201
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
   672
      )
7078
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
   673
11501
7f8a01b9b166 class definition
Claus Gittinger <cg@exept.de>
parents: 11494
diff changeset
   674
    "Modified: / 11-05-2012 / 09:22:04 / cg"
14709
dc6998e427f4 Added option to show directories always in top of the list in directory contents view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14659
diff changeset
   675
    "Modified: / 12-08-2014 / 13:13:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   676
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
   677
17202
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   678
!AbstractFileBrowser class methodsFor:'drag & drop'!
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   679
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   680
doStartDrag:aDropSource in:aView
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   681
    "set the cursors before starting the drag & drop operation"
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   682
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   683
    |hdl|
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   684
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   685
    hdl := DragAndDropManager new.
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   686
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   687
    hdl disabledCursor:self disabledCursorIcon.
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   688
    hdl enabledCursor:self enabledCursorIcon.
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   689
    hdl alienCursor:nil.
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   690
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   691
    hdl startDragFrom:aView dropSource:aDropSource offset:#topLeft.
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   692
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   693
    "Modified: / 23-07-2007 / 23:00:38 / cg"
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   694
! !
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   695
5398
61e42b6e1b84 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5383
diff changeset
   696
!AbstractFileBrowser class methodsFor:'help specs'!
61e42b6e1b84 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5383
diff changeset
   697
17889
b27bc6aaaab9 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 17871
diff changeset
   698
basicHelpSpec
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   699
    <resource: #help>
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   700
17889
b27bc6aaaab9 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 17871
diff changeset
   701
    ^ super helpSpec addPairsFrom:#(
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   702
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   703
#lockFileEncoding
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   704
'Do not guess the encoding from the file''s contents.'
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   705
6100
cfed9da80b68 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6099
diff changeset
   706
#closeTabButton
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   707
'Close this tab'
6100
cfed9da80b68 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6099
diff changeset
   708
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   709
#addTerminal
17182
5f178bffa275 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17119
diff changeset
   710
'Add a shell terminal page'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   711
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   712
#make
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   713
'Call the make command'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   714
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   715
#searchFile
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   716
'Search a file'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   717
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   718
#directoryUp
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   719
'Directory up'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   720
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   721
#directoryBack
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   722
'Directory back'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   723
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   724
#directoryForward
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   725
'Directory forward'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   726
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   727
#directoryHistory
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   728
'Directory'
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   729
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   730
#copyFile
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   731
'Copy the selected file(s)'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   732
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   733
#cutFile
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   734
'Cut the selected file(s)'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   735
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   736
#editFile
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   737
'Edit the selected file'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   738
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   739
#fileHome
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   740
'Goto home directory'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   741
8093
426a17ddceb6 doGotoDesktopDirectory
Claus Gittinger <cg@exept.de>
parents: 8091
diff changeset
   742
#fileDesktop
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   743
'Goto desktop directory'
8093
426a17ddceb6 doGotoDesktopDirectory
Claus Gittinger <cg@exept.de>
parents: 8091
diff changeset
   744
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   745
#fileGotoDefault
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   746
'Goto default directory (ST/X start directory)'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   747
6454
649bdd4e5639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6434
diff changeset
   748
#fileGotoSmalltalkDirectory
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   749
'Goto Smalltalk directory (ST/X application)'
6454
649bdd4e5639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6434
diff changeset
   750
6456
c4d6e69319bc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6454
diff changeset
   751
#fileGotoDefaultDirectory
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   752
'Goto current directory'
6456
c4d6e69319bc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6454
diff changeset
   753
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   754
#pasteFile
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   755
'Paste file(s)'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   756
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   757
#deleteFile
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   758
'Delete the selected file(s)'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   759
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   760
#fileIn
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   761
'File in'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   762
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   763
#fileHistory
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   764
'File history'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   765
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   766
#fileGotoBookmark
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   767
'Goto bookmarked directory'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   768
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   769
#hideToolBar
13910
d32792f13ebf class: SimpleView
Claus Gittinger <cg@exept.de>
parents: 13856
diff changeset
   770
'Hide the toolbar (show again via "View"-menu)'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   771
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   772
#hideFilenameEntryField
13910
d32792f13ebf class: SimpleView
Claus Gittinger <cg@exept.de>
parents: 13856
diff changeset
   773
'Hide filename & filter fields (show again via "View"-menu)'
d32792f13ebf class: SimpleView
Claus Gittinger <cg@exept.de>
parents: 13856
diff changeset
   774
d32792f13ebf class: SimpleView
Claus Gittinger <cg@exept.de>
parents: 13856
diff changeset
   775
#hideBookmarks
d32792f13ebf class: SimpleView
Claus Gittinger <cg@exept.de>
parents: 13856
diff changeset
   776
'Hide the bookmarks (show again via "View"-menu)'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   777
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   778
#openChangeBrowser
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   779
'Open a Changebrowser on file'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   780
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   781
#showFileDetails
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   782
'Show file details'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   783
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   784
#hideFileDetails
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   785
'Hide file details'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   786
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   787
#toggleDetails
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   788
'Show/hide file details'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   789
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   790
#viewDetails
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   791
'Show/hide file details'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   792
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   793
#selectDetails
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   794
'Select file details to be shown'
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   795
8088
a43361dddfc9 menu & flyByHelp
Claus Gittinger <cg@exept.de>
parents: 8082
diff changeset
   796
#showDifferences
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   797
'Show differences between file and editor versions'
8088
a43361dddfc9 menu & flyByHelp
Claus Gittinger <cg@exept.de>
parents: 8082
diff changeset
   798
a43361dddfc9 menu & flyByHelp
Claus Gittinger <cg@exept.de>
parents: 8082
diff changeset
   799
#toggleHexDisplay
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   800
'Toggle between hexadecimal and textual representation'
8088
a43361dddfc9 menu & flyByHelp
Claus Gittinger <cg@exept.de>
parents: 8082
diff changeset
   801
a43361dddfc9 menu & flyByHelp
Claus Gittinger <cg@exept.de>
parents: 8082
diff changeset
   802
#findInBrowser
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   803
'Navigate the browser''s file list to the edited file'
8088
a43361dddfc9 menu & flyByHelp
Claus Gittinger <cg@exept.de>
parents: 8082
diff changeset
   804
a43361dddfc9 menu & flyByHelp
Claus Gittinger <cg@exept.de>
parents: 8082
diff changeset
   805
#saveFile
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   806
'Save the editor''s contents into the file'
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   807
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   808
#saveFileAs
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   809
'Save the editor''s contents into another file'
8088
a43361dddfc9 menu & flyByHelp
Claus Gittinger <cg@exept.de>
parents: 8082
diff changeset
   810
a43361dddfc9 menu & flyByHelp
Claus Gittinger <cg@exept.de>
parents: 8082
diff changeset
   811
#reloadFile
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   812
'Reload from the file'
8088
a43361dddfc9 menu & flyByHelp
Claus Gittinger <cg@exept.de>
parents: 8082
diff changeset
   813
a43361dddfc9 menu & flyByHelp
Claus Gittinger <cg@exept.de>
parents: 8082
diff changeset
   814
#print
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   815
'Send to the printer'
8088
a43361dddfc9 menu & flyByHelp
Claus Gittinger <cg@exept.de>
parents: 8082
diff changeset
   816
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   817
).
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   818
8261
caa4bb627c03 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8256
diff changeset
   819
    "
17889
b27bc6aaaab9 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 17871
diff changeset
   820
     self helpSpec
8261
caa4bb627c03 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8256
diff changeset
   821
    "
caa4bb627c03 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8256
diff changeset
   822
10775
d5be49adfc5e changed: #basicFlyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 10762
diff changeset
   823
    "Modified: / 06-10-2011 / 14:55:27 / cg"
8261
caa4bb627c03 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8256
diff changeset
   824
!
caa4bb627c03 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8256
diff changeset
   825
17889
b27bc6aaaab9 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 17871
diff changeset
   826
helpSpec
8261
caa4bb627c03 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8256
diff changeset
   827
    <resource: #programHelp>
caa4bb627c03 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8256
diff changeset
   828
caa4bb627c03 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8256
diff changeset
   829
    |spec hist resources|
caa4bb627c03 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8256
diff changeset
   830
17889
b27bc6aaaab9 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 17871
diff changeset
   831
    spec := self basicHelpSpec.
8261
caa4bb627c03 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8256
diff changeset
   832
caa4bb627c03 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8256
diff changeset
   833
    "/ add help items for the history
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   834
    hist := self directoryHistory.
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   835
    hist notNil ifTrue:[
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   836
        resources := self classResources.
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   837
        hist canForward ifTrue:[
7879
9c64dea1b14a block as a flyByHelpText item.
Claus Gittinger <cg@exept.de>
parents: 7869
diff changeset
   838
            spec at:#directoryForward put:[ resources string:'Forward to: %1' with:hist nextForwardItem ].
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   839
        ].
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   840
        hist canBackward ifTrue:[
7879
9c64dea1b14a block as a flyByHelpText item.
Claus Gittinger <cg@exept.de>
parents: 7869
diff changeset
   841
            spec at:#directoryBack put:[ resources string:'Back to: %1' with:hist nextBackwardItem ].
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   842
        ].
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   843
    ].
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   844
    ^ spec.
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   845
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   846
    "
17889
b27bc6aaaab9 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 17871
diff changeset
   847
     self helpSpec
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   848
    "
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
   849
7879
9c64dea1b14a block as a flyByHelpText item.
Claus Gittinger <cg@exept.de>
parents: 7869
diff changeset
   850
    "Modified: / 03-11-2007 / 12:05:01 / cg"
5398
61e42b6e1b84 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5383
diff changeset
   851
! !
61e42b6e1b84 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5383
diff changeset
   852
8994
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   853
!AbstractFileBrowser class methodsFor:'image specs'!
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   854
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   855
clearHistoryIcon
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   856
    <resource: #programImage>
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   857
17413
7cc4bf5ee256 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17288
diff changeset
   858
    ^ ToolbarIconLibrary deleteIcon
7cc4bf5ee256 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17288
diff changeset
   859
    "/ ^ Icon deleteIcon
7cc4bf5ee256 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17288
diff changeset
   860
7cc4bf5ee256 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17288
diff changeset
   861
    "Modified: / 15-02-2017 / 19:45:24 / cg"
8994
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   862
!
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   863
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   864
copyIcon
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   865
    <resource: #programImage>
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   866
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   867
    ^ ToolbarIconLibrary copyIcon
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   868
!
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   869
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   870
cutIcon
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   871
    <resource: #programImage>
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   872
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   873
    ^ ToolbarIconLibrary cut20x20Icon2 "cut28x28Icon"
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   874
!
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   875
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   876
deleteIcon
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   877
    <resource: #programImage>
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   878
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   879
    ^ ToolbarIconLibrary erase20x20Icon "/ delete28x28Icon
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   880
!
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   881
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   882
directoryUpIcon
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   883
    <resource: #programImage>
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   884
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   885
    ^ ToolbarIconLibrary directoryUpIcon
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
   886
!
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   887
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   888
disabledCursorIcon
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   889
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   890
     by the ImageEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   891
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   892
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   893
     the ImageEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   894
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   895
    "
17202
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   896
     self disabledCursorIcon inspect
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   897
     ImageEditor openOnClass:self andSelector:#disabledCursorIcon
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   898
     Icon flushCachedIcons
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   899
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   900
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   901
    <resource: #image>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   902
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   903
    ^Icon
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   904
        constantNamed:#'AbstractFileBrowser class disabledCursorIcon'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   905
        ifAbsentPut:[(Depth1Image new) width: 32; height: 32; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   906
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@_ @@@XF@@@H@P@@DOB@@BLLP@AA@"@@RHD @H1AD@BRHI@@$QBP@IBH$@BPQI@@"BLP@D QH@ADBB@@H0Q@@AC
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   907
8 @@H@P@@A X@@@G8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((ImageMask new) width: 32; height: 32; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   908
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@_ @@@_>@@@O?0@@G?>@@C<O0@A?@>@@_8G @O?A<@C38O@@<_C0@OC8<@C0_O@@>C?0@G _8@A<C>@@O0_@@A?
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   909
? @@O?0@@A?8@@@G8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; yourself); yourself]
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   910
!
6337
76a3f145aaad code cleanup
Claus Gittinger <cg@exept.de>
parents: 6335
diff changeset
   911
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   912
enabledCursorIcon
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   913
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   914
     by the ImageEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   915
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   916
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   917
     the ImageEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   918
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   919
    "
17202
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   920
     self enabledCursorIcon inspect
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
   921
     ImageEditor openOnClass:self andSelector:#enabledCursorIcon
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   922
     Icon flushCachedIcons
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   923
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   924
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   925
    <resource: #image>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   926
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   927
    ^Icon
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   928
        constantNamed:#'AbstractFileBrowser class enabledCursorIcon'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   929
        ifAbsentPut:[(Depth1Image new) width: 32; height: 32; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   930
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@E@@@@AP@@@@T@@@@E@@@@AP@@@@T@@@@E@@@@AP@@@@@@@@?0_0@@@@@@C?A?@@@@@@@@AP@@@@T@@@@E@@@@A
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   931
P@@@@T@@@@E@@@@AP@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((ImageMask new) width: 32; height: 32; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   932
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@G@@@@A0@@@@\@@@@G@@@@A0@@@@\@@@@G@@@@A0@@@@\@@@?8?0@O>O<@C?#?@@@G@@@@A0@@@@\@@@@G@@@@A
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   933
0@@@@\@@@@G@@@@A0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; yourself); yourself]
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   934
!
6337
76a3f145aaad code cleanup
Claus Gittinger <cg@exept.de>
parents: 6335
diff changeset
   935
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   936
fileInIcon
321c1729db5b initial checkin
penk
parents:
diff changeset
   937
    <resource: #programImage>
321c1729db5b initial checkin
penk
parents:
diff changeset
   938
6116
acc7f6b44b4f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6114
diff changeset
   939
    ^ ToolbarIconLibrary fileInIcon
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   940
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   941
6079
ab46672791d1 iconLibrary cleanup
Claus Gittinger <cg@exept.de>
parents: 6074
diff changeset
   942
historyBackIcon
ab46672791d1 iconLibrary cleanup
Claus Gittinger <cg@exept.de>
parents: 6074
diff changeset
   943
    <resource: #programImage>
ab46672791d1 iconLibrary cleanup
Claus Gittinger <cg@exept.de>
parents: 6074
diff changeset
   944
ab46672791d1 iconLibrary cleanup
Claus Gittinger <cg@exept.de>
parents: 6074
diff changeset
   945
    ^ ToolbarIconLibrary historyBackIcon
ab46672791d1 iconLibrary cleanup
Claus Gittinger <cg@exept.de>
parents: 6074
diff changeset
   946
!
ab46672791d1 iconLibrary cleanup
Claus Gittinger <cg@exept.de>
parents: 6074
diff changeset
   947
ab46672791d1 iconLibrary cleanup
Claus Gittinger <cg@exept.de>
parents: 6074
diff changeset
   948
historyForwardIcon
ab46672791d1 iconLibrary cleanup
Claus Gittinger <cg@exept.de>
parents: 6074
diff changeset
   949
    <resource: #programImage>
ab46672791d1 iconLibrary cleanup
Claus Gittinger <cg@exept.de>
parents: 6074
diff changeset
   950
ab46672791d1 iconLibrary cleanup
Claus Gittinger <cg@exept.de>
parents: 6074
diff changeset
   951
    ^ ToolbarIconLibrary historyForwardIcon
ab46672791d1 iconLibrary cleanup
Claus Gittinger <cg@exept.de>
parents: 6074
diff changeset
   952
!
ab46672791d1 iconLibrary cleanup
Claus Gittinger <cg@exept.de>
parents: 6074
diff changeset
   953
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   954
homeIcon
321c1729db5b initial checkin
penk
parents:
diff changeset
   955
    <resource: #programImage>
321c1729db5b initial checkin
penk
parents:
diff changeset
   956
6079
ab46672791d1 iconLibrary cleanup
Claus Gittinger <cg@exept.de>
parents: 6074
diff changeset
   957
    ^ ToolbarIconLibrary homeIcon
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   958
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   959
6074
511fe499929b icons moved
Claus Gittinger <cg@exept.de>
parents: 6034
diff changeset
   960
homeIcon2
6079
ab46672791d1 iconLibrary cleanup
Claus Gittinger <cg@exept.de>
parents: 6074
diff changeset
   961
    <resource: #programImage>
ab46672791d1 iconLibrary cleanup
Claus Gittinger <cg@exept.de>
parents: 6074
diff changeset
   962
ab46672791d1 iconLibrary cleanup
Claus Gittinger <cg@exept.de>
parents: 6074
diff changeset
   963
    ^ ToolbarIconLibrary homeIcon2
6074
511fe499929b icons moved
Claus Gittinger <cg@exept.de>
parents: 6034
diff changeset
   964
!
511fe499929b icons moved
Claus Gittinger <cg@exept.de>
parents: 6034
diff changeset
   965
511fe499929b icons moved
Claus Gittinger <cg@exept.de>
parents: 6034
diff changeset
   966
htmlReloadIcon
511fe499929b icons moved
Claus Gittinger <cg@exept.de>
parents: 6034
diff changeset
   967
    <resource: #programImage>
511fe499929b icons moved
Claus Gittinger <cg@exept.de>
parents: 6034
diff changeset
   968
511fe499929b icons moved
Claus Gittinger <cg@exept.de>
parents: 6034
diff changeset
   969
    ^ ToolbarIconLibrary reload22x22Icon
511fe499929b icons moved
Claus Gittinger <cg@exept.de>
parents: 6034
diff changeset
   970
!
511fe499929b icons moved
Claus Gittinger <cg@exept.de>
parents: 6034
diff changeset
   971
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   972
leftDownIcon
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   973
    <resource: #image>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   974
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   975
     by the ImageEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   976
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   977
     the ImageEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   978
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   979
     self leftDownIcon inspect
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   980
     ImageEditor openOnClass:self andSelector:#leftDownIcon"
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   981
    
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   982
    ^ Icon constantNamed:#'AbstractFileBrowser class leftDownIcon'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   983
        ifAbsentPut:[
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   984
            (Depth2Image new)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   985
                width:28;
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   986
                height:28;
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   987
                photometric:(#palette);
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   988
                bitsPerSample:(#( 2 ));
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   989
                samplesPerPixel:(1);
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   990
                bits:(ByteArray 
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   991
                            fromPackedString:'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   992
UUUUUUUUUUUPAUUUUUUUP@UUUUUUUPB!!UUUUUU@B*AUUUUU@B*(UUUUUPB** UUUUPB***AUUUTB***(EUUUB****%UUUR*****UUUUU@*%UUUUUUPJ)UUUU
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   993
UUTB*UUUUUUU@*%UUUUUUPJ)UUUUUUTB*UUUUUUU@*%UUUUUUPJ)UUUUUUTB*UUUUUUU@*$@@@@AUPJ*****)UTB******UU@******%UPJ*****)UTAUUUU
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   994
UUUU@@@@@@@AUUUUUUUUUP@a');
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   995
                colorMapFromArray:#[ 255 255 255 0 0 0 40 40 100 255 0 0 ];
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   996
                mask:((ImageMask new)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   997
                            width:28;
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   998
                            height:28;
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
   999
                            bits:(ByteArray 
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1000
                                        fromPackedString:'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1001
@@@@@@@@@@@@ @@@@\@@@@O @@@G<@@@C? @@A?<@@@?? @@_?<@@G?? @@C<@@@@?@@@@O0@@@C<@@@@?@@@@O0@@@C<@@@@?@@@@O0@@@C??? @???8@O?
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1002
?>@C??? @???8@O??>@@@@@@@@@@@@@a');
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1003
                            yourself);
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1004
                yourself
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1005
        ]
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1006
!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1007
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1008
menuHistoryList9x20Icon
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1009
    <resource: #image>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1010
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1011
     by the ImageEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1012
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1013
     the ImageEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1014
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1015
     self menuHistoryList9x20Icon inspect
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1016
     ImageEditor openOnClass:self andSelector:#menuHistoryList9x20Icon
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1017
     Icon flushCachedIcons"
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1018
    
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1019
    ^ Icon constantNamed:#'AbstractFileBrowser class menuHistoryList9x20Icon'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1020
        ifAbsentPut:[
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1021
            (Depth1Image new)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1022
                width:9;
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1023
                height:20;
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1024
                photometric:(#palette);
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1025
                bitsPerSample:(#( 1 ));
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1026
                samplesPerPixel:(1);
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1027
                bits:(ByteArray 
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1028
                            fromPackedString:'@@@@@A0@G@@\@A0@G@@\@A0@G@@\@A0@G@A?@C8@G@@H@G<@@@@@@@@a');
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1029
                colorMapFromArray:#[ 255 255 255 0 0 0 ];
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1030
                mask:((ImageMask new)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1031
                            width:9;
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1032
                            height:20;
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1033
                            bits:(ByteArray 
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1034
                                        fromPackedString:'@@@@@A0@G@@\@A0@G@@\@A0@G@@\@A0@G@A?@C8@G@@H@G<@@@@@@@@a');
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1035
                            yourself);
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1036
                yourself
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1037
        ]
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1038
!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1039
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1040
menuHistoryListIcon
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1041
    <resource: #image>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1042
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1043
     by the ImageEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1044
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1045
     the ImageEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1046
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1047
     self menuHistoryListIcon inspect
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1048
     ImageEditor openOnClass:self andSelector:#menuHistoryListIcon"
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1049
    
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1050
    ^ Icon constantNamed:#'AbstractFileBrowser class menuHistoryListIcon'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1051
        ifAbsentPut:[
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1052
            (Depth1Image new)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1053
                width:12;
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1054
                height:12;
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1055
                photometric:(#palette);
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1056
                bitsPerSample:(#( 1 ));
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1057
                samplesPerPixel:(1);
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1058
                bits:(ByteArray fromPackedString:'??S?<O?0??C?<O?0??/?=_?0??C?<O?0');
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1059
                colorMapFromArray:#[ 255 255 255 0 0 0 ];
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1060
                mask:((ImageMask new)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1061
                            width:12;
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1062
                            height:12;
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1063
                            bits:(ByteArray fromPackedString:'@@@O@@<@C0A?8C?@G8@O@@X@@@A?8@@@');
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1064
                            yourself);
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1065
                yourself
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1066
        ]
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1067
!
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1068
6087
344513ffd6a1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6083
diff changeset
  1069
newDirectoryIcon
6074
511fe499929b icons moved
Claus Gittinger <cg@exept.de>
parents: 6034
diff changeset
  1070
    <resource: #programImage>
511fe499929b icons moved
Claus Gittinger <cg@exept.de>
parents: 6034
diff changeset
  1071
6087
344513ffd6a1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6083
diff changeset
  1072
    ^ ToolbarIconLibrary newDirectoryIcon
3923
2988fc3c88ab next stage
penk
parents: 3922
diff changeset
  1073
!
2988fc3c88ab next stage
penk
parents: 3922
diff changeset
  1074
6091
f908a6db19ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6087
diff changeset
  1075
removeTabIcon
f908a6db19ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6087
diff changeset
  1076
    <resource: #programImage>
f908a6db19ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6087
diff changeset
  1077
f908a6db19ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6087
diff changeset
  1078
    ^ ToolbarIconLibrary removeTabIcon
f908a6db19ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6087
diff changeset
  1079
!
f908a6db19ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6087
diff changeset
  1080
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1081
vt100Terminal
321c1729db5b initial checkin
penk
parents:
diff changeset
  1082
    <resource: #programImage>
321c1729db5b initial checkin
penk
parents:
diff changeset
  1083
321c1729db5b initial checkin
penk
parents:
diff changeset
  1084
    ^ ToolbarIconLibrary shell20x20Icon
321c1729db5b initial checkin
penk
parents:
diff changeset
  1085
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  1086
5528
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  1087
!AbstractFileBrowser class methodsFor:'interface specs'!
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  1088
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1089
encodingDialogSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1090
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1091
     by the UIPainter of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1092
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1093
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1094
     the UIPainter may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1095
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1096
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1097
     UIPainter new openOnClass:AbstractFileBrowser andSelector:#encodingDialogSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1098
     AbstractFileBrowser new openInterface:#encodingDialogSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1099
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1100
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1101
    <resource: #canvas>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1102
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1103
    ^ 
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1104
    #(FullSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1105
       name: encodingDialogSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1106
       window: 
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1107
      (WindowSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1108
         label: 'File Encoding'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1109
         name: 'File Encoding'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1110
         min: (Point 10 10)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1111
         bounds: (Rectangle 0 0 379 590)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1112
       )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1113
       component: 
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1114
      (SpecCollection
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1115
         collection: (
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1116
          (LabelSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1117
             label: 'Select the External (File-) Encoding:'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1118
             name: 'Label1'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1119
             layout: (LayoutFrame 0 0 0 0 0 1 30 0)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1120
             translateLabel: true
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1121
             adjust: left
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1122
           )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1123
          (DataSetSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1124
             name: 'Table1'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1125
             layout: (LayoutFrame 0 0 30 0 0 1 -60 1)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1126
             model: selectedEncoding
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1127
             hasHorizontalScrollBar: true
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1128
             hasVerticalScrollBar: true
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1129
             dataList: encodingList
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1130
             has3Dseparators: true
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1131
             columns: 
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1132
            (Array
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1133
               
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1134
              (DataSetColumnSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1135
                 label: 'Encoding'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1136
                 labelButtonType: Button
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1137
                 height: heightOfFirstRow
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1138
                 model: at:
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1139
                 canSelect: false
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1140
                 isResizeable: false
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1141
                 showRowSeparator: false
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1142
                 showColSeparator: false
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1143
               ) 
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1144
              (DataSetColumnSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1145
                 label: 'Description'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1146
                 labelButtonType: Button
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1147
                 height: heightOfFirstRow
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1148
                 model: at:
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1149
                 canSelect: false
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1150
                 isResizeable: false
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1151
                 showRowSeparator: false
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1152
                 showColSeparator: false
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1153
               )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1154
             )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1155
             doubleClickChannel: accept
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1156
           )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1157
          (CheckBoxSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1158
             label: 'Lock Encoding'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1159
             name: 'LockEncodingCheckBox'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1160
             layout: (LayoutFrame 3 0 -60 1 217 0 -30 1)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1161
             activeHelpKey: lockFileEncoding
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1162
             model: lockFileEncoding
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1163
             translateLabel: true
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1164
           )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1165
          (HorizontalPanelViewSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1166
             name: 'ButtonPanel'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1167
             layout: (LayoutFrame 0 0 -30 1 0 1 0 1)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1168
             horizontalLayout: fitSpace
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1169
             verticalLayout: center
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1170
             horizontalSpace: 3
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1171
             verticalSpace: 3
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1172
             reverseOrderIfOKAtLeft: true
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1173
             component: 
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1174
            (SpecCollection
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1175
               collection: (
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1176
                (ActionButtonSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1177
                   label: 'Cancel'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1178
                   name: 'Button2'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1179
                   translateLabel: true
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1180
                   model: cancel
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1181
                   extent: (Point 183 22)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1182
                 )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1183
                (ActionButtonSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1184
                   label: 'OK'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1185
                   name: 'Button1'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1186
                   translateLabel: true
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1187
                   model: accept
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1188
                   isDefault: true
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1189
                   extent: (Point 184 22)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1190
                 )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1191
                )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1192
              
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1193
             )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1194
           )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1195
          )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1196
        
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1197
       )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1198
     )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1199
!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1200
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1201
lineEndConventionDialogSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1202
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1203
     by the UIPainter of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1204
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1205
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1206
     the UIPainter may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1207
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1208
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1209
     UIPainter new openOnClass:AbstractFileBrowser andSelector:#lineEndConventionDialogSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1210
     AbstractFileBrowser new openInterface:#lineEndConventionDialogSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1211
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1212
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1213
    <resource: #canvas>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1214
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1215
    ^ 
15212
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1216
    #(FullSpec
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1217
       name: lineEndConventionDialogSpec
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1218
       window: 
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1219
      (WindowSpec
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1220
         label: 'Line-End Convention'
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1221
         name: 'Line-End Convention'
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1222
         min: (Point 10 10)
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1223
         bounds: (Rectangle 0 0 379 239)
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1224
       )
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1225
       component: 
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1226
      (SpecCollection
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1227
         collection: (
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1228
          (LabelSpec
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1229
             label: 'Select the Line-End Convention (used when saving files):'
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1230
             name: 'Label1'
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1231
             layout: (LayoutFrame 0 0 0 0 0 1 30 0)
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1232
             translateLabel: true
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1233
             adjust: left
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1234
           )
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1235
          (VerticalPanelViewSpec
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1236
             name: 'VerticalPanel1'
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1237
             layout: (LayoutFrame 20 0 40 0 0 1 -30 1)
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1238
             horizontalLayout: fit
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1239
             verticalLayout: topSpace
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1240
             horizontalSpace: 3
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1241
             verticalSpace: 3
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1242
             component: 
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1243
            (SpecCollection
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1244
               collection: (
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1245
                (RadioButtonSpec
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1246
                   label: 'NL (Unix)'
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1247
                   name: 'RadioButton1'
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1248
                   translateLabel: true
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1249
                   model: lineEndConvention
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1250
                   isTriggerOnDown: true
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1251
                   select: nl
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1252
                   extent: (Point 359 22)
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1253
                 )
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1254
                (RadioButtonSpec
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1255
                   label: 'CR-NL (MSDOS)'
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1256
                   name: 'RadioButton4'
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1257
                   translateLabel: true
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1258
                   model: lineEndConvention
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1259
                   isTriggerOnDown: true
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1260
                   select: crlf
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1261
                   extent: (Point 359 22)
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1262
                 )
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1263
                (RadioButtonSpec
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1264
                   label: 'CR (VMS and pre OSX mac)'
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1265
                   name: 'RadioButton5'
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1266
                   translateLabel: true
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1267
                   model: lineEndConvention
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1268
                   isTriggerOnDown: true
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1269
                   select: cr
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1270
                   extent: (Point 359 22)
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1271
                 )
15212
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1272
                (RadioButtonSpec
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1273
                   label: 'ETX (some modem protocols and mainframe files)'
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1274
                   name: 'RadioButton6'
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1275
                   translateLabel: true
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1276
                   model: lineEndConvention
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1277
                   isTriggerOnDown: true
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1278
                   select: etx
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1279
                   extent: (Point 359 22)
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1280
                 )
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1281
                (RadioButtonSpec
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1282
                   label: 'EOT (some modem protocols and mainframe files)'
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1283
                   name: 'RadioButton7'
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1284
                   translateLabel: true
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1285
                   model: lineEndConvention
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1286
                   isTriggerOnDown: true
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1287
                   select: eot
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1288
                   extent: (Point 359 22)
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1289
                 )
15212
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1290
                )
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1291
              
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1292
             )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1293
           )
15212
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1294
          (HorizontalPanelViewSpec
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1295
             name: 'ButtonPanel'
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1296
             layout: (LayoutFrame 0 0 -30 1 0 1 0 1)
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1297
             horizontalLayout: fitSpace
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1298
             verticalLayout: center
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1299
             horizontalSpace: 3
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1300
             verticalSpace: 3
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1301
             reverseOrderIfOKAtLeft: true
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1302
             component: 
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1303
            (SpecCollection
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1304
               collection: (
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1305
                (ActionButtonSpec
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1306
                   label: 'Cancel'
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1307
                   name: 'Button2'
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1308
                   translateLabel: true
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1309
                   model: cancel
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1310
                   extent: (Point 185 22)
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1311
                 )
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1312
                (ActionButtonSpec
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1313
                   label: 'OK'
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1314
                   name: 'Button1'
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1315
                   translateLabel: true
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1316
                   model: accept
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1317
                   isDefault: true
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1318
                   extent: (Point 185 22)
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1319
                 )
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1320
                )
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1321
              
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1322
             )
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1323
           )
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1324
          )
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1325
        
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1326
       )
0cb84cd9a32f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15211
diff changeset
  1327
     )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1328
!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1329
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1330
tabStopConversionDialogSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1331
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1332
     by the UIPainter of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1333
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1334
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1335
     the UIPainter may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1336
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1337
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1338
     UIPainter new openOnClass:AbstractFileBrowser andSelector:#tabStopConversionDialogSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1339
     AbstractFileBrowser new openInterface:#tabStopConversionDialogSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1340
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1341
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1342
    <resource: #canvas>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1343
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1344
    ^ 
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1345
     #(FullSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1346
        name: 'tabStopConversionDialogSpec'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1347
        window: 
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1348
       (WindowSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1349
          label: 'Tab-Stop Conversion'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1350
          name: 'Tab-Stop Conversion'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1351
          min: (Point 10 10)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1352
          bounds: (Rectangle 0 0 379 239)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1353
        )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1354
        component: 
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1355
       (SpecCollection
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1356
          collection: (
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1357
           (LabelSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1358
              label: 'Select the Tab-Stop Conversion (used when saving files):'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1359
              name: 'Label1'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1360
              layout: (LayoutFrame 0 0 0 0 0 1 30 0)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1361
              translateLabel: true
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1362
              adjust: left
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1363
            )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1364
           (VerticalPanelViewSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1365
              name: 'VerticalPanel1'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1366
              layout: (LayoutFrame 0 0 30 0 0 1 -30 1)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1367
              horizontalLayout: center
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1368
              verticalLayout: center
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1369
              horizontalSpace: 3
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1370
              verticalSpace: 3
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1371
              component: 
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1372
             (SpecCollection
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1373
                collection: (
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1374
                 (RadioButtonSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1375
                    label: '4'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1376
                    name: 'RadioButton1'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1377
                    translateLabel: true
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1378
                    model: tabStops
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1379
                    isTriggerOnDown: true
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1380
                    select: 4
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1381
                    extent: (Point 136 22)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1382
                  )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1383
                 (RadioButtonSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1384
                    label: '8'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1385
                    name: 'RadioButton4'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1386
                    translateLabel: true
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1387
                    model: tabStops
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1388
                    isTriggerOnDown: true
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1389
                    select: 8
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1390
                    extent: (Point 136 22)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1391
                  )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1392
                 )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1393
               
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1394
              )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1395
            )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1396
           (HorizontalPanelViewSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1397
              name: 'ButtonPanel'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1398
              layout: (LayoutFrame 0 0 -30 1 0 1 0 1)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1399
              horizontalLayout: fitSpace
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1400
              verticalLayout: center
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1401
              horizontalSpace: 3
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1402
              verticalSpace: 3
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1403
              reverseOrderIfOKAtLeft: true
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1404
              component: 
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1405
             (SpecCollection
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1406
                collection: (
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1407
                 (ActionButtonSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1408
                    label: 'Cancel'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1409
                    name: 'Button2'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1410
                    translateLabel: true
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1411
                    model: cancel
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1412
                    extent: (Point 185 22)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1413
                  )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1414
                 (ActionButtonSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1415
                    label: 'OK'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1416
                    name: 'Button1'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1417
                    translateLabel: true
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1418
                    model: accept
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1419
                    isDefault: true
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1420
                    extent: (Point 185 22)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1421
                  )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1422
                 )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1423
               
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1424
              )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1425
            )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1426
           )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1427
         
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1428
        )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1429
      )
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1430
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1431
    "Modified: / 28-02-2012 / 11:12:38 / cg"
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1432
! !
5528
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  1433
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  1434
!AbstractFileBrowser class methodsFor:'menu specs'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  1435
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1436
baseBookmarksMenuSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1437
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1438
     by the MenuEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1439
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1440
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1441
     the MenuEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1442
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1443
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1444
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1445
     MenuEditor new openOnClass:AbstractFileBrowser andSelector:#baseBookmarksMenuSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1446
     (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser baseBookmarksMenuSpec)) startUp
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1447
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1448
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1449
    <resource: #menu>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1450
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1451
    ^ 
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1452
     #(Menu 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1453
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1454
          enabled: currentFilesHasDirectories
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1455
          label: 'Add Bookmark'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1456
          itemValue: addBookmark
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1457
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1458
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1459
          enabled: hasBookmarksToRemove
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1460
          label: 'Remove Bookmark'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1461
          itemValue: removeBookmark
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1462
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1463
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1464
          label: 'Save Bookmarks In...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1465
          itemValue: saveBookmarks
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1466
       )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1467
     )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1468
!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1469
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1470
baseBookmarksMenuSpec2
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1471
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1472
     by the MenuEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1473
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1474
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1475
     the MenuEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1476
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1477
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1478
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1479
     MenuEditor new openOnClass:AbstractFileBrowser andSelector:#baseBookmarksMenuSpec2
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1480
     (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser baseBookmarksMenuSpec2)) startUp
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1481
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1482
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1483
    <resource: #menu>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1484
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1485
    ^ 
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1486
     #(Menu 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1487
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1488
          label: 'Edit Bookmarks'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1489
          itemValue: editBookmarks
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1490
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1491
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1492
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1493
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1494
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1495
          enabled: currentFilesHasDirectories
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1496
          label: 'Add Bookmark'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1497
          itemValue: addBookmark
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1498
       )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1499
     )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1500
!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1501
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1502
browserMenu
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1503
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1504
     by the MenuEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1505
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1506
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1507
     the MenuEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1508
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1509
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1510
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1511
     MenuEditor new openOnClass:AbstractFileBrowser andSelector:#browserMenu
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1512
     (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser browserMenu)) startUp
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1513
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1514
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1515
    <resource: #menu>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1516
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1517
    ^ 
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1518
     #(Menu 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1519
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1520
          label: 'Spawn Filebrowser'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1521
          itemValue: doSpawn
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1522
          shortcutKey: Ctrln
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1523
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1524
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1525
          label: 'Windows Explorer'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1526
          itemValue: doOpenExplorer
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1527
          isVisible: systemIsDOS
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1528
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1529
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1530
          label: 'Open Finder'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1531
          itemValue: doOpenFinder
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1532
          isVisible: systemIsOSX
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1533
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1534
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1535
          label: 'C Browser'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1536
          itemValue: doOpenCBrowser
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1537
          isVisible: cBrowserMenuItemVisible
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1538
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1539
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1540
          label: 'STXGDB Debugger'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1541
          itemValue: doOpenGDBApplication
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1542
          isVisible: stxgdbMenuItemVisible
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1543
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1544
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1545
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1546
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1547
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1548
          label: 'Add Text Editor Page'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1549
          itemValue: newTextEditor
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1550
          shortcutKey: Ctrlt
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1551
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1552
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1553
          label: 'Add Shell Terminal Page'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1554
          itemValue: doAddTerminal
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1555
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1556
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1557
          label: 'Add Archiver Page'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1558
          itemValue: doAddArchiver
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1559
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1560
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1561
          label: 'Add Search Page'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1562
          itemValue: doOpenSearchFile
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1563
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1564
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1565
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1566
          isVisible: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1567
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1568
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1569
          label: 'Settings...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1570
          itemValue: doOpenSettings
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1571
          isVisible: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1572
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1573
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1574
          label: 'Encoding...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1575
          itemValue: fileEncodingDialog
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1576
          isVisible: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1577
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1578
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1579
          label: 'Line End Convention...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1580
          itemValue: lineEndConventionDialog
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1581
          isVisible: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1582
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1583
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1584
          label: 'Tab Stop Conversion...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1585
          itemValue: tabStopConversionDialog
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1586
          isVisible: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1587
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1588
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1589
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1590
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1591
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1592
          label: 'Exit'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1593
          itemValue: closeRequest
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1594
       )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1595
     )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1596
!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1597
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1598
directoryMenu
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1599
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1600
     by the MenuEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1601
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1602
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1603
     the MenuEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1604
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1605
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1606
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1607
     MenuEditor new openOnClass:AbstractFileBrowser andSelector:#directoryMenu
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1608
     (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser directoryMenu)) startUp
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1609
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1610
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1611
    <resource: #menu>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1612
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1613
    ^ 
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1614
     #(Menu 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1615
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1616
          label: 'New..'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1617
          itemValue: newDirectory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1618
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1619
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1620
          label: 'Bookmarks'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1621
          submenuChannel: bookmarksMenu
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1622
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1623
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1624
          label: 'Visited Directories'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1625
          submenuChannel: visitedDirectoriesMenu
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1626
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1627
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1628
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1629
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1630
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1631
          label: 'Up'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1632
          itemValue: doGoDirectoryUp
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1633
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1634
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1635
          activeHelpKey: directoryBack
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1636
          enabled: enableBack
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1637
          label: 'Back'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1638
          itemValue: doBack
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1639
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1640
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1641
          activeHelpKey: directoryBack
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1642
          enabled: enableForward
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1643
          label: 'Forward'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1644
          itemValue: doForward
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1645
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1646
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1647
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1648
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1649
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1650
          enabled: enableHome
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1651
          label: 'Home Directory'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1652
          itemValue: doGotoHomeDirectory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1653
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1654
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1655
          enabled: enableGotoDesktopDirectory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1656
          label: 'Desktop'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1657
          itemValue: doGotoDesktopDirectory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1658
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1659
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1660
          enabled: enableGotoDocumentsDirectory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1661
          label: 'Documents'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1662
          itemValue: doGotoDocumentsDirectory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1663
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1664
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1665
          enabled: enableGotoDownloadsDirectory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1666
          label: 'Downloads'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1667
          itemValue: doGotoDownloadsDirectory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1668
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1669
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1670
          enabled: enableGotoDefaultDirectory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1671
          label: 'Default (Current) Directory'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1672
          itemValue: doGotoDefaultDirectory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1673
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1674
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1675
          enabled: enableGotoSmalltalkDirectory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1676
          label: 'Smalltalk (Application) Directory'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1677
          itemValue: doGotoSmalltalkDirectory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1678
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1679
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1680
          enabled: enableGotoSmalltalkWorkspaceDirectory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1681
          label: 'Smalltalk Workspace Directory'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1682
          itemValue: doGotoSmalltalkWorkspaceDirectory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1683
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1684
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1685
          enabled: enableGotoTempDirectory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1686
          label: 'Smalltalk Temp Directory'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1687
          itemValue: doGotoTempDirectory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1688
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1689
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1690
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1691
          isVisible: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1692
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1693
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1694
          enabled: enableMakeCurrentDirectory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1695
          label: 'Make this the Default (Current) Directory'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1696
          itemValue: doMakeCurrentDirectory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1697
          isVisible: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1698
       )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1699
     )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1700
!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1701
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1702
editMenu
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1703
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1704
     by the MenuEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1705
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1706
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1707
     the MenuEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1708
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1709
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1710
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1711
     MenuEditor new openOnClass:AbstractFileBrowser andSelector:#editMenu
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1712
     (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser editMenu)) startUp
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1713
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1714
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1715
    <resource: #menu>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1716
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1717
    ^ 
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1718
     #(Menu 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1719
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1720
          enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1721
          label: 'Copy Selected Filenames to Clipboard'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1722
          itemValue: copySelectedFilenames
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1723
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1724
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1725
          enabled: fileListIsNotEmpty
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1726
          label: 'Copy all Filenames to Clipboard'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1727
          itemValue: copyFileList
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1728
       )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1729
     )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1730
!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1731
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1732
emptyMenuSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1733
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1734
     by the MenuEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1735
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1736
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1737
     the MenuEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1738
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1739
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1740
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1741
     MenuEditor new openOnClass:AbstractFileBrowser andSelector:#emptyMenuSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1742
     (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser emptyMenuSpec)) startUp
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1743
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1744
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1745
    <resource: #menu>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1746
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1747
    ^ 
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1748
     #(Menu
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1749
     )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1750
!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1751
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1752
extraMenu
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1753
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1754
     by the MenuEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1755
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1756
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1757
     the MenuEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1758
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1759
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1760
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1761
     MenuEditor new openOnClass:AbstractFileBrowser andSelector:#extraMenu
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1762
     (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser extraMenu)) startUp
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1763
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1764
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1765
    <resource: #menu>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1766
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1767
    ^ 
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1768
     #(Menu 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1769
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1770
          label: 'Encoding...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1771
          itemValue: fileEncodingDialog
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1772
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1773
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1774
          label: 'Line End Convention...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1775
          itemValue: lineEndConventionDialog
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1776
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1777
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1778
          label: 'Tab Stop Conversion...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1779
          itemValue: tabStopConversionDialog
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1780
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1781
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1782
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1783
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1784
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1785
          label: 'Settings...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1786
          itemValue: doOpenSettings
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1787
          labelImage: (ResourceRetriever ToolbarIconLibrary settings16x16Icon 'Settings...')
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1788
       )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1789
     )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1790
!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1791
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1792
fileMenu
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1793
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1794
     by the MenuEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1795
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1796
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1797
     the MenuEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1798
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1799
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1800
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1801
     MenuEditor new openOnClass:AbstractFileBrowser andSelector:#fileMenu
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1802
     (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser fileMenu)) startUp
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1803
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1804
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1805
    <resource: #menu>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1806
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1807
    ^ 
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1808
     #(Menu 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1809
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1810
          label: 'New'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1811
          submenuChannel: newMenu
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1812
          keepLinkedMenu: true
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1813
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1814
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1815
          enabled: enableFileHistory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1816
          label: 'File History'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1817
          submenuChannel: menuFileHistory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1818
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1819
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1820
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1821
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1822
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1823
          label: 'Open'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1824
          itemValue: doShowFileContents
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1825
       ) 
19009
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1826
(MenuItem
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1827
          label: 'Find'
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1828
          submenu: 
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1829
         (Menu 
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1830
           (MenuItem
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1831
              label: 'File...'
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1832
              itemValue: fileFindFile
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1833
           ) 
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1834
           (MenuItem
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1835
              enabled: hasFileSelection
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1836
              label: 'Same Contents as Selected...'
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1837
              itemValue: fileFindDuplicateFile
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1838
           ) 
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1839
           (MenuItem
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1840
              label: 'Duplicate Files'
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1841
              itemValue: fileFindDuplicates
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1842
           ) 
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1843
           (MenuItem
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1844
              enabled: hasSelection
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1845
              label: 'All Duplicate Files (Recursive)'
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1846
              itemValue: fileFindAllDuplicates
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1847
           ) 
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1848
           (MenuItem
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1849
              label: 'Similar Image Files (by Colors)'
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1850
              itemValue: fileFindSimilarImages
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1851
              isVisible: hasImageColorHistogram
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1852
           ) 
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1853
           (MenuItem
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1854
              label: 'Similar Image Files (by Form)'
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1855
              itemValue: fileFindSimilarImagesByForm
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1856
              isVisible: hasImageHistogram
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1857
           )
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1858
         )
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1859
       )
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1860
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1861
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1862
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1863
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1864
          enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1865
          label: 'FileIn'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1866
          itemValue: fileFileIn
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1867
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1868
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1869
          enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1870
          label: 'FileIn to Namespace...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1871
          itemValue: fileFileInToNameSpace
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1872
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1873
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1874
          enabled: hasPackageDirectorySelected
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1875
          label: 'Load Package from Here'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1876
          itemValue: fileFileInPackage
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1877
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1878
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1879
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1880
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1881
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1882
          enabled: hasSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1883
          label: 'Cut'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1884
          itemValue: cutFiles
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1885
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1886
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1887
          enabled: hasSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1888
          label: 'Copy'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1889
          itemValue: copyFiles
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1890
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1891
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1892
          enabled: canPaste
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1893
          label: 'Paste'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1894
          itemValue: pasteFiles
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1895
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1896
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1897
          enabled: hasSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1898
          label: 'Delete'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1899
          itemValue: deleteFiles
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1900
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1901
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1902
          enabled: hasSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1903
          label: 'Erase'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1904
          itemValue: eraseFiles
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1905
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1906
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1907
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1908
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1909
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1910
          enabled: hasSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1911
          label: 'Rename...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1912
          itemValue: renameSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1913
          shortcutKey: Rename
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1914
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1915
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1916
          enabled: hasSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1917
          label: 'Move To...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1918
          itemValue: moveSelectionTo
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1919
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1920
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1921
          enabled: hasSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1922
          label: 'Copy To...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1923
          itemValue: copySelectionTo
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1924
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1925
       (MenuItem
19009
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1926
          label: '-'
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1927
       ) 
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  1928
       (MenuItem
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1929
          enabled: hasSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1930
          label: 'Properties...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1931
          itemValue: doShowProperties
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1932
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1933
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1934
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1935
          isVisible: javaSupportLoaded
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1936
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1937
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1938
          enabled: canAddToClassPath
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1939
          label: 'Add to Java Class Path'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1940
          isVisible: javaSupportLoaded
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1941
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1942
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1943
          enabled: canRemoveFromClassPath
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1944
          label: 'Remove from Java Class Path'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1945
          isVisible: javaSupportLoaded
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1946
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1947
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1948
          enabled: canAddToSourcePath
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1949
          label: 'Add to Java Source Path'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1950
          isVisible: javaSupportLoaded
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1951
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1952
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1953
          enabled: canRemoveFromSourcePath
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1954
          label: 'Remove from Java Source Path'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1955
          isVisible: javaSupportLoaded
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1956
       )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1957
     )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1958
!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1959
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1960
fileOpMenu
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1961
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1962
     by the MenuEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1963
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1964
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1965
     the MenuEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1966
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1967
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1968
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1969
     MenuEditor new openOnClass:AbstractFileBrowser andSelector:#fileOpMenu
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1970
     (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser fileOpMenu)) startUp
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1971
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1972
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1973
    <resource: #menu>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1974
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  1975
    ^ 
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1976
     #(Menu 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1977
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1978
          enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1979
          label: 'Split (by size)...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1980
          itemValue: splitSelectedFiles
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1981
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1982
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1983
          enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1984
          label: 'Split (by #lines)...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1985
          itemValue: splitSelectedFilesByLines
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1986
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1987
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1988
          enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1989
          label: 'Join...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1990
          itemValue: joinSelectedFiles
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1991
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1992
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1993
          enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1994
          label: 'Copy Corrupted File To...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1995
          itemValue: copySelectionToRepairingCorruptedFiles
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1996
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1997
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1998
          label: 'Copy Corrupted File From -> To...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  1999
          itemValue: copyFromToRepairingCorruptedFiles
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2000
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2001
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2002
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2003
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2004
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2005
          enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2006
          label: 'Rot13...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2007
          itemValue: filterSelectedFiles:
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2008
          argument: rot13
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2009
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2010
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2011
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2012
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2013
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2014
          enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2015
          label: 'Truncate...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2016
          itemValue: truncateSelectedFilesToZeroSize
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2017
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2018
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2019
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2020
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2021
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2022
          label: 'Load Signature Support Package'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2023
          itemValue: loadSignatureSupport
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2024
          isVisible: cannotGenerateSignatureFiles
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2025
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2026
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2027
          enabled: canGenerateSignatureFiles
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2028
          label: 'Generate Signed Files'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2029
          itemValue: generateSignaturesForSelectedFiles
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2030
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2031
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2032
          enabled: canGenerateSignatureFiles
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2033
          label: 'Generate Detached Signature Files (use for dll)'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2034
          itemValue: generateDetachedSignaturesForSelectedFiles
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2035
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2036
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2037
          enabled: canGenerateSignatureFiles
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2038
          label: 'Generate Patch Installer for File(s)'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2039
          itemValue: generatePatchInstallerForSelectedFiles
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2040
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2041
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2042
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2043
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2044
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2045
          enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2046
          label: 'File Differences'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2047
          itemValue: openDiffView
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2048
          isVisible: hasTwoFilesSelectedHolder
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2049
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2050
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2051
          enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2052
          label: 'File Differences...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2053
          itemValue: openDiffView
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2054
          isVisible: hasNotTwoFilesSelectedHolder
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2055
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2056
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2057
          enabled: hasSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2058
          label: 'Directory Differences'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2059
          itemValue: openDirectoryDiffView
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2060
          isVisible: hasTwoDirectoriesSelectedHolder
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2061
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2062
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2063
          enabled: hasSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2064
          label: 'Directory Differences...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2065
          itemValue: openDirectoryDiffView
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2066
          isVisible: hasNotTwoDirectoriesSelectedHolder
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2067
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2068
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2069
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2070
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2071
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2072
          label: 'Remove .bak and .sav Files...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2073
          itemValue: removeBakAndSavFiles
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2074
       )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2075
     )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2076
!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2077
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2078
newMenu
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2079
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2080
     by the MenuEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2081
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2082
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2083
     the MenuEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2084
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2085
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2086
    "
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2087
     MenuEditor new openOnClass:AbstractFileBrowser andSelector:#newMenu
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2088
     (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser newMenu)) startUp
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2089
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2090
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2091
    <resource: #menu>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2092
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2093
    ^ 
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2094
     #(Menu 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2095
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2096
          label: 'Directory...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2097
          itemValue: newDirectory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2098
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2099
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2100
          label: 'File...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2101
          itemValue: newFile
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2102
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2103
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2104
          label: 'Hard Link...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2105
          itemValue: newHardLink
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2106
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2107
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2108
          label: 'Symbolic Link...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2109
          itemValue: newSoftLink
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2110
       )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2111
     )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2112
!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2113
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2114
scmMenuSlice
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2115
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2116
     by the MenuEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2117
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2118
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2119
     the MenuEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2120
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2121
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2122
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2123
     MenuEditor new openOnClass:AbstractFileBrowser andSelector:#scmMenuSlice
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2124
     (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser scmMenuSlice)) startUp
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2125
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2126
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2127
    <resource: #menu>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2128
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2129
    ^ 
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2130
     #(Menu 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2131
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2132
          label: 'CVS'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2133
          isVisible: cvsMenusAreShown
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2134
          submenuChannel: cvsMenu
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2135
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2136
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2137
          label: 'SVN'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2138
          isVisible: svnMenusAreShown
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2139
          submenuChannel: svnMenu
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2140
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2141
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2142
          label: 'Mercurial'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2143
          isVisible: mercurialMenusAreShown
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2144
          submenuChannel: mercurialMenu
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2145
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2146
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2147
          label: 'HG'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2148
          isVisible: hgMenusAreShown
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2149
          submenuChannel: hgMenu
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2150
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2151
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2152
          label: 'Git'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2153
          isVisible: gitMenusAreShown
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2154
          submenuChannel: gitMenu
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2155
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2156
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2157
          label: 'Perforce'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2158
          isVisible: perforceMenusAreShown
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2159
          submenuChannel: perforceMenu
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2160
       )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2161
     )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2162
!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2163
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2164
showMenuSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2165
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2166
     by the MenuEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2167
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2168
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2169
     the MenuEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2170
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2171
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2172
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2173
     MenuEditor new openOnClass:AbstractFileBrowser andSelector:#showMenuSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2174
     (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser showMenuSpec)) startUp
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2175
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2176
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2177
    <resource: #menu>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2178
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2179
    ^ 
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2180
     #(Menu 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2181
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2182
          label: 'Hidden Files'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2183
          indication: showHiddenFiles
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2184
          hideMenuOnActivated: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2185
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2186
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2187
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2188
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2189
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2190
          label: 'Directory Tree'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2191
          indication: showDirectoryTree
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2192
          hideMenuOnActivated: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2193
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2194
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2195
          label: 'Regular Files in TreeView (Left)'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2196
          indication: viewFilesInDirectoryTree
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2197
          hideMenuOnActivated: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2198
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2199
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2200
          label: 'Directories in ContentsView (Right)'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2201
          indication: viewDirsInContentsBrowser
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2202
          hideMenuOnActivated: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2203
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2204
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2205
          enabled: enableViewNoteBookApplication
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2206
          label: 'File Applications'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2207
          indication: viewNoteBookApplicationHolder
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2208
          hideMenuOnActivated: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2209
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2210
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2211
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2212
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2213
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2214
          label: 'DiskUsage'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2215
          indication: showDiskUsageHolder
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2216
          hideMenuOnActivated: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2217
       )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2218
     )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2219
!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2220
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2221
showMenuSpecForDialog
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2222
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2223
     by the MenuEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2224
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2225
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2226
     the MenuEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2227
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2228
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2229
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2230
     MenuEditor new openOnClass:AbstractFileBrowser andSelector:#showMenuSpecForDialog
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2231
     (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser showMenuSpecForDialog)) startUp
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2232
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2233
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2234
    <resource: #menu>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2235
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2236
    ^ 
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2237
     #(Menu 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2238
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2239
          label: 'Hidden Files'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2240
          indication: showHiddenFiles
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2241
          hideMenuOnActivated: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2242
       )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2243
     )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2244
!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2245
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2246
sortMenu
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2247
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2248
     by the MenuEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2249
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2250
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2251
     the MenuEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2252
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2253
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2254
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2255
     MenuEditor new openOnClass:AbstractFileBrowser andSelector:#sortMenu
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2256
     (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser sortMenu)) startUp
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2257
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2258
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2259
    <resource: #menu>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2260
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2261
    ^ 
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2262
     #(Menu 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2263
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2264
          label: 'By Filename'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2265
          choice: sortBlockProperty
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2266
          choiceValue: baseName
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2267
          hideMenuOnActivated: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2268
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2269
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2270
          label: 'By Extension'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2271
          choice: sortBlockProperty
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2272
          choiceValue: suffix
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2273
          hideMenuOnActivated: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2274
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2275
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2276
          label: 'By Permissions'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2277
          choice: sortBlockProperty
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2278
          choiceValue: permissions
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2279
          hideMenuOnActivated: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2280
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2281
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2282
          label: 'By Owner'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2283
          isVisible: viewOwner
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2284
          choice: sortBlockProperty
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2285
          choiceValue: owner
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2286
          hideMenuOnActivated: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2287
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2288
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2289
          label: 'By Group'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2290
          isVisible: viewOwner
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2291
          choice: sortBlockProperty
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2292
          choiceValue: group
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2293
          hideMenuOnActivated: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2294
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2295
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2296
          label: 'By Size'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2297
          choice: sortBlockProperty
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2298
          choiceValue: fileSize
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2299
          hideMenuOnActivated: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2300
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2301
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2302
          label: 'By Date && Time'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2303
          choice: sortBlockProperty
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2304
          choiceValue: modificationTime
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2305
          hideMenuOnActivated: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2306
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2307
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2308
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2309
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2310
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2311
          label: 'Ignore Case in Sort'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2312
          indication: sortCaseless
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2313
          hideMenuOnActivated: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2314
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2315
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2316
          label: 'Directories before Files'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2317
          indication: sortDirectoriesBeforeFiles
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2318
          hideMenuOnActivated: false
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2319
       )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2320
     )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2321
!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2322
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2323
toolsMenuSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2324
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2325
     by the MenuEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2326
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2327
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2328
     the MenuEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2329
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2330
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2331
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2332
     MenuEditor new openOnClass:AbstractFileBrowser andSelector:#toolsMenuSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2333
     (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser toolsMenuSpec)) startUp
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2334
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2335
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2336
    <resource: #menu>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2337
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2338
    ^ 
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2339
     #(Menu 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2340
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2341
          label: 'Open (Win32-Shell)'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2342
          itemValue: doOpenWithShellCommand
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2343
          isVisible: systemIsDOS
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2344
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2345
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2346
          label: 'Open (OSX-Application)'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2347
          itemValue: doOpenWithShellCommand
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2348
          isVisible: systemIsOSX
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2349
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2350
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2351
          label: 'Execute UNIX Command...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2352
          itemValue: doExecuteCommand
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2353
          isVisible: systemIsUnix
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2354
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2355
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2356
          label: 'Execute DOS Command...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2357
          itemValue: doExecuteCommand
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2358
          isVisible: systemIsDOS
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2359
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2360
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2361
          label: 'Execute Script...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2362
          itemValue: doExecuteScript
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2363
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2364
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2365
          enabled: canDoTerminal
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2366
          label: 'Shell Terminal'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2367
          itemValue: openTerminal
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2368
          isVisible: canDoTerminalAndSystemIsUnix
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2369
          labelImage: (ResourceRetriever ToolbarIconLibrary terminal16x16Icon 'Shell Terminal')
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2370
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2371
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2372
          enabled: canDoTerminal
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2373
          label: 'DOS Terminal'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2374
          itemValue: openTerminal
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2375
          isVisible: canDoTerminalAndSystemIsDOS
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2376
          labelImage: (ResourceRetriever ToolbarIconLibrary terminal16x16Icon 'DOS Terminal')
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2377
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2378
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2379
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2380
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2381
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2382
          enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2383
          label: 'Changes Browser'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2384
          itemValue: openChangesBrowser
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2385
          labelImage: (ResourceRetriever ToolbarIconLibrary changesBrowser16x16Icon 'Changes Browser')
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2386
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2387
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2388
          enabled: hasFileOrCypressPackageSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2389
          label: 'ChangeSet Browser'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2390
          itemValue: openChangeSetBrowser
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2391
          isVisible: changeSetBrowserItemVisible
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2392
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2393
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2394
          enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2395
          label: 'Workspace'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2396
          itemValue: openWorkspace
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2397
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2398
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2399
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2400
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2401
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2402
          enabled: canReadAbbrevFile
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2403
          label: 'Install Autoloaded'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2404
          itemValue: readAbbrevFile
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2405
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2406
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2407
          enabled: anySTFilesPresent
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2408
          label: 'Install all ST-Files as Autoloaded'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2409
          itemValue: installAllAsAutoloaded
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2410
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2411
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2412
          enabled: recursiveAnySTFilesPresent
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2413
          label: 'Recursive Install all ST-Files as Autoloaded'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2414
          itemValue: installAllAsAutoloadedRecursive
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2415
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2416
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2417
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2418
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2419
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2420
          enabled: hasJava
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2421
          label: 'Add Directory to Java Source Path (stx:libjava)'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2422
          itemValue: addDirToJavaSourcePath
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2423
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2424
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2425
          enabled: hasJava
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2426
          label: 'Add Selected Files to Java Source Path (stx:libjava)'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2427
          itemValue: fileAddToJavaSourcePath
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2428
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2429
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2430
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2431
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2432
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2433
          label: 'File Operations'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2434
          submenuChannel: fileOpMenu
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2435
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2436
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2437
          label: 'File Utilities'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2438
          submenu: 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2439
         (Menu 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2440
           (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2441
              enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2442
              label: 'Editor'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2443
              itemValue: openEditor
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2444
           ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2445
           (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2446
              enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2447
              label: 'HTML Reader'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2448
              itemValue: openHTMLReader
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2449
           ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2450
           (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2451
              enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2452
              label: 'Web Browser'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2453
              itemValue: openWebBrowser
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2454
           ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2455
           (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2456
              label: 'XML Inspector'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2457
              itemValue: inspectXmlFile
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2458
              isVisible: hasXml
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2459
              showBusyCursorWhilePerforming: true
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2460
           ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2461
           (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2462
              enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2463
              label: 'PDF Viewer'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2464
              itemValue: openPDFViewer
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2465
           ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2466
           (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2467
              enabled: hasASN1AndSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2468
              label: 'ASN.1 Browser'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2469
              itemValue: openASN1Browser
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2470
              isVisible: hasASN1
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2471
           ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2472
           (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2473
              enabled: hasCBrowser
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2474
              label: 'C Browser'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2475
              itemValue: openCBrowser
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2476
              isVisible: hasCBrowser
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2477
           ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2478
           (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2479
              enabled: canOpenMonticelloBrowser
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2480
              label: 'Monticello Browser'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2481
              itemValue: doOpenMonticelloBrowser
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2482
           ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2483
           (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2484
              enabled: hasJavaAndSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2485
              label: 'Applet Viewer'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2486
              itemValue: openAppletViewer
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2487
              isVisible: hasJava
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2488
           ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2489
           (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2490
              enabled: hasMP3PlayerAndSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2491
              label: 'MP3 Player'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2492
              itemValue: openMP3Player
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2493
              isVisible: hasMP3Player
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2494
           ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2495
           (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2496
              enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2497
              label: 'xv (Image Viewer)'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2498
              itemValue: openXV
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2499
              isVisible: systemIsUnix
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2500
           ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2501
           (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2502
              enabled: currentFilesAreInSameDirectory
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2503
              label: 'Slide Show'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2504
              itemValue: openSlideShow
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2505
              isVisible: hasSlideShow
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2506
           ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2507
           (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2508
              enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2509
              label: 'gv (Postscript Viewer)'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2510
              itemValue: openGV
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2511
              isVisible: systemIsUnix
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2512
           ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2513
           (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2514
              enabled: hasMP3PlayerAndSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2515
              label: 'MP3 Player'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2516
              itemValue: openMP3Player
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2517
              isVisible: hasMP3Player
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2518
           ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2519
           (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2520
              enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2521
              label: 'VLC (Play video)'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2522
              itemValue: openVideoPlayer
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2523
           ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2524
           (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2525
              label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2526
           ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2527
           (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2528
              label: 'Smalltalk'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2529
              submenu: 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2530
             (Menu 
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2531
               (MenuItem
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2532
                  enabled: hasSnapshotSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2533
                  label: 'Snapshot Image Browser'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2534
                  itemValue: openSnapshotImageBrowser
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2535
               ) 
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2536
               (MenuItem
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2537
                  enabled: canCreateNewProject
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2538
                  label: 'Create Smalltalk Project'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2539
                  itemValue: createProjectAndOpenProjectBrowser
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2540
               ) 
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2541
               (MenuItem
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2542
                  label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2543
               ) 
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2544
               (MenuItem
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2545
                  enabled: hasResourceFileSelected
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2546
                  label: 'Show Contents of Resourcefile'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2547
                  itemValue: readAndShowResources
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2548
               ) 
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2549
               (MenuItem
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2550
                  enabled: hasResourceFileSelected
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2551
                  label: 'Resource File Editor'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2552
                  itemValue: openResourceFileEditor
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2553
                  showBusyCursorWhilePerforming: true
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2554
               ) 
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2555
               (MenuItem
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2556
                  label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2557
               ) 
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2558
               (MenuItem
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2559
                  enabled: hasFileSelection
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2560
                  label: 'Contents as ByteArray'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2561
                  itemValue: fileContentsAsByteArray
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2562
               ) 
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2563
               (MenuItem
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2564
                  label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2565
               ) 
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2566
               (MenuItem
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2567
                  enabled: hasFileSelection
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2568
                  label: 'Changes from GNU Smalltalk Source'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2569
                  itemValue: changeSetFromGSTSource
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2570
               )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2571
             )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2572
           ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2573
           (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2574
              label: 'Image'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2575
              submenu: 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2576
             (Menu 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2577
               (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2578
                  enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2579
                  label: 'Image Editor'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2580
                  itemValue: openImageEditor
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2581
               ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2582
               (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2583
                  enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2584
                  label: 'Image Preview'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2585
                  itemValue: openImagePreview
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2586
               ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2587
               (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2588
                  enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2589
                  label: 'Image Inspector'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2590
                  itemValue: openImageInspector
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2591
               ) 
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2592
               (MenuItem
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2593
                  label: '-'
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2594
               ) 
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2595
               (MenuItem
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2596
                  enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2597
                  label: 'Convert to GIF'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2598
                  itemValue: convertImageToGIF
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2599
               ) 
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2600
               (MenuItem
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2601
                  enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2602
                  label: 'Convert to PNG'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2603
                  itemValue: convertImageToPNG
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2604
               ) 
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2605
               (MenuItem
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2606
                  enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2607
                  label: 'Convert to XPM'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2608
                  itemValue: convertImageToXPM
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2609
               ) 
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2610
               (MenuItem
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2611
                  enabled: hasFileSelection
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2612
                  label: 'Convert to JPG'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2613
                  itemValue: convertImageToJPG
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2614
               )
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2615
             )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2616
           ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2617
           (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2618
              label: 'Web'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2619
              submenu: 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2620
             (Menu 
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2621
               (MenuItem
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2622
                  label: 'Fetch File by URL...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2623
                  itemValue: fetchFileByURL
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2624
               )
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2625
             )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2626
           ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2627
           (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2628
              enabled: hasZipFileSelectedHolder
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2629
              label: 'ZipFile Tool'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2630
              itemValue: openZipTool
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2631
           ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2632
           (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2633
              enabled: hasFileSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2634
              label: 'Hex Dump'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2635
              itemValue: fileHexDump
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2636
           )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2637
         )
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2638
       ) 
19009
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  2639
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2640
     )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2641
!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2642
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2643
viewDetailsMenuSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2644
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2645
     by the MenuEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2646
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2647
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2648
     the MenuEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2649
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2650
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2651
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2652
     MenuEditor new openOnClass:AbstractFileBrowser andSelector:#viewDetailsMenuSpec
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2653
     (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser viewDetailsMenuSpec)) startUp
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2654
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2655
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2656
    <resource: #menu>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2657
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2658
    ^ 
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2659
     #(Menu 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2660
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2661
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2662
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2663
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2664
          label: 'Hidden Files'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2665
          indication: showHiddenFiles
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2666
       )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2667
     )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2668
! !
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  2669
11144
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  2670
!AbstractFileBrowser class methodsFor:'menu specs-scm'!
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  2671
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2672
cvsMenu
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2673
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2674
     by the MenuEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2675
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2676
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2677
     the MenuEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2678
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2679
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2680
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2681
     MenuEditor new openOnClass:AbstractFileBrowser andSelector:#cvsMenu
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2682
     (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser cvsMenu)) startUp
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2683
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2684
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2685
    <resource: #menu>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2686
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2687
    ^ 
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2688
     #(Menu 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2689
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2690
          label: 'Commit (CVS)...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2691
          itemValue: cvsCommit
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2692
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2693
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2694
          enabled: canCvsAddAndCommit
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2695
          label: 'Add && Commit...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2696
          itemValue: cvsAddAndCommit
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2697
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2698
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2699
          enabled: canCvsAddAndCommit
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2700
          label: 'Add as Binary && Commit...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2701
          itemValue: cvsAddBinaryAndCommit
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2702
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2703
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2704
          label: 'Commit Folder (CVS)...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2705
          itemValue: cvsCommitFolder
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2706
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2707
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2708
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2709
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2710
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2711
          enabled: hasSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2712
          label: 'Update Selected Files/Directories'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2713
          itemValue: cvsUpdateSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2714
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2715
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2716
          label: 'Update Directory Local'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2717
          itemValue: cvsUpdateAll
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2718
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2719
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2720
          label: 'Update Directory Recursive'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2721
          itemValue: cvsUpdateAllRecursive
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2722
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2723
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2724
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2725
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2726
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2727
          enabled: hasSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2728
          label: 'Tag...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2729
          itemValue: cvsTagSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2730
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2731
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2732
          enabled: hasSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2733
          label: 'Revision Log'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2734
          itemValue: cvsRevisionLog
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2735
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2736
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2737
          enabled: hasSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2738
          label: 'Compare with Newest in Repository'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2739
          itemValue: cvsCompareWithNewest
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2740
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2741
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2742
          enabled: hasSelection
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2743
          label: 'Browse Repository Versions'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2744
          itemValue: cvsBrowseRepositoryVersions
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2745
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2746
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2747
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2748
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2749
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2750
          enabled: canRemoveCVSContainer
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2751
          label: 'Remove File && CVS Container...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2752
          itemValue: cvsRemoveFileAndCVSContainer
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2753
       )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2754
     )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2755
!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2756
18820
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
  2757
gitMenu
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
  2758
    "This resource specification was automatically generated
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
  2759
     by the MenuEditor of ST/X."
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
  2760
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
  2761
    "Do not manually edit this!! If it is corrupted,
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
  2762
     the MenuEditor may not be able to read the specification."
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
  2763
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
  2764
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
  2765
    "
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2766
     MenuEditor new openOnClass:AbstractFileBrowser andSelector:#gitMenu
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2767
     (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser gitMenu)) startUp
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2768
    "
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2769
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2770
    <resource: #menu>
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2771
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2772
    ^ 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2773
     #(Menu 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2774
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2775
          label: 'Add'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2776
          itemValue: gitAdd
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2777
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2778
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2779
          label: 'Commit Changes'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2780
          itemValue: gitCommit
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2781
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2782
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2783
          label: 'Push...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2784
          itemValue: gitPush
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2785
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2786
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2787
          label: 'Status'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2788
          itemValue: gitStatus
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2789
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2790
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2791
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2792
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2793
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2794
          label: 'Init'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2795
          itemValue: gitInit
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2796
       )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2797
     )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2798
!
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2799
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2800
mercurialMenu
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2801
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2802
     by the MenuEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2803
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2804
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2805
     the MenuEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2806
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2807
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2808
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2809
     MenuEditor new openOnClass:AbstractFileBrowser andSelector:#mercurialMenu
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2810
     (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser mercurialMenu)) startUp
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2811
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2812
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2813
    <resource: #menu>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2814
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2815
    ^ 
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2816
     #(Menu 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2817
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2818
          label: 'Add'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2819
          itemValue: mercurialAdd
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2820
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2821
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2822
          label: 'Commit Changes'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2823
          itemValue: mercurialCommit
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2824
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2825
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2826
          label: 'Push...'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2827
          itemValue: mercurialPush
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2828
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2829
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2830
          label: 'Status'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2831
          itemValue: mercurialStatus
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2832
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2833
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2834
          label: '-'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2835
       ) 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2836
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2837
          label: 'Init'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2838
          itemValue: mercurialInit
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2839
       )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2840
     )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2841
!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2842
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2843
perforceMenu
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2844
    "This resource specification was automatically generated
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2845
     by the MenuEditor of ST/X."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2846
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2847
    "Do not manually edit this!! If it is corrupted,
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2848
     the MenuEditor may not be able to read the specification."
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2849
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2850
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2851
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2852
     MenuEditor new openOnClass:AbstractFileBrowser andSelector:#perforceMenu
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2853
     (Menu new fromLiteralArrayEncoding:(AbstractFileBrowser perforceMenu)) startUp
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2854
    "
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2855
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2856
    <resource: #menu>
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2857
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2858
    ^ 
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2859
     #(Menu 
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2860
       (MenuItem
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2861
          label: 'Commit'
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2862
          itemValue: perforceCommit
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2863
       )
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  2864
     )
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  2865
! !
11144
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  2866
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  2867
!AbstractFileBrowser class methodsFor:'misc'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  2868
321c1729db5b initial checkin
penk
parents:
diff changeset
  2869
newLock
321c1729db5b initial checkin
penk
parents:
diff changeset
  2870
    ^ CodeExecutionLock new
321c1729db5b initial checkin
penk
parents:
diff changeset
  2871
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  2872
17288
37a31feda2e4 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17252
diff changeset
  2873
!AbstractFileBrowser class methodsFor:'queries'!
37a31feda2e4 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17252
diff changeset
  2874
37a31feda2e4 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17252
diff changeset
  2875
isAbstract
37a31feda2e4 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17252
diff changeset
  2876
    ^ self == AbstractFileBrowser
37a31feda2e4 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17252
diff changeset
  2877
! !
37a31feda2e4 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17252
diff changeset
  2878
17868
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  2879
!AbstractFileBrowser class methodsFor:'queries-file'!
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  2880
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  2881
getBestDirectoryFrom:directories
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  2882
    "from a set of directories, return the common parent directory"
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  2883
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  2884
    |stringCol firstPre|
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  2885
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  2886
    directories isEmpty ifTrue:[^ nil].
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  2887
    directories size == 1 ifTrue:[^ directories first].
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  2888
    stringCol := (directories collect:[:file| file asString]) asOrderedCollection.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  2889
    firstPre := stringCol at:1.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  2890
    stringCol from:2 do:[:el|
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  2891
         firstPre :=  firstPre commonPrefixWith:el.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  2892
    ].
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  2893
    (firstPre endsWith:(OperatingSystem fileSeparator)) ifTrue:[
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  2894
        firstPre removeLast.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  2895
    ].
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  2896
    ^ firstPre asFilename
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  2897
! !
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  2898
17746
7b5d6fc64fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17744
diff changeset
  2899
!AbstractFileBrowser class methodsFor:'utilities - dump'!
4610
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  2900
18666
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  2901
contentsOfBytesAsDump:dataOrFileStream base:numberBase numberOfAddressDigits:addrDigits addressStart:virtualStart characterEncoding:characterEncodingSymbol
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2902
    "utility helper: generate a hexDump with addresses;
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2903
     characterEncodingSymbol determines how characters are to be shown in the right (character) columns.
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2904
     By default, this is iso8859-1, but supported are also ebcdic and ascii7,
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2905
     to support display of alien encoded binary data."
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2906
18666
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  2907
    |dataSize lines nHexLines replacementForUnprintable colsPerByte characterDecoder|
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2908
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2909
    (characterEncodingSymbol isNil or:[characterEncodingSymbol == #'iso8859-1']) ifFalse:[
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2910
        characterDecoder := CharacterEncoder encoderToEncodeFrom:characterEncodingSymbol into:#unicode.
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2911
    ].    
17252
1182be543bb2 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17239
diff changeset
  2912
1182be543bb2 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17239
diff changeset
  2913
    "/ used to be:
1182be543bb2 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17239
diff changeset
  2914
    "/ replacementForUnprintable := $.
1182be543bb2 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17239
diff changeset
  2915
    replacementForUnprintable := Character value:16rB7. "/ a centered dot.
11281
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2916
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2917
    "/ cols needed per byte in the hex dump
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2918
    colsPerByte := ((255 printStringRadix:numberBase) size).
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2919
11281
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2920
    "generate a virtual collection which evaluates and returns lines on-demand"
18666
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  2921
    dataSize := dataOrFileStream isStream
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  2922
                    ifTrue:[ dataOrFileStream fileSize ]
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  2923
                    ifFalse:[ dataOrFileStream size ].
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  2924
    nHexLines := (dataSize + 15) // 16.
11281
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2925
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2926
    lines := VirtualArray new.
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2927
    lines setSize:nHexLines + (nHexLines // 16).
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2928
    lines 
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2929
        generator:[:lineNr |
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2930
            |blockNr lineNrInBlock startOffset lineStream asciiLineStream byte line
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2931
             decodedChar charPrinted|
11281
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2932
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2933
            blockNr := (lineNr - 1) // 17.
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2934
            lineNrInBlock := (lineNr - 1) \\ 17.
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2935
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2936
            lineNrInBlock == 16 ifTrue:[
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2937
                line := ''
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2938
            ] ifFalse:[
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2939
                startOffset := ((blockNr * 16) + lineNrInBlock) * 16.
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2940
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2941
                "/ two streams; one for the hex bytes, one for the ascii-interpretation
11281
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2942
                lineStream := String writeStream.
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2943
                asciiLineStream := String writeStream.
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2944
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2945
                lineStream nextPutAll:((startOffset+virtualStart) hexPrintString:addrDigits).
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2946
                lineStream nextPutAll:': '.
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2947
                1 to:16 do:[:i |
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2948
                    i ~~ 1 ifTrue:[ lineStream space ].
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2949
18666
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  2950
                    (startOffset + i) > dataSize ifTrue:[
11281
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2951
                        asciiLineStream nextPut:(Character space).
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2952
                        lineStream spaces:colsPerByte.
11281
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2953
                    ] ifFalse:[
18666
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  2954
                        dataOrFileStream isStream ifTrue:[
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  2955
                            dataOrFileStream position:(startOffset + i - 1).
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  2956
                            byte := dataOrFileStream nextByte.
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  2957
                        ] ifFalse:[    
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  2958
                            byte := dataOrFileStream at:startOffset + i.
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  2959
                        ].
17746
7b5d6fc64fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17744
diff changeset
  2960
                        lineStream nextPutAll:(byte printStringRadix:numberBase size:colsPerByte fill:$0).
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2961
11281
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2962
                        
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2963
                        decodedChar := byte.
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2964
                        characterDecoder notNil ifTrue:[
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2965
                            decodedChar := characterDecoder encode:byte.
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2966
                        ].    
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2967
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2968
                        charPrinted := replacementForUnprintable.
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2969
                        decodedChar notNil ifTrue:[
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2970
                            ((decodedChar between:32 and:127) or:[(decodedChar between:(128+32) and:(128+127))]) ifTrue:[
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2971
                                charPrinted := Character value:decodedChar.
16188
26fe162be79f #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 16160
diff changeset
  2972
                            ] ifFalse:[
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2973
                                (decodedChar between:0 and:31) ifTrue:[
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2974
                                    "/ the 'nul', 'soh' .. 'gs' chars in unicodePage 2400
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2975
                                    "/ are perfect here, but usually not available in the font
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2976
                                    "/ and we have currently no way of knowing if they are...
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2977
                                    "/ (could let the font draw into a bitmap and check if there is something...)
19134
6ac3cadf623d #TUNING by exept
Claus Gittinger <cg@exept.de>
parents: 19031
diff changeset
  2978
                                    "/ For now, write a dot.·
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2979
                                    "/ charPrinted := (Character value:(byte + 16r2400))
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2980
                                ].
16188
26fe162be79f #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 16160
diff changeset
  2981
                            ].
11281
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2982
                        ].
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2983
                        asciiLineStream nextPut:charPrinted.
11281
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2984
                    ].
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2985
                ].
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2986
                line := (lineStream contents paddedTo:(addrDigits + 1 + ((colsPerByte+1)*16) + 6))
11281
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2987
                        , asciiLineStream contents.
11262
b7f40ea56d26 extracted utility:
Claus Gittinger <cg@exept.de>
parents: 11176
diff changeset
  2988
            ].
11281
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2989
            line
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2990
        ].
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2991
    ^ lines.
1064ace6fbfa changed: #contentsOfBytesAsHexDump:numberOfAddressDigits:addressStart:
Claus Gittinger <cg@exept.de>
parents: 11262
diff changeset
  2992
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2993
    "Created: / 12-11-2017 / 11:24:29 / cg"
17750
c55331a80c13 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17746
diff changeset
  2994
    "Modified: / 12-11-2017 / 14:17:59 / cg"
18666
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  2995
    "Modified: / 12-03-2019 / 16:16:53 / Claus Gittinger"
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  2996
!
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  2997
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  2998
contentsOfBytesAsHexDump:dataOrFileStream numberOfAddressDigits:addrDigits addressStart:virtualStart
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  2999
    "utility helper: generate a hexDump with addresses; the character columns at the right show
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3000
     the iso8859-1 characters"
17753
b8b1073d9506 #BUGFIX by mawalch
mawalch
parents: 17750
diff changeset
  3001
b8b1073d9506 #BUGFIX by mawalch
mawalch
parents: 17750
diff changeset
  3002
    ^ self
18666
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3003
        contentsOfBytesAsDump:dataOrFileStream base:16
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3004
        numberOfAddressDigits:addrDigits
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3005
        addressStart:virtualStart
17753
b8b1073d9506 #BUGFIX by mawalch
mawalch
parents: 17750
diff changeset
  3006
        characterEncoding:#'iso8859-1'
11262
b7f40ea56d26 extracted utility:
Claus Gittinger <cg@exept.de>
parents: 11176
diff changeset
  3007
b7f40ea56d26 extracted utility:
Claus Gittinger <cg@exept.de>
parents: 11176
diff changeset
  3008
    "Created: / 13-02-2012 / 15:01:46 / cg"
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3009
    "Modified: / 12-11-2017 / 12:07:12 / cg"
17753
b8b1073d9506 #BUGFIX by mawalch
mawalch
parents: 17750
diff changeset
  3010
    "Modified: / 14-11-2017 / 17:48:19 / mawalch"
18666
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3011
    "Modified (format): / 12-03-2019 / 16:38:26 / Claus Gittinger"
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3012
!
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3013
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3014
contentsOfBytesAsHexDump:dataOrFileStream numberOfAddressDigits:addrDigits addressStart:virtualStart characterEncoding:characterEncodingSymbol 
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3015
    "utility helper: generate a hexDump with addresses;
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3016
     characterEncodingSymbol determines how characters are to be shown in the right (character) columns.
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3017
     By default, this is iso8859-1, but supported are also ebcdic and ascii7,
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3018
     to support display of alien encoded binary data."
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3019
    
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3020
    ^ self 
18666
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3021
        contentsOfBytesAsDump:dataOrFileStream base:16
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3022
        numberOfAddressDigits:addrDigits
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3023
        addressStart:virtualStart
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3024
        characterEncoding:characterEncodingSymbol
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3025
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3026
    "Created: / 12-11-2017 / 11:21:44 / cg"
18666
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3027
    "Modified (format): / 12-03-2019 / 16:38:31 / Claus Gittinger"
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3028
!
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3029
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3030
contentsOfFileAsDump:f base:numberBase withLimit:limitOrNil lastPart:showLastPartOrNil characterEncoding:characterEncoding
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3031
    "opens the file, get its contents and generates a dump for it"
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3032
    
4610
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3033
    |resources fileName stream data offs 
17768
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
  3034
     addrDigits lines answer sizeLimit showLastPart setNewLimit thisFileSizeString|
4610
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3035
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3036
    resources := self classResources.
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3037
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3038
    fileName := f baseName.
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3039
    f isDirectory ifTrue:[
18609
8e78a084139c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18578
diff changeset
  3040
        Dialog warn:(resources string:'"%1" is a directory.' with:fileName).
4610
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3041
        ^ nil
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3042
    ].
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3043
    f exists ifFalse:[
18609
8e78a084139c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18578
diff changeset
  3044
        Dialog warn:(resources string:'oops, "%1" is gone or unreadable.' with:fileName).
4610
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3045
        ^ nil
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3046
    ].
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3047
    f isReadable ifFalse:[
18609
8e78a084139c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18578
diff changeset
  3048
        Dialog warn:(resources string:'"%1" is unreadable.' with:fileName).
4610
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3049
        ^ nil
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3050
    ].
17768
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
  3051
    f fileSize > (self maxFileSizeShownWithoutAsking) ifTrue:[
8472
8673c279211b last part of big files
Claus Gittinger <cg@exept.de>
parents: 8462
diff changeset
  3052
        limitOrNil notNil ifTrue:[
8673c279211b last part of big files
Claus Gittinger <cg@exept.de>
parents: 8462
diff changeset
  3053
            sizeLimit := limitOrNil.
8673c279211b last part of big files
Claus Gittinger <cg@exept.de>
parents: 8462
diff changeset
  3054
            showLastPart := showLastPartOrNil
8673c279211b last part of big files
Claus Gittinger <cg@exept.de>
parents: 8462
diff changeset
  3055
        ] ifFalse:[
17768
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
  3056
            setNewLimit := false.
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
  3057
            thisFileSizeString := (UnitConverter fileSizeStringFor:f fileSize).
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
  3058
            
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
  3059
            Dialog 
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
  3060
                withOptoutOption:[ setNewLimit := true ]
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
  3061
                labelled:(resources string:'No longer ask for files smaller than %1' with:thisFileSizeString)
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
  3062
                do:[
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
  3063
                    answer := Dialog 
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
  3064
                                    confirmWithCancel:(resources
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
  3065
                                                        stringWithCRs:'"%1" is very large (%2).\\Show all or only the first 4 Mb ?' 
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
  3066
                                                        with:(fileName contractTo:40) allBold 
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
  3067
                                                        with:thisFileSizeString)
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
  3068
                                    labels:#('Cancel' 'Show All' 'Show First Part' ).
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
  3069
                ].
8472
8673c279211b last part of big files
Claus Gittinger <cg@exept.de>
parents: 8462
diff changeset
  3070
            answer isNil ifTrue:[^ nil].
8673c279211b last part of big files
Claus Gittinger <cg@exept.de>
parents: 8462
diff changeset
  3071
            answer ifTrue:[
17769
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  3072
                sizeLimit := (4 * 1024 * 1024) "max:self maxFileSizeShownWithoutAsking".
17768
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
  3073
            ] ifFalse:[
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
  3074
                setNewLimit ifTrue:[
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
  3075
                    self maxFileSizeShownWithoutAsking:(self maxFileSizeShownWithoutAsking max:f fileSize).
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
  3076
                ].    
dde98b4c9580 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17762
diff changeset
  3077
            ].    
8436
9d37d5a998ca long hex dumps
Claus Gittinger <cg@exept.de>
parents: 8426
diff changeset
  3078
        ].
4610
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3079
    ].
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3080
18666
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3081
    [
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3082
        stream := f readStream binary.
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3083
        sizeLimit notNil ifTrue:[
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3084
            showLastPart == true ifTrue:[
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3085
                stream position:(f fileSize - sizeLimit).
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3086
            ].
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3087
            data := stream nextBytes:sizeLimit.
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3088
        ] ifFalse:[
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3089
            f fileSize > (1024*1024) ifTrue:[
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3090
                data := stream
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3091
            ] ifFalse:[    
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3092
                data := stream contents.
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3093
            ].
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3094
        ].
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3095
    ] ensure:[
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3096
        (stream notNil and:[stream ~~ data]) ifTrue:[
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3097
            stream close.
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3098
        ].
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3099
    ].
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3100
    
4610
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3101
    offs := 0.
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3102
    lines := StringCollection new.
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3103
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3104
    addrDigits := ((f fileSize + 1) log:16) truncated + 1.
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3105
11262
b7f40ea56d26 extracted utility:
Claus Gittinger <cg@exept.de>
parents: 11176
diff changeset
  3106
    ^ self 
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3107
        contentsOfBytesAsDump:data base:numberBase
11262
b7f40ea56d26 extracted utility:
Claus Gittinger <cg@exept.de>
parents: 11176
diff changeset
  3108
        numberOfAddressDigits:addrDigits
b7f40ea56d26 extracted utility:
Claus Gittinger <cg@exept.de>
parents: 11176
diff changeset
  3109
        addressStart:0
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3110
        characterEncoding:characterEncoding
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3111
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3112
    "Created: / 12-11-2017 / 12:08:10 / cg"
17769
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  3113
    "Modified: / 19-11-2017 / 15:01:34 / cg"
18666
96b9b1954989 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18609
diff changeset
  3114
    "Modified: / 12-03-2019 / 16:18:46 / Claus Gittinger"
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3115
!
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3116
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3117
contentsOfFileAsHexDump:f 
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3118
    "opens the file, get its contents and generates a dump for it"
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3119
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3120
    ^ self 
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3121
        contentsOfFileAsHexDump:f
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3122
        withLimit:nil
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3123
        lastPart:nil
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3124
        characterEncoding:#'iso8859-1'
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3125
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3126
    "Modified (comment): / 12-11-2017 / 12:09:30 / cg"
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3127
!
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3128
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3129
contentsOfFileAsHexDump:f withLimit:limitOrNil lastPart:showLastPartOrNil 
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3130
    "opens the file, get its contents and generates a dump for it"
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3131
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3132
    ^ self 
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3133
        contentsOfFileAsHexDump:f
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3134
        withLimit:limitOrNil
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3135
        lastPart:showLastPartOrNil
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3136
        characterEncoding:#'iso-8859-1'
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3137
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3138
    "Modified (comment): / 12-11-2017 / 12:09:34 / cg"
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3139
!
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3140
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3141
contentsOfFileAsHexDump:f withLimit:limitOrNil lastPart:showLastPartOrNil characterEncoding:characterEncoding 
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3142
    "opens the file, get its contents and generates a dump for it"
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3143
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3144
    ^ self 
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3145
        contentsOfFileAsDump:f base:16
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3146
        withLimit:limitOrNil
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3147
        lastPart:showLastPartOrNil
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3148
        characterEncoding:characterEncoding
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3149
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  3150
    "Created: / 12-11-2017 / 12:02:05 / cg"
4610
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3151
! !
778225bac483 hexDump as utility
Claus Gittinger <cg@exept.de>
parents: 4593
diff changeset
  3152
17868
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3153
!AbstractFileBrowser class methodsFor:'utilities - files'!
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3154
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3155
allFilesInDirectories:directories forWhich:aBlock
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3156
    |allFiles|
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3157
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3158
    directories isEmpty ifTrue:[^ #()].
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3159
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3160
    allFiles := OrderedCollection new.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3161
    directories do:[:dir|
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3162
        [
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3163
            |fileNames|
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3164
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3165
            fileNames := dir directoryContents.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3166
            fileNames notNil ifTrue:[
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3167
                fileNames := fileNames 
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3168
                                collect:[:fn | dir construct:fn]
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3169
                                thenSelect:[:fn | fn isDirectory not and:[aBlock value:fn]].
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3170
                allFiles addAll:fileNames.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3171
            ]
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3172
        ] on:FileStream openErrorSignal do:[:ex|
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3173
            self warn:(self classResources stringWithCRs:'Cannot access: %1\(%2)' 
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3174
                            with:ex pathName
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3175
                            with:ex description).
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3176
            ex proceedWith:nil.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3177
        ].
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3178
    ].
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3179
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3180
    ^ allFiles
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3181
!
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3182
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3183
fileFindDuplicatesIn:directories
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3184
    "scan directories for duplicate files.
17871
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  3185
     return a dictionary mapping duplicate files to their original;
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  3186
     the oldest file found will be the value (original), the younger files (copies) will be the keys.
17868
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3187
     Files without duplicate(s) will not have an entry in the dictionary."
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3188
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3189
    |infoDir filesBySize anySameSized 
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3190
     result allFiles|
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3191
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3192
    directories isEmpty ifTrue:[^ #()].
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3193
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3194
    allFiles := self allFilesInDirectories:directories forWhich:[:f | true].
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3195
    allFiles isEmpty ifTrue:[^ #()].
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3196
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3197
    "/ for each, get the file's info (size, modificationTime etc.).
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3198
    infoDir := Dictionary new.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3199
    allFiles do:[:fn |
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3200
        infoDir at:fn put:(fn info)
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3201
    ].
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3202
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3203
    "/ in a first pass, collect groups by the same size
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3204
    "/ remember those fileSizes for which multiple files exist
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3205
    filesBySize := Dictionary new.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3206
    anySameSized := false.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3207
    infoDir keysAndValuesDo:[:fn :info |
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3208
        |sz entry|
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3209
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3210
        sz := info fileSize.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3211
        entry := filesBySize at:sz ifAbsentPut:[Set new].
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3212
        entry add:fn.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3213
        entry size > 1 ifTrue:[ anySameSized := true ].
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3214
    ].
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3215
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3216
    "/ any of same size ?
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3217
    anySameSized ifFalse:[^ #() ].
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3218
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3219
    result := Dictionary new.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3220
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3221
    "/ now walk over the same-sized files and compare the contents.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3222
    filesBySize do:[:entry |
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3223
        |files|
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3224
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3225
        entry size > 1 ifTrue:[
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3226
            files := entry asArray.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3227
            files 
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3228
                sort:[:a :b |
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3229
                    |tA tB|
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3230
                    tA := (infoDir at:a) modificationTime.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3231
                    tB := (infoDir at:b) modificationTime.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3232
                    tA < tB
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3233
                ].
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3234
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3235
            1 to:files size-1 do:[:idx1 |
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3236
                |fn1|
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3237
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3238
                fn1 := files at:idx1.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3239
                idx1+1 to:files size do:[:idx2 |
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3240
                    |fn2|
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3241
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3242
                    fn2 := files at:idx2.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3243
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3244
                    (result at:fn2 ifAbsent:nil) ~= fn1 ifTrue:[
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3245
                        "/ compare the files
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3246
                        (fn1 sameContentsAs:fn2) ifTrue:[
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3247
                            "/ Transcript show:'Same: '; show:fn1 baseName; show:' and '; showCR:fn2 baseName.
17871
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  3248
                            result at:fn2 put:fn1.
17868
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3249
                        ]
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3250
                    ]
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3251
                ]
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3252
            ]
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3253
        ]
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3254
    ].
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3255
17869
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  3256
    result := result associations copy.
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  3257
"/    result := result collect:[:assoc |
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  3258
"/                                    |f1 f2|
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  3259
"/
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  3260
"/                                    f1 := assoc key asString.
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  3261
"/                                    f2 := assoc value asString.
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  3262
"/                                    f1 < f2 ifTrue:[
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  3263
"/                                        f2 -> f1
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  3264
"/                                    ] ifFalse:[
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  3265
"/                                        f1 -> f2
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  3266
"/                                    ]
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  3267
"/                            ].
17868
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3268
    "/ result sort:[:f1 :f2 | f1 key > f2 key "f2 value < f1 key value"].
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3269
    result sort:[:f1 :f2 | " f1 key > f2 key" f2 value < f1 key value].
17869
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  3270
    result sort:[:f1 :f2 | f1 key < f2 key].
17868
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3271
    ^ result
19009
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  3272
!
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  3273
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  3274
getDirectoryOf:aFileName
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  3275
    |fn |
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  3276
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  3277
    aFileName isNil ifTrue:[
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  3278
        ^ aFileName.    
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  3279
    ].
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  3280
    fn := aFileName asFilename.
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  3281
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  3282
    fn isDirectory ifFalse:[
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  3283
        ^ fn directory.
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  3284
    ].
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  3285
    ^ fn.
17868
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3286
! !
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  3287
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3288
!AbstractFileBrowser methodsFor:'actions'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3289
321c1729db5b initial checkin
penk
parents:
diff changeset
  3290
askForCommandFor:fileName thenDo:aBlock
6284
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  3291
    "setup and launch a querybox to ask for a unix command.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3292
     Then evaluate aBlock passing the command-string as argument."
321c1729db5b initial checkin
penk
parents:
diff changeset
  3293
16160
ed6b8b5cb2d4 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16102
diff changeset
  3294
    |box osName commandString alwaysOpenLikeThisHolder openCmd suffix|
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3295
321c1729db5b initial checkin
penk
parents:
diff changeset
  3296
    osName := OperatingSystem platformName.
321c1729db5b initial checkin
penk
parents:
diff changeset
  3297
321c1729db5b initial checkin
penk
parents:
diff changeset
  3298
    box := FilenameEnterBox 
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  3299
                title:(resources string:'Execute %1 command:' with:osName)
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  3300
               okText:(resources string:'Execute')
4523
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
  3301
               action:[:cmd | commandString := cmd].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3302
321c1729db5b initial checkin
penk
parents:
diff changeset
  3303
    fileName notNil ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  3304
        self initialCommandFor:fileName into:box.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3305
    ].
16160
ed6b8b5cb2d4 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16102
diff changeset
  3306
    alwaysOpenLikeThisHolder := false asValue.
ed6b8b5cb2d4 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16102
diff changeset
  3307
    box verticalPanel add:((CheckBox label:'Always use this command for this file type') model:alwaysOpenLikeThisHolder).
19009
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  3308
    box directory:(self class getDirectoryOf:fileName).
16160
ed6b8b5cb2d4 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16102
diff changeset
  3309
    box open.
ed6b8b5cb2d4 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16102
diff changeset
  3310
    
ed6b8b5cb2d4 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16102
diff changeset
  3311
    "/ box destroy.
ed6b8b5cb2d4 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16102
diff changeset
  3312
    alwaysOpenLikeThisHolder value ifTrue:[
ed6b8b5cb2d4 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16102
diff changeset
  3313
        openCmd := commandString upTo:$".
ed6b8b5cb2d4 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16102
diff changeset
  3314
        suffix := fileName suffix.
16306
3e6267eef3aa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16188
diff changeset
  3315
        UserPreferences current 
3e6267eef3aa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16188
diff changeset
  3316
            defaultFileOpenCommandFor:suffix put:(openCmd,' "%1"');
3e6267eef3aa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16188
diff changeset
  3317
            beModified.
3e6267eef3aa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16188
diff changeset
  3318
        self breakPoint:#cg.
16160
ed6b8b5cb2d4 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16102
diff changeset
  3319
    ].
ed6b8b5cb2d4 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16102
diff changeset
  3320
    
4523
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
  3321
    commandString notNil ifTrue:[
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
  3322
        aBlock value:commandString
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
  3323
    ].
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
  3324
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3325
    "Modified: / 7.9.1995 / 10:31:54 / claus"
321c1729db5b initial checkin
penk
parents:
diff changeset
  3326
    "Modified: / 16.9.1997 / 15:35:10 / stefan"
321c1729db5b initial checkin
penk
parents:
diff changeset
  3327
    "Modified: / 14.8.1998 / 14:12:52 / cg"
321c1729db5b initial checkin
penk
parents:
diff changeset
  3328
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3329
321c1729db5b initial checkin
penk
parents:
diff changeset
  3330
changeFileBrowserTitleTo:aString
4774
5119967dbd89 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  3331
    self 
5119967dbd89 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  3332
        applicationNamed:#FileBrowserV2 
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3333
        ifPresentDo:[:app | app changeFileBrowserTitleTo:aString]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3334
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3335
321c1729db5b initial checkin
penk
parents:
diff changeset
  3336
copyFileList
4774
5119967dbd89 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  3337
    "copy the fileList to the clipBoard"
5119967dbd89 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  3338
4973
e4b72eec43d3 refactoring the browserItemList access in directoryContentsBrowser
penk
parents: 4963
diff changeset
  3339
    |fileList|
e4b72eec43d3 refactoring the browserItemList access in directoryContentsBrowser
penk
parents: 4963
diff changeset
  3340
e4b72eec43d3 refactoring the browserItemList access in directoryContentsBrowser
penk
parents: 4963
diff changeset
  3341
    fileList := self 
4774
5119967dbd89 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  3342
                    applicationNamed:#DirectoryContentsBrowser 
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3343
                    ifPresentDo:[:app | app browserFileList].
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3344
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3345
    fileList notNil ifTrue:[
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3346
        self copyFileListToClipBoard:fileList.
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3347
    ]
4973
e4b72eec43d3 refactoring the browserItemList access in directoryContentsBrowser
penk
parents: 4963
diff changeset
  3348
!
e4b72eec43d3 refactoring the browserItemList access in directoryContentsBrowser
penk
parents: 4963
diff changeset
  3349
e4b72eec43d3 refactoring the browserItemList access in directoryContentsBrowser
penk
parents: 4963
diff changeset
  3350
copyFileListToClipBoard:fileList
4774
5119967dbd89 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  3351
    "copy the itemList to the clipBoard"
5119967dbd89 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  3352
5119967dbd89 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  3353
    |stream|
5119967dbd89 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  3354
4973
e4b72eec43d3 refactoring the browserItemList access in directoryContentsBrowser
penk
parents: 4963
diff changeset
  3355
    fileList isEmpty ifTrue:[^ self].
4774
5119967dbd89 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  3356
5772
603abfa8cf99 copy name(s) to clipboard - on lineFeed if only one file is selected
Claus Gittinger <cg@exept.de>
parents: 5756
diff changeset
  3357
    stream := String writeStream.
603abfa8cf99 copy name(s) to clipboard - on lineFeed if only one file is selected
Claus Gittinger <cg@exept.de>
parents: 5756
diff changeset
  3358
    fileList size == 1 ifTrue:[
603abfa8cf99 copy name(s) to clipboard - on lineFeed if only one file is selected
Claus Gittinger <cg@exept.de>
parents: 5756
diff changeset
  3359
        stream nextPutAll:(fileList first asString).
603abfa8cf99 copy name(s) to clipboard - on lineFeed if only one file is selected
Claus Gittinger <cg@exept.de>
parents: 5756
diff changeset
  3360
    ] ifFalse:[
603abfa8cf99 copy name(s) to clipboard - on lineFeed if only one file is selected
Claus Gittinger <cg@exept.de>
parents: 5756
diff changeset
  3361
        fileList do:[:fileName |
603abfa8cf99 copy name(s) to clipboard - on lineFeed if only one file is selected
Claus Gittinger <cg@exept.de>
parents: 5756
diff changeset
  3362
            (fileName baseName ~= '..') ifTrue:[
603abfa8cf99 copy name(s) to clipboard - on lineFeed if only one file is selected
Claus Gittinger <cg@exept.de>
parents: 5756
diff changeset
  3363
                stream nextPutLine:(fileName asString).
603abfa8cf99 copy name(s) to clipboard - on lineFeed if only one file is selected
Claus Gittinger <cg@exept.de>
parents: 5756
diff changeset
  3364
            ]
603abfa8cf99 copy name(s) to clipboard - on lineFeed if only one file is selected
Claus Gittinger <cg@exept.de>
parents: 5756
diff changeset
  3365
        ].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3366
    ].
6034
7f7d4b7362dd set selection interface changed
ca
parents: 6031
diff changeset
  3367
    self window setClipboardText:stream contents.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3368
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3369
321c1729db5b initial checkin
penk
parents:
diff changeset
  3370
copySelectedFilenames
4774
5119967dbd89 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  3371
    "copy the selected fileNames to the clipBoard"
5119967dbd89 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  3372
4973
e4b72eec43d3 refactoring the browserItemList access in directoryContentsBrowser
penk
parents: 4963
diff changeset
  3373
    |fileList|
e4b72eec43d3 refactoring the browserItemList access in directoryContentsBrowser
penk
parents: 4963
diff changeset
  3374
e4b72eec43d3 refactoring the browserItemList access in directoryContentsBrowser
penk
parents: 4963
diff changeset
  3375
    fileList := self 
4774
5119967dbd89 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  3376
                    applicationNamed:#DirectoryContentsBrowser 
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3377
                    ifPresentDo:[:appl | appl selectedFileNames].
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3378
    fileList notNil ifTrue:[
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3379
        self copyFileListToClipBoard:fileList.
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3380
    ].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3381
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3382
10923
dbaaef801020 added: #doAddArchiver
Claus Gittinger <cg@exept.de>
parents: 10915
diff changeset
  3383
doAddArchiver
dbaaef801020 added: #doAddArchiver
Claus Gittinger <cg@exept.de>
parents: 10915
diff changeset
  3384
    |files|
dbaaef801020 added: #doAddArchiver
Claus Gittinger <cg@exept.de>
parents: 10915
diff changeset
  3385
dbaaef801020 added: #doAddArchiver
Claus Gittinger <cg@exept.de>
parents: 10915
diff changeset
  3386
    files := self currentSelectedFiles.
dbaaef801020 added: #doAddArchiver
Claus Gittinger <cg@exept.de>
parents: 10915
diff changeset
  3387
    files size == 1 ifFalse:[
17818
045764df016c #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17790
diff changeset
  3388
        Dialog information:(resources string:'Select exactly one archive.').
10923
dbaaef801020 added: #doAddArchiver
Claus Gittinger <cg@exept.de>
parents: 10915
diff changeset
  3389
        ^ self
dbaaef801020 added: #doAddArchiver
Claus Gittinger <cg@exept.de>
parents: 10915
diff changeset
  3390
    ].
dbaaef801020 added: #doAddArchiver
Claus Gittinger <cg@exept.de>
parents: 10915
diff changeset
  3391
dbaaef801020 added: #doAddArchiver
Claus Gittinger <cg@exept.de>
parents: 10915
diff changeset
  3392
    self 
dbaaef801020 added: #doAddArchiver
Claus Gittinger <cg@exept.de>
parents: 10915
diff changeset
  3393
        applicationNamed:#FileApplicationNoteBook
dbaaef801020 added: #doAddArchiver
Claus Gittinger <cg@exept.de>
parents: 10915
diff changeset
  3394
        ifPresentDo:[:appl | appl doAddArchiverOn:files first].
dbaaef801020 added: #doAddArchiver
Claus Gittinger <cg@exept.de>
parents: 10915
diff changeset
  3395
dbaaef801020 added: #doAddArchiver
Claus Gittinger <cg@exept.de>
parents: 10915
diff changeset
  3396
    "Created: / 29-11-2011 / 19:01:31 / cg"
17818
045764df016c #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17790
diff changeset
  3397
    "Modified: / 29-11-2017 / 12:25:47 / cg"
10923
dbaaef801020 added: #doAddArchiver
Claus Gittinger <cg@exept.de>
parents: 10915
diff changeset
  3398
!
dbaaef801020 added: #doAddArchiver
Claus Gittinger <cg@exept.de>
parents: 10915
diff changeset
  3399
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3400
doAddTerminal
5960
aa171aa05bab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5959
diff changeset
  3401
    |dir|
aa171aa05bab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5959
diff changeset
  3402
aa171aa05bab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5959
diff changeset
  3403
    dir := self currentDirectory.
aa171aa05bab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5959
diff changeset
  3404
    dir isNil ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  3405
        dir :=  Filename homeDirectory
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3406
    ].
4774
5119967dbd89 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  3407
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3408
    self 
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3409
        applicationNamed:#FileApplicationNoteBook
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3410
        ifPresentDo:[:appl | appl addTerminalIn:dir].
18734
ffbafcfcccf1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 18666
diff changeset
  3411
ffbafcfcccf1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 18666
diff changeset
  3412
    "Modified (format): / 10-04-2019 / 05:53:35 / Claus Gittinger"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3413
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3414
321c1729db5b initial checkin
penk
parents:
diff changeset
  3415
doOpenSearchFile
5961
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  3416
    |item file|
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  3417
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  3418
    file := self firstSelectedFileName.
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  3419
    file isNil ifTrue:[
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  3420
        file := Filename homeDirectory asAbsoluteFilename.
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  3421
    ].
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  3422
    item := DirectoryContentsBrowser itemClass fileName:file.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3423
    self openSearchFileOn:item.
321c1729db5b initial checkin
penk
parents:
diff changeset
  3424
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3425
321c1729db5b initial checkin
penk
parents:
diff changeset
  3426
doShowFileContents
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3427
    self 
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3428
        applicationNamed:#DirectoryContentsBrowser 
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3429
        ifPresentDo:[:appl | ^ appl doShowFileContents].
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3430
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3431
    ^ nil
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3432
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3433
321c1729db5b initial checkin
penk
parents:
diff changeset
  3434
doShowProperties
321c1729db5b initial checkin
penk
parents:
diff changeset
  3435
    "show long stat (file)-info"
321c1729db5b initial checkin
penk
parents:
diff changeset
  3436
321c1729db5b initial checkin
penk
parents:
diff changeset
  3437
    self fileGetInfo:true
321c1729db5b initial checkin
penk
parents:
diff changeset
  3438
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3439
14577
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  3440
enterAction
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  3441
    self 
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  3442
        applicationNamed:#DirectoryContentsBrowser 
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  3443
        ifPresentDo:[:appl | appl ~~ self ifTrue:[ appl enterAction ]].
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  3444
!
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  3445
5528
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3446
fileEncodingDialog
14497
6d95f7c8d28e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14419
diff changeset
  3447
    "open a dialog to allow change of the file's character encoding.
5528
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3448
     Files are converted to internal encoding when read, and converted back
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3449
     to this encoding when saved.
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3450
     Notice: currently, not too many encodings are supported by the system."
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3451
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3452
    |bindings encodings encodingDescr idx selectedEncoding|
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3453
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3454
    encodingDescr := CharacterEncoder supportedExternalEncodings.
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3455
    encodings := encodingDescr collect:[:d | d isNil ifTrue:[nil] ifFalse:[d first]].
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3456
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3457
    bindings := IdentityDictionary new.
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3458
    bindings at:#encodingList put:encodingDescr.
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3459
    bindings at:#selectedEncoding put:(encodings indexOf:self fileEncoding ifAbsent:1) asValue.
5737
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  3460
    bindings at:#lockFileEncoding put:(self lockFileEncodingHolder value asValue).
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  3461
5528
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3462
    (self openDialogInterface:#encodingDialogSpec withBindings:bindings)
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3463
    ifTrue:[
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3464
        idx := (bindings at:#selectedEncoding) value.
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3465
        selectedEncoding := encodings at:idx.
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3466
        selectedEncoding notNil ifTrue:[
5704
82093ade9b35 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5673
diff changeset
  3467
            self fileEncoding:selectedEncoding asSymbol.
5528
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3468
        ].
5737
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  3469
        self lockFileEncoding:(bindings at:#lockFileEncoding) value.
5528
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3470
    ].
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3471
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3472
    "Modified: 30.6.1997 / 14:41:12 / cg"
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3473
!
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3474
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  3475
gotoFile:aFilename 
5380
2f738f3a34b1 fixed bug introduced by stefans beautification ;-)
Claus Gittinger <cg@exept.de>
parents: 5374
diff changeset
  3476
    "select only if the file is not already in the selection"
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  3477
    
5959
27c1d00a790d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5956
diff changeset
  3478
    |currentFileNameHolder currentSel|
27c1d00a790d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5956
diff changeset
  3479
18823
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  3480
    aFilename isNil ifTrue:[^ self].
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  3481
    
5959
27c1d00a790d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5956
diff changeset
  3482
    currentFileNameHolder := self currentFileNameHolder.
27c1d00a790d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5956
diff changeset
  3483
27c1d00a790d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5956
diff changeset
  3484
    currentSel := currentFileNameHolder value.
5380
2f738f3a34b1 fixed bug introduced by stefans beautification ;-)
Claus Gittinger <cg@exept.de>
parents: 5374
diff changeset
  3485
    (currentSel includes:aFilename) ifFalse:[
9677
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  3486
        self withWaitCursorDo:[
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  3487
            currentFileNameHolder value:(OrderedCollection with:(aFilename asAbsoluteFilename)).
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  3488
        ]
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  3489
    ].
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  3490
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  3491
    "Modified: / 29-12-2010 / 11:04:29 / cg"
18823
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  3492
    "Modified: / 15-06-2019 / 08:38:21 / Claus Gittinger"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3493
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3494
11053
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3495
lineEndConventionDialog
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3496
    "open a dialog to allow change of the line end conventions
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3497
     (when writing files)"
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3498
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3499
    |bindings|
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3500
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3501
    bindings := IdentityDictionary new.
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3502
    bindings at:#lineEndConvention put:(self lineEndConvention asValue).
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3503
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3504
    (self openDialogInterface:#lineEndConventionDialogSpec withBindings:bindings)
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3505
    ifTrue:[
15208
c02c92b1c524 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15189
diff changeset
  3506
        self lineEndConventionHolder value:(bindings at:#lineEndConvention) value asSymbol
11053
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3507
    ].
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3508
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3509
    "Created: / 06-01-2012 / 15:34:51 / cg"
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3510
!
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3511
4392
feb0bffd27b8 add new Text Editor tab
penk
parents: 4391
diff changeset
  3512
newTextEditor
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3513
    self 
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3514
        applicationNamed:#FileApplicationNoteBook
15936
4d0368c047f5 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 15915
diff changeset
  3515
        ifPresentDo:[:appl | 
4d0368c047f5 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 15915
diff changeset
  3516
            |editor files item|
4d0368c047f5 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 15915
diff changeset
  3517
4d0368c047f5 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 15915
diff changeset
  3518
            editor := appl newTextEditor.
4d0368c047f5 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 15915
diff changeset
  3519
            (files := self currentSelectedFiles) size == 1 ifTrue:[
4d0368c047f5 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 15915
diff changeset
  3520
                item := DirectoryContentsBrowser itemClass fileName:files first.
4d0368c047f5 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 15915
diff changeset
  3521
                editor item:item.     
4d0368c047f5 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 15915
diff changeset
  3522
            ].    
4d0368c047f5 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 15915
diff changeset
  3523
            ^ editor
4d0368c047f5 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 15915
diff changeset
  3524
        ].
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3525
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3526
    ^ nil.
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3527
!
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3528
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3529
openApplByFileItem:anItem
8490
8bcb3096e3fd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8473
diff changeset
  3530
    "/ q: is the following always wanted ?
9267
a8afd9424514 changed: #openApplByFileItem:
Stefan Vogel <sv@exept.de>
parents: 9206
diff changeset
  3531
    self window sensor shiftDown ifFalse:[
17715
72492b5581af #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 17686
diff changeset
  3532
        ((anItem mimeType startsWith:'application/x-expecco-') 
72492b5581af #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 17686
diff changeset
  3533
         and:[(Smalltalk at:#ExpeccoStartup) notNil]) ifTrue:[
72492b5581af #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 17686
diff changeset
  3534
            (Smalltalk at:#ExpeccoStartup) main:{anItem fileName asString}.
72492b5581af #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 17686
diff changeset
  3535
            ^ self.
72492b5581af #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 17686
diff changeset
  3536
        ].
72492b5581af #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 17686
diff changeset
  3537
10669
079d85556631 changed: #openApplByFileItem:
Claus Gittinger <cg@exept.de>
parents: 10556
diff changeset
  3538
        "/ cg: no - batch and shell scripts are to be
079d85556631 changed: #openApplByFileItem:
Claus Gittinger <cg@exept.de>
parents: 10556
diff changeset
  3539
"/        anItem fileName isExecutableProgram ifTrue:[
079d85556631 changed: #openApplByFileItem:
Claus Gittinger <cg@exept.de>
parents: 10556
diff changeset
  3540
"/            self executeCommand:anItem fileName pathName.
079d85556631 changed: #openApplByFileItem:
Claus Gittinger <cg@exept.de>
parents: 10556
diff changeset
  3541
"/            ^ self.
079d85556631 changed: #openApplByFileItem:
Claus Gittinger <cg@exept.de>
parents: 10556
diff changeset
  3542
"/        ].
9267
a8afd9424514 changed: #openApplByFileItem:
Stefan Vogel <sv@exept.de>
parents: 9206
diff changeset
  3543
8490
8bcb3096e3fd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8473
diff changeset
  3544
"/        OperatingSystem isMSWINDOWSlike ifTrue:[
8bcb3096e3fd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8473
diff changeset
  3545
"/            Error handle:[:ex |
8bcb3096e3fd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8473
diff changeset
  3546
"/            ] do:[
8bcb3096e3fd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8473
diff changeset
  3547
"/                OperatingSystem
8bcb3096e3fd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8473
diff changeset
  3548
"/                    shellExecute:nil
8bcb3096e3fd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8473
diff changeset
  3549
"/                    lpOperation:'open'
8bcb3096e3fd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8473
diff changeset
  3550
"/                    lpFile:(anItem fileName pathName)
8bcb3096e3fd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8473
diff changeset
  3551
"/                    lpParameters:nil
8bcb3096e3fd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8473
diff changeset
  3552
"/                    lpDirectory:(self directory pathName)
8bcb3096e3fd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8473
diff changeset
  3553
"/                    nShowCmd:#SW_SHOWNORMAL.
8bcb3096e3fd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8473
diff changeset
  3554
"/                ^ self.
8bcb3096e3fd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8473
diff changeset
  3555
"/            ]
8bcb3096e3fd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8473
diff changeset
  3556
"/        ]
9267
a8afd9424514 changed: #openApplByFileItem:
Stefan Vogel <sv@exept.de>
parents: 9206
diff changeset
  3557
    ].
5306
Claus Gittinger <cg@exept.de>
parents: 5300
diff changeset
  3558
    ^ self 
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3559
        applicationNamed:#FileApplicationNoteBook
5306
Claus Gittinger <cg@exept.de>
parents: 5300
diff changeset
  3560
        ifPresentDo:[:appl | appl openApplByFileItem:anItem].
10669
079d85556631 changed: #openApplByFileItem:
Claus Gittinger <cg@exept.de>
parents: 10556
diff changeset
  3561
079d85556631 changed: #openApplByFileItem:
Claus Gittinger <cg@exept.de>
parents: 10556
diff changeset
  3562
    "Modified: / 06-09-2011 / 11:11:15 / cg"
17715
72492b5581af #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 17686
diff changeset
  3563
    "Modified: / 18-10-2017 / 10:15:15 / stefan"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3564
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3565
4392
feb0bffd27b8 add new Text Editor tab
penk
parents: 4391
diff changeset
  3566
openApplForFile:aFilename
5306
Claus Gittinger <cg@exept.de>
parents: 5300
diff changeset
  3567
    ^ self openApplByFileItem:(DirectoryContentsBrowser itemClass fileName:aFilename).
4392
feb0bffd27b8 add new Text Editor tab
penk
parents: 4391
diff changeset
  3568
!
feb0bffd27b8 add new Text Editor tab
penk
parents: 4391
diff changeset
  3569
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3570
openCommandResultApplication
321c1729db5b initial checkin
penk
parents:
diff changeset
  3571
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3572
    self 
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3573
        applicationNamed:#FileApplicationNoteBook
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3574
        ifPresentDo:[:appl | ^ appl openCommandResultApplication].
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3575
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3576
    ^ nil
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3577
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3578
5010
27aa6fa93dcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5009
diff changeset
  3579
openNewTextEditorOn:anItem
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3580
    self 
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3581
        applicationNamed:#FileApplicationNoteBook
5010
27aa6fa93dcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5009
diff changeset
  3582
        ifPresentDo:[:appl | ^ appl openNewTextEditorOn:anItem ].
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3583
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3584
    ^ nil
4880
87f511659680 edit file in context menu of DirectoryContentsBroser opens a new tab
penk
parents: 4878
diff changeset
  3585
!
87f511659680 edit file in context menu of DirectoryContentsBroser opens a new tab
penk
parents: 4878
diff changeset
  3586
5010
27aa6fa93dcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5009
diff changeset
  3587
openSearchFileOn:anItem
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3588
    self 
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3589
        applicationNamed:#FileApplicationNoteBook
5010
27aa6fa93dcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5009
diff changeset
  3590
        ifPresentDo:[:appl | ^ appl openSearchFileOn:anItem].
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3591
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3592
    ^ nil.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3593
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3594
5162
f2413a1a747a opening on a file
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  3595
openTextEditorForFile:aFilename
f2413a1a747a opening on a file
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  3596
    ^ self openTextEditorOn:(DirectoryContentsBrowser itemClass fileName:aFilename).
f2413a1a747a opening on a file
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  3597
!
f2413a1a747a opening on a file
Claus Gittinger <cg@exept.de>
parents: 5140
diff changeset
  3598
5010
27aa6fa93dcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5009
diff changeset
  3599
openTextEditorOn:anItem
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3600
    self 
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3601
        applicationNamed:#FileApplicationNoteBook
5010
27aa6fa93dcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5009
diff changeset
  3602
        ifPresentDo:[:appl | ^ appl openTextEditorOn:anItem ].
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3603
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3604
    ^ nil.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3605
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3606
5010
27aa6fa93dcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5009
diff changeset
  3607
openTextEditorOn:anItem type:aDirDescrOrFile
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3608
    self 
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3609
        applicationNamed:#FileApplicationNoteBook
5010
27aa6fa93dcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5009
diff changeset
  3610
        ifPresentDo:[:appl | ^ appl openTextEditorOn:anItem type:aDirDescrOrFile].
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3611
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3612
    ^ nil.
4618
fa8474922061 hexDump from tools menu implemented
penk
parents: 4614
diff changeset
  3613
!
fa8474922061 hexDump from tools menu implemented
penk
parents: 4614
diff changeset
  3614
5959
27c1d00a790d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5956
diff changeset
  3615
setCurrentFileName:aFilename 
27c1d00a790d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5956
diff changeset
  3616
    self setCurrentFileNames:(OrderedCollection with:aFilename).
27c1d00a790d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5956
diff changeset
  3617
!
27c1d00a790d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5956
diff changeset
  3618
27c1d00a790d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5956
diff changeset
  3619
setCurrentFileNames:aCollectionOfFilenames 
27c1d00a790d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5956
diff changeset
  3620
    self currentFileNameHolder value:aCollectionOfFilenames.
27c1d00a790d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5956
diff changeset
  3621
!
27c1d00a790d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5956
diff changeset
  3622
11053
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3623
tabStopConversionDialog
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3624
    "open a dialog to allow change of the tab stop conversion (when reading/writing files)"
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3625
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3626
    |bindings|
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3627
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3628
    bindings := IdentityDictionary new.
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3629
    bindings at:#tabStops put:(self inputTabColumnConversion asValue).
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3630
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3631
    (self openDialogInterface:#tabStopConversionDialogSpec withBindings:bindings)
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3632
    ifTrue:[
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3633
        self inputTabColumnConversionHolder value:(bindings at:#tabStops) value
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3634
    ].
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3635
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3636
    "Created: / 06-01-2012 / 15:36:06 / cg"
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3637
!
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  3638
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3639
updateAndSelect:aColOfFiles
4785
5a3f7a0c3ff1 symbolic link creation code fixed
Claus Gittinger <cg@exept.de>
parents: 4782
diff changeset
  3640
    self updateCurrentDirectory.
4707
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  3641
    aColOfFiles notNil ifTrue:[ 
5959
27c1d00a790d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5956
diff changeset
  3642
        self setCurrentFileNames:aColOfFiles 
4707
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  3643
    ].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3644
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3645
321c1729db5b initial checkin
penk
parents:
diff changeset
  3646
updateCurrentDirectory
5739
ec8cb05922b5 update now reread all the items
penk
parents: 5737
diff changeset
  3647
    self updateCurrentDirectory:false
ec8cb05922b5 update now reread all the items
penk
parents: 5737
diff changeset
  3648
!
ec8cb05922b5 update now reread all the items
penk
parents: 5737
diff changeset
  3649
ec8cb05922b5 update now reread all the items
penk
parents: 5737
diff changeset
  3650
updateCurrentDirectory:withReread
4785
5a3f7a0c3ff1 symbolic link creation code fixed
Claus Gittinger <cg@exept.de>
parents: 4782
diff changeset
  3651
    DirectoryContents flushCachedDirectoryFor:(self getBestDirectory).
5a3f7a0c3ff1 symbolic link creation code fixed
Claus Gittinger <cg@exept.de>
parents: 4782
diff changeset
  3652
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3653
    self 
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3654
        applicationNamed:#DirectoryContentsBrowser 
5739
ec8cb05922b5 update now reread all the items
penk
parents: 5737
diff changeset
  3655
        ifPresentDo:[:appl | withReread ifTrue:[appl doUpdate] ifFalse:[appl doUpdateDirectoryContents]].
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3656
    self 
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3657
        applicationNamed:#DirectoryTreeBrowser     
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3658
        ifPresentDo:[:appl | appl doUpdate].
4345
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  3659
!
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  3660
5739
ec8cb05922b5 update now reread all the items
penk
parents: 5737
diff changeset
  3661
updateCurrentDirectoryWithReread
ec8cb05922b5 update now reread all the items
penk
parents: 5737
diff changeset
  3662
    self updateCurrentDirectory:true
ec8cb05922b5 update now reread all the items
penk
parents: 5737
diff changeset
  3663
!
ec8cb05922b5 update now reread all the items
penk
parents: 5737
diff changeset
  3664
4345
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  3665
withActivityIndicationDo:aBlock
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  3666
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  3667
    self activityVisibilityChannel value:true.
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  3668
    [
9361
bad1ef34ac86 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9343
diff changeset
  3669
        self withWaitCursorDo:[
bad1ef34ac86 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9343
diff changeset
  3670
            aBlock value.
bad1ef34ac86 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9343
diff changeset
  3671
        ]
4345
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  3672
    ] ensure:[
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  3673
        self activityVisibilityChannel value:false.
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  3674
    ]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3675
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  3676
321c1729db5b initial checkin
penk
parents:
diff changeset
  3677
!AbstractFileBrowser methodsFor:'actions bookmarks'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3678
321c1729db5b initial checkin
penk
parents:
diff changeset
  3679
addBookmark
321c1729db5b initial checkin
penk
parents:
diff changeset
  3680
    self currentFilesAreInSameDirectory ifFalse:[^ self].
6725
3885523e54b8 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6708
diff changeset
  3681
    self addBookmarks:(self currentSelectedDirectories).
5960
aa171aa05bab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5959
diff changeset
  3682
    self class saveBookmarksInDefaultBookmarksFile
4679
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
  3683
!
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
  3684
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
  3685
addBookmarks:aColOfDirectories
4672
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
  3686
    aColOfDirectories do:[ :path |
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
  3687
        self class addBookmark:path
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3688
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  3689
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3690
8013
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
  3691
editBookmarks
17849
6b238844d1c0 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 17831
diff changeset
  3692
    self class editBookmarksWithDefault: self currentSelectedDirectories firstOrNil.
6b238844d1c0 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 17831
diff changeset
  3693
6b238844d1c0 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 17831
diff changeset
  3694
    "Modified: / 13-12-2017 / 23:24:39 / stefan"
8013
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
  3695
!
eb4bd1984ca0 editBookmarks
fm
parents: 7990
diff changeset
  3696
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3697
hasBookmarks
4672
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
  3698
    ^ self class hasBookmarks
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3699
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3700
321c1729db5b initial checkin
penk
parents:
diff changeset
  3701
hasBookmarksToRemove
321c1729db5b initial checkin
penk
parents:
diff changeset
  3702
    |bookmarks directories|
321c1729db5b initial checkin
penk
parents:
diff changeset
  3703
3982
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  3704
    directories := self currentSelectedDirectories.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3705
    bookmarks := self class directoryBookmarks.
17416
ccd3335a762a #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17413
diff changeset
  3706
    ^ (bookmarks notEmptyOrNil and:[directories notEmpty])
ccd3335a762a #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17413
diff changeset
  3707
ccd3335a762a #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17413
diff changeset
  3708
    "Modified: / 17-02-2017 / 08:25:22 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3709
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3710
321c1729db5b initial checkin
penk
parents:
diff changeset
  3711
removeBookmark
4672
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
  3712
    self currentSelectedDirectories do:[:dir|
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
  3713
        self class removeBookmark:dir
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3714
    ].
4679
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
  3715
!
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
  3716
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
  3717
saveBookmarks
b2fd1d45a7c9 save bookmarks;
Claus Gittinger <cg@exept.de>
parents: 4672
diff changeset
  3718
     self class saveBookmarks
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3719
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  3720
321c1729db5b initial checkin
penk
parents:
diff changeset
  3721
!AbstractFileBrowser methodsFor:'actions history'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3722
321c1729db5b initial checkin
penk
parents:
diff changeset
  3723
addToCommandHistory:aCommandString for:aFilename
6369
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
  3724
    |cmd suffix cmdHist historySize|
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3725
321c1729db5b initial checkin
penk
parents:
diff changeset
  3726
    cmdHist := self class commandHistory.
6482
00207f456339 isEmptyOrNil / notEmptyOrNil refactoring
Claus Gittinger <cg@exept.de>
parents: 6479
diff changeset
  3727
    (aCommandString notEmptyOrNil) ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  3728
        cmdHist notNil ifTrue:[
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  3729
            cmdHist addFirst:aCommandString.
6369
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
  3730
            historySize := self class commandHistorySize.
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
  3731
            (historySize notNil and:[cmdHist size > historySize]) ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  3732
                cmdHist removeLast
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  3733
            ]
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  3734
        ].
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  3735
        aFilename notNil ifTrue:[
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  3736
            cmd := aCommandString copyTo:(aCommandString indexOf:Character space ifAbsent:[aCommandString size + 1])-1.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  3737
            DefaultCommandPerSuffix isNil ifTrue:[
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  3738
                DefaultCommandPerSuffix := Dictionary new.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  3739
            ].
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  3740
            suffix := aFilename asFilename suffix.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  3741
            suffix notNil ifTrue:[
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  3742
                DefaultCommandPerSuffix at:suffix put:cmd.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  3743
            ]
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  3744
        ]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3745
    ]
321c1729db5b initial checkin
penk
parents:
diff changeset
  3746
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3747
321c1729db5b initial checkin
penk
parents:
diff changeset
  3748
doBack
6286
fac153824f35 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6284
diff changeset
  3749
    "go backward in the history"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3750
4022
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
  3751
    | fileName|
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
  3752
6369
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
  3753
    fileName := self directoryHistory goBackward.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3754
    fileName notNil ifTrue:[
4347
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
  3755
        self gotoFile:(fileName asFilename).
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3756
    ]
321c1729db5b initial checkin
penk
parents:
diff changeset
  3757
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3758
321c1729db5b initial checkin
penk
parents:
diff changeset
  3759
doForward
6286
fac153824f35 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6284
diff changeset
  3760
    "go forward in the history"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3761
3964
8697bad1c903 next stage for history
penk
parents: 3963
diff changeset
  3762
    | fileName|
8697bad1c903 next stage for history
penk
parents: 3963
diff changeset
  3763
6369
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
  3764
    fileName := self directoryHistory goForward.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3765
    fileName notNil ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  3766
        self gotoFile:(fileName asFilename).
4022
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
  3767
    ] ifFalse:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  3768
        self enableForward value:false.
18823
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  3769
    ].
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  3770
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  3771
    "Modified (format): / 15-06-2019 / 08:38:41 / Claus Gittinger"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3772
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  3773
321c1729db5b initial checkin
penk
parents:
diff changeset
  3774
!AbstractFileBrowser methodsFor:'applications'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3775
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3776
applicationNamed:anApplicationName ifPresentDo:aBlock
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3777
    |appl|
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3778
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3779
    appl := self applications at:anApplicationName ifAbsent:nil.
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3780
    appl notNil ifTrue:[
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3781
        ^ aBlock value:appl
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3782
    ].
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3783
    ^ nil.
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3784
!
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  3785
4004
f97168a68093 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4000
diff changeset
  3786
directoryContentsBrowser
f97168a68093 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4000
diff changeset
  3787
    ^ self applications at:#DirectoryContentsBrowser ifAbsent:nil.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3788
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  3789
321c1729db5b initial checkin
penk
parents:
diff changeset
  3790
!AbstractFileBrowser methodsFor:'aspects'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3791
321c1729db5b initial checkin
penk
parents:
diff changeset
  3792
applications
321c1729db5b initial checkin
penk
parents:
diff changeset
  3793
    ^ aspects at:#applications
321c1729db5b initial checkin
penk
parents:
diff changeset
  3794
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3795
321c1729db5b initial checkin
penk
parents:
diff changeset
  3796
backgroundProcesses
321c1729db5b initial checkin
penk
parents:
diff changeset
  3797
321c1729db5b initial checkin
penk
parents:
diff changeset
  3798
    ^ self aspectFor:#backgroundProcesses ifAbsent:[List new]
321c1729db5b initial checkin
penk
parents:
diff changeset
  3799
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3800
4230
805e8d4b4ec7 added make.
Claus Gittinger <cg@exept.de>
parents: 4213
diff changeset
  3801
canMake
15259
14297d826b29 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15215
diff changeset
  3802
    ^ self aspectFor:#canMake ifAbsent:[ ValueHolder with:false ].
4230
805e8d4b4ec7 added make.
Claus Gittinger <cg@exept.de>
parents: 4213
diff changeset
  3803
!
805e8d4b4ec7 added make.
Claus Gittinger <cg@exept.de>
parents: 4213
diff changeset
  3804
18246
1217eb5963fc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18175
diff changeset
  3805
canOpenChangeBrowser
1217eb5963fc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18175
diff changeset
  3806
    ^ self aspectFor:#canOpenChangeBrowser ifAbsent:[ false asValue ].
1217eb5963fc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18175
diff changeset
  3807
1217eb5963fc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18175
diff changeset
  3808
    "Created: / 30-06-2018 / 18:29:53 / Claus Gittinger"
1217eb5963fc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18175
diff changeset
  3809
!
1217eb5963fc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18175
diff changeset
  3810
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3811
currentDirectories
6725
3885523e54b8 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6708
diff changeset
  3812
    " returns a holder on a Collection of all currently selected directories  
3885523e54b8 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6708
diff changeset
  3813
      if only a file is selected, currentDirectories holds the directory of the file
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3814
    "
321c1729db5b initial checkin
penk
parents:
diff changeset
  3815
321c1729db5b initial checkin
penk
parents:
diff changeset
  3816
    ^ self aspectFor:#currentDirectories ifAbsent:[ (OrderedCollection new) asValue ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  3817
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3818
6725
3885523e54b8 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6708
diff changeset
  3819
currentDirectoriesValue
3885523e54b8 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6708
diff changeset
  3820
    " returns a Collection of all currently selected directories  
3885523e54b8 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6708
diff changeset
  3821
      if only a file is selected, currentDirectories holds the directory of the file
3885523e54b8 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6708
diff changeset
  3822
    "
3885523e54b8 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6708
diff changeset
  3823
3885523e54b8 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6708
diff changeset
  3824
    ^ self currentDirectories value
3885523e54b8 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6708
diff changeset
  3825
!
3885523e54b8 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6708
diff changeset
  3826
5334
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  3827
currentDirectory
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  3828
    "return the single current directory or nil"
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  3829
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  3830
    |directories|
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  3831
6725
3885523e54b8 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6708
diff changeset
  3832
    directories := self currentSelectedDirectories.
5334
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  3833
    (directories size ~= 1) ifTrue:[
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  3834
        ^ nil
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  3835
    ].
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  3836
    ^ directories first.
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  3837
!
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  3838
13856
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  3839
currentDirectoryDisplayed
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  3840
    "Return a directory as Filename that is currently displayed in the browser"
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  3841
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  3842
    ^self subclassResponsibility
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  3843
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  3844
    "Created: / 14-01-2013 / 11:57:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  3845
!
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  3846
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3847
currentFileNameHolder
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  3848
    "return a ValueHolder with an OrderedCollection containing all selected files.
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  3849
     If no file but a directory is selected it contains the directories 
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  3850
     in contrast to currentDirectories which have only the directories"
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  3851
6589
fd0a284321cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6586
diff changeset
  3852
    ^ self aspectFor:#currentFileNameHolder 
fd0a284321cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6586
diff changeset
  3853
        ifAbsent:[
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  3854
            |currentSel|    
4800
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  3855
4692
f87e230b4688 Shelter class variable from rubbish.
martin
parents: 4684
diff changeset
  3856
            currentSel := self class currentSelection.
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  3857
            currentSel isEmpty ifTrue:[
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  3858
                currentSel := OrderedCollection with:(Filename currentDirectory asAbsoluteFilename)
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  3859
            ].
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  3860
            currentSel asValue
6589
fd0a284321cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6586
diff changeset
  3861
        ] 
fd0a284321cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6586
diff changeset
  3862
        notPresentDo:[:holder|
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  3863
            |filenames newFilenames|
4213
b8e7d4276a33 startup if old filename not present - go up to first directory in path
penk
parents: 4203
diff changeset
  3864
            filenames := holder value.
b8e7d4276a33 startup if old filename not present - go up to first directory in path
penk
parents: 4203
diff changeset
  3865
            newFilenames := Set new.
6589
fd0a284321cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6586
diff changeset
  3866
            filenames do:[:eachFilename|  
18805
f6df57c6dbfb #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18775
diff changeset
  3867
                |existingFilename count|
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  3868
                existingFilename := eachFilename. 
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  3869
                existingFilename notNil ifTrue:[
18805
f6df57c6dbfb #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18775
diff changeset
  3870
                    count := 0.
f6df57c6dbfb #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18775
diff changeset
  3871
                    [existingFilename isRootDirectory or:[existingFilename exists or:[count > 10]]] whileFalse:[
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  3872
                        existingFilename := existingFilename directory.
18805
f6df57c6dbfb #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18775
diff changeset
  3873
                        count := count + 1.
4955
378481247391 if no item is selected directory up action do nothing now
penk
parents: 4950
diff changeset
  3874
                    ].
9649
ad956ada348e changed: #currentFileNameHolder
Claus Gittinger <cg@exept.de>
parents: 9607
diff changeset
  3875
                    existingFilename exists ifTrue:[
ad956ada348e changed: #currentFileNameHolder
Claus Gittinger <cg@exept.de>
parents: 9607
diff changeset
  3876
                        newFilenames add:existingFilename.
ad956ada348e changed: #currentFileNameHolder
Claus Gittinger <cg@exept.de>
parents: 9607
diff changeset
  3877
                    ].
4955
378481247391 if no item is selected directory up action do nothing now
penk
parents: 4950
diff changeset
  3878
                ]
4213
b8e7d4276a33 startup if old filename not present - go up to first directory in path
penk
parents: 4203
diff changeset
  3879
            ].
b8e7d4276a33 startup if old filename not present - go up to first directory in path
penk
parents: 4203
diff changeset
  3880
            newFilenames asOrderedCollection.
b8e7d4276a33 startup if old filename not present - go up to first directory in path
penk
parents: 4203
diff changeset
  3881
        ]
9649
ad956ada348e changed: #currentFileNameHolder
Claus Gittinger <cg@exept.de>
parents: 9607
diff changeset
  3882
ad956ada348e changed: #currentFileNameHolder
Claus Gittinger <cg@exept.de>
parents: 9607
diff changeset
  3883
    "Modified: / 27-11-2010 / 15:42:45 / cg"
18805
f6df57c6dbfb #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18775
diff changeset
  3884
    "Modified: / 05-06-2019 / 14:12:48 / Claus Gittinger"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3885
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3886
5528
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3887
defaultFileEncoding
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3888
    ^ #'iso8859-1' "/ #'utf-8'
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3889
!
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3890
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3891
enableDirectoryUp
321c1729db5b initial checkin
penk
parents:
diff changeset
  3892
15259
14297d826b29 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15215
diff changeset
  3893
    ^ self aspectFor:#enableDirectoryUp ifAbsent:[ValueHolder with:false]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3894
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3895
6456
c4d6e69319bc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6454
diff changeset
  3896
enableGotoDefaultDirectory
15259
14297d826b29 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15215
diff changeset
  3897
    ^ self aspectFor:#enableGotoDefaultDirectory ifAbsent:[ ValueHolder with:true ].
4593
a2b057480bfc added gotoDefault button
Claus Gittinger <cg@exept.de>
parents: 4585
diff changeset
  3898
!
a2b057480bfc added gotoDefault button
Claus Gittinger <cg@exept.de>
parents: 4585
diff changeset
  3899
8168
04ed636784fb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8127
diff changeset
  3900
enableGotoDesktop
14308
192c81c86815 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14298
diff changeset
  3901
    "/ backward compatibility
192c81c86815 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14298
diff changeset
  3902
    ^ self enableGotoDesktopDirectory.
8168
04ed636784fb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8127
diff changeset
  3903
!
04ed636784fb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8127
diff changeset
  3904
9572
Claus Gittinger <cg@exept.de>
parents: 9509
diff changeset
  3905
enableGotoDesktopDirectory
15259
14297d826b29 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15215
diff changeset
  3906
    ^ self aspectFor:#enableGotoDesktopDirectory ifAbsent:[ ValueHolder with:true ].
9572
Claus Gittinger <cg@exept.de>
parents: 9509
diff changeset
  3907
Claus Gittinger <cg@exept.de>
parents: 9509
diff changeset
  3908
    "Created: / 01-10-2010 / 16:19:17 / cg"
Claus Gittinger <cg@exept.de>
parents: 9509
diff changeset
  3909
!
Claus Gittinger <cg@exept.de>
parents: 9509
diff changeset
  3910
18511
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  3911
enableGotoDocumentsDirectory
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  3912
    ^ self aspectFor:#enableGotoDocumentsDirectory ifAbsent:[ ValueHolder with:true ].
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  3913
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  3914
    "Created: / 01-10-2010 / 16:19:17 / cg"
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  3915
!
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  3916
18352
ee486b3355c7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18274
diff changeset
  3917
enableGotoDownloadsDirectory
ee486b3355c7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18274
diff changeset
  3918
    ^ self aspectFor:#enableGotoDownloadsDirectory ifAbsent:[ ValueHolder with:true ].
ee486b3355c7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18274
diff changeset
  3919
ee486b3355c7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18274
diff changeset
  3920
    "Created: / 01-10-2010 / 16:19:17 / cg"
ee486b3355c7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18274
diff changeset
  3921
!
ee486b3355c7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18274
diff changeset
  3922
6434
b856db206ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6433
diff changeset
  3923
enableGotoSmalltalkDirectory
6456
c4d6e69319bc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6454
diff changeset
  3924
    ^ self aspectFor:#enableGotoSmalltalkDirectory ifAbsent:[ true asValue ].
6434
b856db206ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6433
diff changeset
  3925
!
b856db206ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6433
diff changeset
  3926
17187
3dcae3e757cd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17182
diff changeset
  3927
enableGotoSmalltalkWorkspaceDirectory
3dcae3e757cd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17182
diff changeset
  3928
    ^ self aspectFor:#enableGotoSmalltalkWorkspaceDirectory ifAbsent:[ true asValue ].
3dcae3e757cd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17182
diff changeset
  3929
!
3dcae3e757cd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17182
diff changeset
  3930
9677
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  3931
enableGotoTempDirectory
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  3932
    ^ self aspectFor:#enableGotoTempDirectory ifAbsent:[ true asValue ].
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  3933
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  3934
    "Created: / 29-12-2010 / 11:01:17 / cg"
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  3935
!
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  3936
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3937
enableHome
321c1729db5b initial checkin
penk
parents:
diff changeset
  3938
321c1729db5b initial checkin
penk
parents:
diff changeset
  3939
    ^ self aspectFor:#enableHome ifAbsent:[ true asValue ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  3940
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3941
9596
Claus Gittinger <cg@exept.de>
parents: 9582
diff changeset
  3942
enableMakeCurrentDirectory
Claus Gittinger <cg@exept.de>
parents: 9582
diff changeset
  3943
    ^ self aspectFor:#enableMakeCurrentDirectory ifAbsent:[ true asValue ].
Claus Gittinger <cg@exept.de>
parents: 9582
diff changeset
  3944
Claus Gittinger <cg@exept.de>
parents: 9582
diff changeset
  3945
    "Created: / 26-10-2010 / 17:17:58 / cg"
Claus Gittinger <cg@exept.de>
parents: 9582
diff changeset
  3946
!
Claus Gittinger <cg@exept.de>
parents: 9582
diff changeset
  3947
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  3948
enableViewNoteBookApplication
321c1729db5b initial checkin
penk
parents:
diff changeset
  3949
321c1729db5b initial checkin
penk
parents:
diff changeset
  3950
    ^ self aspectFor:#enableViewNoteBookApplication ifAbsent:[false asValue]
321c1729db5b initial checkin
penk
parents:
diff changeset
  3951
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  3952
5528
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3953
fileEncoding
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3954
    ^ self fileEncodingHolder value
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3955
!
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3956
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3957
fileEncoding:newEncoding
5533
263ed8c55a1d encoding stuff
Claus Gittinger <cg@exept.de>
parents: 5528
diff changeset
  3958
    self fileEncodingHolder value:newEncoding.
263ed8c55a1d encoding stuff
Claus Gittinger <cg@exept.de>
parents: 5528
diff changeset
  3959
263ed8c55a1d encoding stuff
Claus Gittinger <cg@exept.de>
parents: 5528
diff changeset
  3960
    self 
263ed8c55a1d encoding stuff
Claus Gittinger <cg@exept.de>
parents: 5528
diff changeset
  3961
        applicationNamed:#FileApplicationNoteBook
263ed8c55a1d encoding stuff
Claus Gittinger <cg@exept.de>
parents: 5528
diff changeset
  3962
        ifPresentDo:[:nb | 
263ed8c55a1d encoding stuff
Claus Gittinger <cg@exept.de>
parents: 5528
diff changeset
  3963
            |appl|
263ed8c55a1d encoding stuff
Claus Gittinger <cg@exept.de>
parents: 5528
diff changeset
  3964
263ed8c55a1d encoding stuff
Claus Gittinger <cg@exept.de>
parents: 5528
diff changeset
  3965
            appl := nb selectedApplication.
5535
f19a31cf305d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5533
diff changeset
  3966
            (appl notNil and:[appl isTextEditor]) ifTrue:[
5533
263ed8c55a1d encoding stuff
Claus Gittinger <cg@exept.de>
parents: 5528
diff changeset
  3967
                appl fileEncoding:newEncoding
263ed8c55a1d encoding stuff
Claus Gittinger <cg@exept.de>
parents: 5528
diff changeset
  3968
            ]
263ed8c55a1d encoding stuff
Claus Gittinger <cg@exept.de>
parents: 5528
diff changeset
  3969
        ].
5528
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3970
!
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5491
diff changeset
  3971
5737
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  3972
fileEncodingHolder
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  3973
    ^ self 
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  3974
        aspectFor:#fileEncodingHolder 
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  3975
        ifAbsent:[
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  3976
            self 
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  3977
                applicationNamed:#FileApplicationNoteBook
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  3978
                ifPresentDo:[:appl | appl fileEncodingHolder].
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  3979
        ]
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  3980
!
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  3981
17485
03eb18e3a5f6 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 17481
diff changeset
  3982
fileEntryFieldHolder
03eb18e3a5f6 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 17481
diff changeset
  3983
    ^ self subclassResponsibility.
03eb18e3a5f6 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 17481
diff changeset
  3984
03eb18e3a5f6 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 17481
diff changeset
  3985
    "Created: / 31-03-2017 / 11:36:49 / stefan"
03eb18e3a5f6 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 17481
diff changeset
  3986
!
03eb18e3a5f6 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 17481
diff changeset
  3987
5961
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  3988
firstSelectedFileName
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  3989
    |files|
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  3990
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  3991
    files := self currentSelectedObjects.
5961
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  3992
    files notEmpty ifTrue:[
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  3993
        ^ files first
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  3994
    ].
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  3995
    ^ nil
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  3996
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  3997
    "Modified: / 04-12-2006 / 13:14:53 / cg"
5961
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  3998
!
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  3999
6456
c4d6e69319bc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6454
diff changeset
  4000
gotoDefaultDirectoryIsVisible
9596
Claus Gittinger <cg@exept.de>
parents: 9582
diff changeset
  4001
    ^ true.
Claus Gittinger <cg@exept.de>
parents: 9582
diff changeset
  4002
"/    ^ (Filename defaultDirectory asAbsoluteFilename) ~= (self smalltalkDirectory asAbsoluteFilename).
Claus Gittinger <cg@exept.de>
parents: 9582
diff changeset
  4003
Claus Gittinger <cg@exept.de>
parents: 9582
diff changeset
  4004
    "Modified: / 26-10-2010 / 17:23:51 / cg"
6456
c4d6e69319bc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6454
diff changeset
  4005
!
c4d6e69319bc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6454
diff changeset
  4006
9572
Claus Gittinger <cg@exept.de>
parents: 9509
diff changeset
  4007
gotoDesktopDirectoryIsVisible
Claus Gittinger <cg@exept.de>
parents: 9509
diff changeset
  4008
    Filename desktopDirectory = Filename homeDirectory ifTrue:[^ false].
Claus Gittinger <cg@exept.de>
parents: 9509
diff changeset
  4009
Claus Gittinger <cg@exept.de>
parents: 9509
diff changeset
  4010
    ^ (Filename desktopDirectory asAbsoluteFilename) ~= (self smalltalkDirectory asAbsoluteFilename).
Claus Gittinger <cg@exept.de>
parents: 9509
diff changeset
  4011
Claus Gittinger <cg@exept.de>
parents: 9509
diff changeset
  4012
    "Created: / 01-10-2010 / 16:26:27 / cg"
Claus Gittinger <cg@exept.de>
parents: 9509
diff changeset
  4013
!
Claus Gittinger <cg@exept.de>
parents: 9509
diff changeset
  4014
18834
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  4015
hasFileOrCypressPackageSelection
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  4016
    ^ self aspectFor:#hasFileOrCypressPackageSelection ifAbsentPut:[ false asValue ].
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  4017
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  4018
    "Created: / 23-06-2019 / 13:05:51 / Claus Gittinger"
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  4019
!
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  4020
4618
fa8474922061 hexDump from tools menu implemented
penk
parents: 4614
diff changeset
  4021
hasFileSelection
fa8474922061 hexDump from tools menu implemented
penk
parents: 4614
diff changeset
  4022
    ^ self aspectFor:#hasFileSelection ifAbsent:[ false asValue ].
fa8474922061 hexDump from tools menu implemented
penk
parents: 4614
diff changeset
  4023
!
fa8474922061 hexDump from tools menu implemented
penk
parents: 4614
diff changeset
  4024
9490
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4025
hasNotTwoDirectoriesSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4026
    ^ self 
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4027
        aspectFor:#hasNotTwoDirectoriesSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4028
        ifAbsent:[
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4029
            BlockValue 
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4030
                with:[:m | self hasTwoDirectoriesSelected not]
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4031
                argument:self currentFileNameHolder
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4032
        ].
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4033
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4034
    "Created: / 20-05-2010 / 10:45:50 / cg"
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4035
!
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4036
5830
fd5a247d6fb3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5828
diff changeset
  4037
hasNotTwoFilesSelectedHolder
9490
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4038
    ^ self 
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4039
        aspectFor:#hasNotTwoFilesSelectedHolder
5830
fd5a247d6fb3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5828
diff changeset
  4040
        ifAbsent:[
fd5a247d6fb3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5828
diff changeset
  4041
            BlockValue 
fd5a247d6fb3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5828
diff changeset
  4042
                with:[:m | self hasTwoFilesSelected not]
fd5a247d6fb3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5828
diff changeset
  4043
                argument:self currentFileNameHolder
fd5a247d6fb3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5828
diff changeset
  4044
        ].
9490
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4045
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4046
    "Modified: / 20-05-2010 / 10:46:01 / cg"
5830
fd5a247d6fb3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5828
diff changeset
  4047
!
fd5a247d6fb3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5828
diff changeset
  4048
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4049
hasSelection
17923
75e9605da9f0 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17889
diff changeset
  4050
    "aspect holding true, if a file is selected"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4051
321c1729db5b initial checkin
penk
parents:
diff changeset
  4052
    ^ self aspectFor:#hasSelection ifAbsent:[ false asValue ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  4053
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4054
9490
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4055
hasTwoDirectoriesSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4056
    ^ self 
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4057
        aspectFor:#hasTwoDirectoriesSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4058
        ifAbsent:[
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4059
            BlockValue 
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4060
                with:[:m | self hasTwoDirectoriesSelected]
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4061
                argument:self currentFileNameHolder
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4062
        ].
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4063
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4064
    "Created: / 20-05-2010 / 10:45:41 / cg"
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4065
!
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4066
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  4067
hasTwoFilesSelectedHolder
9490
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4068
    ^ self 
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4069
        aspectFor:#hasTwoFilesSelectedHolder
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  4070
        ifAbsent:[
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  4071
            BlockValue 
5830
fd5a247d6fb3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5828
diff changeset
  4072
                with:[:m | self hasTwoFilesSelected]
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  4073
                argument:self currentFileNameHolder
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  4074
        ].
9490
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4075
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  4076
    "Modified: / 20-05-2010 / 10:46:08 / cg"
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  4077
!
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  4078
11053
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4079
inputTabColumnConversion
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4080
    ^ self inputTabColumnConversionHolder value
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4081
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4082
    "Created: / 06-01-2012 / 15:25:56 / cg"
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4083
!
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4084
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4085
inputTabColumnConversionHolder
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4086
    ^ self 
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4087
        aspectFor:#inputTabColumnConversionHolder 
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4088
        ifAbsent:[
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4089
            self 
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4090
                applicationNamed:#FileApplicationNoteBook
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4091
                ifPresentDo:[:appl | appl inputTabColumnConversionHolder].
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4092
        ]
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4093
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4094
    "Created: / 06-01-2012 / 15:26:16 / cg"
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4095
!
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4096
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4097
lineEndConvention
15208
c02c92b1c524 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15189
diff changeset
  4098
    ^ self lineEndConventionHolder value asSymbol
11053
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4099
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4100
    "Created: / 06-01-2012 / 13:05:14 / cg"
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4101
!
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4102
11591
e29642ba38b9 added: #lineEndConvention:
Claus Gittinger <cg@exept.de>
parents: 11501
diff changeset
  4103
lineEndConvention: aSymbol
18525
de9b7b5fc8ba #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 18511
diff changeset
  4104
    self lineEndConventionHolder value:(aSymbol ifNotNil:[aSymbol asSymbol])
11591
e29642ba38b9 added: #lineEndConvention:
Claus Gittinger <cg@exept.de>
parents: 11501
diff changeset
  4105
e29642ba38b9 added: #lineEndConvention:
Claus Gittinger <cg@exept.de>
parents: 11501
diff changeset
  4106
    "Created: / 11-07-2012 / 19:51:58 / cg"
18525
de9b7b5fc8ba #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 18511
diff changeset
  4107
    "Modified: / 13-11-2018 / 11:13:41 / Stefan Vogel"
11591
e29642ba38b9 added: #lineEndConvention:
Claus Gittinger <cg@exept.de>
parents: 11501
diff changeset
  4108
!
e29642ba38b9 added: #lineEndConvention:
Claus Gittinger <cg@exept.de>
parents: 11501
diff changeset
  4109
11053
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4110
lineEndConventionHolder
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4111
    ^ self 
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4112
        aspectFor:#lineEndConventionHolder 
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4113
        ifAbsent:[
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4114
            self 
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4115
                applicationNamed:#FileApplicationNoteBook
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4116
                ifPresentDo:[:appl | appl lineEndConventionHolder].
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4117
        ]
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4118
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4119
    "Created: / 06-01-2012 / 13:02:51 / cg"
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4120
!
496110873111 added:12 methods
Claus Gittinger <cg@exept.de>
parents: 11052
diff changeset
  4121
5737
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4122
lockFileEncoding:aBoolean
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4123
    self lockFileEncodingHolder value:aBoolean.
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4124
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4125
    self 
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4126
        applicationNamed:#FileApplicationNoteBook
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4127
        ifPresentDo:[:nb | 
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4128
            |appl|
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4129
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4130
            appl := nb selectedApplication.
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4131
            (appl notNil and:[appl isTextEditor]) ifTrue:[
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4132
                appl lockFileEncoding:aBoolean
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4133
            ]
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4134
        ].
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4135
!
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4136
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4137
lockFileEncodingHolder
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4138
    ^ self 
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4139
        aspectFor:#lockFileEncodingHolder 
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4140
        ifAbsent:[
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4141
            self 
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4142
                applicationNamed:#FileApplicationNoteBook
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4143
                ifPresentDo:[:appl | appl lockFileEncodingHolder].
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4144
        ]
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4145
!
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4146
13856
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4147
makeCommandHolder
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4148
    ^ self aspectFor:#makeCommandHolder ifAbsent:[ nil asValue ].
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4149
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4150
    "Created: / 13-04-2012 / 17:01:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4151
!
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4152
4523
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
  4153
notify:aString
11108
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  4154
    "aString is shown in the lower pane"
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  4155
4523
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
  4156
    self notifyChannel value:aString
11108
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  4157
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  4158
    "Modified (comment): / 11-01-2012 / 21:46:55 / cg"
4523
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
  4159
!
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
  4160
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4161
notifyChannel
321c1729db5b initial checkin
penk
parents:
diff changeset
  4162
321c1729db5b initial checkin
penk
parents:
diff changeset
  4163
    ^ self aspectFor:#notifyChannel ifAbsent:['' asValue]
4071
f923c8257818 *** empty log message ***
penk
parents: 4060
diff changeset
  4164
!
f923c8257818 *** empty log message ***
penk
parents: 4060
diff changeset
  4165
9575
548adf8e9d98 added: #progressPercentageHolder
Claus Gittinger <cg@exept.de>
parents: 9572
diff changeset
  4166
progressPercentageHolder
548adf8e9d98 added: #progressPercentageHolder
Claus Gittinger <cg@exept.de>
parents: 9572
diff changeset
  4167
    ^ self aspectFor:#progressPercentageHolder ifAbsent:[ nil asValue ].
548adf8e9d98 added: #progressPercentageHolder
Claus Gittinger <cg@exept.de>
parents: 9572
diff changeset
  4168
548adf8e9d98 added: #progressPercentageHolder
Claus Gittinger <cg@exept.de>
parents: 9572
diff changeset
  4169
    "Created: / 11-10-2010 / 12:54:46 / cg"
548adf8e9d98 added: #progressPercentageHolder
Claus Gittinger <cg@exept.de>
parents: 9572
diff changeset
  4170
!
548adf8e9d98 added: #progressPercentageHolder
Claus Gittinger <cg@exept.de>
parents: 9572
diff changeset
  4171
4071
f923c8257818 *** empty log message ***
penk
parents: 4060
diff changeset
  4172
rootHolder
f923c8257818 *** empty log message ***
penk
parents: 4060
diff changeset
  4173
    "holder, which keeps the rootHolder of the treeView
f923c8257818 *** empty log message ***
penk
parents: 4060
diff changeset
  4174
    "
f923c8257818 *** empty log message ***
penk
parents: 4060
diff changeset
  4175
4368
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
  4176
    ^ self aspectFor:#rootHolder ifAbsent:[
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
  4177
        self class rootHolder asValue.
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
  4178
    ].
8192
26660fb61e7a Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents: 8185
diff changeset
  4179
!
26660fb61e7a Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents: 8185
diff changeset
  4180
26660fb61e7a Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents: 8185
diff changeset
  4181
rootHolder:aHolder
26660fb61e7a Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents: 8185
diff changeset
  4182
26660fb61e7a Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents: 8185
diff changeset
  4183
    self aspectFor:#rootHolder put:aHolder
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4184
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  4185
321c1729db5b initial checkin
penk
parents:
diff changeset
  4186
!AbstractFileBrowser methodsFor:'aspects handling'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4187
321c1729db5b initial checkin
penk
parents:
diff changeset
  4188
aspectFor:something ifAbsent:aBlock
6284
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  4189
    "returns the model for an aspect; these are stored in a common dictionary"
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  4190
4800
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4191
    ^ self aspectFor:something ifAbsent:aBlock notPresentDo:nil
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4192
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4193
4976
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4194
aspectFor:aKey ifAbsent:aBlock notPresentDo:notPresentBlock
6284
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  4195
    "returns the model for an aspect; these are stored in a common dictionary"
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  4196
4213
b8e7d4276a33 startup if old filename not present - go up to first directory in path
penk
parents: 4203
diff changeset
  4197
    |holder saveAspectItem aspect|
b8e7d4276a33 startup if old filename not present - go up to first directory in path
penk
parents: 4203
diff changeset
  4198
4976
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4199
    holder := aspects at:aKey ifAbsent:[
4800
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4200
        masterApplication notNil ifTrue:[
4976
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4201
            holder := masterApplication aspectOrNil:aKey forSubApplication:self.
4800
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4202
        ].
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4203
        holder isNil ifTrue:[
4976
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4204
            saveAspectItem := self runtimeAspectValueFor:aKey.
4800
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4205
            saveAspectItem notNil ifTrue:[
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4206
                saveAspectItem isHolder ifTrue:[
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4207
                    holder := ValueHolder with:saveAspectItem value 
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4208
                ] ifFalse:[
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4209
                    holder := saveAspectItem value 
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4210
                ].
4213
b8e7d4276a33 startup if old filename not present - go up to first directory in path
penk
parents: 4203
diff changeset
  4211
            ] ifFalse:[
4976
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4212
                aspect := self userPreferencesAspectValueFor:aKey.
4800
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4213
                aspect notNil ifTrue:[ 
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4214
                    holder := aspect asValue
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4215
                ] ifFalse:[
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4216
                    holder := aBlock value.
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4217
                ]
4213
b8e7d4276a33 startup if old filename not present - go up to first directory in path
penk
parents: 4203
diff changeset
  4218
            ].
b8e7d4276a33 startup if old filename not present - go up to first directory in path
penk
parents: 4203
diff changeset
  4219
        ].
b8e7d4276a33 startup if old filename not present - go up to first directory in path
penk
parents: 4203
diff changeset
  4220
        holder notNil ifTrue:[  
4800
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4221
            notPresentBlock notNil ifTrue:[
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4222
                holder value:(notPresentBlock value:holder).
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4223
            ].
4976
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4224
            aspects at:aKey put:holder
4800
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4225
        ].
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4226
        holder
4213
b8e7d4276a33 startup if old filename not present - go up to first directory in path
penk
parents: 4203
diff changeset
  4227
    ].
b8e7d4276a33 startup if old filename not present - go up to first directory in path
penk
parents: 4203
diff changeset
  4228
    ^ holder
b8e7d4276a33 startup if old filename not present - go up to first directory in path
penk
parents: 4203
diff changeset
  4229
!
b8e7d4276a33 startup if old filename not present - go up to first directory in path
penk
parents: 4203
diff changeset
  4230
18834
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  4231
aspectFor:something ifAbsentPut:aBlock
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  4232
    "returns the model for an aspect; these are stored in a common dictionary"
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  4233
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  4234
    ^ self aspectFor:something ifAbsent:[|v| v := aBlock value. self aspectFor:something put:v. v]
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  4235
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  4236
    "Created: / 23-06-2019 / 13:05:37 / Claus Gittinger"
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  4237
!
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  4238
4800
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4239
aspectFor:something put:aValueHolder
6284
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  4240
    "stores the model for an aspect; these are stored in a common dictionary"
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  4241
4800
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4242
    aspects at:something put:aValueHolder
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4243
!
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  4244
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4245
aspects
6284
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  4246
    "returns the common aspect dictionary"
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  4247
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4248
    ^ aspects
321c1729db5b initial checkin
penk
parents:
diff changeset
  4249
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4250
321c1729db5b initial checkin
penk
parents:
diff changeset
  4251
runtimeAspectValueFor:something
321c1729db5b initial checkin
penk
parents:
diff changeset
  4252
    "returns the default aspect item from the class variable RuntimeAspects
321c1729db5b initial checkin
penk
parents:
diff changeset
  4253
    "
321c1729db5b initial checkin
penk
parents:
diff changeset
  4254
    ^ self class runtimeAspects at:something ifAbsent:nil.
321c1729db5b initial checkin
penk
parents:
diff changeset
  4255
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4256
4201
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4257
saveAspectValues
16306
3e6267eef3aa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16188
diff changeset
  4258
    |prefs saveAspects aspectValue|
3e6267eef3aa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16188
diff changeset
  4259
3e6267eef3aa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16188
diff changeset
  4260
    prefs := UserPreferences current.
3e6267eef3aa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16188
diff changeset
  4261
    
7078
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
  4262
    saveAspects := self class userPreferencesAspectList keys.
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
  4263
    saveAspects do:[ :aspectKey |
4201
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4264
        aspectValue := (self perform:aspectKey) value.
16306
3e6267eef3aa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16188
diff changeset
  4265
        prefs 
7078
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
  4266
            at: ('fileBrowser_',aspectKey asString) asSymbol 
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
  4267
            put: aspectValue.
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
  4268
    ].
16306
3e6267eef3aa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16188
diff changeset
  4269
    prefs beModified.
3e6267eef3aa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16188
diff changeset
  4270
    
7078
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
  4271
    "Modified: / 04-09-2006 / 10:02:41 / cg"
4201
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4272
!
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4273
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4274
saveRuntimeAspectValues
321c1729db5b initial checkin
penk
parents:
diff changeset
  4275
    |savedAspects dictionary value isHolder aspect|
321c1729db5b initial checkin
penk
parents:
diff changeset
  4276
5941
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
  4277
    savedAspects := self class listOfRuntimeValuesToRemember.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4278
    dictionary := Dictionary new.
5941
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
  4279
    savedAspects do:[:aspectKey | 
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  4280
        aspect := self perform:aspectKey.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  4281
        isHolder := aspect isValueModel.
5941
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
  4282
        isHolder ifTrue:[
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
  4283
            value := aspect value
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
  4284
        ] ifFalse:[
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
  4285
            value := aspect
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
  4286
        ].
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
  4287
        dictionary at:aspectKey
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
  4288
            put:(SaveAspectItem withValue:value isHolder:isHolder)
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
  4289
    ].
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
  4290
    RuntimeAspects := dictionary.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4291
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4292
4201
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4293
userPreferencesAspectValueFor:something
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4294
    "returns the default aspect from the Userpreferences
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4295
    "
4201
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4296
7078
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
  4297
    (self class userPreferencesAspectList includesKey:something) ifFalse:[ ^ nil].
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
  4298
    ^ UserPreferences current 
47db06f88879 preference-keys are private (no dependencies in UserPrefs)
Claus Gittinger <cg@exept.de>
parents: 7050
diff changeset
  4299
        at:('fileBrowser_',something) asSymbol
9579
7107f49e4583 changed: #userPreferencesAspectValueFor:
Claus Gittinger <cg@exept.de>
parents: 9575
diff changeset
  4300
        ifAbsent:nil "(self class userPreferencesAspectList at:something)".
7107f49e4583 changed: #userPreferencesAspectValueFor:
Claus Gittinger <cg@exept.de>
parents: 9575
diff changeset
  4301
7107f49e4583 changed: #userPreferencesAspectValueFor:
Claus Gittinger <cg@exept.de>
parents: 9575
diff changeset
  4302
    "Modified: / 14-10-2010 / 19:16:38 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4303
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  4304
4011
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4305
!AbstractFileBrowser methodsFor:'aspects-filter'!
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4306
9015
c6ecad0d7fdd added: #filter:
Claus Gittinger <cg@exept.de>
parents: 8994
diff changeset
  4307
filter:aString
c6ecad0d7fdd added: #filter:
Claus Gittinger <cg@exept.de>
parents: 8994
diff changeset
  4308
    self filterModel value:aString
c6ecad0d7fdd added: #filter:
Claus Gittinger <cg@exept.de>
parents: 8994
diff changeset
  4309
!
c6ecad0d7fdd added: #filter:
Claus Gittinger <cg@exept.de>
parents: 8994
diff changeset
  4310
4018
43e02c59719d *** empty log message ***
penk
parents: 4011
diff changeset
  4311
filterBackgroundColor
43e02c59719d *** empty log message ***
penk
parents: 4011
diff changeset
  4312
43e02c59719d *** empty log message ***
penk
parents: 4011
diff changeset
  4313
    ^ self aspectFor:#filterBackgroundColor ifAbsent:[Color white asValue]
43e02c59719d *** empty log message ***
penk
parents: 4011
diff changeset
  4314
!
43e02c59719d *** empty log message ***
penk
parents: 4011
diff changeset
  4315
4011
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4316
filterBlockHolder
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4317
5658
eef91fc147fa filter: allow multiple patterns
Claus Gittinger <cg@exept.de>
parents: 5644
diff changeset
  4318
    ^ self aspectFor:#filterBlockHolder ifAbsent:[self makeFilterBlock asValue]
4011
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4319
!
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4320
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4321
filterListModel
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4322
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4323
    ^ self aspectFor:#filterListModel ifAbsent:[self class defaultFilterList]
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4324
!
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4325
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4326
filterModel
5941
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
  4327
    |m|
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
  4328
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
  4329
    m := self aspectFor:#filterModel ifAbsent:[(self filterListModel at:1) asValue].
0191d8b73eb8 do not remember filter
Claus Gittinger <cg@exept.de>
parents: 5936
diff changeset
  4330
    ^ m
4011
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4331
!
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4332
8185
8b6f11fd7fbf Make #filterModel reusable as SubCanvas
Stefan Vogel <sv@exept.de>
parents: 8172
diff changeset
  4333
filterModel:aHolder
8b6f11fd7fbf Make #filterModel reusable as SubCanvas
Stefan Vogel <sv@exept.de>
parents: 8172
diff changeset
  4334
    self aspectFor:#filterModel put:aHolder.
8b6f11fd7fbf Make #filterModel reusable as SubCanvas
Stefan Vogel <sv@exept.de>
parents: 8172
diff changeset
  4335
!
8b6f11fd7fbf Make #filterModel reusable as SubCanvas
Stefan Vogel <sv@exept.de>
parents: 8172
diff changeset
  4336
4018
43e02c59719d *** empty log message ***
penk
parents: 4011
diff changeset
  4337
filterValueBox
43e02c59719d *** empty log message ***
penk
parents: 4011
diff changeset
  4338
43e02c59719d *** empty log message ***
penk
parents: 4011
diff changeset
  4339
    ^ self aspectFor:#filterValueBox ifAbsent:[ValueHolder new]
43e02c59719d *** empty log message ***
penk
parents: 4011
diff changeset
  4340
!
43e02c59719d *** empty log message ***
penk
parents: 4011
diff changeset
  4341
5658
eef91fc147fa filter: allow multiple patterns
Claus Gittinger <cg@exept.de>
parents: 5644
diff changeset
  4342
makeFilterBlock
14497
6d95f7c8d28e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14419
diff changeset
  4343
    "return a two-arg filterblock on the file's path- and base-name. This block should return true for files
9102
6beb56becd84 changed: #makeFilterBlock
Claus Gittinger <cg@exept.de>
parents: 9015
diff changeset
  4344
     to be shown"
6beb56becd84 changed: #makeFilterBlock
Claus Gittinger <cg@exept.de>
parents: 9015
diff changeset
  4345
17481
a2fe1e2e1727 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 17416
diff changeset
  4346
    | filterString filterStrings filters notFilters showHidden filterBlock caseSensitive|
5658
eef91fc147fa filter: allow multiple patterns
Claus Gittinger <cg@exept.de>
parents: 5644
diff changeset
  4347
eef91fc147fa filter: allow multiple patterns
Claus Gittinger <cg@exept.de>
parents: 5644
diff changeset
  4348
    filterString := self filterModel value.
eef91fc147fa filter: allow multiple patterns
Claus Gittinger <cg@exept.de>
parents: 5644
diff changeset
  4349
    filterString = '' ifTrue:[filterString := '*'].
17481
a2fe1e2e1727 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 17416
diff changeset
  4350
    caseSensitive := "ignoreCaseInPattern ?" Filename isCaseSensitive.
5658
eef91fc147fa filter: allow multiple patterns
Claus Gittinger <cg@exept.de>
parents: 5644
diff changeset
  4351
eef91fc147fa filter: allow multiple patterns
Claus Gittinger <cg@exept.de>
parents: 5644
diff changeset
  4352
    filterStrings := filterString asCollectionOfSubstringsSeparatedBy:$;.
12760
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4353
    filterStrings := filterStrings
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4354
                select:[:eachFilter | eachFilter withoutSeparators notEmpty].
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4355
5658
eef91fc147fa filter: allow multiple patterns
Claus Gittinger <cg@exept.de>
parents: 5644
diff changeset
  4356
    filters := filterStrings
12760
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4357
                reject:[:eachFilter | eachFilter withoutSeparators startsWith:'~']
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4358
                thenCollect:
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4359
                    [:eachPattern |
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4360
                        |pattern|
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4361
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4362
                        pattern := eachPattern withoutSeparators.
15597
0d047081deb7 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15589
diff changeset
  4363
                        pattern includesMatchCharacters ifFalse:[
0d047081deb7 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15589
diff changeset
  4364
                            "JV@2012-03-05: Add implict star at the beginning and at the end of pattern,
0d047081deb7 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15589
diff changeset
  4365
                             that's how most of the other applications behave - do what most users expect"
17772
52be86700796 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17769
diff changeset
  4366
                            "/ pattern first == $* ifFalse:[pattern := '*' , pattern].
52be86700796 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17769
diff changeset
  4367
                            "/ pattern last  == $* ifFalse:[pattern := pattern , '*'].
52be86700796 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17769
diff changeset
  4368
                            [:name :baseName | baseName asLowercase includesString:pattern caseSensitive:caseSensitive]
52be86700796 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17769
diff changeset
  4369
                        ] ifTrue:[
52be86700796 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17769
diff changeset
  4370
                            pattern = '*' ifTrue:[
52be86700796 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17769
diff changeset
  4371
                                [:name :baseName | true].
52be86700796 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17769
diff changeset
  4372
                            ] ifFalse:[    
52be86700796 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17769
diff changeset
  4373
                                [:name :baseName | pattern match:baseName caseSensitive:caseSensitive]
52be86700796 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17769
diff changeset
  4374
                            ].
15597
0d047081deb7 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15589
diff changeset
  4375
                        ].
12760
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4376
                    ].
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4377
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4378
    notFilters := filterStrings
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4379
                select:[:eachFilter | eachFilter withoutSeparators startsWith:'~']
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4380
                thenCollect:
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4381
                    [:eachPattern |
9296
98f29a4338b8 changed: #makeFilterBlock
Stefan Vogel <sv@exept.de>
parents: 9268
diff changeset
  4382
                        |pattern|
98f29a4338b8 changed: #makeFilterBlock
Stefan Vogel <sv@exept.de>
parents: 9268
diff changeset
  4383
98f29a4338b8 changed: #makeFilterBlock
Stefan Vogel <sv@exept.de>
parents: 9268
diff changeset
  4384
                        pattern := eachPattern withoutSeparators.
12760
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4385
                        pattern := (pattern copyFrom:2) withoutSeparators.
17481
a2fe1e2e1727 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 17416
diff changeset
  4386
                        [:name :baseName | pattern match:baseName caseSensitive:caseSensitive]
9296
98f29a4338b8 changed: #makeFilterBlock
Stefan Vogel <sv@exept.de>
parents: 9268
diff changeset
  4387
                    ].
5658
eef91fc147fa filter: allow multiple patterns
Claus Gittinger <cg@exept.de>
parents: 5644
diff changeset
  4388
12760
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4389
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4390
    (filters size == 1 and:[notFilters isEmpty]) ifTrue:[ 
5658
eef91fc147fa filter: allow multiple patterns
Claus Gittinger <cg@exept.de>
parents: 5644
diff changeset
  4391
        filterBlock := filters first 
eef91fc147fa filter: allow multiple patterns
Claus Gittinger <cg@exept.de>
parents: 5644
diff changeset
  4392
    ] ifFalse:[
12760
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4393
        filters isEmpty ifTrue:[
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4394
            filterBlock := [:name :baseName | 
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4395
                               (notFilters contains:[:aFilter | aFilter value:name value:baseName ]) not
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4396
                           ].
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4397
        ] ifFalse:[
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4398
            notFilters isEmpty ifTrue:[
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4399
                filterBlock := [:name :baseName | 
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4400
                                   (filters contains:[:aFilter | aFilter value:name value:baseName ])
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4401
                               ].
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4402
            ] ifFalse:[
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4403
                filterBlock := [:name :baseName | 
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4404
                                   (filters contains:[:aFilter | aFilter value:name value:baseName ])
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4405
                                   and:[ (notFilters contains:[:aFilter | aFilter value:name value:baseName ]) not ]
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4406
                               ].
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4407
            ]
4416657efa36 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12707
diff changeset
  4408
        ]
5658
eef91fc147fa filter: allow multiple patterns
Claus Gittinger <cg@exept.de>
parents: 5644
diff changeset
  4409
    ].
eef91fc147fa filter: allow multiple patterns
Claus Gittinger <cg@exept.de>
parents: 5644
diff changeset
  4410
4011
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4411
    showHidden := self showHiddenFiles value.
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4412
    showHidden ifTrue:[
5658
eef91fc147fa filter: allow multiple patterns
Claus Gittinger <cg@exept.de>
parents: 5644
diff changeset
  4413
        ^ filterBlock.
eef91fc147fa filter: allow multiple patterns
Claus Gittinger <cg@exept.de>
parents: 5644
diff changeset
  4414
    ].
9296
98f29a4338b8 changed: #makeFilterBlock
Stefan Vogel <sv@exept.de>
parents: 9268
diff changeset
  4415
    ^ [:name :baseName | 
98f29a4338b8 changed: #makeFilterBlock
Stefan Vogel <sv@exept.de>
parents: 9268
diff changeset
  4416
                name isHidden not and:[filterBlock value:name value:baseName]].
13856
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4417
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4418
    "Modified: / 05-02-2012 / 01:42:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
17481
a2fe1e2e1727 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 17416
diff changeset
  4419
    "Modified: / 27-03-2017 / 12:52:08 / stefan"
17772
52be86700796 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17769
diff changeset
  4420
    "Modified: / 20-11-2017 / 22:02:04 / cg"
4018
43e02c59719d *** empty log message ***
penk
parents: 4011
diff changeset
  4421
!
43e02c59719d *** empty log message ***
penk
parents: 4011
diff changeset
  4422
43e02c59719d *** empty log message ***
penk
parents: 4011
diff changeset
  4423
shownFiles
43e02c59719d *** empty log message ***
penk
parents: 4011
diff changeset
  4424
43e02c59719d *** empty log message ***
penk
parents: 4011
diff changeset
  4425
    ^ self aspectFor:#shownFiles ifAbsent:['-/-' asValue]
4011
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4426
! !
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4427
14126
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
  4428
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4429
!AbstractFileBrowser methodsFor:'aspects-history'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4430
321c1729db5b initial checkin
penk
parents:
diff changeset
  4431
dirHistory
6369
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
  4432
    "obsolete"
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
  4433
    ^ self directoryHistory
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
  4434
!
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
  4435
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
  4436
directoryHistory
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
  4437
    ^ self class directoryHistory
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4438
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4439
321c1729db5b initial checkin
penk
parents:
diff changeset
  4440
enableBack
321c1729db5b initial checkin
penk
parents:
diff changeset
  4441
15259
14297d826b29 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15215
diff changeset
  4442
    ^ self aspectFor:#enableBack ifAbsent:[ValueHolder with:false]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4443
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4444
321c1729db5b initial checkin
penk
parents:
diff changeset
  4445
enableFileHistory
321c1729db5b initial checkin
penk
parents:
diff changeset
  4446
15259
14297d826b29 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15215
diff changeset
  4447
    ^ self aspectFor:#enableFileHistory ifAbsent:[ValueHolder with:false]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4448
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4449
321c1729db5b initial checkin
penk
parents:
diff changeset
  4450
enableForward
321c1729db5b initial checkin
penk
parents:
diff changeset
  4451
15259
14297d826b29 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15215
diff changeset
  4452
    ^ self aspectFor:#enableForward ifAbsent:[ValueHolder with:false]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4453
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4454
321c1729db5b initial checkin
penk
parents:
diff changeset
  4455
fileHistory
9820
07b7d7929e3e variable renamed in: #fileHistory
Stefan Vogel <sv@exept.de>
parents: 9793
diff changeset
  4456
    ^ self aspectFor:#fileHistory ifAbsent:[OrderedSet new]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4457
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  4458
321c1729db5b initial checkin
penk
parents:
diff changeset
  4459
!AbstractFileBrowser methodsFor:'aspects-visibility'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4460
4345
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  4461
activityVisibilityChannel
6284
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  4462
    " activityVisibilityChannel switches the activity indicator on/off"
4345
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  4463
15259
14297d826b29 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15215
diff changeset
  4464
    ^ self aspectFor:#activityVisibilityChannel ifAbsent:[ ValueHolder with:false ].
4345
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  4465
!
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  4466
15111
3c2f1e7dc492 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15108
diff changeset
  4467
alwaysUseSmalltalkTools
3c2f1e7dc492 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15108
diff changeset
  4468
    " aspect to prevent os tools to be opened on double click"
3c2f1e7dc492 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15108
diff changeset
  4469
15259
14297d826b29 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15215
diff changeset
  4470
    ^ self aspectFor:#alwaysUseSmalltalkTools ifAbsent:[ ValueHolder with:true ].
15111
3c2f1e7dc492 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15108
diff changeset
  4471
!
3c2f1e7dc492 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15108
diff changeset
  4472
6602
6510a174cddc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6593
diff changeset
  4473
changeSetBrowserItemVisible
18834
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  4474
    ^ self hasFileOrCypressPackageSelection value
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  4475
    or:[Screen current ctrlDown].
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  4476
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  4477
    "Modified: / 23-06-2019 / 13:13:53 / Claus Gittinger"
6602
6510a174cddc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6593
diff changeset
  4478
!
6510a174cddc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6593
diff changeset
  4479
11135
59e1d94df37f hg menu preps
Claus Gittinger <cg@exept.de>
parents: 11108
diff changeset
  4480
cvsMenusAreShown
18820
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
  4481
    ^ self class cvsMenusAreShown
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
  4482
!
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
  4483
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
  4484
gitMenusAreShown
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
  4485
    ^ self class gitMenusAreShown
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
  4486
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
  4487
    "Created: / 10-06-2019 / 15:56:16 / Claus Gittinger"
11135
59e1d94df37f hg menu preps
Claus Gittinger <cg@exept.de>
parents: 11108
diff changeset
  4488
!
59e1d94df37f hg menu preps
Claus Gittinger <cg@exept.de>
parents: 11108
diff changeset
  4489
13856
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4490
hgMenusAreShown
18820
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
  4491
    ^ self class hgMenusAreShown
13856
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4492
!
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4493
11135
59e1d94df37f hg menu preps
Claus Gittinger <cg@exept.de>
parents: 11108
diff changeset
  4494
mercurialMenusAreShown
18820
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
  4495
    ^ self class mercurialMenusAreShown
11135
59e1d94df37f hg menu preps
Claus Gittinger <cg@exept.de>
parents: 11108
diff changeset
  4496
!
59e1d94df37f hg menu preps
Claus Gittinger <cg@exept.de>
parents: 11108
diff changeset
  4497
4110
79f87cb97704 *** empty log message ***
penk
parents: 4107
diff changeset
  4498
openAlwaysInTextEditor
18274
78c789c6c2bf #DOCUMENTATION by stefan
Stefan Vogel <sv@exept.de>
parents: 18264
diff changeset
  4499
    "aspect for open every file in TextEditor don't use e.g. HtmlEditor for *.html'"
4110
79f87cb97704 *** empty log message ***
penk
parents: 4107
diff changeset
  4500
15111
3c2f1e7dc492 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15108
diff changeset
  4501
    ^ self aspectFor:#openAlwaysInTextEditor ifAbsent:[ false asValue ].
18274
78c789c6c2bf #DOCUMENTATION by stefan
Stefan Vogel <sv@exept.de>
parents: 18264
diff changeset
  4502
78c789c6c2bf #DOCUMENTATION by stefan
Stefan Vogel <sv@exept.de>
parents: 18264
diff changeset
  4503
    "Modified (comment): / 19-07-2018 / 15:28:00 / Stefan Vogel"
4110
79f87cb97704 *** empty log message ***
penk
parents: 4107
diff changeset
  4504
!
79f87cb97704 *** empty log message ***
penk
parents: 4107
diff changeset
  4505
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4506
openMultipleApplicationsForType
321c1729db5b initial checkin
penk
parents:
diff changeset
  4507
4201
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4508
    " aspect for open more applications for e.g. TextEditor and not change the contents of already 
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4509
      open TextEditor "
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4510
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4511
    ^ self aspectFor:#openMultipleApplicationsForType ifAbsent:[ false asValue ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  4512
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4513
11137
Claus Gittinger <cg@exept.de>
parents: 11135
diff changeset
  4514
perforceMenusAreShown
18820
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
  4515
    ^ self class perforceMenusAreShown
11137
Claus Gittinger <cg@exept.de>
parents: 11135
diff changeset
  4516
!
Claus Gittinger <cg@exept.de>
parents: 11135
diff changeset
  4517
14709
dc6998e427f4 Added option to show directories always in top of the list in directory contents view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14659
diff changeset
  4518
showDirectoriesOnTop
dc6998e427f4 Added option to show directories always in top of the list in directory contents view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14659
diff changeset
  4519
dc6998e427f4 Added option to show directories always in top of the list in directory contents view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14659
diff changeset
  4520
    ^ self aspectFor:#showDirectoriesOnTop ifAbsent:[ false asValue ]
dc6998e427f4 Added option to show directories always in top of the list in directory contents view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14659
diff changeset
  4521
dc6998e427f4 Added option to show directories always in top of the list in directory contents view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14659
diff changeset
  4522
    "Created: / 12-08-2014 / 13:02:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
dc6998e427f4 Added option to show directories always in top of the list in directory contents view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14659
diff changeset
  4523
!
dc6998e427f4 Added option to show directories always in top of the list in directory contents view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14659
diff changeset
  4524
4201
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4525
showDirectoryTree
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4526
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4527
    ^ self aspectFor:#showDirectoryTree ifAbsent:[ true asValue ]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4528
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4529
4554
467311f7345a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4535
diff changeset
  4530
showDiskUsageHolder
467311f7345a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4535
diff changeset
  4531
    |holder|
467311f7345a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4535
diff changeset
  4532
4560
0d3db5e27bc0 default for disk usage is false
Claus Gittinger <cg@exept.de>
parents: 4558
diff changeset
  4533
    holder := self aspectFor:#showDiskUsageHolder ifAbsent:[ false asValue].
4781
08aacafe88ab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  4534
    holder addDependent:self.
4554
467311f7345a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4535
diff changeset
  4535
    ^ holder
467311f7345a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4535
diff changeset
  4536
!
467311f7345a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4535
diff changeset
  4537
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4538
showHiddenFiles
321c1729db5b initial checkin
penk
parents:
diff changeset
  4539
9582
9ae5011f5ef7 changed: #showHiddenFiles
Claus Gittinger <cg@exept.de>
parents: 9579
diff changeset
  4540
    ^ self aspectFor:#showHiddenFiles ifAbsent:[ true asValue ].
9ae5011f5ef7 changed: #showHiddenFiles
Claus Gittinger <cg@exept.de>
parents: 9579
diff changeset
  4541
9ae5011f5ef7 changed: #showHiddenFiles
Claus Gittinger <cg@exept.de>
parents: 9579
diff changeset
  4542
    "Modified: / 15-10-2010 / 10:28:17 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4543
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4544
9108
Claus Gittinger <cg@exept.de>
parents: 9102
diff changeset
  4545
showHiddenFiles:aHolder
Claus Gittinger <cg@exept.de>
parents: 9102
diff changeset
  4546
    self aspectFor:#showHiddenFiles put:aHolder.
Claus Gittinger <cg@exept.de>
parents: 9102
diff changeset
  4547
!
Claus Gittinger <cg@exept.de>
parents: 9102
diff changeset
  4548
Claus Gittinger <cg@exept.de>
parents: 9102
diff changeset
  4549
shownFiles:aHolder
Claus Gittinger <cg@exept.de>
parents: 9102
diff changeset
  4550
    self aspectFor:#shownFiles put:aHolder.
Claus Gittinger <cg@exept.de>
parents: 9102
diff changeset
  4551
!
Claus Gittinger <cg@exept.de>
parents: 9102
diff changeset
  4552
11135
59e1d94df37f hg menu preps
Claus Gittinger <cg@exept.de>
parents: 11108
diff changeset
  4553
svnMenusAreShown
18820
0dece51338cb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18805
diff changeset
  4554
    ^ self class svnMenusAreShown
11135
59e1d94df37f hg menu preps
Claus Gittinger <cg@exept.de>
parents: 11108
diff changeset
  4555
!
59e1d94df37f hg menu preps
Claus Gittinger <cg@exept.de>
parents: 11108
diff changeset
  4556
9945
b32126680c13 added: #tagsBrowserVisibleHolder
Claus Gittinger <cg@exept.de>
parents: 9820
diff changeset
  4557
tagsBrowserVisibleHolder
b32126680c13 added: #tagsBrowserVisibleHolder
Claus Gittinger <cg@exept.de>
parents: 9820
diff changeset
  4558
    masterApplication notNil ifTrue:[
11162
faf8af233ac0 changed: #tagsBrowserVisibleHolder
Claus Gittinger <cg@exept.de>
parents: 11156
diff changeset
  4559
        ^ masterApplication perform:#tagsBrowserVisibleHolder ifNotUnderstood:false
9945
b32126680c13 added: #tagsBrowserVisibleHolder
Claus Gittinger <cg@exept.de>
parents: 9820
diff changeset
  4560
    ].
10762
311190be6490 changed: #tagsBrowserVisibleHolder
Claus Gittinger <cg@exept.de>
parents: 10757
diff changeset
  4561
    ^ self aspectFor:#tagsBrowserVisibleHolder ifAbsent:[ FileApplicationNoteBook::TextEditor defaultTagsBrowserVisible asValue ].
9945
b32126680c13 added: #tagsBrowserVisibleHolder
Claus Gittinger <cg@exept.de>
parents: 9820
diff changeset
  4562
b32126680c13 added: #tagsBrowserVisibleHolder
Claus Gittinger <cg@exept.de>
parents: 9820
diff changeset
  4563
    "Created: / 27-06-2011 / 16:02:59 / cg"
b32126680c13 added: #tagsBrowserVisibleHolder
Claus Gittinger <cg@exept.de>
parents: 9820
diff changeset
  4564
!
b32126680c13 added: #tagsBrowserVisibleHolder
Claus Gittinger <cg@exept.de>
parents: 9820
diff changeset
  4565
10757
5bbe8b995a5f added: #useCodeView2InTools
Claus Gittinger <cg@exept.de>
parents: 10747
diff changeset
  4566
useCodeView2InTools
5bbe8b995a5f added: #useCodeView2InTools
Claus Gittinger <cg@exept.de>
parents: 10747
diff changeset
  4567
    ^ self aspectFor:#useCodeView2InTools ifAbsent:[ UserPreferences current useCodeView2InTools asValue ].
5bbe8b995a5f added: #useCodeView2InTools
Claus Gittinger <cg@exept.de>
parents: 10747
diff changeset
  4568
5bbe8b995a5f added: #useCodeView2InTools
Claus Gittinger <cg@exept.de>
parents: 10747
diff changeset
  4569
    "Created: / 06-10-2011 / 11:45:58 / cg"
5bbe8b995a5f added: #useCodeView2InTools
Claus Gittinger <cg@exept.de>
parents: 10747
diff changeset
  4570
!
5bbe8b995a5f added: #useCodeView2InTools
Claus Gittinger <cg@exept.de>
parents: 10747
diff changeset
  4571
4648
f36ffc19982c changes for windows fileBrowser
penk
parents: 4636
diff changeset
  4572
userContextAvailable
f36ffc19982c changes for windows fileBrowser
penk
parents: 4636
diff changeset
  4573
f36ffc19982c changes for windows fileBrowser
penk
parents: 4636
diff changeset
  4574
    " aspect for show group and user columns in contents view
f36ffc19982c changes for windows fileBrowser
penk
parents: 4636
diff changeset
  4575
      windows provides no user context"
f36ffc19982c changes for windows fileBrowser
penk
parents: 4636
diff changeset
  4576
f36ffc19982c changes for windows fileBrowser
penk
parents: 4636
diff changeset
  4577
    ^ OperatingSystem isMSWINDOWSlike not 
f36ffc19982c changes for windows fileBrowser
penk
parents: 4636
diff changeset
  4578
!
f36ffc19982c changes for windows fileBrowser
penk
parents: 4636
diff changeset
  4579
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4580
viewDescription
4976
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4581
    "aspect for show file description in DirectoryContentsBrowser"
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4582
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4583
    ^ self directoryContentsBrowser viewDescription
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4584
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4585
321c1729db5b initial checkin
penk
parents:
diff changeset
  4586
viewDetails
4976
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4587
    "aspect for show more file properties in DirectoryContentsBrowser 
4201
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4588
    "
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4589
6121
667e3c599cde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6116
diff changeset
  4590
    |directoryContentsBrowser|
667e3c599cde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6116
diff changeset
  4591
667e3c599cde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6116
diff changeset
  4592
    directoryContentsBrowser := self directoryContentsBrowser.
667e3c599cde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6116
diff changeset
  4593
    directoryContentsBrowser isNil ifTrue:[^ nil].    
667e3c599cde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6116
diff changeset
  4594
    ^ directoryContentsBrowser viewDetails
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4595
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4596
321c1729db5b initial checkin
penk
parents:
diff changeset
  4597
viewDirectoryDescription
321c1729db5b initial checkin
penk
parents:
diff changeset
  4598
4201
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4599
    " aspect for auto open a TextView for Readme and other see getInfoItem Method files 
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4600
      on change directory "
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4601
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4602
    ^ self aspectFor:#viewDirectoryDescription ifAbsent:[ true asValue ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  4603
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4604
4201
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4605
viewDirsInContentsBrowser
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4606
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4607
    ^ self aspectFor:#viewDirsInContentsBrowser ifAbsent:[ false asValue ].
9319
23ae966d9dbf comment/format in: #viewDirsInContentsBrowser
Claus Gittinger <cg@exept.de>
parents: 9299
diff changeset
  4608
23ae966d9dbf comment/format in: #viewDirsInContentsBrowser
Claus Gittinger <cg@exept.de>
parents: 9299
diff changeset
  4609
    "
23ae966d9dbf comment/format in: #viewDirsInContentsBrowser
Claus Gittinger <cg@exept.de>
parents: 9299
diff changeset
  4610
     UserPreferences current viewDirsInContentsBrowser
23ae966d9dbf comment/format in: #viewDirsInContentsBrowser
Claus Gittinger <cg@exept.de>
parents: 9299
diff changeset
  4611
    "
4201
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4612
!
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4613
5870
5ea994015006 *** empty log message ***
penk
parents: 5843
diff changeset
  4614
viewFilesInContentsBrowser
5ea994015006 *** empty log message ***
penk
parents: 5843
diff changeset
  4615
5ea994015006 *** empty log message ***
penk
parents: 5843
diff changeset
  4616
    ^ self aspectFor:#viewFilesInContentsBrowser ifAbsent:[ true asValue ].
5ea994015006 *** empty log message ***
penk
parents: 5843
diff changeset
  4617
!
5ea994015006 *** empty log message ***
penk
parents: 5843
diff changeset
  4618
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4619
viewFilesInDirectoryTree
321c1729db5b initial checkin
penk
parents:
diff changeset
  4620
4201
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4621
    " aspect for view files in tree view (not only directories) "
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  4622
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4623
    ^ self aspectFor:#viewFilesInDirectoryTree ifAbsent:[ false asValue ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  4624
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4625
321c1729db5b initial checkin
penk
parents:
diff changeset
  4626
viewGroup
4976
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4627
    " aspect for show group information in DirectoryContentsBrowser "
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4628
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4629
    ^ self directoryContentsBrowser viewGroup
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4630
!
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4631
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4632
viewIcon
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4633
    " aspect for show file-type icon in DirectoryContentsBrowser "
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4634
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4635
    ^ self directoryContentsBrowser viewIcon
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4636
!
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4637
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4638
viewInodeNumber
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4639
    " aspect for show inode numbers in DirectoryContentsBrowser "
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4640
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4641
    ^ self directoryContentsBrowser viewInodeNumber
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4642
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4643
321c1729db5b initial checkin
penk
parents:
diff changeset
  4644
viewNoteBookApplicationHolder
321c1729db5b initial checkin
penk
parents:
diff changeset
  4645
321c1729db5b initial checkin
penk
parents:
diff changeset
  4646
    ^ self aspectFor:#viewNoteBookApplicationHolder ifAbsent:[ false asValue].
321c1729db5b initial checkin
penk
parents:
diff changeset
  4647
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4648
321c1729db5b initial checkin
penk
parents:
diff changeset
  4649
viewOwner
4976
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4650
    " aspect for show owner information in DirectoryContentsBrowser "
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4651
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4652
    ^ self directoryContentsBrowser viewOwner
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4653
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4654
321c1729db5b initial checkin
penk
parents:
diff changeset
  4655
viewPermissions
4976
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4656
    " aspect for show permission information in DirectoryContentsBrowser "
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4657
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4658
    ^ self directoryContentsBrowser viewPermissions
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4659
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4660
321c1729db5b initial checkin
penk
parents:
diff changeset
  4661
viewPreview
4976
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4662
    " aspect for show image previev in DirectoryContentsBrowser "
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4663
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4664
    ^ self directoryContentsBrowser viewPreview
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4665
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4666
321c1729db5b initial checkin
penk
parents:
diff changeset
  4667
viewSize
4976
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4668
    " aspect for show size information in DirectoryContentsBrowser "
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4669
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4670
    ^ self directoryContentsBrowser viewSize
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4671
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4672
4974
6cebe0a963e5 viewSizeInBytes
Claus Gittinger <cg@exept.de>
parents: 4973
diff changeset
  4673
viewSizeInBytes
4976
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4674
    " aspect for show size-in-bytes information in DirectoryContentsBrowser "
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4675
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4676
    ^ self directoryContentsBrowser viewSizeInBytes
4974
6cebe0a963e5 viewSizeInBytes
Claus Gittinger <cg@exept.de>
parents: 4973
diff changeset
  4677
!
6cebe0a963e5 viewSizeInBytes
Claus Gittinger <cg@exept.de>
parents: 4973
diff changeset
  4678
5312
63b275aa2c69 size in Kb
Claus Gittinger <cg@exept.de>
parents: 5306
diff changeset
  4679
viewSizeInKiloBytes
63b275aa2c69 size in Kb
Claus Gittinger <cg@exept.de>
parents: 5306
diff changeset
  4680
    " aspect for show size-in-kilobytes information in DirectoryContentsBrowser "
63b275aa2c69 size in Kb
Claus Gittinger <cg@exept.de>
parents: 5306
diff changeset
  4681
63b275aa2c69 size in Kb
Claus Gittinger <cg@exept.de>
parents: 5306
diff changeset
  4682
    ^ self directoryContentsBrowser viewSizeInKiloBytes
63b275aa2c69 size in Kb
Claus Gittinger <cg@exept.de>
parents: 5306
diff changeset
  4683
!
63b275aa2c69 size in Kb
Claus Gittinger <cg@exept.de>
parents: 5306
diff changeset
  4684
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4685
viewTime
4976
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4686
    " aspect for show time information in DirectoryContentsBrowser"
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4687
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4688
    ^ self directoryContentsBrowser viewTime
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4689
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4690
321c1729db5b initial checkin
penk
parents:
diff changeset
  4691
viewType
4976
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4692
    " aspect for show suffix (type) information in DirectoryContentsBrowser"
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4693
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  4694
    ^ self directoryContentsBrowser viewType
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4695
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  4696
321c1729db5b initial checkin
penk
parents:
diff changeset
  4697
!AbstractFileBrowser methodsFor:'background processing'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4698
321c1729db5b initial checkin
penk
parents:
diff changeset
  4699
executeCommand:cmd
321c1729db5b initial checkin
penk
parents:
diff changeset
  4700
321c1729db5b initial checkin
penk
parents:
diff changeset
  4701
    self executeCommand:cmd inDirectory:nil
321c1729db5b initial checkin
penk
parents:
diff changeset
  4702
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4703
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  4704
executeCommand:cmd inDirectory:aDirectoryOrNil
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4705
    | nameString executionBlock|
321c1729db5b initial checkin
penk
parents:
diff changeset
  4706
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  4707
    executionBlock := self getExecutionBlockForCommand:cmd inDirectory:aDirectoryOrNil.
4516
dc3b7a89598a close command view if no output was generated
Claus Gittinger <cg@exept.de>
parents: 4496
diff changeset
  4708
    nameString := 'Execute: ', cmd.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4709
    self makeExecutionResultProcessFor:executionBlock withName:nameString.
321c1729db5b initial checkin
penk
parents:
diff changeset
  4710
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4711
321c1729db5b initial checkin
penk
parents:
diff changeset
  4712
getExecutionBlockForCommand:cmd
321c1729db5b initial checkin
penk
parents:
diff changeset
  4713
321c1729db5b initial checkin
penk
parents:
diff changeset
  4714
    ^ self getExecutionBlockForCommand:cmd inDirectory:nil
321c1729db5b initial checkin
penk
parents:
diff changeset
  4715
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4716
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  4717
getExecutionBlockForCommand:cmd inDirectory:directoryOrNil
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  4718
    | dir|
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  4719
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  4720
    dir := directoryOrNil.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  4721
    directoryOrNil isNil ifTrue:[
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  4722
        dir := self theSingleSelectedDirectoryOrNil.
6671
f76b43f3b0ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6652
diff changeset
  4723
        dir isNil ifTrue:[ 
12493
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  4724
            Dialog warn:(resources string:'Please select a single directory.').
16732
f2b590b8d7f8 #OTHER by stefan
Stefan Vogel <sv@exept.de>
parents: 16721
diff changeset
  4725
            AbortOperationRequest raise.
6671
f76b43f3b0ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6652
diff changeset
  4726
            ^ nil
f76b43f3b0ad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6652
diff changeset
  4727
        ].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4728
    ].
4523
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
  4729
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
  4730
    ^ [:stream| 
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
  4731
        stream notNil ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  4732
            OperatingSystem 
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  4733
                executeCommand:cmd
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  4734
                inputFrom:nil 
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  4735
                outputTo:stream 
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  4736
                errorTo:stream 
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  4737
                inDirectory:dir
16732
f2b590b8d7f8 #OTHER by stefan
Stefan Vogel <sv@exept.de>
parents: 16721
diff changeset
  4738
                lineWise:true
16825
b5bc034a38d7 #BUGFIX by sr
sr
parents: 16778
diff changeset
  4739
                showWindow:false
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  4740
                onError:[:status| false].
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  4741
        ]
4523
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
  4742
      ].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4743
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4744
321c1729db5b initial checkin
penk
parents:
diff changeset
  4745
killAllRunningBackgroundProcesses
321c1729db5b initial checkin
penk
parents:
diff changeset
  4746
321c1729db5b initial checkin
penk
parents:
diff changeset
  4747
    self backgroundProcesses do:[ : process |
4523
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
  4748
        self notify:'kill ', process name.
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  4749
        process terminate.    
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4750
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  4751
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4752
321c1729db5b initial checkin
penk
parents:
diff changeset
  4753
makeExecutionResultProcessFor:aBlock withName:aString
321c1729db5b initial checkin
penk
parents:
diff changeset
  4754
    | stream process appl nameString|
321c1729db5b initial checkin
penk
parents:
diff changeset
  4755
321c1729db5b initial checkin
penk
parents:
diff changeset
  4756
    appl := self openCommandResultApplication.
321c1729db5b initial checkin
penk
parents:
diff changeset
  4757
    stream := appl resultStream.
321c1729db5b initial checkin
penk
parents:
diff changeset
  4758
    nameString := aString ? 'Execution Result'.
321c1729db5b initial checkin
penk
parents:
diff changeset
  4759
    appl changeTabTo:nameString.
4523
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
  4760
16102
712049dd76a8 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 16084
diff changeset
  4761
    process := 
712049dd76a8 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 16084
diff changeset
  4762
        [ 
712049dd76a8 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 16084
diff changeset
  4763
            [aBlock value:stream] 
712049dd76a8 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 16084
diff changeset
  4764
            ensure:[
712049dd76a8 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 16084
diff changeset
  4765
                self backgroundProcesses remove:process ifAbsent:[].
712049dd76a8 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 16084
diff changeset
  4766
                appl process value:nil.
712049dd76a8 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 16084
diff changeset
  4767
712049dd76a8 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 16084
diff changeset
  4768
                "/ close automatically, if there was no output.
4571
35e2bf331bdc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  4769
"/                        appl resultStream contents isEmpty ifTrue:[
35e2bf331bdc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  4770
"/                            appl doClose.
35e2bf331bdc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  4771
"/                        ]
16102
712049dd76a8 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 16084
diff changeset
  4772
                stream nextPutLine:'Done.'.
712049dd76a8 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 16084
diff changeset
  4773
                self enqueueMessage:#updateCurrentDirectory.
712049dd76a8 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 16084
diff changeset
  4774
            ]
712049dd76a8 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 16084
diff changeset
  4775
        ] newProcess.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4776
    process priority:(Processor userBackgroundPriority).
321c1729db5b initial checkin
penk
parents:
diff changeset
  4777
    process name:nameString.
321c1729db5b initial checkin
penk
parents:
diff changeset
  4778
    self backgroundProcesses add:process.
321c1729db5b initial checkin
penk
parents:
diff changeset
  4779
    appl process value:process.
321c1729db5b initial checkin
penk
parents:
diff changeset
  4780
    process resume.
321c1729db5b initial checkin
penk
parents:
diff changeset
  4781
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  4782
321c1729db5b initial checkin
penk
parents:
diff changeset
  4783
!AbstractFileBrowser methodsFor:'change & update'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4784
4915
be97c8dbd840 category
Claus Gittinger <cg@exept.de>
parents: 4891
diff changeset
  4785
currentFileNameHolderChanged
be97c8dbd840 category
Claus Gittinger <cg@exept.de>
parents: 4891
diff changeset
  4786
    "/ self currentFileNameHolderChangedForCommon
be97c8dbd840 category
Claus Gittinger <cg@exept.de>
parents: 4891
diff changeset
  4787
!
be97c8dbd840 category
Claus Gittinger <cg@exept.de>
parents: 4891
diff changeset
  4788
4577
52c443045ead *** empty log message ***
penk
parents: 4571
diff changeset
  4789
currentFileNameHolderChangedForCommon
18389
028d70eb907a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18352
diff changeset
  4790
    |newDirectories oldDirectories size rootInTreeView selection selectionNotEmpty dir|
4368
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
  4791
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  4792
    selection := self currentSelectedObjects.
4368
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
  4793
    self class currentSelection:selection.
4734
082a31e3bd9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4722
diff changeset
  4794
13521
18393b16599b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13439
diff changeset
  4795
    selectionNotEmpty := selection notEmptyOrNil.
5476
da16d0662a37 refactoring
penk
parents: 5439
diff changeset
  4796
    self hasSelection value:selectionNotEmpty.
da16d0662a37 refactoring
penk
parents: 5439
diff changeset
  4797
    self hasFileSelection value:(selectionNotEmpty and:[self firstSelectedFile notNil]).
18840
6c8e59889b0b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18834
diff changeset
  4798
    self hasFileOrCypressPackageSelection 
6c8e59889b0b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18834
diff changeset
  4799
        value:(selection contains:[:sel | 
6c8e59889b0b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18834
diff changeset
  4800
                sel isDirectory 
6c8e59889b0b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18834
diff changeset
  4801
                and:[(sel hasSuffix:'package') or:[sel hasSuffix:'class']]
6c8e59889b0b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18834
diff changeset
  4802
        ]).
18246
1217eb5963fc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18175
diff changeset
  4803
    self canOpenChangeBrowser value:(selectionNotEmpty).
4734
082a31e3bd9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4722
diff changeset
  4804
4368
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
  4805
    newDirectories := self directoriesForFiles:selection.
19009
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  4806
    newDirectories := newDirectories select:[:fn | fn exists].
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  4807
6725
3885523e54b8 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6708
diff changeset
  4808
    oldDirectories := self currentSelectedDirectories.
4011
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4809
    oldDirectories ~= newDirectories ifTrue:[
4347
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
  4810
        self currentDirectories value:newDirectories.
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
  4811
        size := newDirectories size.
4774
5119967dbd89 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  4812
        rootInTreeView := self 
5119967dbd89 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  4813
                            applicationNamed:#DirectoryTreeBrowser 
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  4814
                            ifPresentDo:[:appl | appl rootHolder].
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  4815
        rootInTreeView := rootInTreeView value.
5437
3556b0348494 directory up not allowed for drive root under windows
penk
parents: 5432
diff changeset
  4816
        self enableDirectoryUp value:(((size == 1) and:[newDirectories first isRootDirectory not]) "or:[(rootInTreeView notNil and:[rootInTreeView value asFilename isRootDirectory not])]").
3556b0348494 directory up not allowed for drive root under windows
penk
parents: 5432
diff changeset
  4817
4347
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
  4818
        newDirectories notEmpty ifTrue:[
6369
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
  4819
            self directoryHistory addToHistory:(newDirectories first asString).
4347
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
  4820
        ].
18389
028d70eb907a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18352
diff changeset
  4821
        (dir := Filename homeDirectory) notNil ifTrue:[
028d70eb907a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18352
diff changeset
  4822
            self enableHome value:((newDirectories includes:(dir asAbsoluteFilename))not).
028d70eb907a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18352
diff changeset
  4823
        ].
14308
192c81c86815 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14298
diff changeset
  4824
        "/ self enableGotoDesktop value:((newDirectories includes:(Filename desktopDirectory asAbsoluteFilename))not).
18389
028d70eb907a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18352
diff changeset
  4825
        (dir := Filename defaultDirectory) notNil ifTrue:[
028d70eb907a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18352
diff changeset
  4826
            self enableGotoDefaultDirectory value:((newDirectories includes:(dir asAbsoluteFilename))not).
028d70eb907a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18352
diff changeset
  4827
        ].
028d70eb907a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18352
diff changeset
  4828
        (dir := self smalltalkDirectory) notNil ifTrue:[
028d70eb907a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18352
diff changeset
  4829
            self enableGotoSmalltalkDirectory value:((newDirectories includes:(dir asAbsoluteFilename))not).
028d70eb907a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18352
diff changeset
  4830
        ].
028d70eb907a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18352
diff changeset
  4831
        (dir := Filename desktopDirectory) notNil ifTrue:[
028d70eb907a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18352
diff changeset
  4832
            self enableGotoDesktopDirectory value:((newDirectories includes:(dir asAbsoluteFilename))not).
028d70eb907a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18352
diff changeset
  4833
        ].
028d70eb907a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18352
diff changeset
  4834
        (dir := Filename downloadsDirectory) notNil ifTrue:[
028d70eb907a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18352
diff changeset
  4835
            self enableGotoDownloadsDirectory value:((newDirectories includes:(dir asAbsoluteFilename))not).
028d70eb907a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18352
diff changeset
  4836
        ].
18511
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  4837
        (dir := Filename documentsDirectory) notNil ifTrue:[
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  4838
            self enableGotoDocumentsDirectory value:((newDirectories includes:(dir asAbsoluteFilename))not).
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  4839
        ].
18389
028d70eb907a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18352
diff changeset
  4840
        (dir := self tempDirectory) notNil ifTrue:[
028d70eb907a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18352
diff changeset
  4841
            self enableGotoTempDirectory value:((newDirectories includes:(dir asAbsoluteFilename))not).
028d70eb907a #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18352
diff changeset
  4842
        ].
4011
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4843
    ].
9599
6ffff091db22 changed: #currentFileNameHolderChangedForCommon
Claus Gittinger <cg@exept.de>
parents: 9596
diff changeset
  4844
    self enableGotoDefaultDirectory value:(self currentDirectory isNil or:[self currentDirectory pathName ~= OperatingSystem getCurrentDirectory]).
9596
Claus Gittinger <cg@exept.de>
parents: 9582
diff changeset
  4845
    self enableMakeCurrentDirectory value:(newDirectories size == 1
Claus Gittinger <cg@exept.de>
parents: 9582
diff changeset
  4846
                                           and:[ newDirectories first asFilename pathName ~= OperatingSystem getCurrentDirectory ]).
4022
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
  4847
    self enableForward value:self canForward.
4734
082a31e3bd9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4722
diff changeset
  4848
    self enableBack    value:self canBackward.
6095
a6f6eb0c7b9d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  4849
13856
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4850
    self updateCanMake.
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  4851
9677
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  4852
    "Modified: / 29-12-2010 / 11:01:52 / cg"
13856
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4853
    "Modified: / 17-12-2013 / 08:23:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
18840
6c8e59889b0b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18834
diff changeset
  4854
    "Modified: / 23-06-2019 / 21:42:40 / Claus Gittinger"
4011
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4855
!
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4856
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4857
filterModelChanged
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4858
5658
eef91fc147fa filter: allow multiple patterns
Claus Gittinger <cg@exept.de>
parents: 5644
diff changeset
  4859
    self filterBlockHolder value:(self makeFilterBlock).
4011
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4860
!
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4861
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4862
update:something with:aParameter from:changedObject
321c1729db5b initial checkin
penk
parents:
diff changeset
  4863
321c1729db5b initial checkin
penk
parents:
diff changeset
  4864
    " do here all the things that have to be done for every part of the FileBrowserV2
321c1729db5b initial checkin
penk
parents:
diff changeset
  4865
      and the things that have to be done if it runs standalone "
321c1729db5b initial checkin
penk
parents:
diff changeset
  4866
321c1729db5b initial checkin
penk
parents:
diff changeset
  4867
    changedObject == self currentFileNameHolder ifTrue:[
4577
52c443045ead *** empty log message ***
penk
parents: 4571
diff changeset
  4868
        self currentFileNameHolderChangedForCommon.
4368
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
  4869
        ^ self
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4870
    ].
3989
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  4871
    changedObject == self sortCaseless ifTrue:[
4368
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
  4872
        self sortFileListsBy:#baseName withReverse:false.
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
  4873
        ^ self
3989
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  4874
    ].             
6785
cac8107d889c clear reverseSort flag, when sort-order is changed via menu.
Claus Gittinger <cg@exept.de>
parents: 6767
diff changeset
  4875
    changedObject == self sortBlockProperty ifTrue:[
cac8107d889c clear reverseSort flag, when sort-order is changed via menu.
Claus Gittinger <cg@exept.de>
parents: 6767
diff changeset
  4876
        self currentSortOrder value at:#reverse put:false.
cac8107d889c clear reverseSort flag, when sort-order is changed via menu.
Claus Gittinger <cg@exept.de>
parents: 6767
diff changeset
  4877
        ^ self
cac8107d889c clear reverseSort flag, when sort-order is changed via menu.
Claus Gittinger <cg@exept.de>
parents: 6767
diff changeset
  4878
    ].             
4011
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
  4879
    (changedObject == self filterModel or:[changedObject == self showHiddenFiles]) ifTrue:[
4368
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
  4880
        self filterModelChanged.
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
  4881
        ^ self
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
  4882
    ].
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
  4883
    changedObject == self rootHolder ifTrue:[
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
  4884
        self class rootHolder:(self rootHolder value).
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
  4885
        ^ self
4004
f97168a68093 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4000
diff changeset
  4886
    ].
4781
08aacafe88ab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  4887
    changedObject == self showDiskUsageHolder ifTrue:[
6190
b3ab1d955319 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6176
diff changeset
  4888
        self notify:nil.
4781
08aacafe88ab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  4889
        ^ self
08aacafe88ab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  4890
    ].
3989
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  4891
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4892
    super update:something with:aParameter from:changedObject
5543
574360e0f2ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5542
diff changeset
  4893
!
574360e0f2ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5542
diff changeset
  4894
6095
a6f6eb0c7b9d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  4895
updateCanMake
a6f6eb0c7b9d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  4896
    |dir can|
a6f6eb0c7b9d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  4897
a6f6eb0c7b9d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  4898
    can := false.
a6f6eb0c7b9d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  4899
    dir := self currentDirectory.
a6f6eb0c7b9d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  4900
    dir notNil ifTrue:[    
13856
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4901
        "/ Check for make
6095
a6f6eb0c7b9d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  4902
        can := (dir asFilename construct:'Makefile') exists.
13856
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4903
        can ifFalse:[
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4904
            can := (dir asFilename construct:'makefile') exists.
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4905
        ].
6095
a6f6eb0c7b9d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  4906
        OperatingSystem isMSWINDOWSlike ifTrue:[
a6f6eb0c7b9d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  4907
            can ifFalse:[
13856
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4908
                can := (self currentDirectory asFilename construct:'bc.mak') exists.
6095
a6f6eb0c7b9d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  4909
            ]
a6f6eb0c7b9d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  4910
        ].
13856
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4911
        can ifTrue:[ 
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4912
            self makeCommandHolder value: 'make'. 
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4913
            self canMake value: true. 
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4914
            ^ self 
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4915
        ].
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4916
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4917
        "/Check for Apache ant
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4918
        (OperatingSystem canExecuteCommand: 'ant') ifTrue:[
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4919
            can := (dir asFilename construct:'build.xml') exists.
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4920
            can ifTrue:[ 
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4921
                self makeCommandHolder value: 'ant'. 
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4922
                self canMake value: true. 
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4923
                ^ self 
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4924
            ].
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4925
        ].
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4926
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4927
        "/Add more here...
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4928
6095
a6f6eb0c7b9d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  4929
    ].
a6f6eb0c7b9d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  4930
    self canMake value:can.
13856
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4931
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  4932
    "Modified: / 17-12-2013 / 08:13:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6095
a6f6eb0c7b9d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  4933
!
a6f6eb0c7b9d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6094
diff changeset
  4934
5543
574360e0f2ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5542
diff changeset
  4935
updateListAfterDelete:colOfFiles
17871
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  4936
    self updateCurrentDirectoryWithReread
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4937
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  4938
321c1729db5b initial checkin
penk
parents:
diff changeset
  4939
!AbstractFileBrowser methodsFor:'clipboard'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4940
321c1729db5b initial checkin
penk
parents:
diff changeset
  4941
canPaste
321c1729db5b initial checkin
penk
parents:
diff changeset
  4942
15259
14297d826b29 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15215
diff changeset
  4943
    ^ self aspectFor:#canPaste ifAbsent:[ ValueHolder with:false ].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4944
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4945
321c1729db5b initial checkin
penk
parents:
diff changeset
  4946
clipboard
321c1729db5b initial checkin
penk
parents:
diff changeset
  4947
321c1729db5b initial checkin
penk
parents:
diff changeset
  4948
    ^ self aspectFor:#clipboard ifAbsent:[Clipboard new]
321c1729db5b initial checkin
penk
parents:
diff changeset
  4949
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4950
321c1729db5b initial checkin
penk
parents:
diff changeset
  4951
copyFilesToClipBoard:colOfFiles
321c1729db5b initial checkin
penk
parents:
diff changeset
  4952
    self putInClipBoard:colOfFiles as:#copy.
321c1729db5b initial checkin
penk
parents:
diff changeset
  4953
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4954
321c1729db5b initial checkin
penk
parents:
diff changeset
  4955
cutFilesToClipBoard:colOfFiles
321c1729db5b initial checkin
penk
parents:
diff changeset
  4956
    "defete current selected files/directories
321c1729db5b initial checkin
penk
parents:
diff changeset
  4957
    "
321c1729db5b initial checkin
penk
parents:
diff changeset
  4958
    self putInClipBoard:colOfFiles as:#cut.
321c1729db5b initial checkin
penk
parents:
diff changeset
  4959
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4960
321c1729db5b initial checkin
penk
parents:
diff changeset
  4961
emptyClipBoard
321c1729db5b initial checkin
penk
parents:
diff changeset
  4962
321c1729db5b initial checkin
penk
parents:
diff changeset
  4963
    self clipboard files:nil.
321c1729db5b initial checkin
penk
parents:
diff changeset
  4964
    self canPaste value:false.
321c1729db5b initial checkin
penk
parents:
diff changeset
  4965
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4966
321c1729db5b initial checkin
penk
parents:
diff changeset
  4967
putInClipBoard:colOfFiles as:aSymbol
321c1729db5b initial checkin
penk
parents:
diff changeset
  4968
    | stream clp|
321c1729db5b initial checkin
penk
parents:
diff changeset
  4969
321c1729db5b initial checkin
penk
parents:
diff changeset
  4970
    colOfFiles isEmpty ifTrue:[ ^ self].
321c1729db5b initial checkin
penk
parents:
diff changeset
  4971
    clp := self clipboard.
321c1729db5b initial checkin
penk
parents:
diff changeset
  4972
    clp files:nil.
321c1729db5b initial checkin
penk
parents:
diff changeset
  4973
    clp method:aSymbol.
5772
603abfa8cf99 copy name(s) to clipboard - on lineFeed if only one file is selected
Claus Gittinger <cg@exept.de>
parents: 5756
diff changeset
  4974
603abfa8cf99 copy name(s) to clipboard - on lineFeed if only one file is selected
Claus Gittinger <cg@exept.de>
parents: 5756
diff changeset
  4975
    stream := String writeStream.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4976
    stream nextPutAll:aSymbol asString.
321c1729db5b initial checkin
penk
parents:
diff changeset
  4977
    stream nextPutAll:' <'.
321c1729db5b initial checkin
penk
parents:
diff changeset
  4978
    stream nextPutAll:colOfFiles first asString.
321c1729db5b initial checkin
penk
parents:
diff changeset
  4979
    colOfFiles size > 1 ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  4980
        stream nextPutAll:' ...'.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4981
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  4982
    stream nextPutAll:'> to clipboard'.
321c1729db5b initial checkin
penk
parents:
diff changeset
  4983
4523
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
  4984
    self notify:stream contents.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4985
    clp files:colOfFiles.
321c1729db5b initial checkin
penk
parents:
diff changeset
  4986
    self canPaste value:true.
321c1729db5b initial checkin
penk
parents:
diff changeset
  4987
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  4988
321c1729db5b initial checkin
penk
parents:
diff changeset
  4989
!AbstractFileBrowser methodsFor:'drag & drop'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  4990
321c1729db5b initial checkin
penk
parents:
diff changeset
  4991
canDropFiles:dropedObjects for:filename 
6284
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  4992
    |filenameDirString filenameDir|
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  4993
321c1729db5b initial checkin
penk
parents:
diff changeset
  4994
    dropedObjects isEmpty ifTrue:[^ false].
6284
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  4995
19009
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  4996
    filenameDir := self class getDirectoryOf:filename.
7491
7fd2af9607de bugfix - check for nil directory
ca
parents: 7408
diff changeset
  4997
    filenameDir isNil ifTrue:[^ false ].
13232
a9d07ac57e19 Use #isWritableDirectory
Stefan Vogel <sv@exept.de>
parents: 13121
diff changeset
  4998
    filenameDir isWritableDirectory ifFalse:[^ false].
6284
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  4999
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5000
    filenameDirString := filenameDir asString.
4963
7ce6eae41e33 do not check if dropFile exists, if its an archive file
Claus Gittinger <cg@exept.de>
parents: 4959
diff changeset
  5001
7ce6eae41e33 do not check if dropFile exists, if its an archive file
Claus Gittinger <cg@exept.de>
parents: 4959
diff changeset
  5002
    dropedObjects do:[:aDropObject | 
6284
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5003
        (self canDropObject:aDropObject into:filenameDir) ifFalse:[^ false].
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5004
"/        |dropFileName dropFileNameString physicalPathName|
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5005
"/
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5006
"/        dropFileName := aDropObject theObject.
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5007
"/        dropFileNameString := dropFileName asString.
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5008
"/        dropFileName isDirectory ifTrue:[
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5009
"/            (self fileName:filenameDirString startsWith:dropFileNameString) ifTrue:[
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5010
"/                self notify:'Cannot drop a directory into one of its parent directories'.
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5011
"/                ^ false
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5012
"/            ]
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5013
"/        ] ifFalse:[
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5014
"/            physicalPathName := dropFileName physicalPathName.
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5015
"/            (filenameDirString = dropFileName directory asString 
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5016
"/            or:[ aDropObject isFileInArchive not and:[physicalPathName notNil
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5017
"/                 and:[ filenameDirString = physicalPathName asFilename directory asString]]]) ifTrue:[
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5018
"/                self notify:'Cannot drop a file into same directory'.
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5019
"/                ^ false
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5020
"/            ]
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5021
"/        ]
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5022
    ].
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5023
    self notify:nil.
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5024
    ^ true
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5025
!
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5026
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5027
canDropObject:aDropObject into:aDirectory
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5028
    |filenameDirString dropFileName dropFileNameString physicalPathName|
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5029
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5030
    dropFileName := aDropObject theObject.
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5031
    dropFileNameString := dropFileName asString.
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5032
    dropFileName isDirectory ifTrue:[
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5033
        filenameDirString := aDirectory asString.
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5034
        (self fileName:filenameDirString startsWith:dropFileNameString) ifTrue:[
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5035
            self notify:'Cannot drop a directory into one of its parent directories'.
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5036
            ^ false
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  5037
        ]
6284
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5038
    ] ifFalse:[
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5039
        physicalPathName := dropFileName physicalPathName.
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5040
        (aDirectory = dropFileName directory 
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5041
        or:[ aDropObject isFileInArchive not 
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5042
             and:[physicalPathName notNil
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5043
             and:[ aDirectory = physicalPathName asFilename directory]]]) ifTrue:[
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5044
            self notify:'Cannot drop a file into same directory'.
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5045
            ^ false
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5046
        ]
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5047
    ].
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  5048
    ^ true.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5049
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  5050
7406
a749af299d5d drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
  5051
canDropObjects:aCollectionOfDropObjects in:aWidget
17865
30a8ebe0a1a5 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17849
diff changeset
  5052
    ^ aCollectionOfDropObjects contains:#isFileObject
7406
a749af299d5d drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
  5053
a749af299d5d drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
  5054
    "Created: / 13-10-2006 / 15:52:49 / cg"
a749af299d5d drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
  5055
!
a749af299d5d drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
  5056
17202
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
  5057
doStartDrag:arg1 in:arg2
82155dcadf24 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17187
diff changeset
  5058
    ^ self class doStartDrag:arg1 in:arg2
6479
760c0b357cb1 file drop for win32
Claus Gittinger <cg@exept.de>
parents: 6460
diff changeset
  5059
!
760c0b357cb1 file drop for win32
Claus Gittinger <cg@exept.de>
parents: 6460
diff changeset
  5060
7408
028111416d25 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 7406
diff changeset
  5061
dropObjects:aCollectionOfDropObjects in:aWidget at:position
7990
7bfe0f1a8b3d fixed external file drop
Claus Gittinger <cg@exept.de>
parents: 7938
diff changeset
  5062
    |fileEntryFieldHolder destDir dropObject fn d|
7bfe0f1a8b3d fixed external file drop
Claus Gittinger <cg@exept.de>
parents: 7938
diff changeset
  5063
7bfe0f1a8b3d fixed external file drop
Claus Gittinger <cg@exept.de>
parents: 7938
diff changeset
  5064
    fileEntryFieldHolder := self masterApplication notNil 
7bfe0f1a8b3d fixed external file drop
Claus Gittinger <cg@exept.de>
parents: 7938
diff changeset
  5065
                              ifTrue:[ self masterApplication fileEntryFieldHolder ]
7bfe0f1a8b3d fixed external file drop
Claus Gittinger <cg@exept.de>
parents: 7938
diff changeset
  5066
                              ifFalse:[ self fileEntryFieldHolder ].
7bfe0f1a8b3d fixed external file drop
Claus Gittinger <cg@exept.de>
parents: 7938
diff changeset
  5067
7bfe0f1a8b3d fixed external file drop
Claus Gittinger <cg@exept.de>
parents: 7938
diff changeset
  5068
    aWidget model == fileEntryFieldHolder ifTrue:[
7900
52ad708471ad drop into fileName-path-field: goto that directory
Claus Gittinger <cg@exept.de>
parents: 7897
diff changeset
  5069
        dropObject := aCollectionOfDropObjects first.
52ad708471ad drop into fileName-path-field: goto that directory
Claus Gittinger <cg@exept.de>
parents: 7897
diff changeset
  5070
        dropObject isFileObject ifTrue:[
52ad708471ad drop into fileName-path-field: goto that directory
Claus Gittinger <cg@exept.de>
parents: 7897
diff changeset
  5071
            fn := dropObject theObject asFilename.
52ad708471ad drop into fileName-path-field: goto that directory
Claus Gittinger <cg@exept.de>
parents: 7897
diff changeset
  5072
            dropObject isDirectory ifTrue:[
52ad708471ad drop into fileName-path-field: goto that directory
Claus Gittinger <cg@exept.de>
parents: 7897
diff changeset
  5073
                d := fn.
52ad708471ad drop into fileName-path-field: goto that directory
Claus Gittinger <cg@exept.de>
parents: 7897
diff changeset
  5074
            ] ifFalse:[
52ad708471ad drop into fileName-path-field: goto that directory
Claus Gittinger <cg@exept.de>
parents: 7897
diff changeset
  5075
                d := fn directory.
52ad708471ad drop into fileName-path-field: goto that directory
Claus Gittinger <cg@exept.de>
parents: 7897
diff changeset
  5076
            ].
7990
7bfe0f1a8b3d fixed external file drop
Claus Gittinger <cg@exept.de>
parents: 7938
diff changeset
  5077
            fileEntryFieldHolder value:d pathName.
7900
52ad708471ad drop into fileName-path-field: goto that directory
Claus Gittinger <cg@exept.de>
parents: 7897
diff changeset
  5078
        ].
52ad708471ad drop into fileName-path-field: goto that directory
Claus Gittinger <cg@exept.de>
parents: 7897
diff changeset
  5079
        ^ self.
52ad708471ad drop into fileName-path-field: goto that directory
Claus Gittinger <cg@exept.de>
parents: 7897
diff changeset
  5080
    ].
6479
760c0b357cb1 file drop for win32
Claus Gittinger <cg@exept.de>
parents: 6460
diff changeset
  5081
760c0b357cb1 file drop for win32
Claus Gittinger <cg@exept.de>
parents: 6460
diff changeset
  5082
    destDir := self currentDirectory.
760c0b357cb1 file drop for win32
Claus Gittinger <cg@exept.de>
parents: 6460
diff changeset
  5083
    destDir isNil ifTrue:[^ self].
760c0b357cb1 file drop for win32
Claus Gittinger <cg@exept.de>
parents: 6460
diff changeset
  5084
8601
85c62034c1ff busy cursor in drop
Claus Gittinger <cg@exept.de>
parents: 8590
diff changeset
  5085
    self withWaitCursorDo:[
85c62034c1ff busy cursor in drop
Claus Gittinger <cg@exept.de>
parents: 8590
diff changeset
  5086
        aCollectionOfDropObjects do:[:dropObject |
85c62034c1ff busy cursor in drop
Claus Gittinger <cg@exept.de>
parents: 8590
diff changeset
  5087
            |fn|
85c62034c1ff busy cursor in drop
Claus Gittinger <cg@exept.de>
parents: 8590
diff changeset
  5088
85c62034c1ff busy cursor in drop
Claus Gittinger <cg@exept.de>
parents: 8590
diff changeset
  5089
            dropObject isFileObject ifTrue:[
85c62034c1ff busy cursor in drop
Claus Gittinger <cg@exept.de>
parents: 8590
diff changeset
  5090
                fn := dropObject theObject asFilename.
85c62034c1ff busy cursor in drop
Claus Gittinger <cg@exept.de>
parents: 8590
diff changeset
  5091
                dropObject isDirectory ifTrue:[
8808
cb6476c0cd3a oops - drop of directories was broken
Claus Gittinger <cg@exept.de>
parents: 8716
diff changeset
  5092
                    fn recursiveCopyTo:destDir
8601
85c62034c1ff busy cursor in drop
Claus Gittinger <cg@exept.de>
parents: 8590
diff changeset
  5093
                ] ifFalse:[
8950
48c69259d82d changed: #dropObjects:in:at:
Claus Gittinger <cg@exept.de>
parents: 8887
diff changeset
  5094
                    fn copyTo:(destDir / fn baseName )
8601
85c62034c1ff busy cursor in drop
Claus Gittinger <cg@exept.de>
parents: 8590
diff changeset
  5095
                ]
6479
760c0b357cb1 file drop for win32
Claus Gittinger <cg@exept.de>
parents: 6460
diff changeset
  5096
            ]
8601
85c62034c1ff busy cursor in drop
Claus Gittinger <cg@exept.de>
parents: 8590
diff changeset
  5097
        ].
85c62034c1ff busy cursor in drop
Claus Gittinger <cg@exept.de>
parents: 8590
diff changeset
  5098
    ].
9268
fbeb680106c9 changed: #dropObjects:in:at:
Claus Gittinger <cg@exept.de>
parents: 9267
diff changeset
  5099
    self directoryContentsBrowser notNil ifTrue:[
fbeb680106c9 changed: #dropObjects:in:at:
Claus Gittinger <cg@exept.de>
parents: 9267
diff changeset
  5100
        self directoryContentsBrowser 
fbeb680106c9 changed: #dropObjects:in:at:
Claus Gittinger <cg@exept.de>
parents: 9267
diff changeset
  5101
            directoryContentsChangeFlag:true;
fbeb680106c9 changed: #dropObjects:in:at:
Claus Gittinger <cg@exept.de>
parents: 9267
diff changeset
  5102
            wakeUp
fbeb680106c9 changed: #dropObjects:in:at:
Claus Gittinger <cg@exept.de>
parents: 9267
diff changeset
  5103
    ].
7408
028111416d25 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 7406
diff changeset
  5104
028111416d25 drag and drop cleanup
Claus Gittinger <cg@exept.de>
parents: 7406
diff changeset
  5105
    "Created: / 13-10-2006 / 18:26:41 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5106
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  5107
321c1729db5b initial checkin
penk
parents:
diff changeset
  5108
!AbstractFileBrowser methodsFor:'file operations'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  5109
321c1729db5b initial checkin
penk
parents:
diff changeset
  5110
copyFile:aSourceFile to:aDestFile
6190
b3ab1d955319 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6176
diff changeset
  5111
    "copy to"
b3ab1d955319 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6176
diff changeset
  5112
7635
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5113
    ^ self copyFile:aSourceFile to:aDestFile repairCorruptedFiles:false
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5114
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5115
    "Modified: / 07-02-2007 / 18:46:44 / cg"
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5116
!
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5117
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5118
copyFile:aSourceFile to:aDestFile repairCorruptedFiles:repairCorruptedFiles
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5119
    "copy to"
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5120
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5121
    |copyOperation msg|
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5122
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5123
    repairCorruptedFiles ifTrue:[
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5124
        copyOperation := FileOperation copyCorruptedFile:aSourceFile to:aDestFile
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5125
    ] ifFalse:[
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5126
        copyOperation := FileOperation copyFile:aSourceFile to:aDestFile withOverWriteWarning:true copyFileIfSame:true.
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5127
    ].
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5128
    copyOperation result ifTrue:[
6190
b3ab1d955319 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6176
diff changeset
  5129
        msg := ('copy ', aSourceFile baseName, ' to:,', aDestFile baseName).
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5130
    ] ifFalse:[
7635
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5131
        msg := copyOperation errorString.
6190
b3ab1d955319 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6176
diff changeset
  5132
    ].
b3ab1d955319 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6176
diff changeset
  5133
    self notify:msg.
7635
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5134
    ^ copyOperation result
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5135
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5136
    "Created: / 07-02-2007 / 18:46:34 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5137
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  5138
321c1729db5b initial checkin
penk
parents:
diff changeset
  5139
copyFiles:aColOfSourceFiles to:aDirectory 
6374
f9bed8385350 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6373
diff changeset
  5140
    |copy result|
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5141
6829
3bcad14c59fc wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6785
diff changeset
  5142
    self withActivityIndicationDo:[
5961
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  5143
        copy := FileOperation copyFiles:aColOfSourceFiles to:aDirectory.
6374
f9bed8385350 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6373
diff changeset
  5144
        copy result ifTrue:[
f9bed8385350 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6373
diff changeset
  5145
            result := Dictionary withKeys:(copy collectionOfCopiedFiles) andValues:(copy collectionOfNewFiles).
f9bed8385350 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6373
diff changeset
  5146
        ] ifFalse:[
4629
e8739857466c show busyCursor while moving/copying files.
Claus Gittinger <cg@exept.de>
parents: 4624
diff changeset
  5147
            self notify:copy errorString.
e8739857466c show busyCursor while moving/copying files.
Claus Gittinger <cg@exept.de>
parents: 4624
diff changeset
  5148
        ].
e8739857466c show busyCursor while moving/copying files.
Claus Gittinger <cg@exept.de>
parents: 4624
diff changeset
  5149
        self updateCurrentDirectory.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5150
    ].
6374
f9bed8385350 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6373
diff changeset
  5151
    ^ result
6829
3bcad14c59fc wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6785
diff changeset
  5152
3bcad14c59fc wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6785
diff changeset
  5153
    "Modified: / 25-07-2006 / 09:07:04 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5154
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  5155
15569
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5156
copyFromToRepairingCorruptedFiles
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5157
    "ask for source and destination and copy the entered file.
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5158
     Especially useful for raw devices to copy corrupted disks/files
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5159
    "
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5160
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5161
    |source destination|
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5162
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5163
    source := Dialog 
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5164
                    requestDirectoryName:(resources string:'Copy from:') 
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5165
                    default:(LastMoveDestination ? self currentDirectory)
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5166
                    ok:(resources string:'Continue')
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5167
                    abort:nil.
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5168
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5169
    source isEmptyOrNil ifTrue:[^ self].
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5170
    source := source asFilename.
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5171
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5172
    destination := Dialog 
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5173
                    requestDirectoryName:(resources string:'Copy "%1" to:' with:source) 
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5174
                    default:(LastMoveDestination ? self currentDirectory)
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5175
                    ok:(resources string:'Copy')
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5176
                    abort:nil.
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5177
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5178
    destination isEmptyOrNil ifTrue:[^ self].
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5179
    destination := destination asFilename.
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5180
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5181
    self copyFile:source to:destination repairCorruptedFiles:true.
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5182
!
89c530367f30 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15528
diff changeset
  5183
4707
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5184
copyOrMoveDialog:aCollectionOfFiles for:aDestinationDirectory
12850
baaea91f1adc Fix stc compiler warnings
Stefan Vogel <sv@exept.de>
parents: 12824
diff changeset
  5185
    |size msg answer file|
4707
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5186
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5187
    size := aCollectionOfFiles size.
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5188
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5189
"/    stream := WriteStream on:'' asText.
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5190
"/    stream nextPutAll:'Copy or move'; cr; cr; nextPutAll:'file'.
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5191
"/    size == 1 ifFalse:[
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5192
"/        stream nextPutAll:'s'.
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5193
"/    ].
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5194
"/    stream nextPutAll:': '.
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5195
"/    stream nextPutAll:aCollectionOfFiles first baseName asString allBold.
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5196
"/    size == 1 ifFalse:[
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5197
"/        stream nextPutAll:' ... '.
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5198
"/        stream nextPutAll:aCollectionOfFiles last baseName asString.
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5199
"/    ].
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5200
"/    stream cr; nextPutAll:'to: '.
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5201
"/    stream nextPutAll:aDestinationDirectory asFilename pathName allBold.
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5202
"/    msg := stream contents
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5203
    size == 1 ifTrue:[
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5204
        file := aCollectionOfFiles first.
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5205
        msg := resources    
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5206
                stringWithCRs:'Copy or move\\%1:\    %2\to:\    %3 ?'
17762
29cf50354a7a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17753
diff changeset
  5207
                with:(resources string:
29cf50354a7a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17753
diff changeset
  5208
                        (file type == #regular 
29cf50354a7a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17753
diff changeset
  5209
                            ifTrue:'file' 
29cf50354a7a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17753
diff changeset
  5210
                            ifFalse:[
29cf50354a7a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17753
diff changeset
  5211
                                file isDirectory 
29cf50354a7a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17753
diff changeset
  5212
                                    ifTrue:'directory' 
29cf50354a7a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17753
diff changeset
  5213
                                    ifFalse:'object']))
4707
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5214
                with:(file baseName allBold)
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5215
                with:(aDestinationDirectory asFilename pathName allBold).
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5216
    ] ifFalse:[
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5217
        msg := resources    
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5218
                stringWithCRs:'Copy or move\\    %1 objects\to:\    %2 ?'
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5219
                with:size
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5220
                with:(aDestinationDirectory asFilename pathName allBold).
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5221
    ].
4707
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5222
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5223
    answer := OptionBox 
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5224
                  request:msg 
8127
116f25bc97ad national strings
Claus Gittinger <cg@exept.de>
parents: 8093
diff changeset
  5225
                  label:(resources string:'Copy or Move')
5898
f6214812e1d2 dont send obsolete message to OptionBox
Claus Gittinger <cg@exept.de>
parents: 5888
diff changeset
  5226
                  image:(WarningBox iconBitmap)
8127
116f25bc97ad national strings
Claus Gittinger <cg@exept.de>
parents: 8093
diff changeset
  5227
                  buttonLabels:(resources array:#('Cancel' 'Move' 'Copy' 'Copy As...'))
4354
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5228
                  values:#(#cancel #move #copy #copyAs)
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5229
                  default:#copy.
4707
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5230
    answer isNil ifTrue:[answer := #cancel].
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5231
    ^ answer.
17762
29cf50354a7a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17753
diff changeset
  5232
29cf50354a7a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17753
diff changeset
  5233
    "Modified: / 17-11-2017 / 13:16:42 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5234
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  5235
4354
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5236
copyOrMoveFiles:aColOfSourceFiles to:aDestinationDirectory 
4745
8082c278087d drop handling
Claus Gittinger <cg@exept.de>
parents: 4742
diff changeset
  5237
    "copy or move aColOfSourceFiles to aDirectory.
8082c278087d drop handling
Claus Gittinger <cg@exept.de>
parents: 4742
diff changeset
  5238
     Asks the used if a move or a copy is wanted.
8082c278087d drop handling
Claus Gittinger <cg@exept.de>
parents: 4742
diff changeset
  5239
     Returns true if the copyOrMove happened, false if user aborted the operation."
8082c278087d drop handling
Claus Gittinger <cg@exept.de>
parents: 4742
diff changeset
  5240
4707
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5241
    |answer lastOld lastNew|
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5242
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5243
    answer := self copyOrMoveDialog:aColOfSourceFiles for:aDestinationDirectory.
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5244
    answer == #copyAs ifTrue:[
4354
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5245
        aColOfSourceFiles do:[:eachSourceFile |
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5246
            |initial destFile srcBase dstBase|
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5247
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5248
            srcBase := eachSourceFile asFilename baseName.
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5249
            lastOld isNil ifTrue:[
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5250
                initial := srcBase
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5251
            ] ifFalse:[
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5252
                initial := DoWhatIMeanSupport
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5253
                            goodRenameDefaultForFile:srcBase lastOld:lastOld lastNew:lastNew.
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5254
            ].
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5255
            dstBase := Dialog request:('Copy %1 as:' bindWith:srcBase) initialAnswer:initial.
4745
8082c278087d drop handling
Claus Gittinger <cg@exept.de>
parents: 4742
diff changeset
  5256
            dstBase isNil ifTrue:[^ false].
4354
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5257
            self copyFile:eachSourceFile to:(aDestinationDirectory construct:dstBase).
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5258
            lastOld := srcBase.
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5259
            lastNew := dstBase.
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5260
        ].
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5261
4745
8082c278087d drop handling
Claus Gittinger <cg@exept.de>
parents: 4742
diff changeset
  5262
        ^ true.
4354
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5263
    ].
4707
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5264
    answer == #copy ifTrue:[
4354
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5265
        self copyFiles:aColOfSourceFiles to:aDestinationDirectory.
4745
8082c278087d drop handling
Claus Gittinger <cg@exept.de>
parents: 4742
diff changeset
  5266
        ^ true.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5267
    ].
4707
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  5268
    answer == #move ifTrue:[
4354
0a1239cd339d added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents: 4347
diff changeset
  5269
        self moveFiles:aColOfSourceFiles to:aDestinationDirectory.
4745
8082c278087d drop handling
Claus Gittinger <cg@exept.de>
parents: 4742
diff changeset
  5270
        ^ true.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5271
    ].
4745
8082c278087d drop handling
Claus Gittinger <cg@exept.de>
parents: 4742
diff changeset
  5272
    ^ false.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5273
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  5274
6107
745d91a22e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6102
diff changeset
  5275
copySelectionTo
745d91a22e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6102
diff changeset
  5276
    "copy the selected file(s) to another directory"
745d91a22e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6102
diff changeset
  5277
13704
38fe95ecc120 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 13683
diff changeset
  5278
    self copySelectionToRepairingCorruptedFiles:false.
38fe95ecc120 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 13683
diff changeset
  5279
    self updateCurrentDirectoryWithReread.
7635
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5280
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5281
    "Modified: / 07-02-2007 / 18:42:48 / cg"
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5282
!
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5283
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5284
copySelectionToRepairingCorruptedFiles
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5285
    "copy the selected file(s) to another directory"
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5286
13704
38fe95ecc120 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 13683
diff changeset
  5287
    self copySelectionToRepairingCorruptedFiles:true.
38fe95ecc120 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 13683
diff changeset
  5288
    self updateCurrentDirectoryWithReread.
7635
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5289
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5290
    "Created: / 07-02-2007 / 18:42:59 / cg"
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5291
!
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5292
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5293
copySelectionToRepairingCorruptedFiles:repairingCorruptedFiles
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5294
    "copy the selected file(s) to another directory"
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5295
6299
2dcebd9e4bff copy single file to
Claus Gittinger <cg@exept.de>
parents: 6292
diff changeset
  5296
    |selectedFiles msg destination directory|
2dcebd9e4bff copy single file to
Claus Gittinger <cg@exept.de>
parents: 6292
diff changeset
  5297
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  5298
    selectedFiles := self currentSelectedObjects copy.
6299
2dcebd9e4bff copy single file to
Claus Gittinger <cg@exept.de>
parents: 6292
diff changeset
  5299
    selectedFiles isEmptyOrNil ifTrue:[^ self].
2dcebd9e4bff copy single file to
Claus Gittinger <cg@exept.de>
parents: 6292
diff changeset
  5300
2dcebd9e4bff copy single file to
Claus Gittinger <cg@exept.de>
parents: 6292
diff changeset
  5301
    msg := (selectedFiles size > 1) 
14588
194e14b18769 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14577
diff changeset
  5302
                ifTrue:[ 'Copy Selected Items to Directory:' ]
194e14b18769 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14577
diff changeset
  5303
                ifFalse:[ 'Copy "%1" to Directory:' ].
6299
2dcebd9e4bff copy single file to
Claus Gittinger <cg@exept.de>
parents: 6292
diff changeset
  5304
2dcebd9e4bff copy single file to
Claus Gittinger <cg@exept.de>
parents: 6292
diff changeset
  5305
    destination := Dialog 
14588
194e14b18769 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14577
diff changeset
  5306
                    requestDirectoryName:(resources stringWithCRs:msg with:selectedFiles first baseName) 
7635
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5307
                    default:(LastMoveDestination ? self currentDirectory)
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5308
                    ok:(resources string:'Copy')
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5309
                    abort:nil.
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5310
6299
2dcebd9e4bff copy single file to
Claus Gittinger <cg@exept.de>
parents: 6292
diff changeset
  5311
    destination isEmptyOrNil ifTrue:[^ self].
2dcebd9e4bff copy single file to
Claus Gittinger <cg@exept.de>
parents: 6292
diff changeset
  5312
    destination := destination asFilename.
2dcebd9e4bff copy single file to
Claus Gittinger <cg@exept.de>
parents: 6292
diff changeset
  5313
2dcebd9e4bff copy single file to
Claus Gittinger <cg@exept.de>
parents: 6292
diff changeset
  5314
    destination isDirectory ifFalse:[
2dcebd9e4bff copy single file to
Claus Gittinger <cg@exept.de>
parents: 6292
diff changeset
  5315
        selectedFiles size == 1 ifTrue:[
2dcebd9e4bff copy single file to
Claus Gittinger <cg@exept.de>
parents: 6292
diff changeset
  5316
            directory := destination directory.
2dcebd9e4bff copy single file to
Claus Gittinger <cg@exept.de>
parents: 6292
diff changeset
  5317
            directory isDirectory ifTrue:[
2dcebd9e4bff copy single file to
Claus Gittinger <cg@exept.de>
parents: 6292
diff changeset
  5318
                LastMoveDestination := directory.
7635
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5319
                self copyFile:selectedFiles first to:destination repairCorruptedFiles:repairingCorruptedFiles.
6299
2dcebd9e4bff copy single file to
Claus Gittinger <cg@exept.de>
parents: 6292
diff changeset
  5320
                ^ self.
2dcebd9e4bff copy single file to
Claus Gittinger <cg@exept.de>
parents: 6292
diff changeset
  5321
            ]
2dcebd9e4bff copy single file to
Claus Gittinger <cg@exept.de>
parents: 6292
diff changeset
  5322
        ]
2dcebd9e4bff copy single file to
Claus Gittinger <cg@exept.de>
parents: 6292
diff changeset
  5323
    ].
2dcebd9e4bff copy single file to
Claus Gittinger <cg@exept.de>
parents: 6292
diff changeset
  5324
2dcebd9e4bff copy single file to
Claus Gittinger <cg@exept.de>
parents: 6292
diff changeset
  5325
    LastMoveDestination := destination.
7635
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5326
    repairingCorruptedFiles ifTrue:[
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5327
        selectedFiles do:[:eachFile |    
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5328
            self copyFile:eachFile to:destination repairCorruptedFiles:repairingCorruptedFiles.
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5329
        ].
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5330
        ^ self.
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5331
    ] ifFalse:[
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5332
        self copyFiles:selectedFiles to:destination
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5333
    ]
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5334
621ef7c664a7 +copyCorrupt
Claus Gittinger <cg@exept.de>
parents: 7633
diff changeset
  5335
    "Created: / 07-02-2007 / 18:42:35 / cg"
6107
745d91a22e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6102
diff changeset
  5336
!
745d91a22e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6102
diff changeset
  5337
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5338
deleteFile:aFile
6373
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5339
    "delete the selected files/directories"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5340
321c1729db5b initial checkin
penk
parents:
diff changeset
  5341
    ^ self deleteFiles:(OrderedCollection with:aFile).
321c1729db5b initial checkin
penk
parents:
diff changeset
  5342
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  5343
321c1729db5b initial checkin
penk
parents:
diff changeset
  5344
deleteFiles:colOfFiles
6373
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5345
    "delete some files/directories"
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5346
5081
e55e62d8aeb9 cut and paste files in same directory
penk
parents: 5074
diff changeset
  5347
    ^ self deleteFiles:colOfFiles confirm:true.
e55e62d8aeb9 cut and paste files in same directory
penk
parents: 5074
diff changeset
  5348
!
e55e62d8aeb9 cut and paste files in same directory
penk
parents: 5074
diff changeset
  5349
e55e62d8aeb9 cut and paste files in same directory
penk
parents: 5074
diff changeset
  5350
deleteFiles:colOfFiles confirm:confirm
6373
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5351
    "delete some files/directories"
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5352
5673
3ed1092a3c73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5667
diff changeset
  5353
    |delete result|
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5354
6829
3bcad14c59fc wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6785
diff changeset
  5355
    self withActivityIndicationDo:[
9575
548adf8e9d98 added: #progressPercentageHolder
Claus Gittinger <cg@exept.de>
parents: 9572
diff changeset
  5356
        ProgressNotification handle:[:info |
548adf8e9d98 added: #progressPercentageHolder
Claus Gittinger <cg@exept.de>
parents: 9572
diff changeset
  5357
            self progressPercentageHolder value:info progressValue.
548adf8e9d98 added: #progressPercentageHolder
Claus Gittinger <cg@exept.de>
parents: 9572
diff changeset
  5358
            info proceed
548adf8e9d98 added: #progressPercentageHolder
Claus Gittinger <cg@exept.de>
parents: 9572
diff changeset
  5359
        ] do:[
548adf8e9d98 added: #progressPercentageHolder
Claus Gittinger <cg@exept.de>
parents: 9572
diff changeset
  5360
            delete := FileOperation deleteFiles:colOfFiles confirm:confirm.
548adf8e9d98 added: #progressPercentageHolder
Claus Gittinger <cg@exept.de>
parents: 9572
diff changeset
  5361
            result := delete result.
548adf8e9d98 added: #progressPercentageHolder
Claus Gittinger <cg@exept.de>
parents: 9572
diff changeset
  5362
        ].
5673
3ed1092a3c73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5667
diff changeset
  5363
        result notNil ifTrue:[
3ed1092a3c73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5667
diff changeset
  5364
            result ifFalse:[
3ed1092a3c73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5667
diff changeset
  5365
                self notify:delete errorString.
5753
e5229b5882b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5739
diff changeset
  5366
            ] ifTrue:[
e5229b5882b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5739
diff changeset
  5367
                self updateListAfterDelete:colOfFiles.
e5229b5882b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5739
diff changeset
  5368
            ]
4394
a7fedd485b73 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4392
diff changeset
  5369
        ].
5673
3ed1092a3c73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5667
diff changeset
  5370
    ].
3ed1092a3c73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5667
diff changeset
  5371
    ^ result.
6829
3bcad14c59fc wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6785
diff changeset
  5372
9575
548adf8e9d98 added: #progressPercentageHolder
Claus Gittinger <cg@exept.de>
parents: 9572
diff changeset
  5373
    "Modified: / 11-10-2010 / 13:08:24 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5374
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  5375
6169
Claus Gittinger <cg@exept.de>
parents: 6151
diff changeset
  5376
eraseFiles:colOfFiles
6373
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5377
    "erase (clear and delete) some files/directories"
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5378
6169
Claus Gittinger <cg@exept.de>
parents: 6151
diff changeset
  5379
    ^ self eraseFiles:colOfFiles confirm:true.
Claus Gittinger <cg@exept.de>
parents: 6151
diff changeset
  5380
!
Claus Gittinger <cg@exept.de>
parents: 6151
diff changeset
  5381
Claus Gittinger <cg@exept.de>
parents: 6151
diff changeset
  5382
eraseFiles:colOfFiles confirm:confirm
6373
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5383
    "erase (clear and delete) some files/directories"
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5384
8462
a5d12742a900 changed #eraseFiles:confirm:
Claus Gittinger <cg@exept.de>
parents: 8454
diff changeset
  5385
    |deleteOperation result fileSize|
6169
Claus Gittinger <cg@exept.de>
parents: 6151
diff changeset
  5386
6829
3bcad14c59fc wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6785
diff changeset
  5387
    self withActivityIndicationDo:[
8462
a5d12742a900 changed #eraseFiles:confirm:
Claus Gittinger <cg@exept.de>
parents: 8454
diff changeset
  5388
        fileSize := colOfFiles first asFilename fileSize.
8294
22f650a23f59 show progress during erase
Claus Gittinger <cg@exept.de>
parents: 8287
diff changeset
  5389
        deleteOperation := FileOperation eraseFiles:colOfFiles confirm:confirm.
8462
a5d12742a900 changed #eraseFiles:confirm:
Claus Gittinger <cg@exept.de>
parents: 8454
diff changeset
  5390
        (colOfFiles size == 1 and:[ fileSize < (10*1024*1024) ])
8294
22f650a23f59 show progress during erase
Claus Gittinger <cg@exept.de>
parents: 8287
diff changeset
  5391
        ifTrue:[
22f650a23f59 show progress during erase
Claus Gittinger <cg@exept.de>
parents: 8287
diff changeset
  5392
            result := deleteOperation result.
22f650a23f59 show progress during erase
Claus Gittinger <cg@exept.de>
parents: 8287
diff changeset
  5393
        ] ifFalse:[
22f650a23f59 show progress during erase
Claus Gittinger <cg@exept.de>
parents: 8287
diff changeset
  5394
            ProgressIndicator
22f650a23f59 show progress during erase
Claus Gittinger <cg@exept.de>
parents: 8287
diff changeset
  5395
                displayProgressNotifications:'Erasing' 
22f650a23f59 show progress during erase
Claus Gittinger <cg@exept.de>
parents: 8287
diff changeset
  5396
                abortable:true 
22f650a23f59 show progress during erase
Claus Gittinger <cg@exept.de>
parents: 8287
diff changeset
  5397
                at:nil 
22f650a23f59 show progress during erase
Claus Gittinger <cg@exept.de>
parents: 8287
diff changeset
  5398
                during:[
22f650a23f59 show progress during erase
Claus Gittinger <cg@exept.de>
parents: 8287
diff changeset
  5399
                    result := deleteOperation result.
22f650a23f59 show progress during erase
Claus Gittinger <cg@exept.de>
parents: 8287
diff changeset
  5400
                ].
22f650a23f59 show progress during erase
Claus Gittinger <cg@exept.de>
parents: 8287
diff changeset
  5401
        ].
22f650a23f59 show progress during erase
Claus Gittinger <cg@exept.de>
parents: 8287
diff changeset
  5402
6169
Claus Gittinger <cg@exept.de>
parents: 6151
diff changeset
  5403
        result notNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 6151
diff changeset
  5404
            result ifFalse:[
8294
22f650a23f59 show progress during erase
Claus Gittinger <cg@exept.de>
parents: 8287
diff changeset
  5405
                self notify:deleteOperation errorString.
6169
Claus Gittinger <cg@exept.de>
parents: 6151
diff changeset
  5406
            ] ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 6151
diff changeset
  5407
                self updateListAfterDelete:colOfFiles.
Claus Gittinger <cg@exept.de>
parents: 6151
diff changeset
  5408
            ]
Claus Gittinger <cg@exept.de>
parents: 6151
diff changeset
  5409
        ].
Claus Gittinger <cg@exept.de>
parents: 6151
diff changeset
  5410
    ].
Claus Gittinger <cg@exept.de>
parents: 6151
diff changeset
  5411
    ^ result.
6829
3bcad14c59fc wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6785
diff changeset
  5412
3bcad14c59fc wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6785
diff changeset
  5413
    "Modified: / 25-07-2006 / 09:07:16 / cg"
6169
Claus Gittinger <cg@exept.de>
parents: 6151
diff changeset
  5414
!
Claus Gittinger <cg@exept.de>
parents: 6151
diff changeset
  5415
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5416
moveFile:aSourceFile to:aDestFile
6373
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5417
    "move a file/directory"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5418
321c1729db5b initial checkin
penk
parents:
diff changeset
  5419
    |move|
321c1729db5b initial checkin
penk
parents:
diff changeset
  5420
5961
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  5421
    move := FileOperation moveFile:aSourceFile to:aDestFile.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5422
    move result ifTrue:[
15346
1220ca6a9666 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15259
diff changeset
  5423
        self notify:(resources string: 'move "%1" to "%2"' with:aSourceFile asString with:aDestFile asString).
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5424
    ] ifFalse:[
4523
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
  5425
        self notify:move errorString.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5426
    ].
17871
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  5427
    self updateCurrentDirectoryWithReread.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5428
    ^ move result
321c1729db5b initial checkin
penk
parents:
diff changeset
  5429
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  5430
321c1729db5b initial checkin
penk
parents:
diff changeset
  5431
moveFiles:aColOfSourceFiles to:aDirectory 
6373
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5432
   "move some files to aDirectory"
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5433
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5434
    |move|
321c1729db5b initial checkin
penk
parents:
diff changeset
  5435
6829
3bcad14c59fc wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6785
diff changeset
  5436
    self withActivityIndicationDo:[
5961
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  5437
        move := FileOperation moveFiles:aColOfSourceFiles to:aDirectory.
4629
e8739857466c show busyCursor while moving/copying files.
Claus Gittinger <cg@exept.de>
parents: 4624
diff changeset
  5438
        move result ifFalse:[
e8739857466c show busyCursor while moving/copying files.
Claus Gittinger <cg@exept.de>
parents: 4624
diff changeset
  5439
            self notify:move errorString.
e8739857466c show busyCursor while moving/copying files.
Claus Gittinger <cg@exept.de>
parents: 4624
diff changeset
  5440
        ].
17871
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  5441
        self updateCurrentDirectoryWithReread.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5442
    ].
6373
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5443
    ^ move collectionOfMovedFiles
6829
3bcad14c59fc wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6785
diff changeset
  5444
3bcad14c59fc wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6785
diff changeset
  5445
    "Modified: / 25-07-2006 / 09:07:32 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5446
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  5447
6107
745d91a22e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6102
diff changeset
  5448
moveSelectionTo
5334
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5449
    "move the selected file(s) to another directory"
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5450
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5451
    |destinationDirectory|
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5452
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5453
    destinationDirectory := Dialog 
14588
194e14b18769 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14577
diff changeset
  5454
                                requestDirectoryName:(resources stringWithCRs:'Move Selected Items to Directory:') 
5789
b357cb31cc87 move fix
Claus Gittinger <cg@exept.de>
parents: 5778
diff changeset
  5455
                                default:(LastMoveDestination ? self currentDirectory)
6952
f9bef0205d36 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6919
diff changeset
  5456
                                ok:(resources string:'Move')
5334
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5457
                                abort:nil.
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5458
    destinationDirectory isEmptyOrNil ifTrue:[^ self].
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5459
5789
b357cb31cc87 move fix
Claus Gittinger <cg@exept.de>
parents: 5778
diff changeset
  5460
    LastMoveDestination := destinationDirectory.
13704
38fe95ecc120 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 13683
diff changeset
  5461
    self moveFiles:(self currentSelectedObjects copy) to:destinationDirectory asFilename.
38fe95ecc120 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 13683
diff changeset
  5462
    self updateCurrentDirectoryWithReread.
38fe95ecc120 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 13683
diff changeset
  5463
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  5464
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  5465
    "Modified: / 04-12-2006 / 13:15:12 / cg"
5334
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5466
!
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5467
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5468
newDirectory
321c1729db5b initial checkin
penk
parents:
diff changeset
  5469
    "ask for and create a new directory"
321c1729db5b initial checkin
penk
parents:
diff changeset
  5470
5334
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5471
    |selectedFiles singleSelectedFile defaultAnswer directory createOp newFile mime|
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5472
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5473
    directory := self currentDirectory.
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5474
    directory isNil ifTrue:[
18175
403729a65fe5 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18036
diff changeset
  5475
        self warn:'Select a single directory to create a directory' translate:true.
4979
366465d1a8a5 warn on create new file or directory if nothing selected or more than one directory
penk
parents: 4976
diff changeset
  5476
        ^ self
366465d1a8a5 warn on create new file or directory if nothing selected or more than one directory
penk
parents: 4976
diff changeset
  5477
    ].
4521
b70a9f623bb1 default in newDir
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
  5478
b70a9f623bb1 default in newDir
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
  5479
    "/ clever default if selection is an archive...
4979
366465d1a8a5 warn on create new file or directory if nothing selected or more than one directory
penk
parents: 4976
diff changeset
  5480
    selectedFiles := self currentSelectedFiles.
4521
b70a9f623bb1 default in newDir
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
  5481
    selectedFiles size == 1 ifTrue:[
b70a9f623bb1 default in newDir
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
  5482
        singleSelectedFile := selectedFiles first.
b70a9f623bb1 default in newDir
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
  5483
b70a9f623bb1 default in newDir
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
  5484
        mime := MIMETypes mimeTypeForFilename:singleSelectedFile.
13714
d5583c9b5ddb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13704
diff changeset
  5485
        (mime notNil and:[mime isArchiveType]) ifTrue:[
4521
b70a9f623bb1 default in newDir
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
  5486
            defaultAnswer := singleSelectedFile asFilename withoutSuffix baseName.
b70a9f623bb1 default in newDir
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
  5487
b70a9f623bb1 default in newDir
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
  5488
            mime := MIMETypes mimeTypeForFilename:defaultAnswer.
13714
d5583c9b5ddb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13704
diff changeset
  5489
            (mime notNil and:[mime isArchiveType]) ifTrue:[
4521
b70a9f623bb1 default in newDir
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
  5490
                defaultAnswer := defaultAnswer asFilename withoutSuffix baseName
b70a9f623bb1 default in newDir
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
  5491
            ].
b70a9f623bb1 default in newDir
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
  5492
        ].
b70a9f623bb1 default in newDir
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
  5493
    ].
b70a9f623bb1 default in newDir
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
  5494
5961
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  5495
4521
b70a9f623bb1 default in newDir
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
  5496
    defaultAnswer notNil ifTrue:[
5961
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  5497
        createOp := FileOperation createDirectoryIn:directory initialAnswer:defaultAnswer.
4521
b70a9f623bb1 default in newDir
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
  5498
    ] ifFalse:[
5961
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  5499
        createOp := FileOperation createDirectoryIn:directory.
4521
b70a9f623bb1 default in newDir
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
  5500
    ].
b70a9f623bb1 default in newDir
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
  5501
    createOp result ifFalse:[ ^ self].
b70a9f623bb1 default in newDir
Claus Gittinger <cg@exept.de>
parents: 4516
diff changeset
  5502
    newFile := createOp createdFile.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5503
    newFile notNil ifTrue:[
17871
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  5504
        self updateCurrentDirectoryWithReread.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5505
    ]
17818
045764df016c #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17790
diff changeset
  5506
045764df016c #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17790
diff changeset
  5507
    "Modified: / 29-11-2017 / 12:26:41 / cg"
18175
403729a65fe5 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18036
diff changeset
  5508
    "Modified: / 01-06-2018 / 12:49:43 / Claus Gittinger"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5509
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  5510
321c1729db5b initial checkin
penk
parents:
diff changeset
  5511
newFile
321c1729db5b initial checkin
penk
parents:
diff changeset
  5512
    "ask for and create a new file"
321c1729db5b initial checkin
penk
parents:
diff changeset
  5513
5334
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5514
    | curFile directory create file|
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5515
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5516
    directory := self currentDirectory.
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5517
    directory isNil ifTrue:[
18175
403729a65fe5 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18036
diff changeset
  5518
        self warn:'Select a single directory to create a file.' translate:true.
4979
366465d1a8a5 warn on create new file or directory if nothing selected or more than one directory
penk
parents: 4976
diff changeset
  5519
        ^ self.
366465d1a8a5 warn on create new file or directory if nothing selected or more than one directory
penk
parents: 4976
diff changeset
  5520
    ].
5334
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5521
3982
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  5522
    curFile := self firstSelectedFile.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5523
    curFile notNil ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  5524
        file := curFile.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5525
    ] ifFalse:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  5526
        file := directory.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5527
    ].
5961
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  5528
    create := FileOperation createFileIn:file.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5529
    create result ifFalse:[ ^ self].
321c1729db5b initial checkin
penk
parents:
diff changeset
  5530
    self updateAndSelect:(OrderedCollection with:(create createdFile)).
17818
045764df016c #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17790
diff changeset
  5531
045764df016c #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17790
diff changeset
  5532
    "Modified: / 29-11-2017 / 12:26:51 / cg"
18175
403729a65fe5 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18036
diff changeset
  5533
    "Modified: / 01-06-2018 / 12:49:50 / Claus Gittinger"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5534
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  5535
321c1729db5b initial checkin
penk
parents:
diff changeset
  5536
newHardLink
321c1729db5b initial checkin
penk
parents:
diff changeset
  5537
    "ask for and create a hard link (unix only)"
321c1729db5b initial checkin
penk
parents:
diff changeset
  5538
6151
baba7a7d54b6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6146
diff changeset
  5539
    self newLink:#hard.
baba7a7d54b6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6146
diff changeset
  5540
!
baba7a7d54b6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6146
diff changeset
  5541
baba7a7d54b6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6146
diff changeset
  5542
newLink:typeOfLink
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5543
    "ask for and create a symbolic if symbolic is true otherwise a hard link (unix only)"
321c1729db5b initial checkin
penk
parents:
diff changeset
  5544
5334
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5545
    | sel dir create createdFile|
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5546
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  5547
    sel := self currentSelectedObjects.
4979
366465d1a8a5 warn on create new file or directory if nothing selected or more than one directory
penk
parents: 4976
diff changeset
  5548
    (sel size ~= 1) ifTrue:[
18175
403729a65fe5 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18036
diff changeset
  5549
        self warn:'Select one directory to link' translate:true.
4979
366465d1a8a5 warn on create new file or directory if nothing selected or more than one directory
penk
parents: 4976
diff changeset
  5550
        ^ self
366465d1a8a5 warn on create new file or directory if nothing selected or more than one directory
penk
parents: 4976
diff changeset
  5551
    ].
5334
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5552
    dir := sel first.
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  5553
6151
baba7a7d54b6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6146
diff changeset
  5554
    create := FileOperation createLinkIn:dir soft:(typeOfLink == #soft).
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5555
    create result ifFalse:[ ^ self].
321c1729db5b initial checkin
penk
parents:
diff changeset
  5556
    createdFile := create createdFile.
321c1729db5b initial checkin
penk
parents:
diff changeset
  5557
    createdFile notNil ifTrue:[
6151
baba7a7d54b6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6146
diff changeset
  5558
        typeOfLink == #soft ifTrue:[
17871
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  5559
            self updateCurrentDirectoryWithReread.
4785
5a3f7a0c3ff1 symbolic link creation code fixed
Claus Gittinger <cg@exept.de>
parents: 4782
diff changeset
  5560
        ] ifFalse:[
5a3f7a0c3ff1 symbolic link creation code fixed
Claus Gittinger <cg@exept.de>
parents: 4782
diff changeset
  5561
            self updateAndSelect:(OrderedCollection with:createdFile).
5a3f7a0c3ff1 symbolic link creation code fixed
Claus Gittinger <cg@exept.de>
parents: 4782
diff changeset
  5562
        ]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5563
    ].
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  5564
17818
045764df016c #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17790
diff changeset
  5565
    "Modified: / 29-11-2017 / 12:26:58 / cg"
18175
403729a65fe5 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18036
diff changeset
  5566
    "Modified: / 01-06-2018 / 12:49:32 / Claus Gittinger"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5567
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  5568
321c1729db5b initial checkin
penk
parents:
diff changeset
  5569
newSoftLink
321c1729db5b initial checkin
penk
parents:
diff changeset
  5570
    "ask for and create a soft link (unix only)"
321c1729db5b initial checkin
penk
parents:
diff changeset
  5571
6151
baba7a7d54b6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6146
diff changeset
  5572
    self newLink:#soft.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5573
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  5574
321c1729db5b initial checkin
penk
parents:
diff changeset
  5575
pasteFiles
6373
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5576
    "paste from clipBoard"
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5577
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5578
    |buffer destination files directories copiedFiles thisIsAFileMoveOperation|
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5579
321c1729db5b initial checkin
penk
parents:
diff changeset
  5580
    files := self clipboard files.
6482
00207f456339 isEmptyOrNil / notEmptyOrNil refactoring
Claus Gittinger <cg@exept.de>
parents: 6479
diff changeset
  5581
    files isEmptyOrNil ifTrue:[ ^ self ].
6373
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5582
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5583
    thisIsAFileMoveOperation := self clipboard method == #cut.
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5584
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5585
    buffer := self clipboard copy.
3982
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  5586
    directories := self currentSelectedDirectories.
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5587
    directories size ~~ 1 ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  5588
        |box dirStringCol|
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5589
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  5590
        dirStringCol := directories collect:[:aDir| aDir asString].
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  5591
        box := ListSelectionBox new.
6373
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5592
        box title:'Paste into which directory ?'.
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  5593
        box list:dirStringCol.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  5594
        box okAction:[:sel | destination := sel asFilename].
5003
a14ce263ada5 boxes no longer show at pointer
Claus Gittinger <cg@exept.de>
parents: 4982
diff changeset
  5595
        box show.
a14ce263ada5 boxes no longer show at pointer
Claus Gittinger <cg@exept.de>
parents: 4982
diff changeset
  5596
        box destroy.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5597
    ] ifFalse:[
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5598
        destination := directories anElement.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5599
    ].
6373
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5600
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5601
    thisIsAFileMoveOperation ifTrue:[
5081
e55e62d8aeb9 cut and paste files in same directory
penk
parents: 5074
diff changeset
  5602
        buffer files copy do:[:aFile|
e55e62d8aeb9 cut and paste files in same directory
penk
parents: 5074
diff changeset
  5603
            aFile directory = destination ifTrue:[
e55e62d8aeb9 cut and paste files in same directory
penk
parents: 5074
diff changeset
  5604
                buffer files remove:aFile.
e55e62d8aeb9 cut and paste files in same directory
penk
parents: 5074
diff changeset
  5605
            ].
e55e62d8aeb9 cut and paste files in same directory
penk
parents: 5074
diff changeset
  5606
        ].
e55e62d8aeb9 cut and paste files in same directory
penk
parents: 5074
diff changeset
  5607
    ].
e55e62d8aeb9 cut and paste files in same directory
penk
parents: 5074
diff changeset
  5608
    copiedFiles := self copyFiles:(buffer files) to:destination.
6374
f9bed8385350 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6373
diff changeset
  5609
    copiedFiles notEmptyOrNil ifTrue:[    
f9bed8385350 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6373
diff changeset
  5610
        thisIsAFileMoveOperation ifTrue:[
f9bed8385350 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6373
diff changeset
  5611
            self deleteFiles:(copiedFiles keys) confirm:false.
f9bed8385350 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6373
diff changeset
  5612
        ]. 
f9bed8385350 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6373
diff changeset
  5613
f9bed8385350 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6373
diff changeset
  5614
        "/ select those pasted files.
f9bed8385350 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6373
diff changeset
  5615
        self updateCurrentDirectory:true.
f9bed8385350 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6373
diff changeset
  5616
        self currentFileNameHolder value:copiedFiles values.
f9bed8385350 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6373
diff changeset
  5617
    ]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5618
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  5619
321c1729db5b initial checkin
penk
parents:
diff changeset
  5620
renameFile:aFile 
321c1729db5b initial checkin
penk
parents:
diff changeset
  5621
    "rename the selected file(s)"
321c1729db5b initial checkin
penk
parents:
diff changeset
  5622
9793
df3c1b8165fa variable renamed in: #renameFile:
Stefan Vogel <sv@exept.de>
parents: 9784
diff changeset
  5623
    ^ self renameFiles:(Array with:aFile).
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5624
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  5625
4230
805e8d4b4ec7 added make.
Claus Gittinger <cg@exept.de>
parents: 4213
diff changeset
  5626
renameFile:filename to:newFileString update:aBoolean
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5627
    "rename filename to newFileString"
321c1729db5b initial checkin
penk
parents:
diff changeset
  5628
321c1729db5b initial checkin
penk
parents:
diff changeset
  5629
    |rename|
321c1729db5b initial checkin
penk
parents:
diff changeset
  5630
5961
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  5631
    rename := FileOperation renameFile:filename to:newFileString.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5632
    rename result ifTrue:[
4230
805e8d4b4ec7 added make.
Claus Gittinger <cg@exept.de>
parents: 4213
diff changeset
  5633
        aBoolean ifTrue:[
805e8d4b4ec7 added make.
Claus Gittinger <cg@exept.de>
parents: 4213
diff changeset
  5634
            self updateAndSelect:(rename renamedFiles).
805e8d4b4ec7 added make.
Claus Gittinger <cg@exept.de>
parents: 4213
diff changeset
  5635
        ].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5636
    ] ifFalse:[
4523
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
  5637
        self notify:rename errorString.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5638
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  5639
    ^ rename result
321c1729db5b initial checkin
penk
parents:
diff changeset
  5640
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  5641
321c1729db5b initial checkin
penk
parents:
diff changeset
  5642
renameFiles:aColOfFiles 
6373
16fb0a500e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6371
diff changeset
  5643
    "rename some file(s)"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5644
321c1729db5b initial checkin
penk
parents:
diff changeset
  5645
    |rename|
321c1729db5b initial checkin
penk
parents:
diff changeset
  5646
5961
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  5647
    rename := FileOperation renameFiles:aColOfFiles.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5648
    rename result ifFalse:[
9793
df3c1b8165fa variable renamed in: #renameFile:
Stefan Vogel <sv@exept.de>
parents: 9784
diff changeset
  5649
        self notify:rename errorString.
df3c1b8165fa variable renamed in: #renameFile:
Stefan Vogel <sv@exept.de>
parents: 9784
diff changeset
  5650
        ^ nil.
df3c1b8165fa variable renamed in: #renameFile:
Stefan Vogel <sv@exept.de>
parents: 9784
diff changeset
  5651
    ].
df3c1b8165fa variable renamed in: #renameFile:
Stefan Vogel <sv@exept.de>
parents: 9784
diff changeset
  5652
    ^ rename
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5653
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  5654
321c1729db5b initial checkin
penk
parents:
diff changeset
  5655
renameSelection
321c1729db5b initial checkin
penk
parents:
diff changeset
  5656
    "rename the selected file(s)"
321c1729db5b initial checkin
penk
parents:
diff changeset
  5657
9793
df3c1b8165fa variable renamed in: #renameFile:
Stefan Vogel <sv@exept.de>
parents: 9784
diff changeset
  5658
    |renamed|
df3c1b8165fa variable renamed in: #renameFile:
Stefan Vogel <sv@exept.de>
parents: 9784
diff changeset
  5659
df3c1b8165fa variable renamed in: #renameFile:
Stefan Vogel <sv@exept.de>
parents: 9784
diff changeset
  5660
    renamed := self renameFiles:(self currentSelectedObjects copy).
df3c1b8165fa variable renamed in: #renameFile:
Stefan Vogel <sv@exept.de>
parents: 9784
diff changeset
  5661
    renamed notNil ifTrue:[
df3c1b8165fa variable renamed in: #renameFile:
Stefan Vogel <sv@exept.de>
parents: 9784
diff changeset
  5662
        self updateAndSelect:renamed renamedFiles.
df3c1b8165fa variable renamed in: #renameFile:
Stefan Vogel <sv@exept.de>
parents: 9784
diff changeset
  5663
    ].
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  5664
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  5665
    "Modified: / 04-12-2006 / 13:15:24 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5666
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  5667
4080
c32f68f51f47 translation to german
penk
parents: 4075
diff changeset
  5668
!AbstractFileBrowser methodsFor:'menu accessing'!
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5669
9111
4566dd920e09 changes for better FileDialog
Claus Gittinger <cg@exept.de>
parents: 9108
diff changeset
  5670
bookmarksMenu
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
  5671
    <resource: #programMenu>
c04d4781a37e next stage
penk
parents: 3949
diff changeset
  5672
14941
feeeea13426b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14742
diff changeset
  5673
    ^ self bookmarksMenuForBaseSpec:self class baseBookmarksMenuSpec.
feeeea13426b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14742
diff changeset
  5674
!
feeeea13426b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14742
diff changeset
  5675
feeeea13426b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14742
diff changeset
  5676
bookmarksMenuForBaseSpec:aBaseMenuSpec
feeeea13426b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14742
diff changeset
  5677
    <resource: #programMenu>
feeeea13426b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14742
diff changeset
  5678
4672
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
  5679
    |menu bookmarks|
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
  5680
14941
feeeea13426b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14742
diff changeset
  5681
    menu := aBaseMenuSpec decodeAsLiteralArray.
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5682
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5683
    "/ add the bookmark items ...
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5684
    bookmarks := self class directoryBookmarks.
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5685
    bookmarks notEmptyOrNil ifTrue:[
14604
8cbf91f053fa class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14593
diff changeset
  5686
        menu addSeparator.
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5687
        bookmarks do:[:dirName |
12963
b8da6d54c50a class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12874
diff changeset
  5688
            menu addItem:(MenuItem 
b8da6d54c50a class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12874
diff changeset
  5689
                            label:dirName asString 
b8da6d54c50a class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12874
diff changeset
  5690
                            itemValue:[
b8da6d54c50a class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12874
diff changeset
  5691
                                (self currentSelectedDirectories includes:dirName) ifFalse:[
b8da6d54c50a class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12874
diff changeset
  5692
                                    self setCurrentFileName:dirName.
b8da6d54c50a class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12874
diff changeset
  5693
                                ].
b8da6d54c50a class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12874
diff changeset
  5694
                            ]).
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5695
        ].
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5696
    ].
4080
c32f68f51f47 translation to german
penk
parents: 4075
diff changeset
  5697
    menu findGuiResourcesIn:self.
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5698
    ^ menu
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5699
11135
59e1d94df37f hg menu preps
Claus Gittinger <cg@exept.de>
parents: 11108
diff changeset
  5700
    "Modified: / 14-01-2012 / 21:14:03 / cg"
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5701
!
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5702
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5703
canBackward
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5704
    ^ self directoryHistory canBackward.
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5705
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5706
    "Modified: / 27-03-2007 / 10:54:55 / cg"
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5707
!
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5708
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5709
canForward
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5710
    ^ self directoryHistory canForward.
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5711
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5712
    "Modified: / 27-03-2007 / 10:54:57 / cg"
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5713
!
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5714
9111
4566dd920e09 changes for better FileDialog
Claus Gittinger <cg@exept.de>
parents: 9108
diff changeset
  5715
gotoBookmarksMenu
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5716
    <resource: #programMenu>
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5717
14941
feeeea13426b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14742
diff changeset
  5718
    ^ self bookmarksMenuForBaseSpec:self class baseBookmarksMenuSpec2.
6099
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
  5719
!
a7263cc8183d bookmarks
Claus Gittinger <cg@exept.de>
parents: 6096
diff changeset
  5720
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5721
menuDirHistory:backOrForward
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5722
    "initialize the history menu"
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5723
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5724
    <resource: #programMenu >
321c1729db5b initial checkin
penk
parents:
diff changeset
  5725
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5726
    |hist menu pathList currentSel currentPath|
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5727
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5728
    hist := self directoryHistory.
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5729
    hist isEmpty ifTrue:[^ nil].
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5730
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5731
    backOrForward == #back ifTrue:[
6725
3885523e54b8 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6708
diff changeset
  5732
        currentSel := self currentSelectedDirectories.
4347
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
  5733
        currentSel size == 1 ifTrue:[
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
  5734
            currentPath := currentSel first asString.
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
  5735
        ] ifFalse:[
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
  5736
            currentPath := nil.
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
  5737
        ].
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5738
        pathList := hist getBackCollection.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5739
    ] ifFalse:[
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5740
        pathList := hist getForwardCollection.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5741
    ].
4022
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
  5742
    pathList isEmpty ifTrue:[ ^ nil].
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5743
6370
eef587af6aa5 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6369
diff changeset
  5744
    pathList size > 30 ifTrue:[
eef587af6aa5 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6369
diff changeset
  5745
        pathList := pathList copyTo:30
eef587af6aa5 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6369
diff changeset
  5746
    ].
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5747
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5748
    menu := Menu new.
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5749
3964
8697bad1c903 next stage for history
penk
parents: 3963
diff changeset
  5750
    pathList do:[:aPath| 
14593
ef995669e26f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14588
diff changeset
  5751
        menu addItem:(MenuItem
ef995669e26f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14588
diff changeset
  5752
                        label:aPath
ef995669e26f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14588
diff changeset
  5753
                        itemValue:[ self setCurrentFileName:(aPath asFilename) ]
ef995669e26f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14588
diff changeset
  5754
                        translateLabel:false).
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
  5755
    ].
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5756
    menu findGuiResourcesIn:self.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5757
    ^ menu
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5758
11783
40139e220343 menuitem protocol
Claus Gittinger <cg@exept.de>
parents: 11767
diff changeset
  5759
    "Modified: / 09-09-2012 / 13:07:22 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5760
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  5761
321c1729db5b initial checkin
penk
parents:
diff changeset
  5762
menuDirHistoryBack
321c1729db5b initial checkin
penk
parents:
diff changeset
  5763
    "initialize the directory menu
321c1729db5b initial checkin
penk
parents:
diff changeset
  5764
    "
321c1729db5b initial checkin
penk
parents:
diff changeset
  5765
    <resource: #programMenu >
321c1729db5b initial checkin
penk
parents:
diff changeset
  5766
321c1729db5b initial checkin
penk
parents:
diff changeset
  5767
    ^ self menuDirHistory:#back.
321c1729db5b initial checkin
penk
parents:
diff changeset
  5768
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  5769
321c1729db5b initial checkin
penk
parents:
diff changeset
  5770
menuDirHistoryForward
321c1729db5b initial checkin
penk
parents:
diff changeset
  5771
    "initialize the directory menu
321c1729db5b initial checkin
penk
parents:
diff changeset
  5772
    "
321c1729db5b initial checkin
penk
parents:
diff changeset
  5773
    <resource: #programMenu >
321c1729db5b initial checkin
penk
parents:
diff changeset
  5774
321c1729db5b initial checkin
penk
parents:
diff changeset
  5775
    ^ self menuDirHistory:#forward.
3906
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  5776
!
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  5777
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  5778
menuFileHistory
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  5779
    "initialize the file history menu
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  5780
    "
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  5781
    <resource: #programMenu >
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  5782
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5783
    |menu hist text removeItem|
3906
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  5784
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  5785
    hist := self fileHistory.
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  5786
    hist isEmpty ifTrue:[^ nil].
4391
05ad03de6f3c no icon in clearHistory menuItem
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
  5787
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5788
    menu := Menu new.
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5789
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5790
    hist copy do:[:aFileItem|
4391
05ad03de6f3c no icon in clearHistory menuItem
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
  5791
        aFileItem fileName exists ifTrue:[
12963
b8da6d54c50a class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12874
diff changeset
  5792
            menu addItem:(MenuItem 
b8da6d54c50a class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12874
diff changeset
  5793
                            label: aFileItem fileName asString 
14593
ef995669e26f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14588
diff changeset
  5794
                            itemValue:
ef995669e26f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14588
diff changeset
  5795
                                [
ef995669e26f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14588
diff changeset
  5796
                                    self setCurrentFileName:(aFileItem fileName).
ef995669e26f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14588
diff changeset
  5797
                                    self openApplByFileItem:aFileItem
ef995669e26f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14588
diff changeset
  5798
                                ]
ef995669e26f class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14588
diff changeset
  5799
                            translateLabel:false).
4391
05ad03de6f3c no icon in clearHistory menuItem
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
  5800
        ] ifFalse:[
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5801
            "/ remove all not existing history entries
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5802
            hist remove:aFileItem.
4391
05ad03de6f3c no icon in clearHistory menuItem
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
  5803
        ]
3906
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  5804
    ].
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5805
    menu addSeparator.
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5806
4080
c32f68f51f47 translation to german
penk
parents: 4075
diff changeset
  5807
    removeItem := MenuItem new.
c32f68f51f47 translation to german
penk
parents: 4075
diff changeset
  5808
    removeItem translateLabel:true.
4391
05ad03de6f3c no icon in clearHistory menuItem
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
  5809
    text := resources string:'Clear History'.
05ad03de6f3c no icon in clearHistory menuItem
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
  5810
    "/ text := LabelAndIcon icon:(self class clearHistoryIcon) string:text.
4080
c32f68f51f47 translation to german
penk
parents: 4075
diff changeset
  5811
    removeItem label:text.
11783
40139e220343 menuitem protocol
Claus Gittinger <cg@exept.de>
parents: 11767
diff changeset
  5812
    removeItem 
40139e220343 menuitem protocol
Claus Gittinger <cg@exept.de>
parents: 11767
diff changeset
  5813
        itemValue:[
40139e220343 menuitem protocol
Claus Gittinger <cg@exept.de>
parents: 11767
diff changeset
  5814
            self fileHistory removeAll.
40139e220343 menuitem protocol
Claus Gittinger <cg@exept.de>
parents: 11767
diff changeset
  5815
            self enableFileHistory value:false.
40139e220343 menuitem protocol
Claus Gittinger <cg@exept.de>
parents: 11767
diff changeset
  5816
        ].
3906
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  5817
    menu addItem:removeItem.
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5818
    menu findGuiResourcesIn:self.
3906
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  5819
    ^ menu
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5820
11783
40139e220343 menuitem protocol
Claus Gittinger <cg@exept.de>
parents: 11767
diff changeset
  5821
    "Modified (format): / 09-09-2012 / 13:07:36 / cg"
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
  5822
!
c04d4781a37e next stage
penk
parents: 3949
diff changeset
  5823
4080
c32f68f51f47 translation to german
penk
parents: 4075
diff changeset
  5824
sortMenu
c32f68f51f47 translation to german
penk
parents: 4075
diff changeset
  5825
    <resource: #programMenu >
c32f68f51f47 translation to german
penk
parents: 4075
diff changeset
  5826
c32f68f51f47 translation to german
penk
parents: 4075
diff changeset
  5827
    |menu|
c32f68f51f47 translation to german
penk
parents: 4075
diff changeset
  5828
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5829
    menu :=  Menu decodeFromLiteralArray:self class sortMenu.
4080
c32f68f51f47 translation to german
penk
parents: 4075
diff changeset
  5830
    menu findGuiResourcesIn:self.
c32f68f51f47 translation to german
penk
parents: 4075
diff changeset
  5831
    ^ menu
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5832
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5833
    "Modified: / 27-03-2007 / 10:47:42 / cg"
4080
c32f68f51f47 translation to german
penk
parents: 4075
diff changeset
  5834
!
c32f68f51f47 translation to german
penk
parents: 4075
diff changeset
  5835
c32f68f51f47 translation to german
penk
parents: 4075
diff changeset
  5836
viewDetailsMenuSpec
4976
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  5837
    |specContentsBrowser itemsContentsBrowser specHere itemsHere spec| 
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  5838
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  5839
    specContentsBrowser := self directoryContentsBrowser class viewBrowserMenuSpec.
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  5840
    itemsContentsBrowser := (specContentsBrowser at:2).
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  5841
19001
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  5842
    "/ attn: the menuSpec format has changed.
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  5843
    "/ for reference, the following code supports both old and new formats.
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  5844
    specHere := self class viewDetailsMenuSpec.
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  5845
    ((specHere at:2) isArray and:[(specHere at:2) first isSymbol]) ifTrue:[
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  5846
        "/ new format
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  5847
        itemsHere := specHere copyFrom:2.
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  5848
        spec := { (specHere first) } , itemsContentsBrowser , itemsHere
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  5849
    ] ifFalse:[
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  5850
        itemsHere := specHere at:2.
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  5851
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  5852
        spec := specHere copy.
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  5853
        spec at:2 put:(itemsContentsBrowser , itemsHere).
26b7a1a140a4 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 18998
diff changeset
  5854
    ].
4976
86594f3f8a9b refactoring column visibility holder of DirectoryContentsBrowser
penk
parents: 4974
diff changeset
  5855
    ^ spec
4080
c32f68f51f47 translation to german
penk
parents: 4075
diff changeset
  5856
!
c32f68f51f47 translation to german
penk
parents: 4075
diff changeset
  5857
c32f68f51f47 translation to german
penk
parents: 4075
diff changeset
  5858
viewInContentsBrowserMenu
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  5859
    self 
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  5860
        applicationNamed:#DirectoryContentsBrowser 
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  5861
        ifPresentDo:[:appl | ^ appl viewBrowserMenu].
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  5862
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  5863
    ^ nil.
4080
c32f68f51f47 translation to german
penk
parents: 4075
diff changeset
  5864
!
c32f68f51f47 translation to german
penk
parents: 4075
diff changeset
  5865
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
  5866
visitedDirectoriesMenu
c04d4781a37e next stage
penk
parents: 3949
diff changeset
  5867
    <resource: #programMenu >
c04d4781a37e next stage
penk
parents: 3949
diff changeset
  5868
c04d4781a37e next stage
penk
parents: 3949
diff changeset
  5869
    |menu histCopy text removeItem|
c04d4781a37e next stage
penk
parents: 3949
diff changeset
  5870
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5871
    histCopy := self directoryHistory.
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5872
    histCopy isEmpty ifTrue:[^ nil].
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5873
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
  5874
    menu := Menu new.
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5875
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5876
    histCopy do:[:aFile| 
12963
b8da6d54c50a class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12874
diff changeset
  5877
        menu addItem:(MenuItem 
b8da6d54c50a class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12874
diff changeset
  5878
                        label:aFile asString 
b8da6d54c50a class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12874
diff changeset
  5879
                        itemValue:[
b8da6d54c50a class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12874
diff changeset
  5880
                            self setCurrentFileName:(aFile path asFilename).
b8da6d54c50a class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12874
diff changeset
  5881
                        ]).
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5882
    ].
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5883
    menu addSeparator.
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5884
4672
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
  5885
    "/ text := LabelAndIcon icon:(self class clearHistoryIcon) string:(resources string:'Clear History').
185a4d75348f common bookmark code with new fileBrowser
Claus Gittinger <cg@exept.de>
parents: 4663
diff changeset
  5886
    text := (resources string:'Clear History').
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
  5887
    removeItem := MenuItem new.
4040
c880438f2554 *** empty log message ***
penk
parents: 4034
diff changeset
  5888
    removeItem translateLabel:true.
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
  5889
    removeItem label:text.
11783
40139e220343 menuitem protocol
Claus Gittinger <cg@exept.de>
parents: 11767
diff changeset
  5890
    removeItem 
40139e220343 menuitem protocol
Claus Gittinger <cg@exept.de>
parents: 11767
diff changeset
  5891
        itemValue:[
40139e220343 menuitem protocol
Claus Gittinger <cg@exept.de>
parents: 11767
diff changeset
  5892
            self directoryHistory removeAll.
40139e220343 menuitem protocol
Claus Gittinger <cg@exept.de>
parents: 11767
diff changeset
  5893
            self enableForward value:self canForward.
40139e220343 menuitem protocol
Claus Gittinger <cg@exept.de>
parents: 11767
diff changeset
  5894
            self enableBack value:self canBackward.
40139e220343 menuitem protocol
Claus Gittinger <cg@exept.de>
parents: 11767
diff changeset
  5895
        ].
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5896
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
  5897
    menu addItem:removeItem.
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5898
    menu findGuiResourcesIn:self.
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
  5899
    ^ menu
7763
6a17ca4cef7b use decodeFromLiteralArray:
Claus Gittinger <cg@exept.de>
parents: 7635
diff changeset
  5900
11783
40139e220343 menuitem protocol
Claus Gittinger <cg@exept.de>
parents: 11767
diff changeset
  5901
    "Modified: / 09-09-2012 / 13:07:45 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  5902
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  5903
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5904
!AbstractFileBrowser methodsFor:'menu actions'!
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5905
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5906
doCompareTwoFiles
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5907
    self openDiffView.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5908
!
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5909
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5910
doGoDirectoryUp
18511
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  5911
    "navigate up to the parent folder"
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  5912
5960
aa171aa05bab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5959
diff changeset
  5913
    | upDir directory rootInTreeView|
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5914
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5915
    self enableDirectoryUp value ifFalse:[ ^ self].
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5916
    self currentFilesAreInSameDirectory ifTrue:[
5960
aa171aa05bab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5959
diff changeset
  5917
        directory := self currentDirectory.
aa171aa05bab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5959
diff changeset
  5918
        directory isNil ifTrue:[ ^ self].
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5919
    ] ifFalse:[
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5920
        rootInTreeView := self 
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5921
                            applicationNamed:#DirectoryTreeBrowser 
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5922
                            ifPresentDo:[:appl | appl rootHolder].
5960
aa171aa05bab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5959
diff changeset
  5923
        directory := rootInTreeView value asFilename.
aa171aa05bab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5959
diff changeset
  5924
    ].
aa171aa05bab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5959
diff changeset
  5925
    upDir := directory directory.
5959
27c1d00a790d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5956
diff changeset
  5926
    self setCurrentFileName:upDir.
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5927
!
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5928
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5929
doGotoDefaultDirectory
18511
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  5930
    "navigate to the default folder (is the current directory)"
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  5931
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5932
    self gotoFile:(Filename defaultDirectory).
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5933
!
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5934
8091
803f4df78b72 +goto desktop directory
Claus Gittinger <cg@exept.de>
parents: 8088
diff changeset
  5935
doGotoDesktopDirectory
18511
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  5936
    "navigate to the desktop folder"
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  5937
18823
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5938
    |dir|
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5939
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5940
    (dir := Filename desktopDirectory) isNil ifTrue:[
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5941
        Dialog warn:'No desktop folder defined'.
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5942
        ^ self.
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5943
    ].    
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5944
    self gotoFile:dir.
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5945
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5946
    "Modified: / 15-06-2019 / 08:40:25 / Claus Gittinger"
8091
803f4df78b72 +goto desktop directory
Claus Gittinger <cg@exept.de>
parents: 8088
diff changeset
  5947
!
803f4df78b72 +goto desktop directory
Claus Gittinger <cg@exept.de>
parents: 8088
diff changeset
  5948
18036
8693f7f542d5 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18024
diff changeset
  5949
doGotoDocumentsDirectory
18511
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  5950
    "navigate to the documents folder"
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  5951
18823
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5952
    |dir|
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5953
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5954
    (dir := Filename documentsDirectory) isNil ifTrue:[
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5955
        Dialog warn:'No documents folder defined'.
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5956
        ^ self.
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5957
    ].    
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5958
    self gotoFile:dir.
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5959
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5960
    "Modified: / 15-06-2019 / 08:40:40 / Claus Gittinger"
18036
8693f7f542d5 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18024
diff changeset
  5961
!
8693f7f542d5 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18024
diff changeset
  5962
8693f7f542d5 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18024
diff changeset
  5963
doGotoDownloadsDirectory
18511
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  5964
    "navigate to the downloads folder"
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  5965
18823
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5966
    |dir|
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5967
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5968
    (dir := Filename downloadsDirectory) isNil ifTrue:[
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5969
        Dialog warn:'No downloads folder defined'.
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5970
        ^ self.
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5971
    ].    
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5972
    self gotoFile:dir.
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5973
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5974
    "Modified: / 15-06-2019 / 08:40:53 / Claus Gittinger"
18036
8693f7f542d5 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18024
diff changeset
  5975
!
8693f7f542d5 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18024
diff changeset
  5976
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5977
doGotoHomeDirectory
18511
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  5978
    "navigate to the home folder"
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  5979
18823
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5980
    |dir|
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5981
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5982
    (dir := Filename homeDirectory) isNil ifTrue:[
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5983
        Dialog warn:'No home folder defined'.
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5984
        ^ self.
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5985
    ].    
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5986
    self gotoFile:dir.
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5987
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5988
    "Modified: / 15-06-2019 / 08:41:08 / Claus Gittinger"
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5989
!
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  5990
6434
b856db206ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6433
diff changeset
  5991
doGotoSmalltalkDirectory
18511
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  5992
    "navigate to the smalltalk bin folder (where the stx executable is)"
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  5993
18823
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5994
    |dir|
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5995
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5996
    (dir := self smalltalkDirectory) isNil ifTrue:[
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5997
        Dialog warn:'No smalltalk folder defined'.
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5998
        ^ self.
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  5999
    ].    
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  6000
    self gotoFile:dir.
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  6001
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  6002
    "Modified: / 15-06-2019 / 08:41:26 / Claus Gittinger"
6434
b856db206ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6433
diff changeset
  6003
!
b856db206ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6433
diff changeset
  6004
17187
3dcae3e757cd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17182
diff changeset
  6005
doGotoSmalltalkWorkspaceDirectory
18511
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  6006
    "navigate to the user's smalltalk workspace folder"
4b7bd1293f9d #FEATURE by cgexept.de
Claus Gittinger <cg@exept.de>
parents: 18478
diff changeset
  6007
18823
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  6008
    |dir|
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  6009
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  6010
    (dir := UserPreferences current workspaceDirectory) isNil ifTrue:[
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  6011
        Dialog warn:'No smalltalk workspace folder defined'.
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  6012
        ^ self.
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  6013
    ].    
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  6014
    self gotoFile:dir.
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  6015
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  6016
    "Modified: / 15-06-2019 / 08:42:03 / Claus Gittinger"
17187
3dcae3e757cd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17182
diff changeset
  6017
!
3dcae3e757cd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17182
diff changeset
  6018
9677
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  6019
doGotoTempDirectory
18823
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  6020
    |dir|
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  6021
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  6022
    (dir := self tempDirectory) isNil ifTrue:[
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  6023
        Dialog warn:'No temp folder defined'.
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  6024
        ^ self.
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  6025
    ].    
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  6026
    self gotoFile:dir.
9677
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  6027
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  6028
    "Created: / 29-12-2010 / 11:03:17 / cg"
18823
ed247fa7d8ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18820
diff changeset
  6029
    "Modified: / 15-06-2019 / 08:41:59 / Claus Gittinger"
9677
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  6030
!
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  6031
9596
Claus Gittinger <cg@exept.de>
parents: 9582
diff changeset
  6032
doMakeCurrentDirectory
17582
e12643cd5864 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17485
diff changeset
  6033
    <resource: #obsolete>
e12643cd5864 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17485
diff changeset
  6034
    
e12643cd5864 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17485
diff changeset
  6035
    "/ no longer
e12643cd5864 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17485
diff changeset
  6036
    ^ self
e12643cd5864 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17485
diff changeset
  6037
"/    OperatingSystem setCurrentDirectory:(self currentDirectory pathName).
e12643cd5864 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17485
diff changeset
  6038
"/    self currentFileNameHolderChangedForCommon.
9596
Claus Gittinger <cg@exept.de>
parents: 9582
diff changeset
  6039
Claus Gittinger <cg@exept.de>
parents: 9582
diff changeset
  6040
    "Created: / 26-10-2010 / 17:21:19 / cg"
17582
e12643cd5864 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17485
diff changeset
  6041
    "Modified (format): / 17-07-2017 / 10:09:39 / cg"
9596
Claus Gittinger <cg@exept.de>
parents: 9582
diff changeset
  6042
!
Claus Gittinger <cg@exept.de>
parents: 9582
diff changeset
  6043
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6044
fileGetInfo:longInfo 
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6045
    "get info on selected file - show it in a box"
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6046
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6047
    |string box updater|
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6048
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6049
    string := self getFileInfoStringForFirstSelectedFile:longInfo.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6050
    string notNil ifTrue:[
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6051
        box := InfoBox title:string.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6052
        updater := [
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6053
                    [true] whileTrue:[
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6054
                        Delay waitForSeconds:2.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6055
                        string := self getFileInfoStringForFirstSelectedFile:longInfo.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6056
                        string isNil ifTrue:[ ^ self].
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6057
                        box title:string
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6058
                    ]
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6059
                ] fork.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6060
        box show.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6061
        updater terminate.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6062
        box destroy
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6063
    ]
6434
b856db206ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6433
diff changeset
  6064
!
b856db206ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6433
diff changeset
  6065
17686
c6fc2da19287 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17582
diff changeset
  6066
showDeltaBetweenTwoImageFiles
c6fc2da19287 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17582
diff changeset
  6067
     |i1 i2 delta|
c6fc2da19287 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17582
diff changeset
  6068
c6fc2da19287 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17582
diff changeset
  6069
     i1 := Image fromFile:(self selectedFileNames first).
c6fc2da19287 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17582
diff changeset
  6070
     i2 := Image fromFile:(self selectedFileNames second).
c6fc2da19287 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17582
diff changeset
  6071
     delta := ImageAlgorithms new differenceImageBetween:i1 and:i2.
c6fc2da19287 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17582
diff changeset
  6072
     ImageView openOn:delta.
c6fc2da19287 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17582
diff changeset
  6073
c6fc2da19287 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17582
diff changeset
  6074
    "Created: / 10-09-2017 / 16:59:08 / cg"
c6fc2da19287 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17582
diff changeset
  6075
!
c6fc2da19287 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17582
diff changeset
  6076
6434
b856db206ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6433
diff changeset
  6077
smalltalkDirectory
8590
ed2ee3a6e866 changed #smalltalkDirectory
Claus Gittinger <cg@exept.de>
parents: 8588
diff changeset
  6078
    |stxPath|
6434
b856db206ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6433
diff changeset
  6079
b856db206ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6433
diff changeset
  6080
    stxPath := OperatingSystem pathOfSTXExecutable.
8590
ed2ee3a6e866 changed #smalltalkDirectory
Claus Gittinger <cg@exept.de>
parents: 8588
diff changeset
  6081
    stxPath isNil ifTrue:[
ed2ee3a6e866 changed #smalltalkDirectory
Claus Gittinger <cg@exept.de>
parents: 8588
diff changeset
  6082
        ^ Filename currentDirectory
ed2ee3a6e866 changed #smalltalkDirectory
Claus Gittinger <cg@exept.de>
parents: 8588
diff changeset
  6083
    ].
ed2ee3a6e866 changed #smalltalkDirectory
Claus Gittinger <cg@exept.de>
parents: 8588
diff changeset
  6084
    ^ stxPath asFilename directory.
9677
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  6085
!
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  6086
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  6087
tempDirectory
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  6088
    ^ Filename tempDirectory.
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  6089
Claus Gittinger <cg@exept.de>
parents: 9675
diff changeset
  6090
    "Created: / 29-12-2010 / 11:03:00 / cg"
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6091
! !
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6092
11139
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6093
!AbstractFileBrowser methodsFor:'menu actions-file'!
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6094
14262
5a728b895f24 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14126
diff changeset
  6095
addDirToJavaSourcePath
5a728b895f24 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14126
diff changeset
  6096
    "add the current path to java's sourcePath
5a728b895f24 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14126
diff changeset
  6097
     (only available with ST/J System"
5a728b895f24 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14126
diff changeset
  6098
5a728b895f24 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14126
diff changeset
  6099
    Java addToSourcePath:self currentDirectory pathName
5a728b895f24 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14126
diff changeset
  6100
5a728b895f24 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14126
diff changeset
  6101
    "Modified: 14.12.1996 / 15:37:47 / cg"
5a728b895f24 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14126
diff changeset
  6102
    "Created: 2.8.1997 / 14:11:19 / cg"
5a728b895f24 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14126
diff changeset
  6103
!
5a728b895f24 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14126
diff changeset
  6104
11139
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6105
copyFiles
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6106
    self 
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6107
        withSelectedFilesOrDirectoriesDo:[:filesOrDirs | self copyFilesToClipBoard:filesOrDirs]
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6108
!
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6109
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6110
cutFiles
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6111
    self 
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6112
        withSelectedFilesOrDirectoriesDo:[:filesOrDirs | self cutFilesToClipBoard:filesOrDirs]
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6113
!
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6114
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6115
deleteFiles
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6116
    self 
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6117
        withSelectedFilesOrDirectoriesDo:[:filesOrDirs | self deleteFiles:filesOrDirs]
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6118
!
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6119
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6120
eraseFiles
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6121
    self 
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6122
        withSelectedFilesOrDirectoriesDo:[:filesOrDirs | self eraseFiles:filesOrDirs]
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6123
!
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6124
14262
5a728b895f24 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14126
diff changeset
  6125
fileAddToJavaSourcePath
5a728b895f24 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14126
diff changeset
  6126
    "add the current path to java's sourcePath
5a728b895f24 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14126
diff changeset
  6127
     (only available with ST/J System"
5a728b895f24 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14126
diff changeset
  6128
17865
30a8ebe0a1a5 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17849
diff changeset
  6129
    Java notNil ifTrue:[
30a8ebe0a1a5 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17849
diff changeset
  6130
        self currentSelectedObjects do:[:each |
30a8ebe0a1a5 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17849
diff changeset
  6131
            Java addToSourcePath:(each pathName)
30a8ebe0a1a5 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17849
diff changeset
  6132
        ].
14262
5a728b895f24 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14126
diff changeset
  6133
    ].
5a728b895f24 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14126
diff changeset
  6134
5a728b895f24 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14126
diff changeset
  6135
    "Created: / 9.11.1998 / 05:41:34 / cg"
5a728b895f24 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14126
diff changeset
  6136
    "Modified: / 9.11.1998 / 05:56:00 / cg"
5a728b895f24 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14126
diff changeset
  6137
!
5a728b895f24 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14126
diff changeset
  6138
11139
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6139
openSettingsDialog
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6140
    |dialog|
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6141
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6142
    dialog := FileBrowserV2SettingsDialog new.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6143
    dialog settingsDialog:self.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6144
    dialog allButOpen.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6145
    dialog doReload.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6146
    dialog openWindow
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6147
!
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6148
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6149
withSelectedFilesOrDirectoriesDo:aBlock
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6150
    |files dirs|
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6151
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6152
    files := self currentSelectedFiles.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6153
    files notEmpty ifTrue:[
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6154
        aBlock value:files.        
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6155
    ] ifFalse:[
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6156
        dirs := self currentSelectedDirectories.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6157
        dirs notEmpty ifTrue:[
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6158
            aBlock value:dirs.        
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6159
        ].
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6160
    ].
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6161
! !
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6162
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6163
!AbstractFileBrowser methodsFor:'menu actions-help'!
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6164
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6165
openAboutThisApplication
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6166
    "opens an about box for this application."
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6167
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6168
    Dialog aboutClass:self class.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6169
!
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6170
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6171
openHTMLDocument:relativeDocPath
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6172
    HTMLDocumentView openFullOnDocumentationFile:relativeDocPath
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6173
! !
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6174
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6175
!AbstractFileBrowser methodsFor:'menu actions-scm-cvs'!
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6176
15905
24872df93617 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15803
diff changeset
  6177
canCvsAddAndCommit
24872df93617 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15803
diff changeset
  6178
24872df93617 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15803
diff changeset
  6179
    |selectedFiles|
24872df93617 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15803
diff changeset
  6180
24872df93617 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15803
diff changeset
  6181
    selectedFiles := self currentSelectedObjects.
24872df93617 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15803
diff changeset
  6182
    ^ (selectedFiles notEmpty and:[self currentFilesAreInSameDirectory]).
24872df93617 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15803
diff changeset
  6183
!
24872df93617 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15803
diff changeset
  6184
24872df93617 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15803
diff changeset
  6185
canRemoveCVSContainer
24872df93617 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15803
diff changeset
  6186
    ^ self currentSelectedFiles 
24872df93617 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15803
diff changeset
  6187
        contains:[:fileName|
24872df93617 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15803
diff changeset
  6188
            |dirOfFile cvsDir|
24872df93617 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15803
diff changeset
  6189
19009
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  6190
            dirOfFile := self class getDirectoryOf:fileName.
15905
24872df93617 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15803
diff changeset
  6191
            cvsDir := dirOfFile construct:'CVS'.
24872df93617 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15803
diff changeset
  6192
            cvsDir isDirectory
24872df93617 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15803
diff changeset
  6193
        ].
24872df93617 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15803
diff changeset
  6194
!
24872df93617 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15803
diff changeset
  6195
12777
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6196
commitFilesToCVS:files
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6197
    |numFiles|
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6198
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6199
    (numFiles := files size) > 0 ifTrue:[
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6200
        self withActivityIndicationDo:[
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6201
            self cvsCommitFiles:files
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6202
        ]
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6203
    ]
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6204
!
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6205
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6206
cvsAddAndCommit
4849
ad567cb531d1 cvs-add binary
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  6207
    self cvsAddAndCommitAsBinary:false
ad567cb531d1 cvs-add binary
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  6208
!
ad567cb531d1 cvs-add binary
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  6209
ad567cb531d1 cvs-add binary
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  6210
cvsAddAndCommitAsBinary:asBinary
8588
e0b4240e621e cvs add -kb for turqoise
Claus Gittinger <cg@exept.de>
parents: 8568
diff changeset
  6211
    |sel log logArg binArg cmd dir executionBlock nameString|
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6212
321c1729db5b initial checkin
penk
parents:
diff changeset
  6213
    log := Dialog
11139
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6214
        requestText:(resources string:'Enter initial log message:')
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  6215
        lines:10
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  6216
        columns:70
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  6217
        initialAnswer:nil.
8322
cf10f08b6164 care for cancel in #cvsAddAndCommitAsBinary:
Claus Gittinger <cg@exept.de>
parents: 8294
diff changeset
  6218
    log isNil ifTrue:[^ self].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6219
6205
0c94c101cfde cvs - log-argument fixes for win32
Claus Gittinger <cg@exept.de>
parents: 6204
diff changeset
  6220
    OperatingSystem isMSWINDOWSlike ifTrue:[
0c94c101cfde cvs - log-argument fixes for win32
Claus Gittinger <cg@exept.de>
parents: 6204
diff changeset
  6221
        logArg := '-m "' , log , '"'.
0c94c101cfde cvs - log-argument fixes for win32
Claus Gittinger <cg@exept.de>
parents: 6204
diff changeset
  6222
    ] ifFalse:[
0c94c101cfde cvs - log-argument fixes for win32
Claus Gittinger <cg@exept.de>
parents: 6204
diff changeset
  6223
        logArg := '-m ''' , log , ''''.
0c94c101cfde cvs - log-argument fixes for win32
Claus Gittinger <cg@exept.de>
parents: 6204
diff changeset
  6224
    ].
0c94c101cfde cvs - log-argument fixes for win32
Claus Gittinger <cg@exept.de>
parents: 6204
diff changeset
  6225
8588
e0b4240e621e cvs add -kb for turqoise
Claus Gittinger <cg@exept.de>
parents: 8568
diff changeset
  6226
    binArg := ''.
e0b4240e621e cvs add -kb for turqoise
Claus Gittinger <cg@exept.de>
parents: 8568
diff changeset
  6227
    asBinary ifTrue:[
e0b4240e621e cvs add -kb for turqoise
Claus Gittinger <cg@exept.de>
parents: 8568
diff changeset
  6228
        binArg := '-kb '.
e0b4240e621e cvs add -kb for turqoise
Claus Gittinger <cg@exept.de>
parents: 8568
diff changeset
  6229
    ].
3982
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  6230
    sel := self currentSelectedFiles.
11139
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6231
    executionBlock := 
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6232
        [:stream |
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6233
            log notNil ifTrue:[
17416
ccd3335a762a #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17413
diff changeset
  6234
                sel notEmptyOrNil ifTrue:[
11139
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6235
                    sel do:[:fn |
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6236
                        |nameArg|
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6237
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6238
                        nameArg := '"',fn baseName,'"'.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6239
19009
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  6240
                        dir := self class getDirectoryOf:fn.
11139
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6241
                        cmd := 'cvs add ',logArg,' ',binArg,nameArg.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6242
                        (self getExecutionBlockForCommand:cmd inDirectory:dir) value:stream.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6243
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6244
                        cmd := ('cvs commit -l ',logArg,' ',nameArg).
6205
0c94c101cfde cvs - log-argument fixes for win32
Claus Gittinger <cg@exept.de>
parents: 6204
diff changeset
  6245
                        (self getExecutionBlockForCommand:cmd inDirectory:dir) value:stream.
11139
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6246
                        "/ mhmh - it seems that only old CVS implementations (at least turqoise)
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6247
                        "/ support and need the 'admin -kb' command.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6248
                        "/ newer ones use the '-kb' option in the 'cvs add' command
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6249
                        asBinary ifTrue:[
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6250
                            cmd := ('cvs admin -kb ' , nameArg).
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6251
                            (self getExecutionBlockForCommand:cmd inDirectory:dir) value:stream.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6252
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6253
                            cmd := ('cvs upd ' , nameArg).
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6254
                            (self getExecutionBlockForCommand:cmd inDirectory:dir) value:stream.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6255
                        ].
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6256
                    ]
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6257
                ] 
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6258
            ]
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6259
        ].
4107
d158469338e5 *** empty log message ***
penk
parents: 4101
diff changeset
  6260
    nameString := 'Command> cvs add and commit'.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6261
    self makeExecutionResultProcessFor:executionBlock withName:nameString.
11139
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6262
17416
ccd3335a762a #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17413
diff changeset
  6263
    "Modified: / 17-02-2017 / 08:25:16 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6264
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  6265
4849
ad567cb531d1 cvs-add binary
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  6266
cvsAddBinaryAndCommit
ad567cb531d1 cvs-add binary
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  6267
    self cvsAddAndCommitAsBinary:true
ad567cb531d1 cvs-add binary
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  6268
!
ad567cb531d1 cvs-add binary
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  6269
18867
d952072b8c6c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18856
diff changeset
  6270
cvsBrowseRepositoryVersions
d952072b8c6c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18856
diff changeset
  6271
    "open a diff-textView showing all versions in the repository."
d952072b8c6c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18856
diff changeset
  6272
d952072b8c6c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18856
diff changeset
  6273
    |sel fn|
d952072b8c6c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18856
diff changeset
  6274
d952072b8c6c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18856
diff changeset
  6275
    sel := self currentSelectedObjects.
d952072b8c6c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18856
diff changeset
  6276
    sel isEmpty ifTrue:[ ^ self ].
d952072b8c6c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18856
diff changeset
  6277
    sel size == 1 ifFalse:[ ^ self ].
d952072b8c6c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18856
diff changeset
  6278
    fn := sel first.
d952072b8c6c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18856
diff changeset
  6279
    
d952072b8c6c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18856
diff changeset
  6280
    self withWaitCursorDo:[
d952072b8c6c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18856
diff changeset
  6281
        FileVersionDiffBrowser openOnAllVersionsOfFile:fn
d952072b8c6c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18856
diff changeset
  6282
    ]
d952072b8c6c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18856
diff changeset
  6283
d952072b8c6c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18856
diff changeset
  6284
    "Created: / 07-07-2019 / 19:45:23 / Claus Gittinger"
d952072b8c6c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18856
diff changeset
  6285
!
d952072b8c6c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18856
diff changeset
  6286
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6287
cvsCommit
12777
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6288
    |selectedFiles|
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6289
3982
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  6290
    selectedFiles:= self currentSelectedFiles.
12777
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6291
    self cvsCommitFiles:selectedFiles
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6292
!
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6293
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6294
cvsCommitFiles:files
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6295
    |nFiles log logTmp s logArg msg executionBlock nameString |
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6296
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6297
    nFiles := files size.
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6298
    nFiles == 0 ifTrue:[^ self].
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6299
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6300
    nFiles == 1 ifTrue:[
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6301
        msg := resources string:'Enter log message for checkIn of "%1"' with:(files first baseName)
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6302
    ] ifFalse:[
12777
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6303
        nFiles > 1 ifTrue:[
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6304
            msg := resources string:'Enter log message for %1 files to checkIn' with:nFiles printString
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  6305
        ] ifFalse:[
6627
48664e62315f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6602
diff changeset
  6306
            msg := resources string:'Enter log message for checkIn'
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  6307
        ]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6308
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  6309
321c1729db5b initial checkin
penk
parents:
diff changeset
  6310
    log := Dialog
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  6311
        requestText:msg
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  6312
        lines:10
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  6313
        columns:70
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  6314
        initialAnswer:nil.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6315
4663
d11b898b6fc5 start no process when commit is canceled
penk
parents: 4655
diff changeset
  6316
    log isNil ifTrue:[^ self].
12777
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6317
    log := log replChar:$"  withString:'\"'.
6205
0c94c101cfde cvs - log-argument fixes for win32
Claus Gittinger <cg@exept.de>
parents: 6204
diff changeset
  6318
0c94c101cfde cvs - log-argument fixes for win32
Claus Gittinger <cg@exept.de>
parents: 6204
diff changeset
  6319
    OperatingSystem isMSWINDOWSlike ifTrue:[
12777
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6320
        "/ save the log message into another tempFile ...
13121
aa4a53f6b8e0 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 13089
diff changeset
  6321
        s := FileStream newTemporary.
aa4a53f6b8e0 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 13089
diff changeset
  6322
        logTmp := s fileName.
12777
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6323
        s nextPutAll:log.
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6324
        s close.
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6325
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6326
        logArg := '-F "', logTmp pathName, '"'.
6205
0c94c101cfde cvs - log-argument fixes for win32
Claus Gittinger <cg@exept.de>
parents: 6204
diff changeset
  6327
    ] ifFalse:[
0c94c101cfde cvs - log-argument fixes for win32
Claus Gittinger <cg@exept.de>
parents: 6204
diff changeset
  6328
        logArg := '-m ''' , log , ''''.
0c94c101cfde cvs - log-argument fixes for win32
Claus Gittinger <cg@exept.de>
parents: 6204
diff changeset
  6329
    ].
0c94c101cfde cvs - log-argument fixes for win32
Claus Gittinger <cg@exept.de>
parents: 6204
diff changeset
  6330
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  6331
    executionBlock := [:stream |
12777
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6332
        [
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6333
            files do:[:fn |
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6334
                | dir nameArg cmd |
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6335
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6336
                nameArg := '"',fn baseName,'"'.
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6337
                dir := fn directory.
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6338
                cmd := 'cvs commit ',logArg,' ' , nameArg.
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6339
stream showCR:fn pathName.
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6340
                (self getExecutionBlockForCommand:cmd inDirectory:dir) value:stream.
4663
d11b898b6fc5 start no process when commit is canceled
penk
parents: 4655
diff changeset
  6341
            ] 
12777
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6342
        ] ensure:[
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6343
            logTmp notNil ifTrue:[ logTmp remove ].
0221a2b95d8c class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12760
diff changeset
  6344
        ].
4107
d158469338e5 *** empty log message ***
penk
parents: 4101
diff changeset
  6345
    ].
d158469338e5 *** empty log message ***
penk
parents: 4101
diff changeset
  6346
    nameString := 'Command> cvs commit'.
d158469338e5 *** empty log message ***
penk
parents: 4101
diff changeset
  6347
    self makeExecutionResultProcessFor:executionBlock withName:nameString.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6348
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  6349
14527
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6350
cvsCommitFolder
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6351
    |dir log logTmp s logArg msg executionBlock nameString |
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6352
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6353
    (dir := self currentDirectory) isNil ifTrue:[ ^ self ].
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6354
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6355
    msg := resources string:'Enter log message for checkIn of "%1"' with:(dir baseName).
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6356
    log := Dialog
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6357
        requestText:msg
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6358
        lines:10
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6359
        columns:70
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6360
        initialAnswer:nil.
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6361
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6362
    log isNil ifTrue:[^ self].
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6363
    log := log replChar:$"  withString:'\"'.
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6364
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6365
    OperatingSystem isMSWINDOWSlike ifTrue:[
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6366
        "/ save the log message into another tempFile ...
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6367
        s := FileStream newTemporary.
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6368
        logTmp := s fileName.
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6369
        s nextPutAll:log.
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6370
        s close.
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6371
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6372
        logArg := '-F "', logTmp pathName, '"'.
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6373
    ] ifFalse:[
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6374
        logArg := '-m ''' , log , ''''.
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6375
    ].
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6376
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6377
    executionBlock := [:stream |
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6378
            [
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6379
                |cmd|
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6380
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6381
                cmd := 'cvs commit ',logArg.
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6382
                (self getExecutionBlockForCommand:cmd inDirectory:dir) value:stream.
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6383
            ] ensure:[
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6384
                logTmp notNil ifTrue:[ logTmp remove ].
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6385
            ].
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6386
        ]. 
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6387
    
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6388
    nameString := 'Command> cvs commit'.
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6389
    self makeExecutionResultProcessFor:executionBlock withName:nameString.
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6390
!
5d2cb6b8ac49 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14497
diff changeset
  6391
9407
cf114ba82b6d added: #cvsCompareWithNewest
Claus Gittinger <cg@exept.de>
parents: 9405
diff changeset
  6392
cvsCompareWithNewest
cf114ba82b6d added: #cvsCompareWithNewest
Claus Gittinger <cg@exept.de>
parents: 9405
diff changeset
  6393
    |selectedFiles|
cf114ba82b6d added: #cvsCompareWithNewest
Claus Gittinger <cg@exept.de>
parents: 9405
diff changeset
  6394
cf114ba82b6d added: #cvsCompareWithNewest
Claus Gittinger <cg@exept.de>
parents: 9405
diff changeset
  6395
    selectedFiles:= self currentSelectedFiles.
cf114ba82b6d added: #cvsCompareWithNewest
Claus Gittinger <cg@exept.de>
parents: 9405
diff changeset
  6396
    selectedFiles do:[:each |
11176
eb02b211e777 changed: #cvsCompareWithNewest
Claus Gittinger <cg@exept.de>
parents: 11162
diff changeset
  6397
        |out diffs|
eb02b211e777 changed: #cvsCompareWithNewest
Claus Gittinger <cg@exept.de>
parents: 11162
diff changeset
  6398
15589
d7db0a09d972 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 15569
diff changeset
  6399
        out := CharacterWriteStream new:100.
11176
eb02b211e777 changed: #cvsCompareWithNewest
Claus Gittinger <cg@exept.de>
parents: 11162
diff changeset
  6400
        OperatingSystem 
eb02b211e777 changed: #cvsCompareWithNewest
Claus Gittinger <cg@exept.de>
parents: 11162
diff changeset
  6401
            executeCommand:'cvs diff -b ',each baseName
eb02b211e777 changed: #cvsCompareWithNewest
Claus Gittinger <cg@exept.de>
parents: 11162
diff changeset
  6402
            outputTo:out
eb02b211e777 changed: #cvsCompareWithNewest
Claus Gittinger <cg@exept.de>
parents: 11162
diff changeset
  6403
            inDirectory:each directoryName.
eb02b211e777 changed: #cvsCompareWithNewest
Claus Gittinger <cg@exept.de>
parents: 11162
diff changeset
  6404
        diffs := out contents.
eb02b211e777 changed: #cvsCompareWithNewest
Claus Gittinger <cg@exept.de>
parents: 11162
diff changeset
  6405
        TextView openWith:diffs.
eb02b211e777 changed: #cvsCompareWithNewest
Claus Gittinger <cg@exept.de>
parents: 11162
diff changeset
  6406
    ].
eb02b211e777 changed: #cvsCompareWithNewest
Claus Gittinger <cg@exept.de>
parents: 11162
diff changeset
  6407
eb02b211e777 changed: #cvsCompareWithNewest
Claus Gittinger <cg@exept.de>
parents: 11162
diff changeset
  6408
    "Modified: / 23-01-2012 / 14:08:28 / cg"
9407
cf114ba82b6d added: #cvsCompareWithNewest
Claus Gittinger <cg@exept.de>
parents: 9405
diff changeset
  6409
!
cf114ba82b6d added: #cvsCompareWithNewest
Claus Gittinger <cg@exept.de>
parents: 9405
diff changeset
  6410
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6411
cvsRemoveAndRemoveFromCVS:filesToRemove
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6412
    "remove the selected file(s) and their CVS containers - no questions asked"
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6413
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6414
    |toRemove updateRunning executionBlock nameString|
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6415
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6416
    updateRunning := self backgroundProcesses value notEmpty.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6417
    self killAllRunningBackgroundProcesses.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6418
    toRemove := OrderedCollection new.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6419
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6420
    executionBlock := 
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6421
        [:stream |
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6422
            |cmd logArg prevDir prevFiles|
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6423
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6424
            OperatingSystem isMSWINDOWSlike ifTrue:[
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6425
                logArg := '-m "' , 'removed via FileBrowser' , '"'.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6426
            ] ifFalse:[
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6427
                logArg := '-m ''' , 'removed via FileBrowser' , ''''.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6428
            ].
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6429
            prevFiles := ''.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6430
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6431
            filesToRemove do:[:fileName |
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6432
                |dir file|
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6433
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6434
                dir := fileName directory.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6435
                (prevDir notNil and:[prevDir ~= dir]) ifTrue:[
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6436
                    cmd := 'cvs commit -l ',logArg, ' ',prevFiles.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6437
                    "/ Transcript show:prevDir; space; showCR:cmd.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6438
                    (self getExecutionBlockForCommand:cmd inDirectory:prevDir) value:stream.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6439
                    prevFiles := ''.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6440
                ].
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6441
17116
625f4a3de032 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 17024
diff changeset
  6442
                OsError handle:[:ex|
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6443
                    "was not able to remove it"
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6444
                    | lastError msg |
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6445
                    lastError := OperatingSystem lastErrorString.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6446
                    msg := (resources string:'cannot remove ''%1'' !!' with:fileName).
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6447
                    lastError isNil ifFalse:[
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6448
                        msg := msg , '\\(' , lastError , ')'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6449
                    ].
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6450
                    Dialog warn:msg withCRs
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6451
                ] do:[
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6452
                    (fileName isSymbolicLink) ifFalse:[
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6453
                        fileName remove.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6454
                        file := fileName baseName.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6455
                        cmd := ('cvs remove -f "',file,'"').
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6456
                        (self getExecutionBlockForCommand:cmd inDirectory:dir) value:stream.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6457
                        "/ Transcript show:dir; space; showCR:cmd.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6458
                    ]
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6459
                ].
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6460
                prevDir := dir.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6461
                prevFiles := prevFiles,' ',file.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6462
            ].
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6463
            cmd := 'cvs commit -l ',logArg, ' ',prevFiles.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6464
            "/ Transcript show:prevDir; space; showCR:cmd.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6465
            (self getExecutionBlockForCommand:cmd inDirectory:prevDir) value:stream.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6466
        ].
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6467
    nameString := 'Command> cvs remove and commit ', filesToRemove first baseName.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6468
    filesToRemove size > 1 ifTrue:[
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6469
        nameString := nameString, ' ...'.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6470
    ].
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6471
    self makeExecutionResultProcessFor:executionBlock withName:nameString.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  6472
!
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6473
321c1729db5b initial checkin
penk
parents:
diff changeset
  6474
cvsRemoveFileAndCVSContainer
12493
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6475
    |files|
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6476
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6477
    files := self currentSelectedFiles copy.
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6478
    self removeFilesAndCVSContainers:files
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6479
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  6480
9338
22c2331c216e added: #cvsRevisionLog
Claus Gittinger <cg@exept.de>
parents: 9319
diff changeset
  6481
cvsRevisionLog
22c2331c216e added: #cvsRevisionLog
Claus Gittinger <cg@exept.de>
parents: 9319
diff changeset
  6482
    | cmd sel executionBlock nameString|
22c2331c216e added: #cvsRevisionLog
Claus Gittinger <cg@exept.de>
parents: 9319
diff changeset
  6483
22c2331c216e added: #cvsRevisionLog
Claus Gittinger <cg@exept.de>
parents: 9319
diff changeset
  6484
    sel := self currentSelectedObjects.
22c2331c216e added: #cvsRevisionLog
Claus Gittinger <cg@exept.de>
parents: 9319
diff changeset
  6485
    sel isEmpty ifTrue:[ ^ self ].
22c2331c216e added: #cvsRevisionLog
Claus Gittinger <cg@exept.de>
parents: 9319
diff changeset
  6486
22c2331c216e added: #cvsRevisionLog
Claus Gittinger <cg@exept.de>
parents: 9319
diff changeset
  6487
    executionBlock := [:stream |
22c2331c216e added: #cvsRevisionLog
Claus Gittinger <cg@exept.de>
parents: 9319
diff changeset
  6488
        sel do:[:fn |
22c2331c216e added: #cvsRevisionLog
Claus Gittinger <cg@exept.de>
parents: 9319
diff changeset
  6489
            | dir nameArg |
22c2331c216e added: #cvsRevisionLog
Claus Gittinger <cg@exept.de>
parents: 9319
diff changeset
  6490
22c2331c216e added: #cvsRevisionLog
Claus Gittinger <cg@exept.de>
parents: 9319
diff changeset
  6491
            nameArg := '"',fn baseName,'"'.
22c2331c216e added: #cvsRevisionLog
Claus Gittinger <cg@exept.de>
parents: 9319
diff changeset
  6492
            dir := fn directory.
22c2331c216e added: #cvsRevisionLog
Claus Gittinger <cg@exept.de>
parents: 9319
diff changeset
  6493
            cmd := 'cvs log ' , nameArg.
22c2331c216e added: #cvsRevisionLog
Claus Gittinger <cg@exept.de>
parents: 9319
diff changeset
  6494
            (self getExecutionBlockForCommand:cmd inDirectory:dir) value:stream.
22c2331c216e added: #cvsRevisionLog
Claus Gittinger <cg@exept.de>
parents: 9319
diff changeset
  6495
        ]
22c2331c216e added: #cvsRevisionLog
Claus Gittinger <cg@exept.de>
parents: 9319
diff changeset
  6496
    ].
22c2331c216e added: #cvsRevisionLog
Claus Gittinger <cg@exept.de>
parents: 9319
diff changeset
  6497
    nameString := 'Command> cvs log'.
22c2331c216e added: #cvsRevisionLog
Claus Gittinger <cg@exept.de>
parents: 9319
diff changeset
  6498
    self makeExecutionResultProcessFor:executionBlock withName:nameString.
22c2331c216e added: #cvsRevisionLog
Claus Gittinger <cg@exept.de>
parents: 9319
diff changeset
  6499
!
22c2331c216e added: #cvsRevisionLog
Claus Gittinger <cg@exept.de>
parents: 9319
diff changeset
  6500
8562
5f9f73f56b6a tag from menu
Claus Gittinger <cg@exept.de>
parents: 8560
diff changeset
  6501
cvsTagSelection
12856
bd934ddf8ba3 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12850
diff changeset
  6502
    |tag tags cmd|
bd934ddf8ba3 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12850
diff changeset
  6503
bd934ddf8ba3 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12850
diff changeset
  6504
    tag := Dialog
bd934ddf8ba3 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12850
diff changeset
  6505
                request:(resources string:'Tag (possibly multiple, separated by ";"):')
bd934ddf8ba3 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12850
diff changeset
  6506
                initialAnswer:(CVSSourceCodeManager recentTag).
bd934ddf8ba3 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12850
diff changeset
  6507
    tag isEmptyOrNil ifTrue:[^ self ].
bd934ddf8ba3 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12850
diff changeset
  6508
bd934ddf8ba3 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12850
diff changeset
  6509
    CVSSourceCodeManager recentTag:tag.
8562
5f9f73f56b6a tag from menu
Claus Gittinger <cg@exept.de>
parents: 8560
diff changeset
  6510
5f9f73f56b6a tag from menu
Claus Gittinger <cg@exept.de>
parents: 8560
diff changeset
  6511
    CVSSourceCodeManager notNil ifTrue:[
5f9f73f56b6a tag from menu
Claus Gittinger <cg@exept.de>
parents: 8560
diff changeset
  6512
        cmd := CVSSourceCodeManager cvsExecutable.
5f9f73f56b6a tag from menu
Claus Gittinger <cg@exept.de>
parents: 8560
diff changeset
  6513
    ] ifFalse:[
5f9f73f56b6a tag from menu
Claus Gittinger <cg@exept.de>
parents: 8560
diff changeset
  6514
        cmd := 'cvs'.
5f9f73f56b6a tag from menu
Claus Gittinger <cg@exept.de>
parents: 8560
diff changeset
  6515
    ].
5f9f73f56b6a tag from menu
Claus Gittinger <cg@exept.de>
parents: 8560
diff changeset
  6516
12856
bd934ddf8ba3 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12850
diff changeset
  6517
    tags := tag asCollectionOfSubstringsSeparatedByAny:',;'.
bd934ddf8ba3 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12850
diff changeset
  6518
    tags do:[:eachTag |
bd934ddf8ba3 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12850
diff changeset
  6519
        self executeCommand:('%1 tag -F "%2" %3' 
bd934ddf8ba3 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12850
diff changeset
  6520
                                bindWith:cmd 
12858
d9d33f96ea6b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12856
diff changeset
  6521
                                with:(eachTag withoutSeparators) 
12856
bd934ddf8ba3 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12850
diff changeset
  6522
                                with:(self makeFileNameArgumentString))
bd934ddf8ba3 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12850
diff changeset
  6523
    ].
8562
5f9f73f56b6a tag from menu
Claus Gittinger <cg@exept.de>
parents: 8560
diff changeset
  6524
!
5f9f73f56b6a tag from menu
Claus Gittinger <cg@exept.de>
parents: 8560
diff changeset
  6525
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6526
cvsUpdateAll
321c1729db5b initial checkin
penk
parents:
diff changeset
  6527
    | cmd |
321c1729db5b initial checkin
penk
parents:
diff changeset
  6528
8042
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6529
    CVSSourceCodeManager notNil ifTrue:[
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6530
        cmd := CVSSourceCodeManager cvsExecutable.
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6531
    ] ifFalse:[
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6532
        cmd := 'cvs'.
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6533
    ].
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6534
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6535
    self executeCommand:(cmd, ' upd -l').
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6536
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  6537
321c1729db5b initial checkin
penk
parents:
diff changeset
  6538
cvsUpdateAllRecursive
321c1729db5b initial checkin
penk
parents:
diff changeset
  6539
    | cmd |
321c1729db5b initial checkin
penk
parents:
diff changeset
  6540
8042
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6541
    CVSSourceCodeManager notNil ifTrue:[
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6542
        cmd := CVSSourceCodeManager cvsExecutable.
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6543
    ] ifFalse:[
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6544
        cmd := 'cvs'.
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6545
    ].
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6546
    self executeCommand:(cmd, ' upd -d').
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6547
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  6548
321c1729db5b initial checkin
penk
parents:
diff changeset
  6549
cvsUpdateSelection
8042
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6550
    |stream cmd|
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6551
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6552
    CVSSourceCodeManager notNil ifTrue:[
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6553
        cmd := CVSSourceCodeManager cvsExecutable.
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6554
    ] ifFalse:[
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6555
        cmd := 'cvs'.
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6556
    ].
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6557
15589
d7db0a09d972 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 15569
diff changeset
  6558
    stream := CharacterWriteStream new.
8563
c5f9ee660edc tag from menu
Claus Gittinger <cg@exept.de>
parents: 8562
diff changeset
  6559
    stream 
c5f9ee660edc tag from menu
Claus Gittinger <cg@exept.de>
parents: 8562
diff changeset
  6560
        nextPutAll:cmd; 
c5f9ee660edc tag from menu
Claus Gittinger <cg@exept.de>
parents: 8562
diff changeset
  6561
        nextPutAll:' upd ';
c5f9ee660edc tag from menu
Claus Gittinger <cg@exept.de>
parents: 8562
diff changeset
  6562
        nextPutAll:(self makeFileNameArgumentString).
c5f9ee660edc tag from menu
Claus Gittinger <cg@exept.de>
parents: 8562
diff changeset
  6563
c5f9ee660edc tag from menu
Claus Gittinger <cg@exept.de>
parents: 8562
diff changeset
  6564
    self executeCommand:stream contents.
c5f9ee660edc tag from menu
Claus Gittinger <cg@exept.de>
parents: 8562
diff changeset
  6565
!
c5f9ee660edc tag from menu
Claus Gittinger <cg@exept.de>
parents: 8562
diff changeset
  6566
c5f9ee660edc tag from menu
Claus Gittinger <cg@exept.de>
parents: 8562
diff changeset
  6567
makeFileNameArgumentString
c5f9ee660edc tag from menu
Claus Gittinger <cg@exept.de>
parents: 8562
diff changeset
  6568
    |stream|
c5f9ee660edc tag from menu
Claus Gittinger <cg@exept.de>
parents: 8562
diff changeset
  6569
15589
d7db0a09d972 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 15569
diff changeset
  6570
    stream := CharacterWriteStream new.
8042
5a4655a03124 Get cvs executable path from CVSSourceCodeManager
Stefan Vogel <sv@exept.de>
parents: 8039
diff changeset
  6571
    self currentSelectedFiles do:[: file |
8563
c5f9ee660edc tag from menu
Claus Gittinger <cg@exept.de>
parents: 8562
diff changeset
  6572
        stream nextPut:$".
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  6573
        stream nextPutAll:file baseName.
8563
c5f9ee660edc tag from menu
Claus Gittinger <cg@exept.de>
parents: 8562
diff changeset
  6574
        stream nextPutAll:'" '.
c5f9ee660edc tag from menu
Claus Gittinger <cg@exept.de>
parents: 8562
diff changeset
  6575
    ].
c5f9ee660edc tag from menu
Claus Gittinger <cg@exept.de>
parents: 8562
diff changeset
  6576
    ^ stream contents.
12493
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6577
!
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6578
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6579
removeFilesAndCVSContainers:files
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6580
    |numFiles question aswer|
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6581
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6582
    (numFiles := files size) > 0 ifTrue:[
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6583
        numFiles > 1 ifTrue:[
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6584
            question := resources string:'Remove %1 selected files and their CVS containers ?' with:numFiles
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6585
        ] ifFalse:[
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6586
            question := resources string:'Remove ''%1'' and its CVS container ?' with:(files first baseName allBold)
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6587
        ].
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6588
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6589
        aswer := Dialog 
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6590
                confirm:question withCRs
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6591
                yesLabel:(resources string:'Remove')
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6592
                noLabel:(resources string:'Cancel').
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6593
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6594
        aswer ifTrue:[
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6595
            self withActivityIndicationDo:[
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6596
                self cvsRemoveAndRemoveFromCVS:files
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6597
            ]
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6598
        ]
c7d274544ad6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12481
diff changeset
  6599
    ]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6600
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  6601
14126
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
  6602
11139
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6603
!AbstractFileBrowser methodsFor:'menu actions-scm-mercurial'!
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6604
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6605
mercurialAdd
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6606
    |executionBlock sel maxCmdSize|
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6607
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6608
    maxCmdSize := 512.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6609
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6610
    sel := self currentSelectedObjects.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6611
    sel isEmptyOrNil ifTrue:[
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6612
        ^ self
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6613
    ].
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6614
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6615
    executionBlock := 
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6616
        [:stream |
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6617
            |prevDir cmd|
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6618
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6619
            prevDir := nil.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6620
            sel do:[:fn |
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6621
                |nameArg dir|
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6622
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6623
                nameArg := '"',fn baseName,'"'.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6624
                dir := fn directory.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6625
                (dir ~= prevDir or:[ (cmd size + nameArg size) > maxCmdSize]) ifTrue:[
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6626
                    "/ flush
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6627
                    cmd notNil ifTrue:[
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6628
                        (self getExecutionBlockForCommand:cmd inDirectory:prevDir) value:stream.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6629
                        cmd := nil.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6630
                    ]
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6631
                ].
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6632
                cmd isNil ifTrue:[
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6633
                    cmd := 'hg add'.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6634
                ].
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6635
                cmd := cmd,' ',nameArg.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6636
                prevDir := dir.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6637
            ].
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6638
            cmd notNil ifTrue:[
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6639
                (self getExecutionBlockForCommand:cmd inDirectory:prevDir) value:stream.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6640
                cmd := nil.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6641
            ].
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6642
            stream nextPutLine:'Commit to finish the transaction'. 
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6643
        ].
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6644
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6645
    self makeExecutionResultProcessFor:executionBlock withName:'Command> hg add'.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6646
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6647
    "Created: / 15-01-2012 / 15:55:47 / cg"
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6648
!
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6649
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6650
mercurialCommit
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6651
    |dir executionBlock|
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6652
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6653
"/    dir := self currentDirectory.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6654
    dir := self directoryContentsBrowser directory.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6655
    executionBlock := 
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6656
        [:stream |
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6657
            (self getExecutionBlockForCommand:'hg commit' 
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6658
                  inDirectory:dir) value:stream.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6659
            stream nextPutLine:'Push to sync other repositories'. 
6169
Claus Gittinger <cg@exept.de>
parents: 6151
diff changeset
  6660
        ].
11139
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6661
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6662
    self makeExecutionResultProcessFor:executionBlock withName:'Command> hg commit'.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6663
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6664
    "Created: / 15-01-2012 / 16:21:27 / cg"
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6665
!
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6666
11144
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  6667
mercurialInit
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  6668
    |dir executionBlock|
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  6669
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  6670
    dir := self directoryContentsBrowser directory.
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  6671
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  6672
    (Dialog confirm:(resources 
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  6673
                        string:'Initialize new Mercurial Repository in %1?'
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  6674
                        with:dir baseName)) ifFalse:[^ self].
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  6675
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  6676
    executionBlock := 
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  6677
        [:stream |
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  6678
            (self getExecutionBlockForCommand:('hg init')
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  6679
                  inDirectory:dir) value:stream.
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  6680
        ].
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  6681
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  6682
    self makeExecutionResultProcessFor:executionBlock withName:'Command> hg init'.
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  6683
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  6684
    "Created: / 17-01-2012 / 15:58:46 / cg"
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  6685
!
489fd65ec36b added: #mercurialInit
Claus Gittinger <cg@exept.de>
parents: 11139
diff changeset
  6686
11139
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6687
mercurialPush
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6688
    |destination dir executionBlock|
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6689
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6690
    destination := Dialog request:'Mercurial Repository'
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6691
                    initialAnswer:(LastMercurialRepository ? MercurialSourceCodeManager repositoryName).
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6692
    destination isEmptyOrNil ifTrue:[^ self].
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6693
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6694
    LastMercurialRepository := destination.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6695
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6696
    dir := self directoryContentsBrowser directory.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6697
    executionBlock := 
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6698
        [:stream |
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6699
            (self getExecutionBlockForCommand:('hg push "%1"' bindWith:destination)
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6700
                  inDirectory:dir) value:stream.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6701
        ].
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6702
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6703
    self makeExecutionResultProcessFor:executionBlock withName:'Command> hg push'.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6704
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6705
    "Created: / 15-01-2012 / 16:29:41 / cg"
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6706
!
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6707
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6708
mercurialStatus
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6709
    |executionBlock sel maxCmdSize|
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6710
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6711
    maxCmdSize := 512.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6712
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6713
    sel := self currentSelectedObjects.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6714
    sel isEmptyOrNil ifTrue:[
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6715
        ^ self
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6716
    ].
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6717
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6718
    executionBlock := 
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6719
        [:stream |
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6720
            |prevDir cmd|
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6721
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6722
            prevDir := nil.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6723
            sel do:[:fn |
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6724
                |nameArg dir|
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6725
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6726
                nameArg := '"',fn baseName,'"'.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6727
                dir := fn directory.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6728
                (dir ~= prevDir or:[ (cmd size + nameArg size) > maxCmdSize]) ifTrue:[
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6729
                    "/ flush
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6730
                    cmd notNil ifTrue:[
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6731
                        (self getExecutionBlockForCommand:cmd inDirectory:prevDir) value:stream.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6732
                        cmd := nil.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6733
                    ]
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6734
                ].
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6735
                cmd isNil ifTrue:[
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6736
                    cmd := 'hg status'.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6737
                ].
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6738
                cmd := cmd,' ',nameArg.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6739
                prevDir := dir.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6740
            ].
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6741
            cmd notNil ifTrue:[
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6742
                (self getExecutionBlockForCommand:cmd inDirectory:prevDir) value:stream.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6743
                cmd := nil.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6744
            ].
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6745
        ].
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6746
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6747
    self makeExecutionResultProcessFor:executionBlock withName:'Command> hg status'.
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6748
e3089114c08d class definition
Claus Gittinger <cg@exept.de>
parents: 11137
diff changeset
  6749
    "Created: / 15-01-2012 / 19:43:08 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6750
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  6751
4849
ad567cb531d1 cvs-add binary
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  6752
!AbstractFileBrowser methodsFor:'menu actions-tools'!
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6753
8510
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  6754
allFilesInSelectedDirectoriesForWhich:aBlock
17868
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  6755
    ^ self class allFilesInDirectories:(self currentSelectedDirectories) forWhich:aBlock
8510
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  6756
!
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  6757
18426
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6758
changeSetFromGSTSource
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6759
    GSTFileReader isNil ifTrue:[ Smalltalk loadPackage:'stx:libbasic2'].
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6760
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6761
    self withWaitCursorDo:[
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6762
        self currentSelectedFiles do:[:fn |
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6763
            |changeSet|
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6764
18746
a12a52c66c53 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18734
diff changeset
  6765
            (fn suffix sameAs:'st') ifTrue:[
18426
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6766
                changeSet := GSTFileReader new changeSetFromStream:fn readStream.
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6767
                (Tools::ChangeSetBrowser2 
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6768
                        on: changeSet
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6769
                        label: fn baseName)
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6770
                    beTwoColumn;
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6771
                    targetNamespace:nil;
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6772
                    targetPackage:nil;
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6773
                    open
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6774
                ]
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6775
        ]
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6776
    ]
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6777
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6778
    "Created: / 23-09-2018 / 01:32:46 / Claus Gittinger"
18746
a12a52c66c53 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18734
diff changeset
  6779
    "Modified: / 01-05-2019 / 11:21:34 / Claus Gittinger"
18426
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6780
!
7a6813ed8ec0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18389
diff changeset
  6781
4721
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6782
conversionChainFrom:inSuffix to:outSuffix
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6783
    |conv|
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6784
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6785
    inSuffix = outSuffix ifTrue:[
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6786
        ^ nil
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6787
    ].
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6788
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6789
    "/ q&d hack to get my images converted for old html-browsers...
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6790
    "/ this should come from somewhere else (do we need an ImageConverter class ?).
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6791
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6792
    conv := OrderedCollection new.
4722
62f29a42dded *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4721
diff changeset
  6793
    conv add:('anytopnm %1 > %2' -> 'pnm').
4721
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6794
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6795
    outSuffix = 'png' ifTrue:[
4722
62f29a42dded *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4721
diff changeset
  6796
        conv add:('pnmtopng %1 > %2' -> 'png').
4721
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6797
        ^ conv.
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6798
    ].
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6799
    outSuffix = 'gif' ifTrue:[
4722
62f29a42dded *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4721
diff changeset
  6800
        conv add:('ppmquant 256 %1 | ppmtogif > %2' -> 'gif').
4721
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6801
        ^ conv.
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6802
    ].
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6803
    outSuffix = 'xpm' ifTrue:[
4722
62f29a42dded *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4721
diff changeset
  6804
        conv add:('ppmtoxpm %1 > %2' -> 'xpm').
4721
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6805
        ^ conv.
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6806
    ].
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6807
    outSuffix = 'jpg' ifTrue:[
4722
62f29a42dded *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4721
diff changeset
  6808
        conv add:('ppmtojpeg %1 > %2' -> 'jpg').
4721
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6809
        ^ conv.
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6810
    ].
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6811
    self error:'unimplemented conversion'.
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6812
!
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6813
9493
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6814
convertImageFrom:fileName to:outFile onError:exceptionBlock
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6815
    |writer image outSuffix|
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6816
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6817
    outSuffix := outFile suffix.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6818
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6819
    ((writer := MIMETypes imageReaderForSuffix:outSuffix) notNil
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6820
    and:[ (image := Image fromFile:fileName) notNil
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6821
    and:[ writer canRepresent:image ]]) ifTrue:[
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6822
        "/ can do it with Smalltalk tools
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6823
        writer save:image onFile:outFile.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6824
    ] ifFalse:[
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6825
        "/ use external tools (pbm-package, if available)
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6826
        self 
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6827
            convertImageUsingExternalFileToolsFrom:fileName 
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6828
            toSuffix:outSuffix 
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6829
            onError:exceptionBlock.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6830
    ].
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6831
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6832
    "Created: / 20-05-2010 / 11:12:36 / cg"
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6833
!
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6834
4367
ec4531103e69 convert to gif implemented
penk
parents: 4366
diff changeset
  6835
convertImageToGIF
4721
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6836
    self convertImageToSuffix:'gif'
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6837
!
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6838
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6839
convertImageToJPG
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6840
    self convertImageToSuffix:'jpg'
4531
c4783f6dfd7a menu reordered
Claus Gittinger <cg@exept.de>
parents: 4523
diff changeset
  6841
!
c4783f6dfd7a menu reordered
Claus Gittinger <cg@exept.de>
parents: 4523
diff changeset
  6842
c4783f6dfd7a menu reordered
Claus Gittinger <cg@exept.de>
parents: 4523
diff changeset
  6843
convertImageToPNG
4721
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6844
    self convertImageToSuffix:'png'
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6845
!
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6846
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6847
convertImageToSuffix:outSuffix
9493
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6848
    |outFile filesToConvert|
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6849
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6850
    self withActivityIndicationDo:[
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6851
        filesToConvert := self currentSelectedObjects copy.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6852
        filesToConvert do:[:fileName |
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6853
            self notify:(resources string:'Converting: %1...' with:fileName baseName).
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6854
18453
e20ac933ee00 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18433
diff changeset
  6855
            fileName isRegularFile ifTrue:[
9493
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6856
                |skip|
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6857
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6858
                skip := false.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6859
                outFile := fileName withSuffix:outSuffix.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6860
                outFile exists ifTrue:[
4722
62f29a42dded *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4721
diff changeset
  6861
                    |answer|
62f29a42dded *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4721
diff changeset
  6862
9493
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6863
                    answer := Dialog 
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6864
                        confirmWithCancel:(resources string:'Overwrite existing %1 ?' with:outFile baseName allBold)
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6865
                        default:false.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6866
                    answer isNil ifTrue:[AbortSignal raise].
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6867
                    answer ifFalse:[ skip := true ].
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6868
                ].
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6869
                skip ifFalse:[
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6870
                    self 
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6871
                        convertImageFrom:fileName 
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6872
                        to:outFile 
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6873
                        onError:[:errMsg |
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6874
                            filesToConvert size == 1 ifTrue:[
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6875
                                Dialog warn:errMsg
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6876
                            ] ifFalse:[
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6877
                                (Dialog confirm:errMsg yesLabel:(resources string:'OK') noLabel:(resources string:'Cancel')) ifFalse:[
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6878
                                    ^ self
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6879
                                ]
4721
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6880
                            ].
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6881
                        ].
9493
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6882
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6883
                    self updateAndSelect:nil.
4367
ec4531103e69 convert to gif implemented
penk
parents: 4366
diff changeset
  6884
                ]
9493
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6885
            ]
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6886
        ].
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6887
        self notify:nil.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6888
    ]
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6889
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6890
    "Modified: / 20-05-2010 / 11:15:35 / cg"
4721
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6891
!
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6892
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6893
convertImageToXPM
2fe2500194e6 more image conversions (png); req'd for eXept swiki.
Claus Gittinger <cg@exept.de>
parents: 4708
diff changeset
  6894
    self convertImageToSuffix:'xpm'
4367
ec4531103e69 convert to gif implemented
penk
parents: 4366
diff changeset
  6895
!
ec4531103e69 convert to gif implemented
penk
parents: 4366
diff changeset
  6896
9493
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6897
convertImageUsingExternalFileToolsFrom:fileName toSuffix:outSuffix onError:exceptionBlock
13121
aa4a53f6b8e0 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 13089
diff changeset
  6898
    |inFile outFile chainOfConversions conversionStream 
9493
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6899
     eachConversionSuffixCommandPair eachConversionCommand eachConversionSuffix|
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6900
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6901
    chainOfConversions := self conversionChainFrom:(fileName suffix) to:outSuffix.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6902
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6903
    chainOfConversions isNil ifTrue:[ 
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6904
        self warn:('Don''t know how to convert from %1 to %2' bindWith:fileName suffix with:outSuffix).
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6905
        ^ false 
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6906
    ].
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6907
    conversionStream := chainOfConversions readStream.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6908
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6909
    inFile := fileName.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6910
    eachConversionSuffixCommandPair := conversionStream next.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6911
    eachConversionCommand := eachConversionSuffixCommandPair key.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6912
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6913
    eachConversionCommand == #readToXPM ifTrue:[
13121
aa4a53f6b8e0 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 13089
diff changeset
  6914
        |image tempStreamXPM|
9493
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6915
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6916
        image := Image fromFile:(inFile pathName).
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6917
        image isNil ifTrue:[
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6918
            self warn:'Unknown format/not an image: ' , inFile baseName.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6919
            ^ false.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6920
        ].
13121
aa4a53f6b8e0 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 13089
diff changeset
  6921
        tempStreamXPM  := FileStream newTemporaryWithSuffix:'xpm'.
aa4a53f6b8e0 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 13089
diff changeset
  6922
        XPMReader save:image onStream:tempStreamXPM.
aa4a53f6b8e0 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 13089
diff changeset
  6923
        tempStreamXPM close.
aa4a53f6b8e0 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 13089
diff changeset
  6924
        inFile := tempStreamXPM fileName.
9493
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6925
        eachConversionSuffixCommandPair := conversionStream next.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6926
    ].
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6927
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6928
    [
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6929
        |command errOutput errMsg|
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6930
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6931
        [eachConversionSuffixCommandPair notNil] whileTrue:[
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6932
            eachConversionCommand := eachConversionSuffixCommandPair key.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6933
            eachConversionSuffix  := eachConversionSuffixCommandPair value.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6934
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6935
            self notify:(resources string:'Converting: %1 to %2...' with:fileName baseName with:eachConversionSuffix).
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6936
13121
aa4a53f6b8e0 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 13089
diff changeset
  6937
            outFile := (FileStream newTemporaryWithSuffix:eachConversionSuffix) close pathName.
9493
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6938
            command := eachConversionCommand 
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6939
                            bindWith:(inFile pathName)
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6940
                            with:(outFile pathName).
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6941
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6942
            errOutput := String writeStream.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6943
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6944
            (OperatingSystem executeCommand:command errorTo:errOutput) ifFalse:[
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6945
                errMsg := resources
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6946
                            stringWithCRs:'Conversion of %1 to %2 using %3 failed:\\%4.' 
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6947
                            with:inFile baseName allBold
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6948
                            with:eachConversionSuffix
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6949
                            with:eachConversionCommand allBold
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6950
                            with:errOutput contents.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6951
                exceptionBlock value:errMsg.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6952
18024
b033a880db74 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18013
diff changeset
  6953
                (inFile ~= fileName) ifTrue:[inFile remove].
b033a880db74 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18013
diff changeset
  6954
                outFile remove.
9493
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6955
                ^ false
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6956
            ].
18024
b033a880db74 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18013
diff changeset
  6957
            (inFile ~= fileName) ifTrue:[inFile remove].
9493
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6958
            inFile := outFile.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6959
            eachConversionSuffixCommandPair := conversionStream next
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6960
        ].
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6961
        outFile moveTo:(fileName withSuffix:(chainOfConversions last value)).
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6962
    ] ifCurtailed:[
18024
b033a880db74 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18013
diff changeset
  6963
        (inFile ~= fileName) ifTrue:[inFile remove].
b033a880db74 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18013
diff changeset
  6964
        outFile remove.
9493
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6965
    ].
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6966
    ^ true.
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6967
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6968
    "Created: / 20-05-2010 / 11:05:50 / cg"
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6969
!
3fc4fb8c1b0a changed: #convertImageToSuffix:
Claus Gittinger <cg@exept.de>
parents: 9490
diff changeset
  6970
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6971
createProjectAndOpenProjectBrowser
321c1729db5b initial checkin
penk
parents:
diff changeset
  6972
    |nm f s directory|
321c1729db5b initial checkin
penk
parents:
diff changeset
  6973
321c1729db5b initial checkin
penk
parents:
diff changeset
  6974
    self currentFilesAreInSameDirectory ifFalse:[^ self].
5960
aa171aa05bab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5959
diff changeset
  6975
    directory := self currentDirectory.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6976
    nm := directory baseName.
321c1729db5b initial checkin
penk
parents:
diff changeset
  6977
    f := (directory  construct:nm) withSuffix:'prj'.
321c1729db5b initial checkin
penk
parents:
diff changeset
  6978
    f exists ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  6979
        Dialog warn:'A file named ' , f baseName , ' already exists.'.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  6980
        ^ self.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  6981
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  6982
    s := f writeStream.
321c1729db5b initial checkin
penk
parents:
diff changeset
  6983
    s nextPutAll:'
321c1729db5b initial checkin
penk
parents:
diff changeset
  6984
name            ''' , nm , '''
321c1729db5b initial checkin
penk
parents:
diff changeset
  6985
type            #classLibrary
321c1729db5b initial checkin
penk
parents:
diff changeset
  6986
package         #''private:' , nm , '''
321c1729db5b initial checkin
penk
parents:
diff changeset
  6987
prerequisites   nil
321c1729db5b initial checkin
penk
parents:
diff changeset
  6988
321c1729db5b initial checkin
penk
parents:
diff changeset
  6989
classes      #( )
321c1729db5b initial checkin
penk
parents:
diff changeset
  6990
'.
321c1729db5b initial checkin
penk
parents:
diff changeset
  6991
    s close.
321c1729db5b initial checkin
penk
parents:
diff changeset
  6992
    ProjectBrowser openOnFile:f.
321c1729db5b initial checkin
penk
parents:
diff changeset
  6993
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  6994
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6995
doExecuteCommand
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6996
    "execute an OperatingSystem-command"
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6997
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6998
    | action fileName|
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  6999
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7000
    fileName := self firstSelectedFile.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7001
    action := [:command | 
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7002
                self addToCommandHistory:command for:fileName.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7003
                self executeCommand:command.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7004
              ].
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7005
    self askForCommandFor:fileName thenDo:action
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7006
!
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7007
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7008
doExecuteScript
16941
9edb5cb2922f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16911
diff changeset
  7009
    "execute a Smalltalk script"
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7010
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7011
    |textHolder dialog template dummyClass dummyInstance|
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7012
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7013
    template :=
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7014
'"/ Smalltalk script:
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7015
16084
mawalch
parents: 15981
diff changeset
  7016
"/ the following variables are accessible:
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7017
"/      directory       (= ' , (self theSingleSelectedDirectoryOrNil ? Filename homeDirectory) pathName , ')
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7018
"/      selectedFiles   (= ...)
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7019
"/
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7020
"/ Beginner warning: Smalltalk know-how is useful here ;-).
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7021
"/
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7022
"/ Useful operations are:
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7023
"/      directory directoryContentsDo:[:eachBaseNameString | ...]
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7024
"/      directory directoryContentsAsFilenamesDo:[:eachFilename | ...]
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7025
"/      directory directory
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7026
"/
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7027
"/ example: move all files which match a aarticular pattern to
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7028
"/          a separate directory:
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7029
"/ 
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7030
"/        |directory idx prefix rest newDir oldFile newFile|
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7031
"/
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7032
"/        directory := ''/mnt/var/priv/image/tv/frank/frank2/2131_008.jpg'' asFilename.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7033
"/
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7034
"/        directory directoryContentsDo:[:eachBaseNameString |
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7035
"/            (eachBaseNameString includes:$_) ifTrue:[
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7036
"/                idx := eachBaseNameString indexOf:$_.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7037
"/                prefix := eachBaseNameString copyTo:(idx - 1).
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7038
"/                rest := eachBaseNameString copyFrom:(idx + 1).
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7039
"/                newDir := directory construct:prefix.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7040
"/                newDir exists ifFalse:[
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7041
"/                    (Dialog confirm:''Create '' , newDir pathName) ifTrue:[
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7042
"/                        newDir makeDirectory.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7043
"/                    ].
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7044
"/                ].
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7045
"/                newDir exists ifTrue:[
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7046
"/                    oldFile := directory construct:eachBaseNameString.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7047
"/                    newFile := newDir construct:rest.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7048
"/                    oldFile moveTo:newFile
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7049
"/                ]
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7050
"/            ]
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7051
"/        ]
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7052
'.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7053
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7054
    LastScriptBlockString isNil ifTrue:[
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7055
        LastScriptBlockString := template.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7056
    ].
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7057
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7058
    textHolder := ValueHolder new.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7059
    dialog := Dialog 
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7060
                 forRequestText:(resources string:'Enter script')
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7061
                 editViewClass:CodeView
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7062
                 lines:25 
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7063
                 columns:70
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7064
                 initialAnswer:LastScriptBlockString
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7065
                 model:textHolder.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7066
    dialog addButton:(Button label:'Template' action:[textHolder value:template. textHolder changed:#value.]).
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7067
    dialog open.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7068
    dialog accepted ifFalse:[^ self].
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7069
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7070
    LastScriptBlockString := textHolder value.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7071
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7072
    Class classConventionViolationConfirmationQuerySignal 
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7073
        answer:true
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7074
        do:[
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7075
            dummyClass := Object class
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7076
                    name:#Dummy
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7077
                    inEnvironment:nil
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7078
                    subclassOf:Object
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7079
                    instanceVariableNames:'directory selectedFiles'
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7080
                    variable:false
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7081
                    words:true
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7082
                    pointers:true
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7083
                    classVariableNames:''
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7084
                    poolDictionaries:''
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7085
                    category:#dummyCategory
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7086
                    comment:nil
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7087
                    changed:true.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7088
        ].
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7089
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7090
    dummyInstance := dummyClass basicNew.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7091
    dummyInstance instVarAt:1 put:(self theSingleSelectedDirectoryOrNil ? Filename homeDirectory).
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7092
    dummyInstance instVarAt:2 put:(self currentSelectedFiles value).
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7093
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7094
    Compiler
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7095
        evaluate:textHolder value
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7096
        in:nil 
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7097
        receiver:dummyInstance 
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7098
        notifying:nil 
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7099
        logged:false
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7100
        ifFail:[]
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7101
        compile:true.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7102
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7103
"/    fileName := self firstSelectedFile.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7104
"/    action := [:command | 
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7105
"/                self addToCommandHistory:command for:fileName.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7106
"/                self executeCommand:command.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7107
"/              ].
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7108
"/    self askForCommandFor:fileName thenDo:action
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7109
!
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  7110
4230
805e8d4b4ec7 added make.
Claus Gittinger <cg@exept.de>
parents: 4213
diff changeset
  7111
doMake
7938
e8725dda1df6 make action for windows...
Claus Gittinger <cg@exept.de>
parents: 7900
diff changeset
  7112
    |dir cmd|
4230
805e8d4b4ec7 added make.
Claus Gittinger <cg@exept.de>
parents: 4213
diff changeset
  7113
13856
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7114
    cmd := self makeCommandHolder value.
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7115
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7116
    "Make"
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7117
    cmd = 'make' ifTrue:[
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7118
        dir := self theSingleSelectedDirectoryOrNil.
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7119
        OperatingSystem isMSWINDOWSlike ifTrue:[
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7120
            dir notNil ifTrue:[
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7121
                (dir construct:'bmake.bat') exists ifTrue:[
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7122
                    cmd := 'bmake.bat'.
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7123
                ]
7938
e8725dda1df6 make action for windows...
Claus Gittinger <cg@exept.de>
parents: 7900
diff changeset
  7124
            ]
13856
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7125
        ].
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7126
        self executeCommand:cmd.
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7127
        ^self.
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7128
    ].
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7129
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7130
    "Apache ant"
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7131
    cmd = 'ant' ifTrue:[
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7132
        self executeCommand:cmd.
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7133
        ^self.
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7134
    ].
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7135
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7136
    "Add more here..."
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7137
9e56b70c61da merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13783
diff changeset
  7138
    "Modified (comment): / 13-04-2012 / 17:07:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4230
805e8d4b4ec7 added make.
Claus Gittinger <cg@exept.de>
parents: 4213
diff changeset
  7139
!
805e8d4b4ec7 added make.
Claus Gittinger <cg@exept.de>
parents: 4213
diff changeset
  7140
8256
eca8cc20d16c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8253
diff changeset
  7141
doOpenCBrowser
11712
ed8877d9356b comment/format in: #doOpenCBrowser
Claus Gittinger <cg@exept.de>
parents: 11688
diff changeset
  7142
    "the CBrowser is an eXept-internal C-language IDE tool.
ed8877d9356b comment/format in: #doOpenCBrowser
Claus Gittinger <cg@exept.de>
parents: 11688
diff changeset
  7143
     (no longer of much interest, since we have VC and eclipse, but this was written
ed8877d9356b comment/format in: #doOpenCBrowser
Claus Gittinger <cg@exept.de>
parents: 11688
diff changeset
  7144
     20 years ago ;-)"
ed8877d9356b comment/format in: #doOpenCBrowser
Claus Gittinger <cg@exept.de>
parents: 11688
diff changeset
  7145
8256
eca8cc20d16c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8253
diff changeset
  7146
    |destDir|
eca8cc20d16c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8253
diff changeset
  7147
18433
4afda005ed69 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18432
diff changeset
  7148
    ((Smalltalk at:#'CBrowser') isNil or:[ (Smalltalk at:#'CBrowser::Browser') isNil ]) ifTrue:[
10747
aa57b76e8318 added: #cBrowserMenuItemVisible
Claus Gittinger <cg@exept.de>
parents: 10678
diff changeset
  7149
        Smalltalk loadPackage:'exept:CC'
aa57b76e8318 added: #cBrowserMenuItemVisible
Claus Gittinger <cg@exept.de>
parents: 10678
diff changeset
  7150
    ].
8256
eca8cc20d16c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8253
diff changeset
  7151
    destDir := self currentDirectory.
18433
4afda005ed69 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18432
diff changeset
  7152
    (Smalltalk at:#'CBrowser::Browser') openIn:destDir pathName
10747
aa57b76e8318 added: #cBrowserMenuItemVisible
Claus Gittinger <cg@exept.de>
parents: 10678
diff changeset
  7153
aa57b76e8318 added: #cBrowserMenuItemVisible
Claus Gittinger <cg@exept.de>
parents: 10678
diff changeset
  7154
    "Modified: / 04-10-2011 / 13:41:31 / cg"
11712
ed8877d9356b comment/format in: #doOpenCBrowser
Claus Gittinger <cg@exept.de>
parents: 11688
diff changeset
  7155
    "Modified (comment): / 27-07-2012 / 20:41:40 / cg"
18433
4afda005ed69 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18432
diff changeset
  7156
    "Modified: / 26-09-2018 / 12:37:34 / Claus Gittinger"
8256
eca8cc20d16c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8253
diff changeset
  7157
!
eca8cc20d16c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8253
diff changeset
  7158
7829
0e3be44e2f01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7788
diff changeset
  7159
doOpenExplorer
18433
4afda005ed69 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18432
diff changeset
  7160
    "corresponding menu item is visible on a windows machine only"
4afda005ed69 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18432
diff changeset
  7161
11642
72cd5c5e2615 changed: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 11591
diff changeset
  7162
    self currentDirectory asFilename openExplorer
72cd5c5e2615 changed: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 11591
diff changeset
  7163
72cd5c5e2615 changed: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 11591
diff changeset
  7164
    "Modified: / 21-07-2012 / 12:28:36 / cg"
18433
4afda005ed69 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18432
diff changeset
  7165
    "Modified (comment): / 26-09-2018 / 12:38:08 / Claus Gittinger"
7829
0e3be44e2f01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7788
diff changeset
  7166
!
0e3be44e2f01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7788
diff changeset
  7167
12473
cbdb0b046e1b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12426
diff changeset
  7168
doOpenFinder
18433
4afda005ed69 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18432
diff changeset
  7169
    "corresponding menu item is visible on a mac only"
4afda005ed69 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18432
diff changeset
  7170
    
12473
cbdb0b046e1b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12426
diff changeset
  7171
    self currentDirectory asFilename openFinder
cbdb0b046e1b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12426
diff changeset
  7172
cbdb0b046e1b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12426
diff changeset
  7173
    "Modified: / 21-07-2012 / 12:28:36 / cg"
18433
4afda005ed69 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18432
diff changeset
  7174
    "Modified (comment): / 26-09-2018 / 12:38:00 / Claus Gittinger"
12473
cbdb0b046e1b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12426
diff changeset
  7175
!
cbdb0b046e1b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12426
diff changeset
  7176
18432
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  7177
doOpenGDBApplication
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  7178
    "the GDBApplication is a cg-private debugging tool"
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  7179
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  7180
    |destDir|
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  7181
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  7182
    (Smalltalk at:#'GDBApplication') isNil ifTrue:[
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  7183
        Smalltalk loadPackage:'cg:tools'
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  7184
    ].
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  7185
    destDir := self currentDirectory.
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  7186
    (Smalltalk at:#'GDBApplication') openOn:destDir
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  7187
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  7188
    "Created: / 26-09-2018 / 12:09:32 / Claus Gittinger"
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  7189
!
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  7190
12811
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  7191
doOpenMonticelloBrowser
18433
4afda005ed69 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18432
diff changeset
  7192
    (Smalltalk at:#'MCMczReader') isNil ifTrue:[ 
4afda005ed69 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18432
diff changeset
  7193
        Smalltalk loadPackage:'stx:goodies/monticello'.
4afda005ed69 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18432
diff changeset
  7194
        (Smalltalk at:#'MCMczReader') isNil ifTrue:[
4afda005ed69 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18432
diff changeset
  7195
            Dialog warn:'Failed to load the monticello package'.
4afda005ed69 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18432
diff changeset
  7196
            ^ self.
4afda005ed69 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18432
diff changeset
  7197
        ].    
4afda005ed69 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18432
diff changeset
  7198
    ].
12874
f08360e7ac62 oops - startup did not enable directoryUp
Claus Gittinger <cg@exept.de>
parents: 12871
diff changeset
  7199
12811
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  7200
    self withWaitCursorDo:[
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  7201
        self currentSelectedFiles do:[:fn |
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  7202
            |version snapshot|
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  7203
18746
a12a52c66c53 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18734
diff changeset
  7204
            (fn suffix sameAs:'mcz') ifTrue:[
18433
4afda005ed69 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18432
diff changeset
  7205
                version := (Smalltalk at:#'MCMczReader') versionFromFile:fn.
12811
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  7206
                snapshot := version snapshot.
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  7207
                (Tools::ChangeSetBrowser2 
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  7208
                        on: snapshot asChangeSet
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  7209
                        label: version info name)
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  7210
                    beTwoColumn;
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  7211
                    targetNamespace:nil;
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  7212
                    targetPackage:nil;
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  7213
                    open
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  7214
                ]
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  7215
        ]
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  7216
    ]
18433
4afda005ed69 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18432
diff changeset
  7217
18746
a12a52c66c53 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18734
diff changeset
  7218
    "Modified: / 01-05-2019 / 11:23:23 / Claus Gittinger"
12811
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  7219
!
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  7220
4317
bf3f150809c2 settings is a new application now and will be inserted under tools in
penk
parents: 4294
diff changeset
  7221
doOpenSettings
8168
04ed636784fb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8127
diff changeset
  7222
    self openSettingsDialog
4317
bf3f150809c2 settings is a new application now and will be inserted under tools in
penk
parents: 4294
diff changeset
  7223
!
bf3f150809c2 settings is a new application now and will be inserted under tools in
penk
parents: 4294
diff changeset
  7224
9343
895543baebfe added: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9338
diff changeset
  7225
doOpenWithShellCommand
895543baebfe added: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9338
diff changeset
  7226
    "open using win32-shell"
895543baebfe added: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9338
diff changeset
  7227
895543baebfe added: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9338
diff changeset
  7228
    |fileName|
895543baebfe added: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9338
diff changeset
  7229
895543baebfe added: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9338
diff changeset
  7230
    fileName := self firstSelectedFile.
9405
5b598565288a changed: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9393
diff changeset
  7231
    fileName notNil ifTrue:[    
11642
72cd5c5e2615 changed: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 11591
diff changeset
  7232
        OperatingSystem
9405
5b598565288a changed: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9393
diff changeset
  7233
            openApplicationForDocument:fileName pathName 
5b598565288a changed: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9393
diff changeset
  7234
            operation:#open
5b598565288a changed: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9393
diff changeset
  7235
    ]
11642
72cd5c5e2615 changed: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 11591
diff changeset
  7236
72cd5c5e2615 changed: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 11591
diff changeset
  7237
    "Modified: / 21-07-2012 / 12:26:10 / cg"
9343
895543baebfe added: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9338
diff changeset
  7238
!
895543baebfe added: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9338
diff changeset
  7239
7104
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7240
editMode:aSymbol
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7241
    self 
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7242
        applicationNamed:#FileApplicationNoteBook
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7243
        ifPresentDo:[:appl |
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7244
            |subApp|
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7245
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7246
            subApp := appl selectedApplication.
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7247
            subApp notNil ifTrue:[
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7248
                ^ subApp perform:aSymbol
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7249
            ]
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7250
        ].
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7251
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7252
    "Created: / 11-09-2006 / 12:42:08 / cg"
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7253
!
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7254
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7255
editModeInsert
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7256
    self editMode:#editModeInsert
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7257
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7258
    "Created: / 11-09-2006 / 12:40:36 / cg"
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7259
!
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7260
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7261
editModeInsertAndSelect
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7262
    self editMode:#editModeInsertAndSelect
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7263
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7264
    "Created: / 11-09-2006 / 12:40:45 / cg"
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7265
!
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7266
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7267
editModeOverwrite
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7268
    self editMode:#editModeOverwrite
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7269
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7270
    "Modified: / 11-09-2006 / 12:42:26 / cg"
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7271
!
a92ba997a778 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 7078
diff changeset
  7272
15528
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7273
fetchFileByURL
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7274
    |url destinationFilename|
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7275
17818
045764df016c #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17790
diff changeset
  7276
    url := Dialog request:(resources string:'URL to Fetch:') initialAnswer:'http://host/path'.
15528
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7277
    url isEmptyOrNil ifTrue:[^ self].
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7278
    url := url asURL.
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7279
17818
045764df016c #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17790
diff changeset
  7280
    destinationFilename := Dialog request:(resources string:'Download As:') initialAnswer:(UnixFilename named:url path) baseName.
15528
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7281
    destinationFilename isEmptyOrNil ifTrue:[^ self].
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7282
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7283
    destinationFilename := self currentDirectory asFilename / destinationFilename.
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7284
    destinationFilename exists ifTrue:[
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7285
        |answer|
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7286
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7287
        answer := Dialog 
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7288
            confirm:(resources string:'Overwrite existing %1 ?' with:destinationFilename baseName allBold)
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7289
            default:false.
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7290
        answer ~~ true ifTrue:[^ self].
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7291
    ].
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7292
    self withActivityIndicationDo:[
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7293
        self notify:(resources string:'Fetching %1' with:url).
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7294
        HTTPInterface get:url destinationFile:destinationFilename.
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7295
        self notify:nil.
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7296
    ]
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7297
17818
045764df016c #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17790
diff changeset
  7298
    "Modified: / 29-11-2017 / 12:26:13 / cg"
15528
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7299
!
a9986f82fdfb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15507
diff changeset
  7300
8454
15917af80ff6 changed #fileContentsAsByteArray
Claus Gittinger <cg@exept.de>
parents: 8440
diff changeset
  7301
fileContentsAsByteArray
17769
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  7302
    |file fileSize|
8454
15917af80ff6 changed #fileContentsAsByteArray
Claus Gittinger <cg@exept.de>
parents: 8440
diff changeset
  7303
15917af80ff6 changed #fileContentsAsByteArray
Claus Gittinger <cg@exept.de>
parents: 8440
diff changeset
  7304
    file := self firstSelectedFile.
15917af80ff6 changed #fileContentsAsByteArray
Claus Gittinger <cg@exept.de>
parents: 8440
diff changeset
  7305
    file isNil ifTrue:[^ self ].
17769
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  7306
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  7307
    file := file asFilename.
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  7308
    
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  7309
    (fileSize := file fileSize) > (1024*1024) ifTrue:[
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  7310
        fileSize > (128*1024*1024) ifTrue:[
11889
f97fbd89d7c7 changed:
Claus Gittinger <cg@exept.de>
parents: 11783
diff changeset
  7311
            Dialog warn:(resources string:'File is too big').
8454
15917af80ff6 changed #fileContentsAsByteArray
Claus Gittinger <cg@exept.de>
parents: 8440
diff changeset
  7312
            ^ self.
15917af80ff6 changed #fileContentsAsByteArray
Claus Gittinger <cg@exept.de>
parents: 8440
diff changeset
  7313
        ].
17769
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  7314
        (Dialog confirm:(resources 
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  7315
                            string:'File is big (%1) - proceed?' 
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  7316
                            with:(UnitConverter fileSizeStringFor:fileSize))
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  7317
        ) ifFalse:[^ self].
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  7318
    ].
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  7319
    file binaryContentsOfEntireFile inspect
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  7320
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  7321
    "Modified: / 19-11-2017 / 14:58:43 / cg"
8454
15917af80ff6 changed #fileContentsAsByteArray
Claus Gittinger <cg@exept.de>
parents: 8440
diff changeset
  7322
!
15917af80ff6 changed #fileContentsAsByteArray
Claus Gittinger <cg@exept.de>
parents: 8440
diff changeset
  7323
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7324
fileFileIn
321c1729db5b initial checkin
penk
parents:
diff changeset
  7325
    "fileIn the selected file(s)"
321c1729db5b initial checkin
penk
parents:
diff changeset
  7326
321c1729db5b initial checkin
penk
parents:
diff changeset
  7327
    self fileFileInLazy:false 
321c1729db5b initial checkin
penk
parents:
diff changeset
  7328
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  7329
7324
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7330
fileFileIn:aFilename lazy:lazy
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7331
    "fileIn a file"
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7332
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7333
    self withActivityIndicationDo:[
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7334
        self notify:('File in:', aFilename asFilename baseName).
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7335
        self singleFileFileIn:aFilename lazy:lazy.
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7336
        self notify:nil.
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7337
    ]
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7338
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7339
    "Created: / 20-09-2006 / 14:28:35 / cg"
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7340
!
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7341
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7342
fileFileInLazy
321c1729db5b initial checkin
penk
parents:
diff changeset
  7343
    "fileIn the selected file(s). Do a quick load (no compilation)"
321c1729db5b initial checkin
penk
parents:
diff changeset
  7344
321c1729db5b initial checkin
penk
parents:
diff changeset
  7345
    self fileFileInLazy:true 
321c1729db5b initial checkin
penk
parents:
diff changeset
  7346
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  7347
321c1729db5b initial checkin
penk
parents:
diff changeset
  7348
fileFileInLazy:lazy
321c1729db5b initial checkin
penk
parents:
diff changeset
  7349
    "fileIn the selected file(s)"
321c1729db5b initial checkin
penk
parents:
diff changeset
  7350
7324
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7351
    self currentSelectedFiles do:[:fileName |
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7352
        self fileIn:fileName lazy:lazy
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7353
    ].
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7354
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7355
    "Modified: / 20-09-2006 / 14:29:24 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7356
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  7357
12497
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  7358
fileFileInPackage
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  7359
    "assuming the current directory is a package directory, load it"
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  7360
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  7361
    |packageDir dir path top packageID|
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  7362
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  7363
    "/ find a reasonable package-id (walk up until we find stx)
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  7364
    path := ''.
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  7365
    dir := packageDir := self currentDirectory.
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  7366
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  7367
    top := (Smalltalk projectDirectoryForPackage:'stx') asFilename.
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  7368
    [ (dir / 'stx') = top ] whileFalse:[
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  7369
        path := dir baseName , '/' , path.
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  7370
        dir := dir directory.
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  7371
        dir isNil ifTrue:[
12707
6e9276c4fc95 Changed usage of deprecated #copyWithoutLast: to #copyButLast:
Stefan Vogel <sv@exept.de>
parents: 12684
diff changeset
  7372
            Dialog warn:'Could not find a path from "stx" to the current directory.'.
12497
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  7373
            "/ should ask the user for a packageID and proceed...
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  7374
            ^  self.
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  7375
        ].
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  7376
    ].
12707
6e9276c4fc95 Changed usage of deprecated #copyWithoutLast: to #copyButLast:
Stefan Vogel <sv@exept.de>
parents: 12684
diff changeset
  7377
    packageID := path copyButLast:1.
12497
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  7378
    Smalltalk loadPackage:packageID fromDirectory:packageDir asAutoloaded:true
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  7379
!
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  7380
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7381
fileFileInToNameSpace
321c1729db5b initial checkin
penk
parents:
diff changeset
  7382
    "fileIn the selected file(s)<into a nameSpace"
321c1729db5b initial checkin
penk
parents:
diff changeset
  7383
321c1729db5b initial checkin
penk
parents:
diff changeset
  7384
    |ns listOfKnownNameSpaces|
321c1729db5b initial checkin
penk
parents:
diff changeset
  7385
321c1729db5b initial checkin
penk
parents:
diff changeset
  7386
    listOfKnownNameSpaces := Set new.
321c1729db5b initial checkin
penk
parents:
diff changeset
  7387
    NameSpace 
6672
478b83a3753a max size to be shown without dialog
Claus Gittinger <cg@exept.de>
parents: 6671
diff changeset
  7388
        allNameSpaces 
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7389
            do:[:eachNameSpace | 
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7390
                listOfKnownNameSpaces add:eachNameSpace name
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7391
            ].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7392
    listOfKnownNameSpaces := listOfKnownNameSpaces asOrderedCollection sort.
321c1729db5b initial checkin
penk
parents:
diff changeset
  7393
321c1729db5b initial checkin
penk
parents:
diff changeset
  7394
    ns := Dialog 
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7395
                request:'During fileIn, new classes are created in nameSpace:'
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7396
                initialAnswer:(LastEnforcedNameSpace ? Class nameSpaceQuerySignal query name)
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7397
                list:listOfKnownNameSpaces.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7398
    ns isEmptyOrNil ifTrue:[^ self].
321c1729db5b initial checkin
penk
parents:
diff changeset
  7399
321c1729db5b initial checkin
penk
parents:
diff changeset
  7400
    LastEnforcedNameSpace := ns.
321c1729db5b initial checkin
penk
parents:
diff changeset
  7401
    ns := NameSpace name:ns.
321c1729db5b initial checkin
penk
parents:
diff changeset
  7402
321c1729db5b initial checkin
penk
parents:
diff changeset
  7403
    Class nameSpaceQuerySignal 
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7404
        answer:ns
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7405
        do:[ 
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7406
            self fileFileInLazy:false 
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7407
        ] 
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7408
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  7409
321c1729db5b initial checkin
penk
parents:
diff changeset
  7410
fileFindAllDuplicates
321c1729db5b initial checkin
penk
parents:
diff changeset
  7411
    "scan directory and all subdirs for duplicate files"
321c1729db5b initial checkin
penk
parents:
diff changeset
  7412
321c1729db5b initial checkin
penk
parents:
diff changeset
  7413
    |fileNames dir infoDir filesBySize
18856
f19f968a287e #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18840
diff changeset
  7414
     result info dirPrefix stream textBox maxLength directories|
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7415
6829
3bcad14c59fc wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6785
diff changeset
  7416
    self withActivityIndicationDo:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7417
        result := Dictionary new.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7418
        directories := self currentSelectedDirectories.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7419
        directories isEmpty ifTrue:[^ self].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7420
        
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7421
        dir := directories first.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7422
"/        self label: myName, '- gathering file names ...'.
4636
08b2b63e3107 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 4629
diff changeset
  7423
        [
08b2b63e3107 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 4629
diff changeset
  7424
            fileNames := dir recursiveDirectoryContents.
08b2b63e3107 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 4629
diff changeset
  7425
        ] on:FileStream openErrorSignal do:[:ex|
6352
1dfde810826f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6346
diff changeset
  7426
            self warn:(resources stringWithCRs:'Cannot access: %1\(%2)' 
1dfde810826f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6346
diff changeset
  7427
                            with:ex pathName
1dfde810826f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6346
diff changeset
  7428
                            with:ex description).
4636
08b2b63e3107 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 4629
diff changeset
  7429
            ^ self
08b2b63e3107 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 4629
diff changeset
  7430
        ].
4765
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  7431
        fileNames := fileNames 
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  7432
                        collect:[:fn | dir construct:fn]
18453
e20ac933ee00 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18433
diff changeset
  7433
                        thenSelect:[:fn | fn isRegularFile].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7434
321c1729db5b initial checkin
penk
parents:
diff changeset
  7435
"/        self label:myName , '- gathering sizes ...'.
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7436
        infoDir := Dictionary new.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7437
        fileNames do:[:fn |
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7438
            infoDir at:fn put:(fn fileSize)
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7439
        ].
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7440
14497
6d95f7c8d28e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14419
diff changeset
  7441
        "/ for each, get the file's size.
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7442
        "/ in a first pass, look for files of the same size and
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7443
        "/ compare them ...
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7444
321c1729db5b initial checkin
penk
parents:
diff changeset
  7445
"/        self label:myName , '- preselect possible duplicates ...'.
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7446
        filesBySize := Dictionary new.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7447
        infoDir keysAndValuesDo:[:fn :sz |
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7448
            |entry|
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7449
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7450
            entry := filesBySize at:sz ifAbsentPut:[Set new].
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7451
            entry add:fn.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7452
        ].
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7453
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7454
        "/ any of same size ?
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7455
321c1729db5b initial checkin
penk
parents:
diff changeset
  7456
"/        self label:myName , '- checking for duplicates ...'.
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7457
        filesBySize do:[:entry |
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7458
            |files|
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7459
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7460
            entry size > 1 ifTrue:[
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7461
                files := entry asArray.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7462
                1 to:files size-1 do:[:idx1 |
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7463
                    idx1+1 to:files size do:[:idx2 |
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7464
                        |fn1 fn2|
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7465
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7466
                        fn1 := files at:idx1.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7467
                        fn2 := files at:idx2.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7468
321c1729db5b initial checkin
penk
parents:
diff changeset
  7469
"/                        self label:myName , '- checking ' , fn1 baseName , ' vs. ' , fn2 baseName , ' ...'.
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7470
                        (result at:fn2 ifAbsent:nil) ~= fn1 ifTrue:[
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7471
                            "/ compare the files
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7472
                            (fn1 sameContentsAs:fn2) ifTrue:[
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7473
"/                                Transcript show:'Same: '; show:fn1 baseName; show:' and '; showCR:fn2 baseName.
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7474
                                result at:fn1 put:fn2.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7475
                            ]
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7476
                        ]
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7477
                    ]
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7478
                ]
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7479
            ]
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7480
        ].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7481
321c1729db5b initial checkin
penk
parents:
diff changeset
  7482
"/        self label:myName , '- sorting ...'.
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7483
        dirPrefix := dir pathName.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7484
        result := result associations.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7485
        result := result collect:[:assoc |
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7486
                                        |f1 f2|
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7487
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7488
                                        f1 := assoc key name.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7489
                                        f2 := assoc value name.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7490
                                        (f1 startsWith:dirPrefix) ifTrue:[
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7491
                                            f1 := f1 copyFrom:dirPrefix size + 2.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7492
                                        ].
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7493
                                        (f2 startsWith:dirPrefix) ifTrue:[
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7494
                                            f2 := f2 copyFrom:dirPrefix size + 2.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7495
                                        ].
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7496
                                        f1 < f2 ifTrue:[
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7497
                                            f2 -> f1
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7498
                                        ] ifFalse:[
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7499
                                            f1 -> f2
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7500
                                        ]
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7501
                                ].
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7502
        result sort:[:f1 :f2 | f2 value < f1 value].
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7503
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7504
        info := OrderedCollection new.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7505
        result do:[:assoc |
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7506
            info add:(assoc key , ' same as ' , assoc value)
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7507
        ].
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7508
        info isEmpty ifTrue:[
11889
f97fbd89d7c7 changed:
Claus Gittinger <cg@exept.de>
parents: 11783
diff changeset
  7509
            Dialog information:(resources string:'No duplicate files found.').
5543
574360e0f2ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5542
diff changeset
  7510
            ^ self.
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7511
        ].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7512
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  7513
15589
d7db0a09d972 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 15569
diff changeset
  7514
    stream := CharacterWriteStream new.
11688
0a519d63778c withWriteCursorDo
Claus Gittinger <cg@exept.de>
parents: 11642
diff changeset
  7515
    stream nextPutAllLines:info.
5542
d6a34a556472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5535
diff changeset
  7516
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7517
    textBox := TextBox new.
321c1729db5b initial checkin
penk
parents:
diff changeset
  7518
    textBox initialText:(stream contents).
5542
d6a34a556472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5535
diff changeset
  7519
    stream close.
11889
f97fbd89d7c7 changed:
Claus Gittinger <cg@exept.de>
parents: 11783
diff changeset
  7520
    textBox title:(resources string:'File duplicates in directory: %1' with:dir asString).
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7521
    textBox readOnly:true.
321c1729db5b initial checkin
penk
parents:
diff changeset
  7522
    textBox noCancel.
11889
f97fbd89d7c7 changed:
Claus Gittinger <cg@exept.de>
parents: 11783
diff changeset
  7523
    textBox label:(resources string:'Duplicates in %1' with:dir asString).
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7524
    maxLength := 10.
321c1729db5b initial checkin
penk
parents:
diff changeset
  7525
    info do:[: el |
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  7526
        maxLength := maxLength max:(el size).
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7527
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  7528
    textBox extent:((maxLength * 5)@(info size * 20)); sizeFixed:false.
5542
d6a34a556472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5535
diff changeset
  7529
    textBox maxExtent:Screen current extent.
d6a34a556472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5535
diff changeset
  7530
    textBox openModeless.
6829
3bcad14c59fc wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6785
diff changeset
  7531
11688
0a519d63778c withWriteCursorDo
Claus Gittinger <cg@exept.de>
parents: 11642
diff changeset
  7532
    "Modified: / 27-07-2012 / 09:29:00 / cg"
18856
f19f968a287e #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18840
diff changeset
  7533
    "Modified (format): / 28-06-2019 / 08:37:14 / Claus Gittinger"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7534
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  7535
10304
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7536
fileFindDuplicateFile
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7537
    "scan directory for duplicates of the selected files"
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7538
10306
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7539
    |files filesBySize samePerFile stream textBox mustHaveMatches|
10304
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7540
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7541
    files := self currentSelectedFiles.
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7542
    files isEmpty ifTrue:[^ self].
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7543
10305
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7544
    self withWaitCursorDo:[
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7545
        filesBySize := Dictionary new.
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7546
        files do:[:fn |
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7547
            |sz entry|
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7548
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7549
            sz := fn asFilename fileSize.
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7550
            (filesBySize at:sz ifAbsentPut:[Set new]) add:fn.
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7551
        ].
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7552
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7553
        samePerFile := Dictionary new.
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7554
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7555
        self currentSelectedDirectories do:[:eachDir |
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7556
            eachDir recursiveDirectoryContentsAsFilenamesDo:[:eachFile |
18453
e20ac933ee00 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18433
diff changeset
  7557
                eachFile isRegularFile ifTrue:[
10305
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7558
                    |sz possibleMatches|
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7559
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7560
                    sz := eachFile fileSize.
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7561
                    possibleMatches := filesBySize at:sz ifAbsent:nil.
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7562
                    possibleMatches notNil ifTrue:[
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7563
                        possibleMatches do:[:eachFileWithSameSize |
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7564
                            eachFileWithSameSize ~= eachFile ifTrue:[
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7565
                                (eachFileWithSameSize sameContentsAs:eachFile) ifTrue:[
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7566
                                    (samePerFile at:eachFileWithSameSize ifAbsentPut:[Set new]) add:eachFile
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7567
                                ]
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7568
                            ]
10304
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7569
                        ]
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7570
                    ]
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7571
                ]
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7572
            ]
10305
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7573
        ].
10304
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7574
    ].
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7575
15589
d7db0a09d972 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 15569
diff changeset
  7576
    stream := CharacterWriteStream with:'Duplicates:'.
10305
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7577
    (samePerFile keys asOrderedCollection sort:[:a :b | a asFilename baseName < b asFilename baseName])
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7578
    do:[:origFile |
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7579
        |sameFiles|
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7580
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
  7581
        sameFiles :=  samePerFile at:origFile.
10304
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7582
        stream nextPutLine:origFile baseName.
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7583
        (sameFiles asOrderedCollection collect:[:each | each baseName]) sort do:[:eachSameName |
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7584
            stream nextPutAll:'    '; nextPutLine:eachSameName.
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7585
        ]
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7586
    ].
10306
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7587
    stream nextPutLine:'Files without duplicates:'.
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7588
    (samePerFile keys asOrderedCollection sort:[:a :b | a asFilename baseName < b asFilename baseName])
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7589
    do:[:origFile |
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7590
        |sameFiles|
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7591
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7592
        sameFiles :=  samePerFile at:origFile.
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7593
        sameFiles isEmpty ifTrue:[
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7594
            stream nextPutLine:origFile baseName.
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7595
        ].
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7596
    ].
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7597
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7598
    mustHaveMatches := Dialog request:'Must have for duplicates matching ?:' initialAnswer:(LastMustMatchPattern ? '[a-z][a-z][a-z]_[0-9][0-9][0-9].*').
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7599
    mustHaveMatches notEmptyOrNil ifTrue:[
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7600
        LastMustMatchPattern := mustHaveMatches.
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7601
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7602
        stream nextPutLine:'Files without duplicates in xxx_nnn.jpg:'.
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7603
        (samePerFile keys asOrderedCollection sort:[:a :b | a asFilename baseName < b asFilename baseName])
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7604
        do:[:origFile |
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7605
            |sameFiles|
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7606
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7607
            sameFiles :=  samePerFile at:origFile.
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7608
            sameFiles notEmpty ifTrue:[
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7609
                (sameFiles contains:[:file | mustHaveMatches match:file baseName]) ifFalse:[
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7610
                    stream nextPutLine:origFile baseName.
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7611
                ]
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7612
            ].
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7613
        ].
daa2548f71ca class definition
Claus Gittinger <cg@exept.de>
parents: 10305
diff changeset
  7614
    ].
10304
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7615
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7616
    textBox := TextBox new.
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7617
    textBox initialText:(stream contents).
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7618
    textBox title:'Files with same contents'.
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7619
    textBox readOnly:true.
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7620
    textBox noCancel.
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7621
    textBox extent:(350@400).
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7622
    textBox maxExtent:Screen current extent.
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7623
    textBox openModeless. "/ showAtPointer.
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7624
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7625
    "Created: / 11-07-2011 / 12:39:44 / cg"
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7626
!
ef51c640ee76 added: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10258
diff changeset
  7627
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7628
fileFindDuplicates
321c1729db5b initial checkin
penk
parents:
diff changeset
  7629
    "scan directory for duplicate files"
321c1729db5b initial checkin
penk
parents:
diff changeset
  7630
17869
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  7631
    |directories duplicates info 
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  7632
     commonDir prefixSize stream titleStream textBox maxLength|
8510
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7633
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7634
    directories := self currentSelectedDirectories.
17869
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  7635
    duplicates := self class fileFindDuplicatesIn:directories.
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  7636
    duplicates isEmpty ifTrue:[
17868
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  7637
        Dialog information:'No duplicate files found.'.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  7638
        ^ self.
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  7639
    ].
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  7640
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  7641
    info := OrderedCollection new.
17869
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  7642
    commonDir := self getBestDirectory.
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  7643
    prefixSize := commonDir asString size.
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  7644
    duplicates do:[:assoc |
17871
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  7645
        |dup orig|
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  7646
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  7647
        dup := assoc key.
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  7648
        orig := assoc value.
17868
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  7649
        prefixSize > 1 ifTrue:[
17871
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  7650
            dup := dup pathNameRelativeFrom:commonDir.
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  7651
            orig := orig pathNameRelativeFrom:commonDir.
17869
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  7652
            "/ fn1 := ('..', (fn1 name copyFrom:(prefixSize + 1))).
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  7653
            "/ fn2 := ('..', (fn2 copyFrom:(prefixSize + 1))).
17868
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  7654
        ].
17871
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  7655
        (dup includes:Character space) ifTrue:[
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  7656
            dup := '"' , dup , '"'
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  7657
        ].
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  7658
        (orig includes:Character space) ifTrue:[
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  7659
            orig := '"' , orig , '"'
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  7660
        ].
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  7661
        info add:(dup , ' duplicate of ' , orig)
17868
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  7662
    ].
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  7663
15589
d7db0a09d972 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 15569
diff changeset
  7664
    stream := CharacterWriteStream new.
11688
0a519d63778c withWriteCursorDo
Claus Gittinger <cg@exept.de>
parents: 11642
diff changeset
  7665
    stream nextPutAllLines:info.
0a519d63778c withWriteCursorDo
Claus Gittinger <cg@exept.de>
parents: 11642
diff changeset
  7666
17869
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  7667
    titleStream := CharacterWriteStream with:'File duplicates in director'.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7668
    directories size == 1 ifTrue:[
12602
a3610dbd8b96 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12497
diff changeset
  7669
        titleStream nextPutAll:'y: '; nextPutAll: directories first asString.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7670
    ] ifFalse:[
4535
4df3f171bcb0 *** empty log message ***
penk
parents: 4534
diff changeset
  7671
        titleStream nextPutLine:'ies: '.
4355
63dc8ed2e56c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4354
diff changeset
  7672
        directories do:[:dir|
17868
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  7673
            prefixSize > 1 ifTrue:[
4355
63dc8ed2e56c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4354
diff changeset
  7674
                titleStream nextPutAll:'..'.
17868
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  7675
                titleStream nextPutLine:((dir asString) copyFrom:(prefixSize + 1)).
4355
63dc8ed2e56c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4354
diff changeset
  7676
            ] ifFalse:[
4535
4df3f171bcb0 *** empty log message ***
penk
parents: 4534
diff changeset
  7677
                titleStream nextPutLine:(dir asString).
4355
63dc8ed2e56c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4354
diff changeset
  7678
            ].
63dc8ed2e56c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4354
diff changeset
  7679
        ]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7680
    ].
5543
574360e0f2ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5542
diff changeset
  7681
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7682
    textBox := TextBox new.
321c1729db5b initial checkin
penk
parents:
diff changeset
  7683
    textBox initialText:(stream contents).
321c1729db5b initial checkin
penk
parents:
diff changeset
  7684
    textBox title:(titleStream contents).
321c1729db5b initial checkin
penk
parents:
diff changeset
  7685
    textBox readOnly:true.
321c1729db5b initial checkin
penk
parents:
diff changeset
  7686
    textBox noCancel.
14715
e806729125fc class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14709
diff changeset
  7687
    stream := WriteStream on:''.
e806729125fc class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14709
diff changeset
  7688
    stream nextPutAll:'Duplicates in '.
4170
d01b3e418209 *** empty log message ***
penk
parents: 4164
diff changeset
  7689
    directories do:[ :aDirectory |
4355
63dc8ed2e56c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4354
diff changeset
  7690
        stream nextPutAll:aDirectory baseName.
63dc8ed2e56c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4354
diff changeset
  7691
        stream space.
4050
d63d33ad9c41 *** empty log message ***
penk
parents: 4046
diff changeset
  7692
    ].
4170
d01b3e418209 *** empty log message ***
penk
parents: 4164
diff changeset
  7693
    textBox label:stream contents.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7694
    maxLength := 10.
321c1729db5b initial checkin
penk
parents:
diff changeset
  7695
    info do:[: el |
4355
63dc8ed2e56c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4354
diff changeset
  7696
        maxLength := maxLength max:(el size).
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7697
    ].
5092
1f44028f8fb7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5082
diff changeset
  7698
    textBox extent:((maxLength * 5)@((info size max:40)* 10)).
1f44028f8fb7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5082
diff changeset
  7699
    textBox maxExtent:Screen current extent.
17869
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  7700
    textBox addButton:(Button 
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  7701
                        label:(resources string:'Remove Duplicates')
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  7702
                        action:[
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  7703
                            (Dialog confirm:(resources string:'Remove %1 duplicate files?' with:duplicates size)) ifTrue:[
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  7704
                                duplicates do:[:eachAssoc |
17871
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  7705
                                    eachAssoc key remove
17869
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  7706
                                ].
17871
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  7707
                            ].
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  7708
                            textBox close.
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  7709
                            self updateCurrentDirectoryWithReread.
17869
4f02f7359cd2 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17868
diff changeset
  7710
                        ]).
4355
63dc8ed2e56c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4354
diff changeset
  7711
    textBox openModeless. "/ showAtPointer.
6829
3bcad14c59fc wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6785
diff changeset
  7712
11688
0a519d63778c withWriteCursorDo
Claus Gittinger <cg@exept.de>
parents: 11642
diff changeset
  7713
    "Modified: / 27-07-2012 / 09:29:14 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7714
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  7715
321c1729db5b initial checkin
penk
parents:
diff changeset
  7716
fileFindFile
5961
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  7717
    |filename|
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  7718
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  7719
    filename := self firstSelectedFileName.
f91c25cf2475 private classes are private
Claus Gittinger <cg@exept.de>
parents: 5960
diff changeset
  7720
    filename isNil ifTrue:[
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  7721
        filename := Filename homeDirectory.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7722
    ].
4101
cc9cdc23b789 select & doubleClick
Claus Gittinger <cg@exept.de>
parents: 4094
diff changeset
  7723
    FindFileApplication openOnFileName:filename for:self.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  7724
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  7725
8510
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7726
fileFindSimilarImages
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7727
    "scan directory for similar image files"
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7728
8512
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7729
    |result stream textBox directories imageFiles histogramsV histogramsH 
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7730
     similarV similarH similar alreadyPrinted|
8510
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7731
8524
cac6b19eae23 changed #fileFindSimilarImages
Claus Gittinger <cg@exept.de>
parents: 8512
diff changeset
  7732
self withWaitCursorDo:[
8510
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7733
    self withActivityIndicationDo:[
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7734
        result := Dictionary new.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7735
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7736
        directories := self currentSelectedDirectories.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7737
        directories isEmpty ifTrue:[^ self].
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7738
13714
d5583c9b5ddb class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13704
diff changeset
  7739
        imageFiles := self allFilesInSelectedDirectoriesForWhich:[:f | f mimeTypeFromName isImageType].
8511
641332126a4f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8510
diff changeset
  7740
        "/ imageFiles := imageFiles select:[:f | f baseName startsWith:'foo'].
641332126a4f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8510
diff changeset
  7741
        imageFiles sort:[:a :b | a pathName < b pathName].
641332126a4f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8510
diff changeset
  7742
        
8510
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7743
        "/ for each, get the color histogram
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7744
        histogramsV := Dictionary new.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7745
        histogramsH := Dictionary new.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7746
        imageFiles do:[:fn |
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7747
            |hist image|
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7748
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7749
            image := Image fromFile:fn.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7750
            Transcript showCR:'generating histogram for ',fn baseName.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7751
            hist := ImageColorHistogram new forImage:image.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7752
            histogramsV at:fn put:(hist histogramVectorV).
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7753
            histogramsH at:fn put:(hist histogramVectorH).
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7754
        ].
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7755
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7756
        similarH := Dictionary new.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7757
        similarV := Dictionary new.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7758
        similar := Dictionary new.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7759
8512
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7760
        (self firstSelectedFile notNil
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7761
            ifTrue:[ Array with:self firstSelectedFile ]
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7762
            ifFalse:[ imageFiles ])
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7763
        do:[:eachFile1 |
8510
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7764
            |setOfSimilar distancesV distancesH|
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7765
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7766
            distancesV := OrderedCollection new.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7767
            distancesH := OrderedCollection new.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7768
            setOfSimilar := OrderedCollection new.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7769
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7770
            imageFiles do:[:eachFile2 |
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7771
                |v1 v2 dV dH|
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7772
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7773
                eachFile1 ~= eachFile2 ifTrue:[
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7774
                    v1 := histogramsV at:eachFile1.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7775
                    v2 := histogramsV at:eachFile2.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7776
                    dV := ImageColorHistogram distanceFrom:v1 to:v2.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7777
                    distancesV add:(eachFile2 -> dV).
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7778
                    v1 := histogramsH at:eachFile1.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7779
                    v2 := histogramsH at:eachFile2.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7780
                    dH := ImageColorHistogram distanceFrom:v1 to:v2.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7781
                    distancesH add:(eachFile2 -> dH).
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7782
                    (dV < 10000 and:[dH < 10000]) ifTrue:[
8512
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7783
                        setOfSimilar add:eachFile2->(dV + dH).
8510
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7784
                    ].
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7785
                ]
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7786
            ].
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7787
            distancesV sort:[:a1 :a2 | a1 value < a2 value].
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7788
            distancesH sort:[:a1 :a2 | a1 value < a2 value].
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7789
            similarV at:eachFile1 put:distancesV.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7790
            similarH at:eachFile1 put:distancesH.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7791
            setOfSimilar notEmpty ifTrue:[ similar at:eachFile1 put:setOfSimilar ].
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7792
        ].
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7793
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7794
        similar isEmpty ifTrue:[
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7795
            Dialog information:'No similarities found.'.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7796
            ^ self.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7797
        ].
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7798
    ].
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7799
15589
d7db0a09d972 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 15569
diff changeset
  7800
    stream := CharacterWriteStream new.
8512
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7801
    alreadyPrinted := Set new.
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7802
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7803
    imageFiles do:[:eachFile |
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7804
        |eachSet|
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7805
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7806
        (alreadyPrinted includes:eachFile) ifFalse:[
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7807
            eachSet := similar at:eachFile ifAbsent:nil.
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7808
            eachSet notNil ifTrue:[
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7809
                stream nextPutLine:eachFile pathName.
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7810
                eachSet do:[:info |
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7811
                    |fn2 dist|
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7812
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7813
                    fn2 := info key.
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7814
                    dist := info value.
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7815
                    stream nextPutAll:'    '.
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7816
                    stream nextPutAll:fn2 pathName.
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7817
                    stream nextPutLine:' (',dist printString,')'.
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7818
                    alreadyPrinted add:fn2.
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7819
                ].
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7820
                stream cr.
60c663ba731f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8511
diff changeset
  7821
            ].
8510
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7822
        ].
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7823
    ].
8524
cac6b19eae23 changed #fileFindSimilarImages
Claus Gittinger <cg@exept.de>
parents: 8512
diff changeset
  7824
    ].
8510
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7825
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7826
    textBox := TextBox new.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7827
    textBox initialText:(stream contents).
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7828
    textBox title:'File similarities:'.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7829
    textBox readOnly:true.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7830
    textBox noCancel.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7831
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7832
    textBox label:'File similarities'.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7833
    textBox extent:(400@((similar size max:40)* 10)).
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7834
    textBox maxExtent:Screen current extent.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7835
    textBox openModeless. "/ showAtPointer.
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7836
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7837
    "Modified: / 25-07-2006 / 09:07:25 / cg"
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7838
!
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  7839
4618
fa8474922061 hexDump from tools menu implemented
penk
parents: 4614
diff changeset
  7840
fileHexDump
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  7841
    |file item|
4618
fa8474922061 hexDump from tools menu implemented
penk
parents: 4614
diff changeset
  7842
fa8474922061 hexDump from tools menu implemented
penk
parents: 4614
diff changeset
  7843
    file := self firstSelectedFile.
fa8474922061 hexDump from tools menu implemented
penk
parents: 4614
diff changeset
  7844
    file notNil ifTrue:[
fa8474922061 hexDump from tools menu implemented
penk
parents: 4614
diff changeset
  7845
        item := DirectoryContentsBrowser itemClass fileName:file.
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  7846
        self 
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  7847
            applicationNamed:#FileApplicationNoteBook
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  7848
            ifPresentDo:[:appl | appl openTextEditorWithHexPresentationOn:item].
4618
fa8474922061 hexDump from tools menu implemented
penk
parents: 4614
diff changeset
  7849
    ].
17744
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  7850
8ce1acaa8fee #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17724
diff changeset
  7851
    "Modified (format): / 12-11-2017 / 11:19:56 / cg"
4618
fa8474922061 hexDump from tools menu implemented
penk
parents: 4614
diff changeset
  7852
!
fa8474922061 hexDump from tools menu implemented
penk
parents: 4614
diff changeset
  7853
7324
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7854
fileIn:aFilename
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7855
    "fileIn a file"
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7856
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7857
    self fileIn:aFilename lazy:false
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7858
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7859
    "Created: / 20-09-2006 / 14:30:06 / cg"
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7860
!
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7861
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7862
fileIn:aFilename lazy:lazy
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7863
    "fileIn a file"
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7864
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7865
    self withActivityIndicationDo:[
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7866
        self notify:('File in:', aFilename asFilename baseName).
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7867
        self singleFileFileIn:aFilename lazy:lazy.
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7868
        self notify:nil.
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7869
    ]
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7870
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7871
    "Created: / 20-09-2006 / 14:29:21 / cg"
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7872
!
e0a07ea40af9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7315
diff changeset
  7873
4930
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7874
filterSelectedFiles:whichFilter
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7875
    |selectedFiles numFiles msg filterBlock|
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7876
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  7877
    selectedFiles := self currentSelectedObjects.
4930
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7878
    (numFiles := selectedFiles size) == 0 ifTrue:[^ self].
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7879
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7880
    msg := 'Replace contents of file ''%2'' with output of %3-filter ?'.
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7881
    numFiles > 1 ifTrue:[
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7882
        msg := 'Replace contents of %1 files with output of %3-filter ?'.
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7883
    ].
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7884
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7885
    (Dialog 
6352
1dfde810826f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6346
diff changeset
  7886
        confirm:(resources stringWithCRs:msg with:numFiles with:selectedFiles first baseName allBold with:whichFilter)
4930
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7887
        initialAnswer:false
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7888
    ) ifFalse:[
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7889
        ^ self
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7890
    ].
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7891
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7892
    whichFilter == #rot13 ifTrue:[
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7893
        filterBlock := [:charIn | charIn rot13 ].
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7894
    ].
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7895
    "/ add more here...
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7896
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7897
    filterBlock isNil ifTrue:[
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7898
        self information:'No such filter: ' , whichFilter.
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7899
        ^ self.
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7900
    ].
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7901
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7902
    selectedFiles do:[:fileName |
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7903
        |s|
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7904
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7905
        self notify:('Processing:',  fileName baseName).
18453
e20ac933ee00 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18433
diff changeset
  7906
        fileName isRegularFile ifTrue:[
4930
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7907
            [
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7908
                |inFile outFile in out|
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7909
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7910
                inFile := fileName asFilename.
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7911
                outFile := (fileName pathName , '.filter') asFilename.
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7912
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7913
                [
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7914
                    |charIn charOut|
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7915
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7916
                    in := inFile readStream.
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7917
                    out := outFile writeStream.
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7918
                    [in atEnd] whileFalse:[
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7919
                        charIn := in next.
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7920
                        charOut := filterBlock value:charIn.
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7921
                        out nextPut:charOut.
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7922
                    ].
13683
e31bd21c4760 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 13677
diff changeset
  7923
                    out close. out:= nil.
4930
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7924
                    outFile renameTo:inFile.
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7925
                ] ensure:[
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7926
                    out notNil ifTrue:[ out close ].
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7927
                    in notNil ifTrue:[ in close ].
18024
b033a880db74 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18013
diff changeset
  7928
                    outFile remove.
4930
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7929
                ]
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7930
            ] on:FileStream openErrorSignal do:[:ex|
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7931
                self warn:('Cannot process "%1".' bindWith:fileName baseName allBold).
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7932
            ].
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7933
        ]
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7934
    ].
6190
b3ab1d955319 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6176
diff changeset
  7935
    self notify:nil.
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  7936
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  7937
    "Modified: / 04-12-2006 / 13:14:48 / cg"
4930
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7938
!
a1d871f949af checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4922
diff changeset
  7939
9784
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7940
forEachParsedXmlFileDo:aBlock
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7941
    "parse all selected XML files, for each dom-tree, evaluate aBlock"
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7942
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7943
    self withActivityIndicationDo:[
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7944
        | selectedFiles xmlDocument |
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7945
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7946
        selectedFiles:= self currentSelectedFiles.
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7947
        selectedFiles do:[:fileName |
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7948
            XML::XMLSignal handle:[:ex |
14551
0fc5b67cdd3e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14530
diff changeset
  7949
                Dialog 
0fc5b67cdd3e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14530
diff changeset
  7950
                    information:('Error while reading XML:\    %1' bindWith:ex description) withCRs
0fc5b67cdd3e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14530
diff changeset
  7951
                    title:'XML Error'.
9784
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7952
                ^ self.
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7953
            ] do:[
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7954
                |s d magic encoder document|
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7955
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7956
                s := fileName asFilename readStream.
14012
9d3ec63fe7d6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13968
diff changeset
  7957
                [
9d3ec63fe7d6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13968
diff changeset
  7958
                    s binary.
9d3ec63fe7d6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13968
diff changeset
  7959
                    magic := (s next:2).
9d3ec63fe7d6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13968
diff changeset
  7960
                    magic = #[254 255] ifTrue:[
9d3ec63fe7d6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13968
diff changeset
  7961
                        "/ UTF16BE
9d3ec63fe7d6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13968
diff changeset
  7962
                        document := CharacterEncoder decodeString:(s upToEnd) from:#utf16be.
9d3ec63fe7d6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13968
diff changeset
  7963
                    ] ifFalse:[ 
9d3ec63fe7d6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13968
diff changeset
  7964
                        magic = #[255 254] ifTrue:[
9d3ec63fe7d6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13968
diff changeset
  7965
                            "/ UTF16LE
9d3ec63fe7d6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13968
diff changeset
  7966
                            document := CharacterEncoder decodeString:(s upToEnd) from:#utf16le.
9d3ec63fe7d6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13968
diff changeset
  7967
                        ].
9d3ec63fe7d6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13968
diff changeset
  7968
                    ]. 
9d3ec63fe7d6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13968
diff changeset
  7969
                ] ensure:[
9d3ec63fe7d6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13968
diff changeset
  7970
                    s close.
9d3ec63fe7d6 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13968
diff changeset
  7971
                ].
9784
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7972
                document notNil ifTrue:[
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7973
                    xmlDocument := XML::XMLParser 
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7974
                                    processDocumentString:document 
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7975
                                    beforeScanDo:[:parse| parse validate:false].
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7976
                ] ifFalse:[
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7977
                    xmlDocument := XML::XMLParser 
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7978
                                    processDocumentInFilename:fileName 
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7979
                                    beforeScanDo:[:parse| parse validate:false].
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7980
                ]
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7981
            ].
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7982
            aBlock value:xmlDocument.
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7983
        ].
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7984
    ]
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7985
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7986
    "Created: / 17-02-2011 / 13:58:21 / cg"
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7987
!
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  7988
8832
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  7989
forEachSelectedFileIgnoringDirectories:ignoreDirs do:aBlock 
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  7990
    |numItems path files|
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  7991
18834
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  7992
    files := ignoreDirs 
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  7993
                ifTrue:[self currentSelectedFiles]
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  7994
                ifFalse:[self currentSelectedObjects].
8832
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  7995
    
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  7996
    (numItems := files size) > 2 ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  7997
        (self 
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  7998
            confirm:(resources string:'Open for each of the %1 items ?' 
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  7999
                                 with:numItems)) ifFalse:[^ self].
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  8000
    ].
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  8001
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  8002
    self withActivityIndicationDo:[
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  8003
        files do:[:fileName |
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  8004
            (ignoreDirs not or:[fileName isDirectory not]) ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  8005
                fileName isAbsolute ifTrue:[
17239
f09d9792751b #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 17202
diff changeset
  8006
                    path := fileName name.
8832
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  8007
                ] ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  8008
                    path := fileName pathName.
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  8009
                ].
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  8010
                aBlock value:path
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  8011
            ]
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  8012
        ].
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  8013
    ].
17239
f09d9792751b #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 17202
diff changeset
  8014
f09d9792751b #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 17202
diff changeset
  8015
    "Modified: / 19-01-2017 / 16:57:03 / stefan"
18834
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  8016
    "Modified: / 23-06-2019 / 13:19:05 / Claus Gittinger"
8832
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  8017
!
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  8018
8648
e8a98d146af2 Generate both integrated and detached PKCS#7 signatures
Stefan Vogel <sv@exept.de>
parents: 8646
diff changeset
  8019
generateDetachedSignaturesForSelectedFiles
e8a98d146af2 Generate both integrated and detached PKCS#7 signatures
Stefan Vogel <sv@exept.de>
parents: 8646
diff changeset
  8020
    "generate detached signature (pkcs7) files from the contents of the selected files.
16941
9edb5cb2922f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16911
diff changeset
  8021
     For Smalltalk text files, better use #generateSignaturesForSelectedFiles."
8648
e8a98d146af2 Generate both integrated and detached PKCS#7 signatures
Stefan Vogel <sv@exept.de>
parents: 8646
diff changeset
  8022
e8a98d146af2 Generate both integrated and detached PKCS#7 signatures
Stefan Vogel <sv@exept.de>
parents: 8646
diff changeset
  8023
    self withActivityIndicationDo:[
e8a98d146af2 Generate both integrated and detached PKCS#7 signatures
Stefan Vogel <sv@exept.de>
parents: 8646
diff changeset
  8024
        self currentSelectedFiles do:[:fn |
e8a98d146af2 Generate both integrated and detached PKCS#7 signatures
Stefan Vogel <sv@exept.de>
parents: 8646
diff changeset
  8025
            |data hash signature signatureFile|
e8a98d146af2 Generate both integrated and detached PKCS#7 signatures
Stefan Vogel <sv@exept.de>
parents: 8646
diff changeset
  8026
e8a98d146af2 Generate both integrated and detached PKCS#7 signatures
Stefan Vogel <sv@exept.de>
parents: 8646
diff changeset
  8027
            self notify:'Generating detached signature file for ', (fn baseName),'...'.
e8a98d146af2 Generate both integrated and detached PKCS#7 signatures
Stefan Vogel <sv@exept.de>
parents: 8646
diff changeset
  8028
e8a98d146af2 Generate both integrated and detached PKCS#7 signatures
Stefan Vogel <sv@exept.de>
parents: 8646
diff changeset
  8029
            data := fn contentsAsString.
e8a98d146af2 Generate both integrated and detached PKCS#7 signatures
Stefan Vogel <sv@exept.de>
parents: 8646
diff changeset
  8030
            hash := SHA1Stream hashValueOf:data.
e8a98d146af2 Generate both integrated and detached PKCS#7 signatures
Stefan Vogel <sv@exept.de>
parents: 8646
diff changeset
  8031
e8a98d146af2 Generate both integrated and detached PKCS#7 signatures
Stefan Vogel <sv@exept.de>
parents: 8646
diff changeset
  8032
            signature := Expecco::KeyFileGenerator new signExpeccoCode:hash.
e8a98d146af2 Generate both integrated and detached PKCS#7 signatures
Stefan Vogel <sv@exept.de>
parents: 8646
diff changeset
  8033
e8a98d146af2 Generate both integrated and detached PKCS#7 signatures
Stefan Vogel <sv@exept.de>
parents: 8646
diff changeset
  8034
            signatureFile := fn addSuffix:'sig'.
e8a98d146af2 Generate both integrated and detached PKCS#7 signatures
Stefan Vogel <sv@exept.de>
parents: 8646
diff changeset
  8035
            signatureFile contents:signature.
e8a98d146af2 Generate both integrated and detached PKCS#7 signatures
Stefan Vogel <sv@exept.de>
parents: 8646
diff changeset
  8036
        ].
13677
1b97a31ac83f class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 13521
diff changeset
  8037
        self updateCurrentDirectoryWithReread.
8648
e8a98d146af2 Generate both integrated and detached PKCS#7 signatures
Stefan Vogel <sv@exept.de>
parents: 8646
diff changeset
  8038
        self notify:nil.
e8a98d146af2 Generate both integrated and detached PKCS#7 signatures
Stefan Vogel <sv@exept.de>
parents: 8646
diff changeset
  8039
    ]
e8a98d146af2 Generate both integrated and detached PKCS#7 signatures
Stefan Vogel <sv@exept.de>
parents: 8646
diff changeset
  8040
!
e8a98d146af2 Generate both integrated and detached PKCS#7 signatures
Stefan Vogel <sv@exept.de>
parents: 8646
diff changeset
  8041
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8042
generatePatchInstallerForSelectedFiles
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8043
    "generate an expecco patch, which installs the selected file(s).
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8044
     Opens a dialog asking for the target directory and if the patch should be signed"
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8045
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8046
    |dialog targetDirHolder targetDir 
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8047
     generateSignedPatchHolder patchFileNameHolder patchFileName|
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8048
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8049
    targetDirHolder := '.' asValue.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8050
    generateSignedPatchHolder := true asValue.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8051
    patchFileNameHolder := '/tmp/00nn_patchFile.st' asValue.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8052
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8053
    dialog := Dialog new.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8054
    dialog label:(resources string:'Patch Installer for File(s)').
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8055
    dialog addTextLabel:'Patchfile Name' adjust:#left.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8056
    dialog addInputFieldOn:patchFileNameHolder tabable:true.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8057
    dialog addTextLabel:'Target directory (relative to executable''s directory at execution time)' adjust:#left.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8058
    dialog addInputFieldOn:targetDirHolder tabable:true.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8059
    dialog addCheckBox:'Generate Signed Patch' on:generateSignedPatchHolder.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8060
    dialog addAbortAndOkButtons.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8061
    dialog open.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8062
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8063
    dialog accepted ifFalse:[^ self].
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8064
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8065
    targetDir := targetDirHolder value asFilename.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8066
    patchFileName := patchFileNameHolder value asFilename.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8067
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8068
    self withActivityIndicationDo:[
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8069
        |outStream zipArchive pkcs7SignedData signatureFilename|
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8070
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8071
        self notify:'Generating self extracting st script: ', patchFileName name, '...'.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8072
        outStream := patchFileName writeStream.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8073
        outStream nextPutAll:'
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8074
|patchStream zipArchive|
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8075
patchStream := Expecco::Browser::CurrentPatchStreamQuery query.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8076
patchStream isNil ifTrue:[ self error:''sorry, this patch can only be installed in expecco 2.6.2 and newer (missing CurrentPatchStreamQuery)''].
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8077
zipArchive := ZipArchive readingFrom:patchStream.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8078
zipArchive members do:[:each | zipArchive extract:each fileName].
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8079
patchStream setToEnd. "/ to force fileIn to finish
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8080
!!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8081
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8082
!! !!
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8083
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8084
'.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8085
        zipArchive := ZipArchive writingTo:outStream. "/ newFileNamed:(patchFileName).
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8086
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8087
        self currentSelectedFiles do:[:fn |
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8088
            |inStream signatureFilename|
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8089
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8090
            inStream := fn asFilename readStream.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8091
            zipArchive addFile: (targetDir construct:fn asFilename baseName) name fromStream:inStream.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8092
            inStream close.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8093
        ].
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8094
16975
9c6630591fe6 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 16941
diff changeset
  8095
        zipArchive close.
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8096
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8097
        generateSignedPatchHolder value ifTrue:[
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8098
            self notify:'Generating signed file from: ', patchFileName name, '...'.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8099
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8100
            pkcs7SignedData := Expecco::KeyFileGenerator new signExpeccoCode:patchFileName contentsOfEntireFile.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8101
            signatureFilename := patchFileName withSuffix:'expeccoPatch'.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8102
            signatureFilename contents:pkcs7SignedData.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8103
        ].
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8104
        self notify:nil.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8105
    ]
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8106
!
13783
00625eec40bc class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13714
diff changeset
  8107
8640
fe2bc358dec4 added generateSignatureFile to tools-menu
Claus Gittinger <cg@exept.de>
parents: 8617
diff changeset
  8108
generateSignaturesForSelectedFiles
13783
00625eec40bc class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13714
diff changeset
  8109
    "generate signed pkcs7 files from the contents of the selected files.
00625eec40bc class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13714
diff changeset
  8110
     These can be delivered as expeccoPatch files"
8640
fe2bc358dec4 added generateSignatureFile to tools-menu
Claus Gittinger <cg@exept.de>
parents: 8617
diff changeset
  8111
fe2bc358dec4 added generateSignatureFile to tools-menu
Claus Gittinger <cg@exept.de>
parents: 8617
diff changeset
  8112
    self withActivityIndicationDo:[
fe2bc358dec4 added generateSignatureFile to tools-menu
Claus Gittinger <cg@exept.de>
parents: 8617
diff changeset
  8113
        self currentSelectedFiles do:[:fn |
8645
00e4d07c6d6d Generate signed expecco patch files
Stefan Vogel <sv@exept.de>
parents: 8641
diff changeset
  8114
            |pkcs7SignedData signatureFilename|
00e4d07c6d6d Generate signed expecco patch files
Stefan Vogel <sv@exept.de>
parents: 8641
diff changeset
  8115
8646
8046120212f6 generating signed files
Stefan Vogel <sv@exept.de>
parents: 8645
diff changeset
  8116
            self notify:'Generating signed file from: ', (fn baseName), '...'.
8645
00e4d07c6d6d Generate signed expecco patch files
Stefan Vogel <sv@exept.de>
parents: 8641
diff changeset
  8117
00e4d07c6d6d Generate signed expecco patch files
Stefan Vogel <sv@exept.de>
parents: 8641
diff changeset
  8118
            pkcs7SignedData := Expecco::KeyFileGenerator new signExpeccoCode:fn contentsOfEntireFile.
12094
1ac25533a0d3 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 12062
diff changeset
  8119
            signatureFilename := fn withSuffix:'expeccoPatch'.
8645
00e4d07c6d6d Generate signed expecco patch files
Stefan Vogel <sv@exept.de>
parents: 8641
diff changeset
  8120
            signatureFilename contents:pkcs7SignedData.
8640
fe2bc358dec4 added generateSignatureFile to tools-menu
Claus Gittinger <cg@exept.de>
parents: 8617
diff changeset
  8121
        ].
13677
1b97a31ac83f class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 13521
diff changeset
  8122
        self updateCurrentDirectoryWithReread.
8640
fe2bc358dec4 added generateSignatureFile to tools-menu
Claus Gittinger <cg@exept.de>
parents: 8617
diff changeset
  8123
        self notify:nil.
fe2bc358dec4 added generateSignatureFile to tools-menu
Claus Gittinger <cg@exept.de>
parents: 8617
diff changeset
  8124
    ]
fe2bc358dec4 added generateSignatureFile to tools-menu
Claus Gittinger <cg@exept.de>
parents: 8617
diff changeset
  8125
!
fe2bc358dec4 added generateSignatureFile to tools-menu
Claus Gittinger <cg@exept.de>
parents: 8617
diff changeset
  8126
9784
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  8127
inspectXmlFile
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  8128
    "Show an XML file - either in an XMLInspector or fall back to
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  8129
     a plain inspector on the XML tree"
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  8130
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  8131
    self forEachParsedXmlFileDo:[:xmlDocument |
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  8132
        XML::XMLInspector notNil ifTrue:[
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  8133
            XML::XMLInspector openOn:xmlDocument.
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  8134
        ] ifFalse:[
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  8135
            "fall back..."
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  8136
            xmlDocument inspect.
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  8137
        ]
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  8138
    ].
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  8139
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  8140
    "Modified: / 17-02-2011 / 13:58:16 / cg"
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  8141
!
afeca3b8a748 refactored
Claus Gittinger <cg@exept.de>
parents: 9764
diff changeset
  8142
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8143
installAllAsAutoloaded
321c1729db5b initial checkin
penk
parents:
diff changeset
  8144
    "install all classes found here as autoloaded classes"
321c1729db5b initial checkin
penk
parents:
diff changeset
  8145
9674
3c3c1ef9974b added: #installAllAsAutoloadedRecursive:
Claus Gittinger <cg@exept.de>
parents: 9649
diff changeset
  8146
    self installAllAsAutoloadedRecursive:false
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8147
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8148
6521
6f55c8f06c1f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6482
diff changeset
  8149
installAllAsAutoloadedRecursive
6f55c8f06c1f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6482
diff changeset
  8150
    "install all classes found here and in subdirectories as autoloaded classes"
6f55c8f06c1f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6482
diff changeset
  8151
9674
3c3c1ef9974b added: #installAllAsAutoloadedRecursive:
Claus Gittinger <cg@exept.de>
parents: 9649
diff changeset
  8152
    self installAllAsAutoloadedRecursive:true
3c3c1ef9974b added: #installAllAsAutoloadedRecursive:
Claus Gittinger <cg@exept.de>
parents: 9649
diff changeset
  8153
!
3c3c1ef9974b added: #installAllAsAutoloadedRecursive:
Claus Gittinger <cg@exept.de>
parents: 9649
diff changeset
  8154
3c3c1ef9974b added: #installAllAsAutoloadedRecursive:
Claus Gittinger <cg@exept.de>
parents: 9649
diff changeset
  8155
installAllAsAutoloadedRecursive:aBoolean
3c3c1ef9974b added: #installAllAsAutoloadedRecursive:
Claus Gittinger <cg@exept.de>
parents: 9649
diff changeset
  8156
    "install all classes found here (and in subdirs if aBoolean is true) as autoloaded classes"
3c3c1ef9974b added: #installAllAsAutoloadedRecursive:
Claus Gittinger <cg@exept.de>
parents: 9649
diff changeset
  8157
6521
6f55c8f06c1f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6482
diff changeset
  8158
    [
15507
fe66ebdf481d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15346
diff changeset
  8159
        LoadInProgressQuery answerNotifyLoadingDo:[
fe66ebdf481d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15346
diff changeset
  8160
            |installAction|
fe66ebdf481d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15346
diff changeset
  8161
fe66ebdf481d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15346
diff changeset
  8162
            installAction := 
19031
346bc1b61c0a #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19015
diff changeset
  8163
                [:fn |      
346bc1b61c0a #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19015
diff changeset
  8164
                    (fn hasSuffix:'st') ifTrue:[
15507
fe66ebdf481d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15346
diff changeset
  8165
                        self notify:('Install as autoloaded: ', fn baseName).
fe66ebdf481d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15346
diff changeset
  8166
                        self installAsAutoloaded:fn.
fe66ebdf481d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15346
diff changeset
  8167
                    ]
fe66ebdf481d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15346
diff changeset
  8168
                ].
fe66ebdf481d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15346
diff changeset
  8169
fe66ebdf481d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15346
diff changeset
  8170
            self withActivityIndicationDo:[
fe66ebdf481d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15346
diff changeset
  8171
                self currentSelectedDirectories do:[:dir|
fe66ebdf481d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15346
diff changeset
  8172
                    aBoolean ifTrue:[
fe66ebdf481d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15346
diff changeset
  8173
                        dir recursiveDirectoryContentsAsFilenamesDo:installAction
fe66ebdf481d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15346
diff changeset
  8174
                    ] ifFalse:[
fe66ebdf481d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15346
diff changeset
  8175
                        dir directoryContentsAsFilenamesDo:installAction
15152
d5f4755c217b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15111
diff changeset
  8176
                    ].
9674
3c3c1ef9974b added: #installAllAsAutoloadedRecursive:
Claus Gittinger <cg@exept.de>
parents: 9649
diff changeset
  8177
                ].
15507
fe66ebdf481d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15346
diff changeset
  8178
                self notify:nil.
fe66ebdf481d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15346
diff changeset
  8179
            ].
fe66ebdf481d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15346
diff changeset
  8180
        ]
6521
6f55c8f06c1f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6482
diff changeset
  8181
    ] fork.
6f55c8f06c1f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6482
diff changeset
  8182
!
6f55c8f06c1f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6482
diff changeset
  8183
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8184
installAsAutoloaded:aFilename
321c1729db5b initial checkin
penk
parents:
diff changeset
  8185
    "install aFilename as autoloaded class"
321c1729db5b initial checkin
penk
parents:
diff changeset
  8186
13292
37cf92626327 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13232
diff changeset
  8187
    Smalltalk installAutoloadedClassFromSourceFile:aFilename
37cf92626327 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13232
diff changeset
  8188
37cf92626327 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13232
diff changeset
  8189
    "Modified: / 01-08-2013 / 16:58:09 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8190
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8191
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8192
joinSelectedFiles
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8193
    |selectedFiles numFiles msg outFileName outFile outStream|
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8194
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8195
    selectedFiles := self currentSelectedObjects.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8196
    (numFiles := selectedFiles size) <= 1 ifTrue:[^ self].
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8197
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8198
    msg := 'Join each of the %1 files into single file named:\\Attention: order in which files were selected is relevant here !!'.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8199
    outFileName := Dialog request:(resources stringWithCRs:msg with:numFiles with:selectedFiles first baseName).
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8200
    outFileName isEmptyOrNil ifTrue:[^ self].
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8201
    outFile := selectedFiles first directory construct:outFileName.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8202
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8203
    outStream := outFile writeStream.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8204
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8205
    selectedFiles do:[:fileName |
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8206
        self notify:('Adding:',  fileName baseName).
17997
03d094e11b46 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17982
diff changeset
  8207
        fileName readingFileDo:[:inStream |
03d094e11b46 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17982
diff changeset
  8208
            inStream copyToEndInto:outStream.
03d094e11b46 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17982
diff changeset
  8209
        ].
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8210
    ].
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8211
    outStream close.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8212
    self notify:nil.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8213
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8214
    "Modified: / 04-12-2006 / 13:15:10 / cg"
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  8215
!
4558
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  8216
6292
bce1479e1e2a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6286
diff changeset
  8217
loadImageThenDo:aBlock
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8218
    |img path files|
321c1729db5b initial checkin
penk
parents:
diff changeset
  8219
3982
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  8220
    files := self currentSelectedFiles.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8221
    files isEmpty ifTrue:[ ^ self].
321c1729db5b initial checkin
penk
parents:
diff changeset
  8222
    files do:[:fileName |
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8223
        path := fileName.
18453
e20ac933ee00 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18433
diff changeset
  8224
        path isRegularFile ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8225
            img := Image fromFile:(path pathName).
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8226
            img notNil ifTrue:[
6292
bce1479e1e2a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6286
diff changeset
  8227
                aBlock value:img
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8228
            ] ifFalse:[
15346
1220ca6a9666 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15259
diff changeset
  8229
                Dialog warn:(resources string:'Unknown image format: "%1"' with:fileName asString)
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8230
            ]
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8231
        ]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8232
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  8233
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8234
13089
70766b1c3b0d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13011
diff changeset
  8235
loadSignatureSupport
70766b1c3b0d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13011
diff changeset
  8236
    Expecco::KeyFileGenerator isNil ifTrue:[
14047
1bc0c67645f2 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 14012
diff changeset
  8237
        Smalltalk loadPackage:'exept:expecco/license'
13089
70766b1c3b0d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13011
diff changeset
  8238
    ].
70766b1c3b0d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13011
diff changeset
  8239
!
70766b1c3b0d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13011
diff changeset
  8240
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8241
openASN1Browser
321c1729db5b initial checkin
penk
parents:
diff changeset
  8242
321c1729db5b initial checkin
penk
parents:
diff changeset
  8243
    self openTool:OSI::ASN1Browser 
321c1729db5b initial checkin
penk
parents:
diff changeset
  8244
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8245
321c1729db5b initial checkin
penk
parents:
diff changeset
  8246
openAppletViewer
321c1729db5b initial checkin
penk
parents:
diff changeset
  8247
    |numItems files|
321c1729db5b initial checkin
penk
parents:
diff changeset
  8248
3982
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  8249
    files := self currentSelectedFiles.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8250
    (numItems := files size) > 2 ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8251
        (self 
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8252
            confirm:(resources string:'open for each of the %1 items ?' 
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8253
                                 with:numItems)) ifFalse:[^ self].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8254
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  8255
321c1729db5b initial checkin
penk
parents:
diff changeset
  8256
    Java startupJavaSystem.
321c1729db5b initial checkin
penk
parents:
diff changeset
  8257
"/    Java markAllClassesUninitialized.
321c1729db5b initial checkin
penk
parents:
diff changeset
  8258
"/    Java initAllStaticFields.
321c1729db5b initial checkin
penk
parents:
diff changeset
  8259
"/    Java initAllClasses.
321c1729db5b initial checkin
penk
parents:
diff changeset
  8260
321c1729db5b initial checkin
penk
parents:
diff changeset
  8261
    files do:[:fileName |
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8262
        |p path|
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8263
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8264
        path := fileName.
18453
e20ac933ee00 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18433
diff changeset
  8265
        path isRegularFile ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8266
            p := Java 
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8267
                    javaProcessForMainOf:(Java classForName:'sun.applet.AppletViewer')
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8268
                    argumentString:path pathName.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8269
            p resume.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8270
        ]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8271
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  8272
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8273
321c1729db5b initial checkin
penk
parents:
diff changeset
  8274
openCBrowser
6031
e30ceda65e5c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6022
diff changeset
  8275
    |dir files|
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  8276
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  8277
    dir := self theSingleSelectedDirectoryOrNil.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  8278
    dir isNil ifTrue:[ ^ self].
6829
3bcad14c59fc wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6785
diff changeset
  8279
    self withActivityIndicationDo:[
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  8280
        files := self currentSelectedObjects.
6031
e30ceda65e5c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6022
diff changeset
  8281
        files notEmptyOrNil ifTrue:[
e30ceda65e5c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6022
diff changeset
  8282
            CBrowser::Browser openOn:files first.
e30ceda65e5c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6022
diff changeset
  8283
        ] ifFalse:[
e30ceda65e5c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6022
diff changeset
  8284
            CBrowser::Browser openIn:dir.
e30ceda65e5c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6022
diff changeset
  8285
        ]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8286
    ]
6829
3bcad14c59fc wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6785
diff changeset
  8287
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  8288
    "Modified: / 04-12-2006 / 13:15:19 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8289
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8290
4230
805e8d4b4ec7 added make.
Claus Gittinger <cg@exept.de>
parents: 4213
diff changeset
  8291
openChangeSetBrowser
11712
ed8877d9356b comment/format in: #doOpenCBrowser
Claus Gittinger <cg@exept.de>
parents: 11688
diff changeset
  8292
    "open a changeSet browser on the selected file(s)"
ed8877d9356b comment/format in: #doOpenCBrowser
Claus Gittinger <cg@exept.de>
parents: 11688
diff changeset
  8293
4230
805e8d4b4ec7 added make.
Claus Gittinger <cg@exept.de>
parents: 4213
diff changeset
  8294
    self
11712
ed8877d9356b comment/format in: #doOpenCBrowser
Claus Gittinger <cg@exept.de>
parents: 11688
diff changeset
  8295
        openTool:(UserPreferences current changeSetBrowserClass) 
4230
805e8d4b4ec7 added make.
Claus Gittinger <cg@exept.de>
parents: 4213
diff changeset
  8296
        with:#openOnFile: 
18834
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  8297
        ignoreDirectories:false
11712
ed8877d9356b comment/format in: #doOpenCBrowser
Claus Gittinger <cg@exept.de>
parents: 11688
diff changeset
  8298
ed8877d9356b comment/format in: #doOpenCBrowser
Claus Gittinger <cg@exept.de>
parents: 11688
diff changeset
  8299
    "Modified (comment): / 27-07-2012 / 20:42:55 / cg"
18834
2656052d93f6 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18823
diff changeset
  8300
    "Modified: / 23-06-2019 / 13:17:07 / Claus Gittinger"
4230
805e8d4b4ec7 added make.
Claus Gittinger <cg@exept.de>
parents: 4213
diff changeset
  8301
!
805e8d4b4ec7 added make.
Claus Gittinger <cg@exept.de>
parents: 4213
diff changeset
  8302
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8303
openChangesBrowser
321c1729db5b initial checkin
penk
parents:
diff changeset
  8304
    "open a change browser on the selected file(s)"
321c1729db5b initial checkin
penk
parents:
diff changeset
  8305
18774
2551a3ae4dd7 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18773
diff changeset
  8306
    |files remaining|
18775
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8307
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8308
    files := self currentSelectedFiles.
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8309
    remaining := files copy.
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8310
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8311
    "/ special for github-downloaded package&class folders (one method per file)
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8312
    "/ these are named .package and .class
18774
2551a3ae4dd7 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18773
diff changeset
  8313
    GitHubSmalltalkPackageReader notNil ifTrue:[
2551a3ae4dd7 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18773
diff changeset
  8314
        files do:[:fn |
19031
346bc1b61c0a #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19015
diff changeset
  8315
            |suff|
346bc1b61c0a #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19015
diff changeset
  8316
18774
2551a3ae4dd7 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18773
diff changeset
  8317
            fn isDirectory ifTrue:[
19031
346bc1b61c0a #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19015
diff changeset
  8318
                suff := fn suffix. 
346bc1b61c0a #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19015
diff changeset
  8319
                (suff = 'package') ifTrue:[
18248
0e0b4a81b2a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18246
diff changeset
  8320
                    ChangeSetBrowser openOn:(GitHubSmalltalkPackageReader readPackageFrom:fn).
18774
2551a3ae4dd7 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18773
diff changeset
  8321
                    remaining remove:fn.
2551a3ae4dd7 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18773
diff changeset
  8322
                ] ifFalse:[   
19031
346bc1b61c0a #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19015
diff changeset
  8323
                    (suff = 'class') ifTrue:[
18774
2551a3ae4dd7 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18773
diff changeset
  8324
                        ChangeSetBrowser openOn:(GitHubSmalltalkClassReader readClassFrom:fn).
2551a3ae4dd7 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18773
diff changeset
  8325
                        remaining remove:fn.
2551a3ae4dd7 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18773
diff changeset
  8326
                    ].    
2551a3ae4dd7 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18773
diff changeset
  8327
                ].
18248
0e0b4a81b2a4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18246
diff changeset
  8328
            ].
18774
2551a3ae4dd7 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18773
diff changeset
  8329
        ].
2551a3ae4dd7 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18773
diff changeset
  8330
        remaining isEmpty ifTrue:[^ self].
18246
1217eb5963fc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18175
diff changeset
  8331
    ].
1217eb5963fc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18175
diff changeset
  8332
    
18775
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8333
    "/ special for new github-downloaded source files
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8334
    "/ these are named *.class.st, *.extension.st and *.trait.st
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8335
    remaining copy do:[:fn |
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8336
        #( '.class' '.extension' '.trait') contains:[:suff |
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8337
            |changeSet|
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8338
            
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8339
            (fn withoutSuffix baseName endsWith:suff) ifTrue:[
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8340
                fn readingFileDo:[:in |
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8341
                    changeSet := ChangeSet fromGithubPharoSmalltalkStream:in.
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8342
                ].    
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8343
                ChangeSetBrowser openOn:changeSet.
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8344
                remaining remove:fn.
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8345
            ].    
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8346
        ].    
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8347
        remaining isEmpty ifTrue:[^ self].
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8348
    ].
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8349
    
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8350
    self openTool:(UserPreferences current changesBrowserClass)
18246
1217eb5963fc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18175
diff changeset
  8351
18775
24687514152a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18774
diff changeset
  8352
    "Modified: / 26-05-2019 / 02:58:27 / Claus Gittinger"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8353
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8354
321c1729db5b initial checkin
penk
parents:
diff changeset
  8355
openDiffView
15215
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8356
    "open a diff-view on the two selected files"
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8357
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8358
    |name1 name2 files title 
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8359
     defaultName defaultDir|
6460
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  8360
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  8361
    files := self currentSelectedObjects.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8362
    files isEmpty ifTrue:[
6460
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  8363
        Dialog warn:(resources string:'You have to select a file first').
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8364
        ^ self.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8365
    ].
8287
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8366
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8367
    (files size == 2) ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8368
        name1 := files last.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8369
        name2 := files first.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8370
    ] ifFalse:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8371
        LastFileDiffFile notNil ifTrue:[
11052
6fb06d6f1bc4 changed: #openDiffView
Claus Gittinger <cg@exept.de>
parents: 10923
diff changeset
  8372
            LastFileDiffFile exists ifTrue:[
6fb06d6f1bc4 changed: #openDiffView
Claus Gittinger <cg@exept.de>
parents: 10923
diff changeset
  8373
                name1 := LastFileDiffFile.
6fb06d6f1bc4 changed: #openDiffView
Claus Gittinger <cg@exept.de>
parents: 10923
diff changeset
  8374
            ].
6fb06d6f1bc4 changed: #openDiffView
Claus Gittinger <cg@exept.de>
parents: 10923
diff changeset
  8375
"/            | directory |
6fb06d6f1bc4 changed: #openDiffView
Claus Gittinger <cg@exept.de>
parents: 10923
diff changeset
  8376
"/            directory := self currentDirectory.
6fb06d6f1bc4 changed: #openDiffView
Claus Gittinger <cg@exept.de>
parents: 10923
diff changeset
  8377
"/            directory notNil ifTrue:[
6fb06d6f1bc4 changed: #openDiffView
Claus Gittinger <cg@exept.de>
parents: 10923
diff changeset
  8378
"/                lastFile := directory asFilename construct:(LastFileDiffFile baseName).
6fb06d6f1bc4 changed: #openDiffView
Claus Gittinger <cg@exept.de>
parents: 10923
diff changeset
  8379
"/                (lastFile exists and:[lastFile isReadable]) ifTrue:[
6fb06d6f1bc4 changed: #openDiffView
Claus Gittinger <cg@exept.de>
parents: 10923
diff changeset
  8380
"/                    name1 := lastFile.
6fb06d6f1bc4 changed: #openDiffView
Claus Gittinger <cg@exept.de>
parents: 10923
diff changeset
  8381
"/                ]
6fb06d6f1bc4 changed: #openDiffView
Claus Gittinger <cg@exept.de>
parents: 10923
diff changeset
  8382
"/            ]
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8383
        ].
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8384
        name2 := files first.
6460
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  8385
        title := resources string:'Show differences between "%1" and:' with:name2 baseName.
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8386
        defaultName := name1 notNil ifTrue:[name1 baseName] ifFalse:[nil].
11052
6fb06d6f1bc4 changed: #openDiffView
Claus Gittinger <cg@exept.de>
parents: 10923
diff changeset
  8387
        defaultDir := name1 notNil ifTrue:[name1 directory] ifFalse:[self currentDirectory].
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8388
        name1 := DialogBox 
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8389
                    requestFileName:title 
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8390
                    default:defaultName 
6460
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  8391
                    ok:(resources string:'OK') 
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  8392
                    abort:(resources string:'Compare against File List') 
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8393
                    pattern:'*' 
11052
6fb06d6f1bc4 changed: #openDiffView
Claus Gittinger <cg@exept.de>
parents: 10923
diff changeset
  8394
                    fromDirectory:defaultDir.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8395
    ].
15215
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8396
    self openDiffViewOn:name1 and:name2
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8397
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8398
    "Modified: / 03-05-2012 / 08:03:16 / cg"
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8399
!
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8400
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8401
openDiffViewOn:fileArg1 and:fileArg2
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8402
    "open a diff-view on two files"
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8403
17769
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  8404
    |file1 file2 file1Size file2Size text1 text2 d err nm l1 sameContents msg|
15215
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8405
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8406
    file1 := fileArg1.
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8407
    file2 := fileArg2.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8408
8287
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8409
    self withWaitCursorDo:[
15215
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8410
        (file1 isNil or:[file1 asString isEmpty]) ifTrue:[
8287
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8411
            text1 := self getAllFilesAsStrings asStringCollection withTabs.
14126
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
  8412
            text1 := text1 collect:[:l | l isNil ifTrue:[' '] ifFalse:[l string]].
15215
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8413
            file1 := nil.
8287
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8414
            l1 := 'browser contents'
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8415
        ] ifFalse:[
15215
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8416
            file1 := file1 asFilename.
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8417
            LastFileDiffFile := file1.
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8418
            file1 isReadable ifFalse:[
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8419
                nm := file1.
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8420
                file1 exists ifFalse:[
8287
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8421
                    err := '"%1" does not exist.'.
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8422
                ] ifTrue:[
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8423
                    err := '"%1" is not readable.'
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8424
                ].
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8425
            ].
15215
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8426
            l1 := file1 pathName
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8427
        ].
8287
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8428
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8429
        err isNil ifTrue:[
15215
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8430
            file2 isReadable ifFalse:[
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8431
                nm := file2.
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8432
                file2 exists ifFalse:[
8287
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8433
                    err := '"%1" does not exist.'.
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8434
                ] ifTrue:[
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8435
                    err := '"%1" is not readable.'
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8436
                ].
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8437
            ].
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8438
        ].
8287
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8439
        err notNil ifTrue:[
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8440
            Dialog warn:(resources string:err with:nm pathName allBold).
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8441
            ^ self
6176
6bc0c44931c9 big file compare
Claus Gittinger <cg@exept.de>
parents: 6169
diff changeset
  8442
        ].
6bc0c44931c9 big file compare
Claus Gittinger <cg@exept.de>
parents: 6169
diff changeset
  8443
8287
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8444
        self withActivityIndicationDo:[
17769
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  8445
            file1Size := file1 isNil ifTrue:[0] ifFalse:[file1 fileSize].
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  8446
            file2Size := file2 isNil ifTrue:[0] ifFalse:[file2 fileSize].
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  8447
            
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  8448
            ((file1Size > (1024*1024*32)) or:[ file2Size > (1024*1024*32) ]) ifTrue:[
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  8449
                file1Size = file2Size ifTrue:[
8287
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8450
                    ProgressIndicator
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8451
                        displayBusyIndicator:'Comparing...'
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8452
                        at:(Screen default center)
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8453
                        during:[
15215
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8454
                            sameContents := (file1 sameContentsAs:file2).
8287
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8455
                        ].
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8456
                    sameContents ifTrue:[
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8457
                        self information:'Same contents.'
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8458
                    ] ifFalse:[
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8459
                        self information:'Different contents (File(s) too big for more details).'
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8460
                    ].
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8461
                ] ifFalse:[
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8462
                    self information:'Different size (File(s) too big for more details).'
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8463
                ].
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8464
                ^ self.
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8465
            ].
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8466
15215
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8467
            file1 notNil ifTrue:[
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8468
                file1 isDirectory ifTrue:[
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8469
                    text1 := file1 directoryContents asString.
8287
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8470
                ] ifFalse:[
15215
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8471
                    text1 := file1 contents.
8287
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8472
                ]
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8473
            ].
15215
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8474
            file2 isDirectory ifTrue:[
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8475
                text2 := file2 directoryContents asString.
6460
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  8476
            ] ifFalse:[
15215
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8477
                text2 := file2 contents.
8287
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8478
            ].
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8479
            text1 = text2 ifTrue:[
15215
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8480
                (file1 isDirectory or:[file2 isDirectory]) ifTrue:[
8287
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8481
                    msg := 'Same filename lists.'
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8482
                ] ifFalse:[
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8483
                    msg := 'Same contents.'
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8484
                ].
16911
d71609b50e6d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16825
diff changeset
  8485
                self information:msg
8287
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8486
            ] ifFalse:[
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8487
                d := DiffTextView 
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8488
                        openOn:text1 label:l1
15215
3d4164587084 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15212
diff changeset
  8489
                        and:text2 label:file2 pathName.
8287
df5c80b5bbfb show busy cursor while computing the diff of two files
Claus Gittinger <cg@exept.de>
parents: 8261
diff changeset
  8490
                d topView label:(resources string:'File Differences').
6460
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  8491
            ]
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8492
        ]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8493
    ]
6829
3bcad14c59fc wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6785
diff changeset
  8494
17769
156241c3adef #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17768
diff changeset
  8495
    "Modified: / 19-11-2017 / 15:00:47 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8496
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8497
9496
0cfc347edb59 added: #openDirectoryDiffView
Claus Gittinger <cg@exept.de>
parents: 9493
diff changeset
  8498
openDirectoryDiffView
0cfc347edb59 added: #openDirectoryDiffView
Claus Gittinger <cg@exept.de>
parents: 9493
diff changeset
  8499
    "open a directory diff-view"
0cfc347edb59 added: #openDirectoryDiffView
Claus Gittinger <cg@exept.de>
parents: 9493
diff changeset
  8500
0cfc347edb59 added: #openDirectoryDiffView
Claus Gittinger <cg@exept.de>
parents: 9493
diff changeset
  8501
    |name1 name2 files|
0cfc347edb59 added: #openDirectoryDiffView
Claus Gittinger <cg@exept.de>
parents: 9493
diff changeset
  8502
0cfc347edb59 added: #openDirectoryDiffView
Claus Gittinger <cg@exept.de>
parents: 9493
diff changeset
  8503
    files := self currentSelectedObjects.
11108
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8504
    files notEmpty ifTrue:[
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8505
        name1 := files first asFilename.
18453
e20ac933ee00 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18433
diff changeset
  8506
        name1 asFilename isRegularFile ifTrue:[
11108
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8507
            name1 := name1 directory
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8508
        ].
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8509
    ].
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8510
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8511
    (files size == 2) ifTrue:[
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8512
        name2 := files second.
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8513
    ] ifFalse:[
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8514
        (files size ~= 1) ifTrue:[
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8515
            Dialog warn:(resources string:'Please select one or two directories.').
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8516
            ^ self.
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8517
        ].
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8518
        name2 := Dialog 
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8519
                    requestDirectoryName:(resources
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8520
                                            string:'Recursive compare "%1" with folder:' 
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8521
                                            with:name1 asFilename baseName)
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8522
                    default:(LastFileDiffDirectory ? self currentDirectory).
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8523
        name2 isEmptyOrNil ifTrue:[^ self].
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8524
        LastFileDiffDirectory := name2.
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8525
    ].
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8526
    name2 := name2 asFilename.
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8527
18453
e20ac933ee00 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18433
diff changeset
  8528
    name2 asFilename isRegularFile ifTrue:[
11108
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8529
        name2 := name2 directory
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8530
    ].
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8531
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8532
    self 
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8533
        applicationNamed:#FileApplicationNoteBook
f13e428f8d06 class definition
Claus Gittinger <cg@exept.de>
parents: 11057
diff changeset
  8534
        ifPresentDo:[:appl | ^ appl openCompareDirectory:name1 with:name2].
9496
0cfc347edb59 added: #openDirectoryDiffView
Claus Gittinger <cg@exept.de>
parents: 9493
diff changeset
  8535
0cfc347edb59 added: #openDirectoryDiffView
Claus Gittinger <cg@exept.de>
parents: 9493
diff changeset
  8536
    "Created: / 20-05-2010 / 15:01:17 / cg"
0cfc347edb59 added: #openDirectoryDiffView
Claus Gittinger <cg@exept.de>
parents: 9493
diff changeset
  8537
!
0cfc347edb59 added: #openDirectoryDiffView
Claus Gittinger <cg@exept.de>
parents: 9493
diff changeset
  8538
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8539
openEditor
321c1729db5b initial checkin
penk
parents:
diff changeset
  8540
    self openTool:EditTextView
321c1729db5b initial checkin
penk
parents:
diff changeset
  8541
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8542
4957
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8543
openGV
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8544
    self openOSCommandWithFiles:'gv'
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8545
!
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8546
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8547
openHTMLReader
321c1729db5b initial checkin
penk
parents:
diff changeset
  8548
321c1729db5b initial checkin
penk
parents:
diff changeset
  8549
    self openTool:HTMLDocumentView ignoreDirectories:false
321c1729db5b initial checkin
penk
parents:
diff changeset
  8550
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8551
321c1729db5b initial checkin
penk
parents:
diff changeset
  8552
openImageEditor
6292
bce1479e1e2a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6286
diff changeset
  8553
    [
bce1479e1e2a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6286
diff changeset
  8554
        self loadImageThenDo:[:img | img edit]
bce1479e1e2a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6286
diff changeset
  8555
    ] fork
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8556
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8557
321c1729db5b initial checkin
penk
parents:
diff changeset
  8558
openImageInspector
6292
bce1479e1e2a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6286
diff changeset
  8559
    [
bce1479e1e2a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6286
diff changeset
  8560
        self loadImageThenDo:[:img | img inspect]
bce1479e1e2a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6286
diff changeset
  8561
    ] fork
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8562
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8563
321c1729db5b initial checkin
penk
parents:
diff changeset
  8564
openImagePreview
5778
15da4590fcd5 separatorString / separator
Claus Gittinger <cg@exept.de>
parents: 5772
diff changeset
  8565
    [
15da4590fcd5 separatorString / separator
Claus Gittinger <cg@exept.de>
parents: 5772
diff changeset
  8566
        self 
6292
bce1479e1e2a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6286
diff changeset
  8567
            loadImageThenDo:
5778
15da4590fcd5 separatorString / separator
Claus Gittinger <cg@exept.de>
parents: 5772
diff changeset
  8568
                [:img |
15da4590fcd5 separatorString / separator
Claus Gittinger <cg@exept.de>
parents: 5772
diff changeset
  8569
                    |i top viewer|
15da4590fcd5 separatorString / separator
Claus Gittinger <cg@exept.de>
parents: 5772
diff changeset
  8570
15da4590fcd5 separatorString / separator
Claus Gittinger <cg@exept.de>
parents: 5772
diff changeset
  8571
                    top := StandardSystemView new.
15da4590fcd5 separatorString / separator
Claus Gittinger <cg@exept.de>
parents: 5772
diff changeset
  8572
15da4590fcd5 separatorString / separator
Claus Gittinger <cg@exept.de>
parents: 5772
diff changeset
  8573
                    viewer := ImageView origin:0.0@0.0 corner:1.0@1.0 in:top.
15da4590fcd5 separatorString / separator
Claus Gittinger <cg@exept.de>
parents: 5772
diff changeset
  8574
                    i := img.
15da4590fcd5 separatorString / separator
Claus Gittinger <cg@exept.de>
parents: 5772
diff changeset
  8575
                    top extent:200@200.
15da4590fcd5 separatorString / separator
Claus Gittinger <cg@exept.de>
parents: 5772
diff changeset
  8576
                    top label:(img fileName asFilename directory baseName , Filename separator , img fileName asFilename baseName).
15da4590fcd5 separatorString / separator
Claus Gittinger <cg@exept.de>
parents: 5772
diff changeset
  8577
                    top openAndWait.
15da4590fcd5 separatorString / separator
Claus Gittinger <cg@exept.de>
parents: 5772
diff changeset
  8578
15da4590fcd5 separatorString / separator
Claus Gittinger <cg@exept.de>
parents: 5772
diff changeset
  8579
                    (i width > 200 or:[i height > 200]) ifTrue:[
15da4590fcd5 separatorString / separator
Claus Gittinger <cg@exept.de>
parents: 5772
diff changeset
  8580
                        i := i magnifiedPreservingRatioTo:200@200.
15da4590fcd5 separatorString / separator
Claus Gittinger <cg@exept.de>
parents: 5772
diff changeset
  8581
                    ].
15da4590fcd5 separatorString / separator
Claus Gittinger <cg@exept.de>
parents: 5772
diff changeset
  8582
                    viewer image:i.
15da4590fcd5 separatorString / separator
Claus Gittinger <cg@exept.de>
parents: 5772
diff changeset
  8583
                ].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8584
    ] fork
321c1729db5b initial checkin
penk
parents:
diff changeset
  8585
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8586
321c1729db5b initial checkin
penk
parents:
diff changeset
  8587
openMP3Player
321c1729db5b initial checkin
penk
parents:
diff changeset
  8588
    |file|
321c1729db5b initial checkin
penk
parents:
diff changeset
  8589
3982
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  8590
    file := self currentSelectedFiles.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8591
    (file isEmpty) ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8592
        ^ self.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8593
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  8594
    file := file first.
321c1729db5b initial checkin
penk
parents:
diff changeset
  8595
    (MP3PlayerApplication ? SaugFix::MP3PlayerApplication) playSong:file.
321c1729db5b initial checkin
penk
parents:
diff changeset
  8596
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8597
4957
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8598
openOSCommandWithFiles:command
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8599
    |files fileNames|
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8600
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8601
    files := self currentSelectedFiles.
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8602
    (files isEmpty) ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8603
        ^ self.
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8604
    ].
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8605
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8606
    fileNames := files collect:[:each |
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8607
                    '"' , each asFilename pathName , '"'
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8608
                 ].
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8609
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8610
    [
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8611
        OperatingSystem 
4959
Claus Gittinger <cg@exept.de>
parents: 4958
diff changeset
  8612
            executeCommand:command , ' ' , fileNames asStringCollection asString
Claus Gittinger <cg@exept.de>
parents: 4958
diff changeset
  8613
            inDirectory:(files first asFilename directory).
4957
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8614
    ] fork
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8615
!
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8616
4820
8046b45e1569 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4800
diff changeset
  8617
openPDFViewer
5836
922c94b683a1 ask MIMETypes for pdf-command
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
  8618
    |files fileNames cmd arg|
4820
8046b45e1569 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4800
diff changeset
  8619
8046b45e1569 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4800
diff changeset
  8620
    files := self currentSelectedFiles.
8046b45e1569 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4800
diff changeset
  8621
    (files isEmpty) ifTrue:[
8046b45e1569 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4800
diff changeset
  8622
        ^ self.
8046b45e1569 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4800
diff changeset
  8623
    ].
12972
b7a2f930c5f2 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 12963
diff changeset
  8624
    cmd := MIMETypes defaultCommandTemplateToOpenMimeType:'application/pdf'.
5836
922c94b683a1 ask MIMETypes for pdf-command
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
  8625
    cmd isNil ifTrue:[
922c94b683a1 ask MIMETypes for pdf-command
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
  8626
        Dialog warn:'No viewer has been defined for pdf-files (See MIMETypes initialization).'.
922c94b683a1 ask MIMETypes for pdf-command
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
  8627
        ^ self.
922c94b683a1 ask MIMETypes for pdf-command
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
  8628
    ].
922c94b683a1 ask MIMETypes for pdf-command
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
  8629
4820
8046b45e1569 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4800
diff changeset
  8630
    fileNames := 
8046b45e1569 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4800
diff changeset
  8631
        files 
8046b45e1569 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4800
diff changeset
  8632
            collect:
8046b45e1569 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4800
diff changeset
  8633
                [:each |
8046b45e1569 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4800
diff changeset
  8634
                    '"' , each asFilename pathName , '"'
8046b45e1569 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4800
diff changeset
  8635
                ].
5836
922c94b683a1 ask MIMETypes for pdf-command
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
  8636
    arg := fileNames asStringCollection asStringWith:' '.
922c94b683a1 ask MIMETypes for pdf-command
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
  8637
922c94b683a1 ask MIMETypes for pdf-command
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
  8638
    (cmd includesString:'"%1"') ifTrue:[
922c94b683a1 ask MIMETypes for pdf-command
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
  8639
        cmd := cmd copyReplaceString:'"%1"' withString:'%1'    
922c94b683a1 ask MIMETypes for pdf-command
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
  8640
    ].
4820
8046b45e1569 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4800
diff changeset
  8641
4950
d0b7db4bfba5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4940
diff changeset
  8642
    [
5836
922c94b683a1 ask MIMETypes for pdf-command
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
  8643
        OperatingSystem executeCommand:(cmd bindWith:arg).
4950
d0b7db4bfba5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4940
diff changeset
  8644
    ] fork
5836
922c94b683a1 ask MIMETypes for pdf-command
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
  8645
922c94b683a1 ask MIMETypes for pdf-command
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
  8646
    "Modified: / 12-05-2004 / 12:31:20 / cg"
4820
8046b45e1569 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4800
diff changeset
  8647
!
8046b45e1569 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4800
diff changeset
  8648
8426
3adb5c1f5a70 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8364
diff changeset
  8649
openResourceFileEditor
3adb5c1f5a70 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8364
diff changeset
  8650
3adb5c1f5a70 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8364
diff changeset
  8651
    self 
3adb5c1f5a70 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8364
diff changeset
  8652
        openTool: Tools::InternationalLanguageTranslationEditor
3adb5c1f5a70 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8364
diff changeset
  8653
        with: #openOnFile:
3adb5c1f5a70 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8364
diff changeset
  8654
!
3adb5c1f5a70 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8364
diff changeset
  8655
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8656
openSlideShow
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  8657
    |dir|
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  8658
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  8659
    dir := self theSingleSelectedDirectoryOrNil.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  8660
    dir isNil ifTrue:[^ self].
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  8661
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8662
    CodingExamples_GUI::SlideShow openIn:dir.
321c1729db5b initial checkin
penk
parents:
diff changeset
  8663
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8664
321c1729db5b initial checkin
penk
parents:
diff changeset
  8665
openSnapshotImageBrowser
4491
b5f8412a83e2 comments
Claus Gittinger <cg@exept.de>
parents: 4486
diff changeset
  8666
    "Sorry, for now, only the old browser can handle snapShotImages."
b5f8412a83e2 comments
Claus Gittinger <cg@exept.de>
parents: 4486
diff changeset
  8667
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8668
    ^ self openTool:SystemBrowser with:#openOnSnapShotImage: ignoreDirectories:true
321c1729db5b initial checkin
penk
parents:
diff changeset
  8669
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8670
321c1729db5b initial checkin
penk
parents:
diff changeset
  8671
openTerminal
19009
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  8672
    "open a shell in vt100 terminal emulation in the current directory"
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  8673
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  8674
    |dir|
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  8675
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  8676
    dir := self theSingleSelectedDirectoryOrHomeDir.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8677
5300
260ccc2864cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5290
diff changeset
  8678
    TerminalApplication notNil ifTrue:[
260ccc2864cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5290
diff changeset
  8679
        TerminalApplication openIn:dir
260ccc2864cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5290
diff changeset
  8680
    ] ifFalse:[
260ccc2864cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5290
diff changeset
  8681
        VT100TerminalView openShellIn:dir.
260ccc2864cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5290
diff changeset
  8682
    ].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8683
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8684
321c1729db5b initial checkin
penk
parents:
diff changeset
  8685
openTool:aToolClass
321c1729db5b initial checkin
penk
parents:
diff changeset
  8686
    "open a tool on the selected file(s)"
321c1729db5b initial checkin
penk
parents:
diff changeset
  8687
321c1729db5b initial checkin
penk
parents:
diff changeset
  8688
    ^ self openTool:aToolClass ignoreDirectories:true
321c1729db5b initial checkin
penk
parents:
diff changeset
  8689
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8690
321c1729db5b initial checkin
penk
parents:
diff changeset
  8691
openTool:aToolClass ignoreDirectories:ignoreDirs
321c1729db5b initial checkin
penk
parents:
diff changeset
  8692
    "open a tool on the selected file(s)"
321c1729db5b initial checkin
penk
parents:
diff changeset
  8693
321c1729db5b initial checkin
penk
parents:
diff changeset
  8694
    ^ self
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8695
        openTool:aToolClass 
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8696
        with:#openOn: 
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8697
        ignoreDirectories:ignoreDirs
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8698
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8699
8426
3adb5c1f5a70 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8364
diff changeset
  8700
openTool:aToolClass with:aSelector
3adb5c1f5a70 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8364
diff changeset
  8701
    "open a tool on the selected file(s)"
3adb5c1f5a70 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8364
diff changeset
  8702
3adb5c1f5a70 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8364
diff changeset
  8703
    ^ self openTool:aToolClass with:aSelector ignoreDirectories:true
3adb5c1f5a70 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8364
diff changeset
  8704
!
3adb5c1f5a70 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8364
diff changeset
  8705
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8706
openTool:aToolClass with:aSelector ignoreDirectories:ignoreDirs
321c1729db5b initial checkin
penk
parents:
diff changeset
  8707
    "open a tool on the selected file(s)"
321c1729db5b initial checkin
penk
parents:
diff changeset
  8708
8832
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  8709
    |tool|
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8710
321c1729db5b initial checkin
penk
parents:
diff changeset
  8711
    aToolClass isNil ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8712
        Dialog warn:'Sorry, that tool seems to be not available'.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  8713
        ^ nil.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8714
    ].
8832
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  8715
    self forEachSelectedFileIgnoringDirectories:ignoreDirs do:[:path |
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  8716
        tool := aToolClass perform:aSelector with:path.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8717
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  8718
    ^ tool
8832
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  8719
!
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  8720
18946
6a96d75e0709 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18945
diff changeset
  8721
openVideoPlayer
6a96d75e0709 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18945
diff changeset
  8722
    self openOSCommandWithFiles:'vlc'
6a96d75e0709 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18945
diff changeset
  8723
6a96d75e0709 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18945
diff changeset
  8724
    "Created: / 26-07-2019 / 11:09:32 / Stefan Vogel"
6a96d75e0709 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18945
diff changeset
  8725
!
6a96d75e0709 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18945
diff changeset
  8726
8832
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
  8727
openWebBrowser
9343
895543baebfe added: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9338
diff changeset
  8728
    self 
895543baebfe added: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9338
diff changeset
  8729
        forEachSelectedFileIgnoringDirectories:true 
895543baebfe added: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9338
diff changeset
  8730
        do:[:path |
895543baebfe added: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9338
diff changeset
  8731
            Error
895543baebfe added: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9338
diff changeset
  8732
                handle:[:ex |
895543baebfe added: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9338
diff changeset
  8733
                    Dialog warn:'Shell execution failed: ',ex description
895543baebfe added: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9338
diff changeset
  8734
                ] do:[
895543baebfe added: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9338
diff changeset
  8735
                    OperatingSystem openApplicationForDocument:path operation:#open.
895543baebfe added: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9338
diff changeset
  8736
                    ^ self.
895543baebfe added: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9338
diff changeset
  8737
                ]
895543baebfe added: #doOpenWithShellCommand
Claus Gittinger <cg@exept.de>
parents: 9338
diff changeset
  8738
        ].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8739
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8740
6022
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5977
diff changeset
  8741
openWorkspace
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5977
diff changeset
  8742
    self 
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5977
diff changeset
  8743
        openTool:WorkspaceApplication 
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5977
diff changeset
  8744
        with:#openOnFile:
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5977
diff changeset
  8745
        ignoreDirectories:true
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5977
diff changeset
  8746
!
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5977
diff changeset
  8747
4950
d0b7db4bfba5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4940
diff changeset
  8748
openXV
4957
Claus Gittinger <cg@exept.de>
parents: 4955
diff changeset
  8749
    self openOSCommandWithFiles:'xv'
4950
d0b7db4bfba5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4940
diff changeset
  8750
!
d0b7db4bfba5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4940
diff changeset
  8751
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8752
openZipTool
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  8753
    |zipTool|
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8754
321c1729db5b initial checkin
penk
parents:
diff changeset
  8755
    (zipTool := self openTool:ZipTool) notNil ifTrue:[
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  8756
        zipTool initialExtractDirectory:(self theSingleSelectedDirectoryOrHomeDir).
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8757
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  8758
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8759
321c1729db5b initial checkin
penk
parents:
diff changeset
  8760
readAbbrevFile
321c1729db5b initial checkin
penk
parents:
diff changeset
  8761
    "read the abbrev file and install classes found there as autoloaded classes"
321c1729db5b initial checkin
penk
parents:
diff changeset
  8762
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  8763
    |directories|
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8764
3982
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  8765
    directories := self currentSelectedDirectories.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8766
    directories isEmpty ifTrue:[^ self].
321c1729db5b initial checkin
penk
parents:
diff changeset
  8767
6829
3bcad14c59fc wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6785
diff changeset
  8768
    self withActivityIndicationDo:[
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  8769
        directories do:[:eachDir |
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  8770
            Smalltalk installAutoloadedClassesFrom:(eachDir construct:'abbrev.stc').
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  8771
        ]
5828
67b58a435b3e wait cursor
Claus Gittinger <cg@exept.de>
parents: 5810
diff changeset
  8772
    ]
6829
3bcad14c59fc wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6785
diff changeset
  8773
3bcad14c59fc wait-cursor -> activity indication
Claus Gittinger <cg@exept.de>
parents: 6785
diff changeset
  8774
    "Modified: / 25-07-2006 / 09:07:43 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8775
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  8776
6460
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  8777
readAndShowResources
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  8778
    self withActivityIndicationDo:[
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  8779
        | selectedFiles|
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  8780
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  8781
        selectedFiles:= self currentSelectedFiles.
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  8782
        selectedFiles do:[:fileName |
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  8783
            resources := ResourcePack fromFile:fileName.
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  8784
            resources inspect.
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  8785
        ].
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  8786
    ]
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  8787
!
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  8788
17831
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8789
removeBakAndSavFiles
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8790
    "remove all .sav and .bak files (after confirmation)"
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8791
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8792
    |filesToRemove directories|
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8793
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8794
    directories := self currentSelectedDirectories.
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8795
    directories isEmptyOrNil ifTrue:[
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8796
        directories := Array with:self currentDirectory
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8797
    ].
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8798
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8799
    self withActivityIndicationDo:[
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8800
        filesToRemove := OrderedCollection new.
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8801
        directories do:[:eachDirectoryToScan |
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8802
            eachDirectoryToScan filesDo:[:fn |
18998
121fe2565ab3 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18952
diff changeset
  8803
                (#('sav' 'bak') includes:fn suffix asLowercase) ifTrue:[
17831
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8804
                    filesToRemove add:fn.
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8805
                ]
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8806
            ]
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8807
        ].
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8808
        filesToRemove isEmpty ifTrue:[
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8809
            Dialog information:(resources string:'Nothing to remove').
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8810
            ^ self.
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8811
        ].
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8812
        (Dialog confirm:(resources string:'Remove %1 file(s) ?' with:filesToRemove size)) ifFalse:[
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8813
            ^ self
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8814
        ].
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8815
        filesToRemove do:[:each |
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8816
            each remove
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8817
        ].
17871
7f0b6e10415d #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17869
diff changeset
  8818
        self updateCurrentDirectoryWithReread
17831
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8819
    ].
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8820
!
84a4c9f364e4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17818
diff changeset
  8821
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  8822
singleFileFileIn:fileName lazy:lazy
321c1729db5b initial checkin
penk
parents:
diff changeset
  8823
    "fileIn the selected file(s)"
321c1729db5b initial checkin
penk
parents:
diff changeset
  8824
9299
3c234ab3fae2 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 9296
diff changeset
  8825
    |aStream wasLazy notifyString dontAskSignals lang|
6281
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  8826
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  8827
    fileName isRegularFile ifFalse:[
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  8828
        ^ self.
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  8829
    ].
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  8830
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  8831
    [
4345
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8832
        (ObjectFileLoader notNil
5491
755cec01b183 Accept Filenames in loadFile:
Stefan Vogel <sv@exept.de>
parents: 5478
diff changeset
  8833
         and:[ObjectFileLoader hasValidBinaryExtension:fileName]) ifTrue:[
4345
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8834
            AbortOperationRequest catch:[
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8835
                |p|
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8836
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8837
                "/
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8838
                "/ look if already loaded ...  then unload first
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8839
                "/
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8840
                p := fileName pathName.
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8841
                (ObjectFileLoader loadedObjectFiles includes:p) ifTrue:[
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8842
                    (Dialog confirm:(resources 
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8843
                                        string:'%1 is already loaded; load anyway ?'
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8844
                                        with:p)) ifFalse:[
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8845
                        ^ self
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8846
                    ].
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8847
                    notifyString := 'unloading old ' , p , ' ...'.
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8848
                    Transcript showCR:notifyString.
4523
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
  8849
                    self notify:notifyString.
4345
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8850
                    ObjectFileLoader unloadObjectFile:p. 
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8851
                ].
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8852
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8853
                notifyString := 'loading ' , p , ' ...'.
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8854
                Transcript showCR:notifyString.
4523
ae3d65269e21 added notify: method;
Claus Gittinger <cg@exept.de>
parents: 4521
diff changeset
  8855
                self notify:notifyString.
12426
700b06622522 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 12421
diff changeset
  8856
                (ObjectFileLoader loadObjectFile:p) isNil ifTrue:[
700b06622522 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 12421
diff changeset
  8857
                    notifyString := 'Error: could not load ' , p.
700b06622522 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 12421
diff changeset
  8858
                    Transcript showCR:notifyString.
700b06622522 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 12421
diff changeset
  8859
                    self notify:notifyString.
700b06622522 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 12421
diff changeset
  8860
               ] ifFalse:[
700b06622522 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 12421
diff changeset
  8861
                    Class addInfoRecord:('fileIn ' , fileName asFilename pathName) 
700b06622522 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 12421
diff changeset
  8862
                ].
4345
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8863
            ]
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8864
        ] ifFalse:[ ((fileName hasSuffix:'cls') 
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8865
                     and:[((fileName mimeTypeOfContents ? '') startsWith:'application/x-smalltalk-source') not ]) ifTrue:[
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8866
            "/ loading a binary class file
4636
08b2b63e3107 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 4629
diff changeset
  8867
            aStream := fileName readStreamOrNil.
4345
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8868
            aStream notNil ifTrue:[
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8869
                aStream fileInBinary.
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8870
            ]
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8871
        ] ifFalse:[
9299
3c234ab3fae2 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 9296
diff changeset
  8872
            ((fileName hasSuffix:'class') or:[(fileName hasSuffix:'cla')]) ifTrue:[
4345
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8873
                "/ loading a java class file
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8874
                JavaClassReader notNil ifTrue:[
5491
755cec01b183 Accept Filenames in loadFile:
Stefan Vogel <sv@exept.de>
parents: 5478
diff changeset
  8875
                    JavaClassReader loadFile:fileName
4345
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8876
                ]
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8877
            ] ifFalse:[ (fileName hasSuffix:'sif') ifTrue:[
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8878
                "/ loading a sif (smalltalk interchange format) file
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8879
                SmalltalkInterchangeSTXFileInManager autoload.    
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8880
                SmalltalkInterchangeFileManager newForFileIn
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8881
                    fileName: fileName pathName;
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8882
                    fileIn.
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8883
            ] ifFalse:[ (fileName hasSuffix:'pcl') ifTrue:[
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8884
                Parcel isNil ifTrue:[
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8885
                    Dialog warn:'Parcel support not loaded.'
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8886
                ] ifFalse:[
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8887
                    Parcel loadParcelFrom: fileName pathName
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8888
                ]
13968
45cdc56fd50a Added support for filing-in .jar files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13910
diff changeset
  8889
            ] ifFalse:[ (fileName hasSuffix:'jar') ifTrue:[
45cdc56fd50a Added support for filing-in .jar files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13910
diff changeset
  8890
                JavaVM isNil ifTrue:[ 
45cdc56fd50a Added support for filing-in .jar files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13910
diff changeset
  8891
                    Dialog warn: (resources string: 'Java support is not loaded.').
45cdc56fd50a Added support for filing-in .jar files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13910
diff changeset
  8892
                    ^ self.
45cdc56fd50a Added support for filing-in .jar files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13910
diff changeset
  8893
                ] ifFalse:[
45cdc56fd50a Added support for filing-in .jar files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13910
diff changeset
  8894
                    JavaVM booted ifFalse:[ 
45cdc56fd50a Added support for filing-in .jar files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13910
diff changeset
  8895
                        (Dialog confirm: (resources string: 'Java is not initialized. Initialize now?')) ifFalse:[ ^ self. ].
45cdc56fd50a Added support for filing-in .jar files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13910
diff changeset
  8896
                        JavaVM boot.
45cdc56fd50a Added support for filing-in .jar files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13910
diff changeset
  8897
                    ].
45cdc56fd50a Added support for filing-in .jar files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13910
diff changeset
  8898
                    JavaVM loadClassesIn: fileName.  
45cdc56fd50a Added support for filing-in .jar files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13910
diff changeset
  8899
                ]
4345
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8900
            ] ifFalse:[
9299
3c234ab3fae2 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 9296
diff changeset
  8901
                "/ ask programming languages...
3c234ab3fae2 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 9296
diff changeset
  8902
                lang := ProgrammingLanguage allDetect:[:l | l canReadSourceFile:fileName] ifNone:nil.
14360
7459355f5a90 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14308
diff changeset
  8903
                (lang isNil and:[(fileName hasSuffix:'js')]) ifTrue:[
14362
b03192e7a145 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14360
diff changeset
  8904
                    Smalltalk loadPackage:'stx:libjavascript'.
14360
7459355f5a90 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14308
diff changeset
  8905
                    lang := ProgrammingLanguage allDetect:[:l | l canReadSourceFile:fileName] ifNone:nil.
7459355f5a90 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14308
diff changeset
  8906
                ].
9299
3c234ab3fae2 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 9296
diff changeset
  8907
                (lang notNil and:[lang ~= SmalltalkLanguage]) ifTrue:[
3c234ab3fae2 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 9296
diff changeset
  8908
                    lang fileIn:fileName.
3c234ab3fae2 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 9296
diff changeset
  8909
                ] ifFalse:[
3c234ab3fae2 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 9296
diff changeset
  8910
                    "/ loading a regular (chunk) or xml source file
3c234ab3fae2 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 9296
diff changeset
  8911
                    Error handle:[:ex |
15675
ac6981afbb9b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15597
diff changeset
  8912
                        self errorNotify:'Error during file in: ', ex description.
15981
Stefan Vogel <sv@exept.de>
parents: 15936
diff changeset
  8913
                        ex resume.
9299
3c234ab3fae2 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 9296
diff changeset
  8914
                    ] do:[
3c234ab3fae2 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 9296
diff changeset
  8915
                        aStream := fileName readStream.
3c234ab3fae2 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 9296
diff changeset
  8916
                        [
3c234ab3fae2 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 9296
diff changeset
  8917
                            Class withoutUpdatingChangesDo:[
3c234ab3fae2 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 9296
diff changeset
  8918
                                wasLazy := Compiler compileLazy:lazy.
3c234ab3fae2 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 9296
diff changeset
  8919
                                Smalltalk fileInStream:aStream.
3c234ab3fae2 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 9296
diff changeset
  8920
                            ].
3c234ab3fae2 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 9296
diff changeset
  8921
                            Class addInfoRecord:('fileIn ' , fileName asString) 
3c234ab3fae2 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 9296
diff changeset
  8922
                        ] ensure:[
3c234ab3fae2 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 9296
diff changeset
  8923
                            Compiler compileLazy:wasLazy.
3c234ab3fae2 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 9296
diff changeset
  8924
                            aStream close
3c234ab3fae2 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 9296
diff changeset
  8925
                        ]
4345
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8926
                    ]
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8927
                ]
13968
45cdc56fd50a Added support for filing-in .jar files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13910
diff changeset
  8928
            ]]]]
4345
7094ddfde188 *** empty log message ***
penk
parents: 4343
diff changeset
  8929
        ]]
6281
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  8930
    ] on:Error, HaltInterrupt, Class packageRedefinitionNotification do:[:ex| 
8082
40a926dc460d On class/method redefinition allow the user to select both #keep and #continue
Stefan Vogel <sv@exept.de>
parents: 8068
diff changeset
  8931
        |sig msg label labels values action proceedValue isRedef redefKind|
6281
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  8932
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  8933
        isRedef := false.
12684
cc8a225600bd class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12602
diff changeset
  8934
        sig := ex creator.
10887
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8935
        (dontAskSignals notNil and:[dontAskSignals includesKey:sig]) ifTrue:[
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8936
            action := #continue    
6281
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  8937
        ] ifFalse:[
10887
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8938
            (sig == NoHandlerError and:[ex parameter rejected]) ifTrue:[
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8939
                ex reject
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8940
            ].
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8941
            sig == Class methodRedefinitionNotification ifTrue:[
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8942
                msg := 'trying to overwrite method:\\    ' , ex oldMethod whoString , '\\in package ''' 
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8943
                       , ex oldPackage , ''' with method from package ''' , ex newPackage , ''''.
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8944
                label := 'Method redefinition in fileIn'.
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8945
                redefKind := 'method'.
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8946
                isRedef := true.
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8947
            ] ifFalse:[sig == Class classRedefinitionNotification ifTrue:[
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8948
                msg := 'trying to redefine class: ' , ex oldClass name allBold , '\\in package ''' 
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8949
                       , ex oldPackage , ''' with new definition from package ''' , ex newPackage , ''''.
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8950
                label := 'Class redefinition in fileIn'.
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8951
                redefKind := 'class'.
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8952
                isRedef := true.
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8953
            ] ifFalse:[sig == HaltInterrupt ifTrue:[ |sender|
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8954
                label := msg := 'Breakpoint/Halt in fileIn'.
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8955
                sender := ex suspendedContext.
19134
6ac3cadf623d #TUNING by exept
Claus Gittinger <cg@exept.de>
parents: 19031
diff changeset
  8956
                msg := msg , ('\\in %1 » %2' bindWith:(sender receiver class name) with:(sender sender selector))
10887
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8957
            ] ifFalse:[
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8958
                label := 'Error in fileIn'.
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8959
                msg := 'error in fileIn: %1'
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8960
            ]]].
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8961
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8962
            msg := msg bindWith:ex description.
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8963
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8964
            labels := #('Cancel' 'Skip' 'Debug' 'Compare Sources').
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8965
            values := #(abort     skip  debug   compareSources).
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8966
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8967
            isRedef ifTrue:[
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8968
                  msg := msg, ('%<cr>%<cr>Continue will install the change and assign the %1 to the new package.
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8969
    Keep Package will install the change, but keep the %1 in the old package.' bindWith:redefKind).
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8970
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8971
                  labels := labels , #('Keep Package' ).
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8972
                  values := values , #(keep).
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8973
            ].
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8974
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8975
            labels := labels , #( 'Continue' 'ContinueForAll').
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8976
            values := values , #(  continue   continueForAll).
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8977
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8978
            AbortAllOperationWantedQuery query ifTrue:[
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8979
                  labels := #('Cancel All') , labels.
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8980
                  values := #(cancelAll) , values.
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8981
            ].
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8982
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8983
            action := Dialog 
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8984
                          choose:(msg withCRs) 
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8985
                          label:label
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8986
                          image:(WarningBox iconBitmap)
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8987
                          labels:labels
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8988
                          values:values
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8989
                          default:#continue
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  8990
                          onCancel:#abort.
6281
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  8991
        ].
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  8992
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  8993
        action == #continueForAll ifTrue:[
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  8994
            dontAskSignals isNil ifTrue:[
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  8995
                dontAskSignals := IdentityDictionary new.
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  8996
            ].
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  8997
            dontAskSignals at:sig put:#continue.
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  8998
            action := #continue.
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  8999
        ].
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  9000
8887
f9ab42af84ff changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 8882
diff changeset
  9001
        (action == #compareSources) ifTrue:[
f9ab42af84ff changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 8882
diff changeset
  9002
            DiffCodeView 
f9ab42af84ff changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 8882
diff changeset
  9003
                openOn:(ex oldMethod source) label:'Old Source'
f9ab42af84ff changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 8882
diff changeset
  9004
                and:(ex newMethod source) label:'New Source'
f9ab42af84ff changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 8882
diff changeset
  9005
                title:ex description.
f9ab42af84ff changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 8882
diff changeset
  9006
            ex resignalAs:ex
f9ab42af84ff changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 8882
diff changeset
  9007
        ].
8082
40a926dc460d On class/method redefinition allow the user to select both #keep and #continue
Stefan Vogel <sv@exept.de>
parents: 8068
diff changeset
  9008
        (action == #continue or:[action == #keep]) ifTrue:[
40a926dc460d On class/method redefinition allow the user to select both #keep and #continue
Stefan Vogel <sv@exept.de>
parents: 8068
diff changeset
  9009
            ex proceedWith:action "(isRedef ifTrue:[#keep] ifFalse:[#continue])".
6281
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  9010
        ].
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  9011
        action == #abort ifTrue:[
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  9012
            AbortOperationRequest raise.
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  9013
            ex return
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  9014
        ].
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  9015
        action == #cancelAll ifTrue:[
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  9016
            AbortAllOperationRequest raise.
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  9017
            ex return
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  9018
        ].
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  9019
        action == #skip ifTrue:[
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  9020
            ex proceedWith:nil
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  9021
        ].
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  9022
        action == #debug ifTrue:[
7330
fe62e489caae When opening a debugger, make sure that the topmost context is returnable
Stefan Vogel <sv@exept.de>
parents: 7324
diff changeset
  9023
            Debugger enter:ex returnableSuspendedContext 
6281
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  9024
                     withMessage:ex description 
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  9025
                     mayProceed:true.
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  9026
            ex proceedWith:nil.
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  9027
        ].
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  9028
        ex reject
e8e47b1b290f Do not pop up dialogs on PackageRedefinitions when doing a fileIn
Stefan Vogel <sv@exept.de>
parents: 6265
diff changeset
  9029
    ]
7040
19c639b3b68d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6952
diff changeset
  9030
10887
f2a55c7f0ed6 changed: #singleFileFileIn:lazy:
Claus Gittinger <cg@exept.de>
parents: 10775
diff changeset
  9031
    "Modified: / 22-11-2011 / 13:52:17 / cg"
13968
45cdc56fd50a Added support for filing-in .jar files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13910
diff changeset
  9032
    "Modified: / 19-02-2014 / 12:49:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4531
c4783f6dfd7a menu reordered
Claus Gittinger <cg@exept.de>
parents: 4523
diff changeset
  9033
!
c4783f6dfd7a menu reordered
Claus Gittinger <cg@exept.de>
parents: 4523
diff changeset
  9034
4558
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9035
splitFile:infile intoPiecesOfSize:kiloBytes
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9036
    |bytesPerSplit splitIndex bufferSize buffer n
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9037
     inStream outFile outStream remaining remainingInThisOutfile|
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9038
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9039
    bufferSize := 32*1024.
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9040
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9041
    inStream := infile readStream.
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9042
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9043
    bytesPerSplit := kiloBytes * 1024.
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9044
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9045
    remaining := infile fileSize.
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9046
    splitIndex := 1.
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9047
    [remaining > 0] whileTrue:[
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9048
        outFile := infile pathName , '_' , (splitIndex printString leftPaddedTo:3 with:$0).
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9049
        outStream := outFile asFilename writeStream.
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9050
        remainingInThisOutfile := remaining min:bytesPerSplit.
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9051
        [remainingInThisOutfile > 0] whileTrue:[
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9052
            buffer := ByteArray new:bufferSize.
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9053
            n := inStream 
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9054
                    nextBytes:(bufferSize min:remainingInThisOutfile)
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9055
                    into:buffer 
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9056
                    startingAt:1.
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9057
            outStream nextPutBytes:n from:buffer startingAt:1.
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9058
            remainingInThisOutfile := remainingInThisOutfile - n.
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9059
            remaining := remaining - n.
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9060
        ].
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9061
        outStream close.
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9062
        splitIndex := splitIndex + 1.
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9063
    ].
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9064
    inStream close.
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9065
!
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9066
15906
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9067
splitFile:infile intoPiecesWithNumberOfLines:numberOfLines
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9068
    |splitIndex line
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9069
     inStream outFile outStream remainingLinesInThisOutfile|
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9070
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9071
    inStream := infile readStream.
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9072
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9073
    splitIndex := 1.
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9074
    [inStream atEnd] whileFalse:[
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9075
        outFile := infile pathName , '_' , (splitIndex printString leftPaddedTo:3 with:$0).
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9076
        outStream := outFile asFilename writeStream.
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9077
        remainingLinesInThisOutfile := numberOfLines.
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9078
        [(remainingLinesInThisOutfile > 0) and:[inStream atEnd not]] whileTrue:[
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9079
            line := inStream nextLine.
15910
Claus Gittinger <cg@exept.de>
parents: 15906
diff changeset
  9080
            outStream nextPutLine:line.
15906
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9081
            remainingLinesInThisOutfile := remainingLinesInThisOutfile - 1.
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9082
        ].
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9083
        outStream close.
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9084
        splitIndex := splitIndex + 1.
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9085
    ].
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9086
    inStream close.
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9087
!
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9088
4558
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9089
splitSelectedFiles
6264
039dc5c1710b slight code cleanup
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  9090
    |selectedFiles numFiles msg sizeString kiloBytes|
4558
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9091
12871
74bdca95981d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12858
diff changeset
  9092
    selectedFiles := self currentSelectedFiles.
4558
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9093
    (numFiles := selectedFiles size) == 0 ifTrue:[^ self].
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9094
6265
19f8b1250d41 slight code cleanup
Claus Gittinger <cg@exept.de>
parents: 6264
diff changeset
  9095
    msg := (numFiles > 1) 
19f8b1250d41 slight code cleanup
Claus Gittinger <cg@exept.de>
parents: 6264
diff changeset
  9096
                ifTrue:'Split each of the %1 files into pieces of size (in kB):'
19f8b1250d41 slight code cleanup
Claus Gittinger <cg@exept.de>
parents: 6264
diff changeset
  9097
                ifFalse:'Split %2 into pieces of size (in kB):'.
4558
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9098
6352
1dfde810826f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6346
diff changeset
  9099
    sizeString := Dialog request:(resources stringWithCRs:msg with:numFiles with:selectedFiles first baseName).
6264
039dc5c1710b slight code cleanup
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  9100
    sizeString isEmptyOrNil ifTrue:[^ self].
039dc5c1710b slight code cleanup
Claus Gittinger <cg@exept.de>
parents: 6250
diff changeset
  9101
    kiloBytes := Integer readFrom:sizeString onError:nil.
4558
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9102
    kiloBytes isNil ifTrue:[^ self].
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9103
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9104
    selectedFiles do:[:fileName |
18453
e20ac933ee00 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18433
diff changeset
  9105
        fileName isRegularFile ifTrue:[
e20ac933ee00 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18433
diff changeset
  9106
            self notify:('Splitting:',  fileName baseName).
4558
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9107
            self splitFile:fileName intoPiecesOfSize:kiloBytes.
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9108
        ]
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9109
    ].
6190
b3ab1d955319 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6176
diff changeset
  9110
    self notify:nil.
6265
19f8b1250d41 slight code cleanup
Claus Gittinger <cg@exept.de>
parents: 6264
diff changeset
  9111
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  9112
    "Modified: / 04-12-2006 / 13:15:26 / cg"
4558
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9113
!
9f64535810cd split and join added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
  9114
15906
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9115
splitSelectedFilesByLines
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9116
    |selectedFiles numFiles msg numLinesString numLines|
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9117
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9118
    selectedFiles := self currentSelectedFiles.
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9119
    (numFiles := selectedFiles size) == 0 ifTrue:[^ self].
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9120
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9121
    msg := (numFiles > 1) 
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9122
                ifTrue:'Split each of the %1 files into pieces with number of lines:'
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9123
                ifFalse:'Split %2 into pieces with number of lines:'.
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9124
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9125
    numLinesString := Dialog request:(resources stringWithCRs:msg with:numFiles with:selectedFiles first baseName).
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9126
    numLinesString isEmptyOrNil ifTrue:[^ self].
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9127
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9128
    numLines := Integer readFrom:numLinesString onError:nil.
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9129
    numLines isNil ifTrue:[^ self].
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9130
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9131
    selectedFiles do:[:fileName |
18453
e20ac933ee00 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18433
diff changeset
  9132
        fileName isRegularFile ifTrue:[
e20ac933ee00 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18433
diff changeset
  9133
            self notify:('Splitting:',  fileName baseName).
15906
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9134
            self splitFile:fileName intoPiecesWithNumberOfLines:numLines
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9135
        ]
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9136
    ].
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9137
    self notify:nil.
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9138
!
1c4d247a06d9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15905
diff changeset
  9139
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9140
truncateSelectedFilesToZeroSize
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9141
    |selectedFiles numFiles msg|
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9142
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9143
    selectedFiles := self currentSelectedObjects.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9144
    (numFiles := selectedFiles size) == 0 ifTrue:[^ self].
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9145
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9146
    msg := 'Really truncate file ''%2'' to zero length ?\\WARNING: contents of file is lost !!\This cannot be undone.'.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9147
    numFiles > 1 ifTrue:[
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9148
        msg := 'Really truncate %1 files to zero length ?\\WARNING: contents of files is lost !!\This cannot be undone.'.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9149
    ].
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9150
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9151
    (Dialog 
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9152
        confirm:(resources stringWithCRs:msg with:numFiles with:selectedFiles first baseName allBold)
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9153
        initialAnswer:false
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9154
    ) ifFalse:[
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9155
        ^ self
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9156
    ].
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9157
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9158
    selectedFiles do:[:fileName |
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9159
        |s|
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9160
18453
e20ac933ee00 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18433
diff changeset
  9161
        fileName isRegularFile ifTrue:[
e20ac933ee00 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18433
diff changeset
  9162
            self notify:('Truncating:',  fileName baseName).
15211
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9163
            [
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9164
                s := fileName writeStream.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9165
                s close.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9166
            ] on:FileStream openErrorSignal do:[:ex|
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9167
                self warn:('Cannot truncate "%1".' bindWith:fileName baseName allBold).
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9168
            ].
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9169
        ]
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9170
    ].
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9171
    self notify:nil.
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9172
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9173
    "Modified: / 04-12-2006 / 13:15:28 / cg"
56568f030d10 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15210
diff changeset
  9174
! !
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9175
4849
ad567cb531d1 cvs-add binary
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  9176
!AbstractFileBrowser methodsFor:'menu queries-tools'!
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9177
321c1729db5b initial checkin
penk
parents:
diff changeset
  9178
anySTFilesPresent
321c1729db5b initial checkin
penk
parents:
diff changeset
  9179
    ^ self anyFilesPresentWithSuffix:'st'
321c1729db5b initial checkin
penk
parents:
diff changeset
  9180
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9181
321c1729db5b initial checkin
penk
parents:
diff changeset
  9182
canCreateNewProject
321c1729db5b initial checkin
penk
parents:
diff changeset
  9183
    self currentFilesAreInSameDirectory ifFalse:[^ false].
17865
30a8ebe0a1a5 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17849
diff changeset
  9184
    ^ self currentSelectedFiles 
30a8ebe0a1a5 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17849
diff changeset
  9185
        contains:[:fileName| 
30a8ebe0a1a5 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17849
diff changeset
  9186
            | suffix|
30a8ebe0a1a5 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17849
diff changeset
  9187
            suffix := fileName suffix asLowercase.
30a8ebe0a1a5 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17849
diff changeset
  9188
            (suffix = 'prj' or:[suffix = 'st'])
30a8ebe0a1a5 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17849
diff changeset
  9189
        ]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9190
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9191
321c1729db5b initial checkin
penk
parents:
diff changeset
  9192
canDoTerminal
321c1729db5b initial checkin
penk
parents:
diff changeset
  9193
321c1729db5b initial checkin
penk
parents:
diff changeset
  9194
    ^ OperatingSystem isUNIXlike
321c1729db5b initial checkin
penk
parents:
diff changeset
  9195
      or:[OperatingSystem isMSWINDOWSlike]
321c1729db5b initial checkin
penk
parents:
diff changeset
  9196
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9197
321c1729db5b initial checkin
penk
parents:
diff changeset
  9198
canDoTerminalAndSystemIsDOS
321c1729db5b initial checkin
penk
parents:
diff changeset
  9199
321c1729db5b initial checkin
penk
parents:
diff changeset
  9200
    ^ self canDoTerminal and:[OperatingSystem isMSWINDOWSlike]
321c1729db5b initial checkin
penk
parents:
diff changeset
  9201
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9202
321c1729db5b initial checkin
penk
parents:
diff changeset
  9203
canDoTerminalAndSystemIsUnix
321c1729db5b initial checkin
penk
parents:
diff changeset
  9204
321c1729db5b initial checkin
penk
parents:
diff changeset
  9205
    ^ self canDoTerminal and:[OperatingSystem isUNIXlike]
321c1729db5b initial checkin
penk
parents:
diff changeset
  9206
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9207
8640
fe2bc358dec4 added generateSignatureFile to tools-menu
Claus Gittinger <cg@exept.de>
parents: 8617
diff changeset
  9208
canGenerateSignatureFiles
8645
00e4d07c6d6d Generate signed expecco patch files
Stefan Vogel <sv@exept.de>
parents: 8641
diff changeset
  9209
    "we need the both the KeyFileGenerator (for the secret expecco key) and the KeyFile"
8640
fe2bc358dec4 added generateSignatureFile to tools-menu
Claus Gittinger <cg@exept.de>
parents: 8617
diff changeset
  9210
fe2bc358dec4 added generateSignatureFile to tools-menu
Claus Gittinger <cg@exept.de>
parents: 8617
diff changeset
  9211
    Expecco::KeyFileGenerator isNil ifTrue:[ ^ false ].
fe2bc358dec4 added generateSignatureFile to tools-menu
Claus Gittinger <cg@exept.de>
parents: 8617
diff changeset
  9212
    Expecco::KeyFile isNil ifTrue:[ ^ false ].
fe2bc358dec4 added generateSignatureFile to tools-menu
Claus Gittinger <cg@exept.de>
parents: 8617
diff changeset
  9213
8645
00e4d07c6d6d Generate signed expecco patch files
Stefan Vogel <sv@exept.de>
parents: 8641
diff changeset
  9214
    ^ self currentSelectedFiles notEmptyOrNil
8640
fe2bc358dec4 added generateSignatureFile to tools-menu
Claus Gittinger <cg@exept.de>
parents: 8617
diff changeset
  9215
!
fe2bc358dec4 added generateSignatureFile to tools-menu
Claus Gittinger <cg@exept.de>
parents: 8617
diff changeset
  9216
12811
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  9217
canOpenMonticelloBrowser
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  9218
    ^ self currentSelectedFiles
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  9219
        contains:[:fileName|
18746
a12a52c66c53 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18734
diff changeset
  9220
            fileName suffix sameAs:'mcz'
12811
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  9221
        ]
18746
a12a52c66c53 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18734
diff changeset
  9222
a12a52c66c53 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18734
diff changeset
  9223
    "Modified: / 01-05-2019 / 11:21:16 / Claus Gittinger"
12811
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  9224
!
ffdf97bbca6e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12777
diff changeset
  9225
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9226
canReadAbbrevFile
321c1729db5b initial checkin
penk
parents:
diff changeset
  9227
5960
aa171aa05bab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5959
diff changeset
  9228
    |currentDirectory|
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9229
321c1729db5b initial checkin
penk
parents:
diff changeset
  9230
    self currentFilesAreInSameDirectory ifFalse:[^ false].
5960
aa171aa05bab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5959
diff changeset
  9231
    currentDirectory := self currentDirectory.
aa171aa05bab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5959
diff changeset
  9232
    ^ currentDirectory notNil 
aa171aa05bab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5959
diff changeset
  9233
      and:[ (currentDirectory construct:'abbrev.stc') exists ]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9234
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9235
321c1729db5b initial checkin
penk
parents:
diff changeset
  9236
canRemoveFromSourcePath
321c1729db5b initial checkin
penk
parents:
diff changeset
  9237
321c1729db5b initial checkin
penk
parents:
diff changeset
  9238
    ^ false
321c1729db5b initial checkin
penk
parents:
diff changeset
  9239
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9240
13089
70766b1c3b0d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13011
diff changeset
  9241
cannotGenerateSignatureFiles
70766b1c3b0d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13011
diff changeset
  9242
    ^ self canGenerateSignatureFiles not
70766b1c3b0d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13011
diff changeset
  9243
!
70766b1c3b0d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 13011
diff changeset
  9244
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9245
hasASN1
321c1729db5b initial checkin
penk
parents:
diff changeset
  9246
    ^ [ OSI::ASN1Parser notNil 
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9247
        and:[OSI::ASN1Parser isLoaded]]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9248
321c1729db5b initial checkin
penk
parents:
diff changeset
  9249
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9250
321c1729db5b initial checkin
penk
parents:
diff changeset
  9251
hasASN1AndSelection
321c1729db5b initial checkin
penk
parents:
diff changeset
  9252
    ^ [ self hasSelection value 
17416
ccd3335a762a #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17413
diff changeset
  9253
        and:[self currentSelectedFiles notEmptyOrNil
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9254
        and:[OSI::ASN1Parser notNil 
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9255
        and:[OSI::ASN1Parser isLoaded]]]]
17416
ccd3335a762a #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17413
diff changeset
  9256
ccd3335a762a #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17413
diff changeset
  9257
    "Modified: / 17-02-2017 / 08:25:09 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9258
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9259
321c1729db5b initial checkin
penk
parents:
diff changeset
  9260
hasCBrowser
321c1729db5b initial checkin
penk
parents:
diff changeset
  9261
    ^ [ CBrowser::Browser notNil ]
321c1729db5b initial checkin
penk
parents:
diff changeset
  9262
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9263
321c1729db5b initial checkin
penk
parents:
diff changeset
  9264
hasJava
321c1729db5b initial checkin
penk
parents:
diff changeset
  9265
14298
dbcceba5f47e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14262
diff changeset
  9266
    ^ [ JavaVM notNil 
dbcceba5f47e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14262
diff changeset
  9267
        and:[JavaClassReader notNil 
dbcceba5f47e class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14262
diff changeset
  9268
        and:[JavaClassReader isLoaded]]]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9269
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9270
321c1729db5b initial checkin
penk
parents:
diff changeset
  9271
hasJavaAndSelection
321c1729db5b initial checkin
penk
parents:
diff changeset
  9272
12871
74bdca95981d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12858
diff changeset
  9273
    ^ [ self currentSelectedFiles notEmptyOrNil
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9274
        and:[JavaClassReader notNil 
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9275
        and:[JavaClassReader isLoaded]]]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9276
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9277
321c1729db5b initial checkin
penk
parents:
diff changeset
  9278
hasMP3Player
321c1729db5b initial checkin
penk
parents:
diff changeset
  9279
321c1729db5b initial checkin
penk
parents:
diff changeset
  9280
    ^ [ MP3PlayerApplication notNil
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9281
        or:[SaugFix::MP3PlayerApplication notNil ]]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9282
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9283
321c1729db5b initial checkin
penk
parents:
diff changeset
  9284
hasMP3PlayerAndSelection
321c1729db5b initial checkin
penk
parents:
diff changeset
  9285
12871
74bdca95981d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12858
diff changeset
  9286
    ^ [ self currentSelectedFiles notEmptyOrNil
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9287
        and:[ self hasMP3Player value]]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9288
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9289
8426
3adb5c1f5a70 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8364
diff changeset
  9290
hasResourceFileSelected
12871
74bdca95981d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12858
diff changeset
  9291
    ^ (self currentSelectedFiles) 
74bdca95981d class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12858
diff changeset
  9292
        contains:[:fn | 
18746
a12a52c66c53 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18734
diff changeset
  9293
            fn suffix sameAs:'rs'
a12a52c66c53 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18734
diff changeset
  9294
        ].
a12a52c66c53 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18734
diff changeset
  9295
a12a52c66c53 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18734
diff changeset
  9296
    "Modified: / 01-05-2019 / 11:23:30 / Claus Gittinger"
8426
3adb5c1f5a70 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8364
diff changeset
  9297
!
3adb5c1f5a70 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8364
diff changeset
  9298
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9299
hasSlideShow
321c1729db5b initial checkin
penk
parents:
diff changeset
  9300
321c1729db5b initial checkin
penk
parents:
diff changeset
  9301
    ^ [CodingExamples_GUI::SlideShow notNil]
321c1729db5b initial checkin
penk
parents:
diff changeset
  9302
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9303
321c1729db5b initial checkin
penk
parents:
diff changeset
  9304
hasSnapshotSelection
321c1729db5b initial checkin
penk
parents:
diff changeset
  9305
321c1729db5b initial checkin
penk
parents:
diff changeset
  9306
    ^ [ 
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9307
        | files |
8426
3adb5c1f5a70 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8364
diff changeset
  9308
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9309
        files := self currentSelectedFiles.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9310
        ((files size == 1)
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9311
        and:[ files first hasSuffix:'img' ])
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9312
      ]
321c1729db5b initial checkin
penk
parents:
diff changeset
  9313
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9314
7869
eeb3c47f1c62 Menu entry to parse XML file
Stefan Vogel <sv@exept.de>
parents: 7841
diff changeset
  9315
hasXml
9206
7ed728324dbf changed: #hasXml
Claus Gittinger <cg@exept.de>
parents: 9173
diff changeset
  9316
    ^ [ XML::XMLParser notNil ]
7869
eeb3c47f1c62 Menu entry to parse XML file
Stefan Vogel <sv@exept.de>
parents: 7841
diff changeset
  9317
!
eeb3c47f1c62 Menu entry to parse XML file
Stefan Vogel <sv@exept.de>
parents: 7841
diff changeset
  9318
eeb3c47f1c62 Menu entry to parse XML file
Stefan Vogel <sv@exept.de>
parents: 7841
diff changeset
  9319
hasXmlFileSelected
8611
3d979ab577b7 xml-inspector always enabled.
Claus Gittinger <cg@exept.de>
parents: 8601
diff changeset
  9320
    "/ cg - no longer use this to enable XML-inspector (always enabled).
3d979ab577b7 xml-inspector always enabled.
Claus Gittinger <cg@exept.de>
parents: 8601
diff changeset
  9321
    "/ then handle the error when it ever fails during xml-parsing.
7869
eeb3c47f1c62 Menu entry to parse XML file
Stefan Vogel <sv@exept.de>
parents: 7841
diff changeset
  9322
8426
3adb5c1f5a70 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8364
diff changeset
  9323
    ^ [
3adb5c1f5a70 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8364
diff changeset
  9324
        |sel fileName|
7869
eeb3c47f1c62 Menu entry to parse XML file
Stefan Vogel <sv@exept.de>
parents: 7841
diff changeset
  9325
eeb3c47f1c62 Menu entry to parse XML file
Stefan Vogel <sv@exept.de>
parents: 7841
diff changeset
  9326
        sel := self currentSelectedFiles.
eeb3c47f1c62 Menu entry to parse XML file
Stefan Vogel <sv@exept.de>
parents: 7841
diff changeset
  9327
        sel size == 1 ifTrue:[
eeb3c47f1c62 Menu entry to parse XML file
Stefan Vogel <sv@exept.de>
parents: 7841
diff changeset
  9328
            fileName := sel first.
eeb3c47f1c62 Menu entry to parse XML file
Stefan Vogel <sv@exept.de>
parents: 7841
diff changeset
  9329
            fileName notNil ifTrue:[
15936
4d0368c047f5 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 15915
diff changeset
  9330
                #('xml' 'xsd' 'vdx') includes:fileName suffix asLowercase
7869
eeb3c47f1c62 Menu entry to parse XML file
Stefan Vogel <sv@exept.de>
parents: 7841
diff changeset
  9331
            ] ifFalse:[
eeb3c47f1c62 Menu entry to parse XML file
Stefan Vogel <sv@exept.de>
parents: 7841
diff changeset
  9332
                false
eeb3c47f1c62 Menu entry to parse XML file
Stefan Vogel <sv@exept.de>
parents: 7841
diff changeset
  9333
            ]
eeb3c47f1c62 Menu entry to parse XML file
Stefan Vogel <sv@exept.de>
parents: 7841
diff changeset
  9334
        ] ifFalse:[
eeb3c47f1c62 Menu entry to parse XML file
Stefan Vogel <sv@exept.de>
parents: 7841
diff changeset
  9335
            false
eeb3c47f1c62 Menu entry to parse XML file
Stefan Vogel <sv@exept.de>
parents: 7841
diff changeset
  9336
        ]
eeb3c47f1c62 Menu entry to parse XML file
Stefan Vogel <sv@exept.de>
parents: 7841
diff changeset
  9337
      ]
eeb3c47f1c62 Menu entry to parse XML file
Stefan Vogel <sv@exept.de>
parents: 7841
diff changeset
  9338
!
eeb3c47f1c62 Menu entry to parse XML file
Stefan Vogel <sv@exept.de>
parents: 7841
diff changeset
  9339
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9340
hasZipFileSelected
17982
d8e7e6e78525 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17979
diff changeset
  9341
    |sel fileName suff mime|
9764
47b9c33465a1 added: #hasZipFileSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9752
diff changeset
  9342
47b9c33465a1 added: #hasZipFileSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9752
diff changeset
  9343
    sel := self currentSelectedFiles.
47b9c33465a1 added: #hasZipFileSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9752
diff changeset
  9344
    sel size == 1 ifFalse:[^ false].
47b9c33465a1 added: #hasZipFileSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9752
diff changeset
  9345
47b9c33465a1 added: #hasZipFileSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9752
diff changeset
  9346
    fileName := sel first.
47b9c33465a1 added: #hasZipFileSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9752
diff changeset
  9347
    fileName isNil ifTrue:[^ false].
47b9c33465a1 added: #hasZipFileSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9752
diff changeset
  9348
47b9c33465a1 added: #hasZipFileSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9752
diff changeset
  9349
    suff := fileName suffix asLowercase.
47b9c33465a1 added: #hasZipFileSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9752
diff changeset
  9350
    (suff = 'zip' or:[suff = 'jar']) ifTrue:[^ true].
47b9c33465a1 added: #hasZipFileSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9752
diff changeset
  9351
17982
d8e7e6e78525 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17979
diff changeset
  9352
    mime := fileName mimeTypeOfContents.
d8e7e6e78525 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17979
diff changeset
  9353
    "/ prepare for change (iana has obsoleted the x- types)
d8e7e6e78525 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17979
diff changeset
  9354
    ^ (mime = 'application/x-zip-compressed') or:[mime = 'application/zip']
9764
47b9c33465a1 added: #hasZipFileSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9752
diff changeset
  9355
47b9c33465a1 added: #hasZipFileSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9752
diff changeset
  9356
    "Modified: / 14-02-2011 / 17:17:03 / cg"
47b9c33465a1 added: #hasZipFileSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9752
diff changeset
  9357
!
47b9c33465a1 added: #hasZipFileSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9752
diff changeset
  9358
47b9c33465a1 added: #hasZipFileSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9752
diff changeset
  9359
hasZipFileSelectedHolder
47b9c33465a1 added: #hasZipFileSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9752
diff changeset
  9360
    ^ [ self hasZipFileSelected ]
47b9c33465a1 added: #hasZipFileSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9752
diff changeset
  9361
47b9c33465a1 added: #hasZipFileSelectedHolder
Claus Gittinger <cg@exept.de>
parents: 9752
diff changeset
  9362
    "Created: / 14-02-2011 / 17:16:08 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9363
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9364
321c1729db5b initial checkin
penk
parents:
diff changeset
  9365
javaSupportLoaded
321c1729db5b initial checkin
penk
parents:
diff changeset
  9366
321c1729db5b initial checkin
penk
parents:
diff changeset
  9367
    ^ false
321c1729db5b initial checkin
penk
parents:
diff changeset
  9368
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  9369
14126
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
  9370
454c06ae7055 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14049
diff changeset
  9371
3906
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9372
!AbstractFileBrowser methodsFor:'presentation'!
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9373
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9374
getModeString:modeBits
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9375
    "convert file-mode bits into a more user-friendly string.
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9376
     This is wrong here - should be moved into OperatingSystem."
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9377
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9378
    ^ self getModeString:modeBits 
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9379
                    with:#( 'owner:' $r $w $x 
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9380
                            ' group:' $r $w $x 
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9381
                            ' others:' $r $w $x )
3906
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9382
!
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9383
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9384
getModeString:modeBits with:texts
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9385
    "convert file-mode bits into a more user-friendly string.
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9386
     This is wrong here - should be moved into OperatingSystem."
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9387
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9388
    |bits modeString|
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9389
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9390
    bits := modeBits bitAnd:8r777.
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9391
    modeString := ''.
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9392
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9393
    #( nil 8r400 8r200 8r100 nil 8r040 8r020 8r010 nil 8r004 8r002 8r001 ) 
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9394
    with: texts do:[:bitMask :access |
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9395
        |ch|
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9396
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9397
        bitMask isNil ifTrue:[
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9398
            modeString := modeString , access
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9399
        ] ifFalse:[
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9400
            (bits bitAnd:bitMask) == 0 ifTrue:[
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9401
                ch := $-
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9402
            ] ifFalse:[
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9403
                ch := access
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9404
            ].
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9405
            modeString := modeString copyWith:ch 
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9406
        ]
3906
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9407
    ].
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9408
    ^ modeString
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9409
! !
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9410
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9411
!AbstractFileBrowser methodsFor:'private'!
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9412
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9413
theSingleSelectedDirectoryOrHomeDir
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9414
    |dir|
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9415
5888
f2758e87cb4f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5883
diff changeset
  9416
    dir := self theSingleSelectedDirectoryOrNil.
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9417
    dir isNil ifTrue:[ dir := Filename homeDirectory].
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9418
    ^ dir.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9419
!
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9420
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9421
theSingleSelectedDirectoryOrNil
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9422
    |dirs|
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9423
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9424
    dirs := self currentSelectedDirectories.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9425
    dirs size ~= 1 ifTrue:[ ^ nil].
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9426
    ^ dirs anElement.
14577
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  9427
!
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  9428
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  9429
theSingleSelectedFileOrNil
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  9430
    |dirs|
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  9431
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  9432
    dirs := self currentSelectedFiles.
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  9433
    dirs size ~= 1 ifTrue:[ ^ nil].
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  9434
    ^ dirs anElement.
18751
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9435
!
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9436
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9437
theSingleSelectedItemOrNil
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9438
    |items|
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9439
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9440
    items := self selectedItems.
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9441
    items size ~= 1 ifTrue:[ ^ nil].
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9442
    ^ items anElement.
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9443
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9444
    "Created: / 02-05-2019 / 18:53:06 / Claus Gittinger"
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9445
! !
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9446
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9447
!AbstractFileBrowser methodsFor:'queries'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9448
8256
eca8cc20d16c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8253
diff changeset
  9449
cBrowserLoaded
18432
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  9450
    ^ (Smalltalk at:#'CBrowser::Browser') notNil
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  9451
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  9452
    "Modified: / 26-09-2018 / 12:06:32 / Claus Gittinger"
8256
eca8cc20d16c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8253
diff changeset
  9453
!
eca8cc20d16c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8253
diff changeset
  9454
10747
aa57b76e8318 added: #cBrowserMenuItemVisible
Claus Gittinger <cg@exept.de>
parents: 10678
diff changeset
  9455
cBrowserMenuItemVisible
aa57b76e8318 added: #cBrowserMenuItemVisible
Claus Gittinger <cg@exept.de>
parents: 10678
diff changeset
  9456
    ^ self cBrowserLoaded or:[ OperatingSystem getLoginName = 'cg' ]
aa57b76e8318 added: #cBrowserMenuItemVisible
Claus Gittinger <cg@exept.de>
parents: 10678
diff changeset
  9457
aa57b76e8318 added: #cBrowserMenuItemVisible
Claus Gittinger <cg@exept.de>
parents: 10678
diff changeset
  9458
    "Created: / 04-10-2011 / 13:40:38 / cg"
aa57b76e8318 added: #cBrowserMenuItemVisible
Claus Gittinger <cg@exept.de>
parents: 10678
diff changeset
  9459
!
aa57b76e8318 added: #cBrowserMenuItemVisible
Claus Gittinger <cg@exept.de>
parents: 10678
diff changeset
  9460
5334
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  9461
getAllFilesAsStrings
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  9462
    "raise an error: must be redefined in concrete subclass(es)"
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  9463
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  9464
    ^ self subclassResponsibility
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  9465
!
637f49d94b1b move file(s) operation added
Claus Gittinger <cg@exept.de>
parents: 5318
diff changeset
  9466
3906
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9467
getFileInfoStringForFirstSelectedFile:longInfo
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9468
    "get stat info on selected file - return a string which can be
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9469
     shown in a box"
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9470
5973
0baf6c6b685f #linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents: 5971
diff changeset
  9471
    |selFiles filename fileOutput modeBits modeString s info
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  9472
     sizeString fileSize tAccess tModification buffer|
3906
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9473
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  9474
    selFiles := self currentSelectedObjects.
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  9475
    selFiles size ~~ 1 ifTrue:[ ^ nil].
3906
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9476
    filename := selFiles first.
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9477
8364
29410508a0f5 show the alternative name in the property box
ca
parents: 8355
diff changeset
  9478
    info := filename linkInfo.
9111
4566dd920e09 changes for better FileDialog
Claus Gittinger <cg@exept.de>
parents: 9108
diff changeset
  9479
    info isNil ifTrue:[
4566dd920e09 changes for better FileDialog
Claus Gittinger <cg@exept.de>
parents: 9108
diff changeset
  9480
        ^ 'Cannot get fileInfo'.
4566dd920e09 changes for better FileDialog
Claus Gittinger <cg@exept.de>
parents: 9108
diff changeset
  9481
        ^ nil
4566dd920e09 changes for better FileDialog
Claus Gittinger <cg@exept.de>
parents: 9108
diff changeset
  9482
    ].
8364
29410508a0f5 show the alternative name in the property box
ca
parents: 8355
diff changeset
  9483
5755
5e8165d55605 replaced '' writeStream by String writeStream
Claus Gittinger <cg@exept.de>
parents: 5753
diff changeset
  9484
    buffer := Text writeStream.
4765
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9485
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9486
    buffer 
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9487
        nextPutAll:'filename: '; 
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9488
        nextPutLine:filename asString.
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9489
8364
29410508a0f5 show the alternative name in the property box
ca
parents: 8355
diff changeset
  9490
    OperatingSystem isMSDOSlike ifTrue: [
29410508a0f5 show the alternative name in the property box
ca
parents: 8355
diff changeset
  9491
        (info alternativeName notNil
29410508a0f5 show the alternative name in the property box
ca
parents: 8355
diff changeset
  9492
        and:[ info alternativeName ~= info fullName ]) ifTrue:[
29410508a0f5 show the alternative name in the property box
ca
parents: 8355
diff changeset
  9493
            buffer nextPutAll:'shortname: '.
29410508a0f5 show the alternative name in the property box
ca
parents: 8355
diff changeset
  9494
            buffer nextPutLine:info alternativeName.
29410508a0f5 show the alternative name in the property box
ca
parents: 8355
diff changeset
  9495
        ]
29410508a0f5 show the alternative name in the property box
ca
parents: 8355
diff changeset
  9496
    ].
29410508a0f5 show the alternative name in the property box
ca
parents: 8355
diff changeset
  9497
5360
1f2f874c8c9a avoid blocking on mounted directories;
Claus Gittinger <cg@exept.de>
parents: 5356
diff changeset
  9498
    buffer nextPutAll:'type:   '.
5973
0baf6c6b685f #linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents: 5971
diff changeset
  9499
    info isSymbolicLink ifTrue:[
0baf6c6b685f #linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents: 5971
diff changeset
  9500
        filename exists ifFalse:[
5360
1f2f874c8c9a avoid blocking on mounted directories;
Claus Gittinger <cg@exept.de>
parents: 5356
diff changeset
  9501
            buffer nextPutAll:'broken '.
1f2f874c8c9a avoid blocking on mounted directories;
Claus Gittinger <cg@exept.de>
parents: 5356
diff changeset
  9502
        ].
4765
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9503
        buffer 
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9504
            nextPutAll:'symbolic link to: ';
7633
0a85c590f98f ignore nil-return from get link name (for broken links)
Claus Gittinger <cg@exept.de>
parents: 7585
diff changeset
  9505
            nextPutLine:(info path ? '???').
3906
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9506
    ] ifFalse:[
5973
0baf6c6b685f #linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents: 5971
diff changeset
  9507
        (longInfo and:[info isRegular]) ifTrue:[
5360
1f2f874c8c9a avoid blocking on mounted directories;
Claus Gittinger <cg@exept.de>
parents: 5356
diff changeset
  9508
            fileOutput := filename fileType.
1f2f874c8c9a avoid blocking on mounted directories;
Claus Gittinger <cg@exept.de>
parents: 5356
diff changeset
  9509
        ].
1f2f874c8c9a avoid blocking on mounted directories;
Claus Gittinger <cg@exept.de>
parents: 5356
diff changeset
  9510
1f2f874c8c9a avoid blocking on mounted directories;
Claus Gittinger <cg@exept.de>
parents: 5356
diff changeset
  9511
        fileOutput isNil ifTrue:[
5973
0baf6c6b685f #linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents: 5971
diff changeset
  9512
            s := info type asString
5360
1f2f874c8c9a avoid blocking on mounted directories;
Claus Gittinger <cg@exept.de>
parents: 5356
diff changeset
  9513
        ] ifFalse:[
1f2f874c8c9a avoid blocking on mounted directories;
Claus Gittinger <cg@exept.de>
parents: 5356
diff changeset
  9514
            s := 'regular (' , fileOutput , ')'
1f2f874c8c9a avoid blocking on mounted directories;
Claus Gittinger <cg@exept.de>
parents: 5356
diff changeset
  9515
        ].
1f2f874c8c9a avoid blocking on mounted directories;
Claus Gittinger <cg@exept.de>
parents: 5356
diff changeset
  9516
        buffer nextPutLine:s.
1f2f874c8c9a avoid blocking on mounted directories;
Claus Gittinger <cg@exept.de>
parents: 5356
diff changeset
  9517
    ].
1f2f874c8c9a avoid blocking on mounted directories;
Claus Gittinger <cg@exept.de>
parents: 5356
diff changeset
  9518
4707
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  9519
    fileSize := info fileSize.
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  9520
    sizeString := 'size:   ', fileSize printString.
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  9521
    longInfo ifTrue:[
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  9522
        fileSize > 1024  ifTrue:[
8172
71054e80bac7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8168
diff changeset
  9523
            sizeString := sizeString,' (',(UnitConverter fileSizeStringFor:fileSize),')'.
4707
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  9524
        ].
e0a527ba0898 show Kb & Mb based on 1024 bytes per kilo
Claus Gittinger <cg@exept.de>
parents: 4692
diff changeset
  9525
    ].
4765
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9526
    buffer nextPutLine:sizeString.
3906
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9527
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9528
    modeBits := info mode.
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9529
    modeString := self getModeString:modeBits.
4765
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9530
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9531
    buffer nextPutAll:'access: '; nextPutAll:modeString.
3906
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9532
    longInfo ifTrue:[
5973
0baf6c6b685f #linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents: 5971
diff changeset
  9533
        buffer nextPutAll:' ('; nextPutAll:(modeBits printStringRadix:8); nextPut:$).
3906
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9534
    ].
4765
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9535
    buffer
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9536
        cr;
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9537
        nextPutAll:'owner:  ';
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9538
        nextPutLine:(OperatingSystem getUserNameFromID:(info uid)).
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9539
3906
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9540
    longInfo ifTrue:[
4765
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9541
        buffer 
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9542
            nextPutAll:'group:  ';
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9543
            nextPutLine:(OperatingSystem getGroupNameFromID:(info gid)).
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9544
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9545
        tAccess := info accessTime.
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9546
        buffer 
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9547
            nextPutAll:'last access:       '; 
5973
0baf6c6b685f #linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents: 5971
diff changeset
  9548
            nextPutAll:tAccess asDate printString; 
4765
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9549
            space;
5973
0baf6c6b685f #linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents: 5971
diff changeset
  9550
            nextPutLine:tAccess asTime printString.
4765
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9551
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9552
        tModification := info modificationTime.
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9553
        buffer 
5973
0baf6c6b685f #linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents: 5971
diff changeset
  9554
            nextPutAll:'last modification: '; 
0baf6c6b685f #linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents: 5971
diff changeset
  9555
            nextPutAll:tModification asDate printString; 
4765
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9556
            space;
5973
0baf6c6b685f #linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents: 5971
diff changeset
  9557
            nextPutLine:tModification asTime printString.
3906
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9558
    ].
4765
da557dd8bf69 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  9559
    ^ buffer contents
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  9560
7633
0a85c590f98f ignore nil-return from get link name (for broken links)
Claus Gittinger <cg@exept.de>
parents: 7585
diff changeset
  9561
    "Modified: / 07-02-2007 / 10:38:14 / cg"
3906
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9562
!
8a76cb4f5884 next stage
penk
parents: 3892
diff changeset
  9563
8510
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  9564
hasImageColorHistogram
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  9565
    ^ ImageColorHistogram notNil
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  9566
!
a21c9accd3cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8490
diff changeset
  9567
17686
c6fc2da19287 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17582
diff changeset
  9568
hasImageHistogram
c6fc2da19287 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17582
diff changeset
  9569
    ^ ImageAlgorithms notNil
c6fc2da19287 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17582
diff changeset
  9570
c6fc2da19287 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17582
diff changeset
  9571
    "Created: / 10-09-2017 / 16:50:34 / cg"
c6fc2da19287 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17582
diff changeset
  9572
!
c6fc2da19287 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17582
diff changeset
  9573
10258
7d2454c716de Merged with JV's branch
vrany
parents: 9945
diff changeset
  9574
hasSubversionSupport
11156
11c0b4cbc836 Use Configurable includesFeature:#Feature instead of direct send of #hasFeature
vrany
parents: 11149
diff changeset
  9575
    ^ ConfigurableFeatures includesFeature: #SubversionSupport
10258
7d2454c716de Merged with JV's branch
vrany
parents: 9945
diff changeset
  9576
7d2454c716de Merged with JV's branch
vrany
parents: 9945
diff changeset
  9577
    "Created: / 24-06-2010 / 19:59:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10678
3a574f143d8f changed: #hasSubversionSupport
Claus Gittinger <cg@exept.de>
parents: 10669
diff changeset
  9578
    "Modified: / 07-09-2011 / 10:41:19 / cg"
11156
11c0b4cbc836 Use Configurable includesFeature:#Feature instead of direct send of #hasFeature
vrany
parents: 11149
diff changeset
  9579
    "Modified: / 19-01-2012 / 10:43:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10258
7d2454c716de Merged with JV's branch
vrany
parents: 9945
diff changeset
  9580
!
7d2454c716de Merged with JV's branch
vrany
parents: 9945
diff changeset
  9581
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9582
initialCommandFor:fileName into:aBox
321c1729db5b initial checkin
penk
parents:
diff changeset
  9583
    "set a useful initial command for execute box."
321c1729db5b initial checkin
penk
parents:
diff changeset
  9584
18734
ffbafcfcccf1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 18666
diff changeset
  9585
    self class 
ffbafcfcccf1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 18666
diff changeset
  9586
        initialCommandFor:fileName 
ffbafcfcccf1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 18666
diff changeset
  9587
        in:self "Filename" currentDirectory 
ffbafcfcccf1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 18666
diff changeset
  9588
        intoBox:aBox
ffbafcfcccf1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 18666
diff changeset
  9589
ffbafcfcccf1 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 18666
diff changeset
  9590
    "Modified: / 10-04-2019 / 05:55:21 / Claus Gittinger"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9591
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9592
321c1729db5b initial checkin
penk
parents:
diff changeset
  9593
isAbstractFileBrowser
321c1729db5b initial checkin
penk
parents:
diff changeset
  9594
321c1729db5b initial checkin
penk
parents:
diff changeset
  9595
    ^ true
321c1729db5b initial checkin
penk
parents:
diff changeset
  9596
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9597
18432
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  9598
stxgdbLoaded
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  9599
    ^ (Smalltalk at:#GDBApplication) notNil
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  9600
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  9601
    "Created: / 26-09-2018 / 12:06:23 / Claus Gittinger"
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  9602
!
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  9603
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  9604
stxgdbMenuItemVisible
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  9605
    ^ self stxgdbLoaded or:[ OperatingSystem getLoginName = 'cg' ]
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  9606
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  9607
    "Created: / 26-09-2018 / 12:05:45 / Claus Gittinger"
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  9608
!
cd3ec19afe61 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18426
diff changeset
  9609
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9610
systemIsDOS
321c1729db5b initial checkin
penk
parents:
diff changeset
  9611
    ^ OperatingSystem isMSDOSlike
321c1729db5b initial checkin
penk
parents:
diff changeset
  9612
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9613
12473
cbdb0b046e1b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12426
diff changeset
  9614
systemIsOSX
cbdb0b046e1b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12426
diff changeset
  9615
    ^ OperatingSystem isOSXlike
cbdb0b046e1b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12426
diff changeset
  9616
!
cbdb0b046e1b class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12426
diff changeset
  9617
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9618
systemIsUnix
321c1729db5b initial checkin
penk
parents:
diff changeset
  9619
    ^ OperatingSystem isUNIXlike
14980
1c752103f217 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14941
diff changeset
  9620
!
1c752103f217 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14941
diff changeset
  9621
1c752103f217 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14941
diff changeset
  9622
systemSupportsVolumes
1c752103f217 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14941
diff changeset
  9623
    ^ OperatingSystem supportsVolumes
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9624
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  9625
321c1729db5b initial checkin
penk
parents:
diff changeset
  9626
!AbstractFileBrowser methodsFor:'queries-file'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9627
321c1729db5b initial checkin
penk
parents:
diff changeset
  9628
allItemsOfCurrentDirectory
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  9629
    self 
4774
5119967dbd89 code cleanup
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  9630
        applicationNamed:#DirectoryContentsBrowser 
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  9631
        ifPresentDo:[:app | ^ app allItemsOfCurrentDirectory].
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  9632
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  9633
    ^ nil
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9634
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9635
321c1729db5b initial checkin
penk
parents:
diff changeset
  9636
anyFilesPresentWithSuffix:suffix
6725
3885523e54b8 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6708
diff changeset
  9637
    self currentSelectedDirectories do:[:dir|
4636
08b2b63e3107 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 4629
diff changeset
  9638
        [
5810
4661bf4c3bbf openErrorSignal arg: always a string
Claus Gittinger <cg@exept.de>
parents: 5789
diff changeset
  9639
            (dir directoryContentsAsFilenamesDo:[:fn | (fn suffix = suffix) ifTrue:[ ^ true]])
4636
08b2b63e3107 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 4629
diff changeset
  9640
        ] on:FileStream openErrorSignal do:[:ex|].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9641
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  9642
    ^ false.
321c1729db5b initial checkin
penk
parents:
diff changeset
  9643
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9644
19009
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  9645
commonPrefixOfFiles:files
19015
96720958ca7c #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 19009
diff changeset
  9646
    |stringCol commonPrefix|
19009
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  9647
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  9648
    stringCol := files collect:#asString.
19015
96720958ca7c #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 19009
diff changeset
  9649
    stringCol do:[:el|
96720958ca7c #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 19009
diff changeset
  9650
         commonPrefix := commonPrefix isNil 
96720958ca7c #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 19009
diff changeset
  9651
                            ifTrue:[el] 
96720958ca7c #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 19009
diff changeset
  9652
                            ifFalse:[commonPrefix commonPrefixWith:el].
96720958ca7c #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 19009
diff changeset
  9653
    ].
96720958ca7c #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 19009
diff changeset
  9654
    commonPrefix isNil ifTrue:[^ nil].
96720958ca7c #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 19009
diff changeset
  9655
    ^ commonPrefix asFilename
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  9656
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  9657
    "Modified: / 04-12-2006 / 13:14:25 / cg"
4771
9290fdb65a5d #getCommonForCurrentFiles renamed to #commonPrefixOfSelectedFiles
Claus Gittinger <cg@exept.de>
parents: 4769
diff changeset
  9658
!
9290fdb65a5d #getCommonForCurrentFiles renamed to #commonPrefixOfSelectedFiles
Claus Gittinger <cg@exept.de>
parents: 4769
diff changeset
  9659
19009
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  9660
commonPrefixOfSelectedFiles
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  9661
    |selFiles|
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  9662
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  9663
    selFiles := self currentSelectedObjects.
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  9664
    selFiles isEmpty ifTrue:[^ nil].
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  9665
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  9666
    ^ self commonPrefixOfFiles:selFiles
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  9667
!
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  9668
12481
8cff01f9f552 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12473
diff changeset
  9669
compressTabsOnSave
8cff01f9f552 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12473
diff changeset
  9670
    "if true, compress leading spaces (multiples of 8) with a tab character
8cff01f9f552 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12473
diff changeset
  9671
     when saving.
8cff01f9f552 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12473
diff changeset
  9672
     Default is true"
8cff01f9f552 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12473
diff changeset
  9673
8cff01f9f552 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12473
diff changeset
  9674
    ^ true
8cff01f9f552 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12473
diff changeset
  9675
!
8cff01f9f552 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12473
diff changeset
  9676
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9677
currentFilesAreInSameDirectory
321c1729db5b initial checkin
penk
parents:
diff changeset
  9678
4881
e6fc72aac6e6 multiple select allowed in DirectoryTreeBrowser some changes in DirectoryContentsBrowser
penk
parents: 4880
diff changeset
  9679
    ^ self parentDirectoriesOfCurrentFiles size < 2
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9680
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9681
321c1729db5b initial checkin
penk
parents:
diff changeset
  9682
currentFilesHasDirectories
321c1729db5b initial checkin
penk
parents:
diff changeset
  9683
6725
3885523e54b8 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6708
diff changeset
  9684
    ^ self currentSelectedDirectories notEmpty.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9685
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9686
3982
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  9687
directoriesForFiles:aFileCol
19009
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  9688
     ^ aFileCol collect:[:eachName| self class getDirectoryOf:eachName] as:Set.
3982
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  9689
!
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  9690
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9691
fileListIsEmpty
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  9692
    self 
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  9693
        applicationNamed:#DirectoryContentsBrowser 
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  9694
        ifPresentDo:[:appl | ^ appl fileListIsEmpty].
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  9695
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  9696
    ^ nil.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9697
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9698
321c1729db5b initial checkin
penk
parents:
diff changeset
  9699
fileListIsNotEmpty
321c1729db5b initial checkin
penk
parents:
diff changeset
  9700
321c1729db5b initial checkin
penk
parents:
diff changeset
  9701
    ^ self fileListIsEmpty not.   
321c1729db5b initial checkin
penk
parents:
diff changeset
  9702
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9703
321c1729db5b initial checkin
penk
parents:
diff changeset
  9704
fileName:aFilename1 startsWith:aFilename2
6284
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  9705
    " check if aFilename2 is a prefix of aFilename1"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9706
321c1729db5b initial checkin
penk
parents:
diff changeset
  9707
    | file1 file2 |
321c1729db5b initial checkin
penk
parents:
diff changeset
  9708
6284
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  9709
    (aFilename2 isNil or:[aFilename1 isNil]) ifTrue:[ ^ false].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9710
    file1 := aFilename1 asFilename.
321c1729db5b initial checkin
penk
parents:
diff changeset
  9711
    file2 := aFilename2 asFilename.
6284
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  9712
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9713
    file2 isRootDirectory ifTrue:[ ^ true].
6284
cf7d9fccade1 comments
Claus Gittinger <cg@exept.de>
parents: 6281
diff changeset
  9714
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9715
    ((file1 isDirectory) 
321c1729db5b initial checkin
penk
parents:
diff changeset
  9716
    and:[(file2 isDirectory)
321c1729db5b initial checkin
penk
parents:
diff changeset
  9717
    and:[file1 directory = file2 directory]]) ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9718
        ^ file1 baseName = file2 baseName
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9719
    ].
3982
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  9720
    ^ (file1 pathName) startsWith:(file2 pathName)
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9721
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9722
321c1729db5b initial checkin
penk
parents:
diff changeset
  9723
getAllFilesAsStringCollection
5009
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  9724
    self 
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  9725
        applicationNamed:#DirectoryContentsBrowser 
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  9726
        ifPresentDo:[:appl | ^ appl getAllFilesAsStringCollection].
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  9727
badffb8e7d06 code cleanup
Claus Gittinger <cg@exept.de>
parents: 5003
diff changeset
  9728
    ^ nil
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9729
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9730
321c1729db5b initial checkin
penk
parents:
diff changeset
  9731
getBestDirectory
17868
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  9732
    "from a set of directories, return the common parent directory"
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  9733
fa8c5a7bef99 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17865
diff changeset
  9734
    ^ self class getBestDirectoryFrom:(self currentSelectedDirectories)
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9735
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9736
321c1729db5b initial checkin
penk
parents:
diff changeset
  9737
getDirWithoutFileName:aFileName
19009
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  9738
    <resource: #obsolete>
04d1833bcd6e #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 19001
diff changeset
  9739
    ^ self class getDirectoryOf:aFileName
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9740
!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9741
321c1729db5b initial checkin
penk
parents:
diff changeset
  9742
getInfoItem
321c1729db5b initial checkin
penk
parents:
diff changeset
  9743
    "get filename of a description-file (.dir.info, README etc.);
16778
dbbfdadc87a8 #OTHER by mawalch
mawalch
parents: 16732
diff changeset
  9744
     This file is automatically shown when a directory is entered.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9745
     You can add more names below if you like."
321c1729db5b initial checkin
penk
parents:
diff changeset
  9746
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9747
    |dir|
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9748
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9749
    dir := self theSingleSelectedDirectoryOrNil.
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9750
    dir isNil ifTrue:[ ^ nil].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9751
16778
dbbfdadc87a8 #OTHER by mawalch
mawalch
parents: 16732
diff changeset
  9752
    #(
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9753
       '.dir.info'
321c1729db5b initial checkin
penk
parents:
diff changeset
  9754
       'README'
321c1729db5b initial checkin
penk
parents:
diff changeset
  9755
       'ReadMe'
321c1729db5b initial checkin
penk
parents:
diff changeset
  9756
       'Readme'
321c1729db5b initial checkin
penk
parents:
diff changeset
  9757
       'readme'
321c1729db5b initial checkin
penk
parents:
diff changeset
  9758
       'read.me'
321c1729db5b initial checkin
penk
parents:
diff changeset
  9759
       'Read.me'
321c1729db5b initial checkin
penk
parents:
diff changeset
  9760
       'READ.ME'
321c1729db5b initial checkin
penk
parents:
diff changeset
  9761
       'README.TXT'
15915
08316e965232 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 15910
diff changeset
  9762
       'README.txt'
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9763
       'readme.txt'
321c1729db5b initial checkin
penk
parents:
diff changeset
  9764
       'Readme.txt'
321c1729db5b initial checkin
penk
parents:
diff changeset
  9765
       'Info.txt'
321c1729db5b initial checkin
penk
parents:
diff changeset
  9766
       'info.txt'
321c1729db5b initial checkin
penk
parents:
diff changeset
  9767
       'INFO.TXT'
15915
08316e965232 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 15910
diff changeset
  9768
       'INFO.txt'
16778
dbbfdadc87a8 #OTHER by mawalch
mawalch
parents: 16732
diff changeset
  9769
    ) do:[:f |
5883
a13bd841136b dir declaration error in getInfoItem
penk
parents: 5880
diff changeset
  9770
        |n|
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9771
5880
b2b345e219bf +execute script
Claus Gittinger <cg@exept.de>
parents: 5870
diff changeset
  9772
        n := dir construct:f.
18453
e20ac933ee00 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18433
diff changeset
  9773
        (n isReadable and:[n isRegularFile]) ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9774
            ^ DirectoryContentsBrowser itemClass fileName:n
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9775
        ]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9776
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
  9777
    ^ nil
4881
e6fc72aac6e6 multiple select allowed in DirectoryTreeBrowser some changes in DirectoryContentsBrowser
penk
parents: 4880
diff changeset
  9778
!
e6fc72aac6e6 multiple select allowed in DirectoryTreeBrowser some changes in DirectoryContentsBrowser
penk
parents: 4880
diff changeset
  9779
12497
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  9780
hasPackageDirectorySelected
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  9781
    |dir|
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  9782
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  9783
    dir := self currentDirectory.
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  9784
    ^  dir notNil
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  9785
    and:[ dir exists
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  9786
    and:[ (dir / 'abbrev.stc') exists ]]
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  9787
!
216e10b026ab class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12493
diff changeset
  9788
4881
e6fc72aac6e6 multiple select allowed in DirectoryTreeBrowser some changes in DirectoryContentsBrowser
penk
parents: 4880
diff changeset
  9789
parentDirectoriesOfCurrentFiles
11743
acb7245e126b changed:
Stefan Vogel <sv@exept.de>
parents: 11712
diff changeset
  9790
    ^ self currentSelectedObjects 
acb7245e126b changed:
Stefan Vogel <sv@exept.de>
parents: 11712
diff changeset
  9791
        collect:[:file | file directory] as:Set
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  9792
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  9793
    "Modified: / 04-12-2006 / 13:15:21 / cg"
6521
6f55c8f06c1f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6482
diff changeset
  9794
!
6f55c8f06c1f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6482
diff changeset
  9795
6f55c8f06c1f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6482
diff changeset
  9796
recursiveAnyFilesPresentWithSuffix:suffix
6652
abde6585a001 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6651
diff changeset
  9797
    ^ true. "/ the code below is too slow for a menu enabling operation
abde6585a001 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6651
diff changeset
  9798
abde6585a001 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6651
diff changeset
  9799
"/    |directories|
abde6585a001 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6651
diff changeset
  9800
"/
abde6585a001 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6651
diff changeset
  9801
"/    directories := self currentDirectories value.
abde6585a001 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6651
diff changeset
  9802
"/    directories do:[:dir|
abde6585a001 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6651
diff changeset
  9803
"/        [
abde6585a001 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6651
diff changeset
  9804
"/            dir recursiveDirectoryContentsDo:[:f |
abde6585a001 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6651
diff changeset
  9805
"/                (f asFilename suffix = suffix) ifTrue:[ ^ true]
abde6585a001 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6651
diff changeset
  9806
"/            ]
abde6585a001 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6651
diff changeset
  9807
"/        ] on:FileStream openErrorSignal do:[:ex|].
abde6585a001 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6651
diff changeset
  9808
"/    ].
abde6585a001 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6651
diff changeset
  9809
"/    ^ false.
6586
e4eb50529f4c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6551
diff changeset
  9810
!
e4eb50529f4c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6551
diff changeset
  9811
e4eb50529f4c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6551
diff changeset
  9812
recursiveAnySTFilesPresent
e4eb50529f4c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6551
diff changeset
  9813
    ^ self recursiveAnyFilesPresentWithSuffix:'st'
3982
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  9814
! !
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  9815
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  9816
!AbstractFileBrowser methodsFor:'selection'!
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  9817
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  9818
currentSelectedDirectories
6725
3885523e54b8 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6708
diff changeset
  9819
    ^ self currentDirectoriesValue.
3982
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  9820
!
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  9821
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  9822
currentSelectedFiles
17865
30a8ebe0a1a5 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17849
diff changeset
  9823
    ^ self currentSelectedObjects reject:#isDirectory.
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  9824
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  9825
    "Modified: / 04-12-2006 / 13:14:39 / cg"
3982
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  9826
!
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  9827
6460
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  9828
currentSelectedObjects
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  9829
    ^ self currentFileNameHolder value 
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  9830
!
62fb687b0e87 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6456
diff changeset
  9831
3982
fc30449d705d *** empty log message ***
penk
parents: 3980
diff changeset
  9832
firstSelectedFile
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  9833
    ^ self currentSelectedObjects 
12102
9512a4336434 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 12094
diff changeset
  9834
        detect:[:file | (file ? '') asFilename isDirectory not]
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  9835
        ifNone:[].
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  9836
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  9837
    "Modified: / 04-12-2006 / 13:14:50 / cg"
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9838
!
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9839
9490
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  9840
hasOnlyDirectoriesSelected
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  9841
    ^ self currentSelectedObjects conform:[:file | file isDirectory].
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  9842
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  9843
    "Created: / 20-05-2010 / 10:45:03 / cg"
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  9844
!
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  9845
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9846
hasOnlyFilesSelected
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  9847
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  9848
    ^ self currentSelectedObjects conform:[:file | file isDirectory not].
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  9849
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  9850
    "Modified: / 04-12-2006 / 13:15:01 / cg"
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9851
!
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9852
9490
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  9853
hasTwoDirectoriesSelected
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  9854
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  9855
    ^ self currentSelectedObjects size == 2 
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  9856
        and:[self hasOnlyDirectoriesSelected]
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  9857
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  9858
    "Created: / 20-05-2010 / 10:45:18 / cg"
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  9859
!
Claus Gittinger <cg@exept.de>
parents: 9455
diff changeset
  9860
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
  9861
hasTwoFilesSelected
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  9862
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  9863
    ^ self currentSelectedObjects size == 2 
5374
c654db6e8c37 Save bookmarks - as documented - in home directory
Stefan Vogel <sv@exept.de>
parents: 5366
diff changeset
  9864
        and:[self hasOnlyFilesSelected]
7560
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  9865
7fc383050360 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7533
diff changeset
  9866
    "Modified: / 04-12-2006 / 13:15:04 / cg"
14577
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  9867
!
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  9868
18751
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9869
selectFiles:aCollectionOfFiles
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9870
    self subclassResponsibility
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9871
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9872
    "Created: / 02-05-2019 / 18:40:04 / Claus Gittinger"
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9873
!
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9874
14577
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  9875
selectNextFile
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  9876
    self 
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  9877
        applicationNamed:#DirectoryContentsBrowser 
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  9878
        ifPresentDo:[:appl | appl ~~ self ifTrue:[ appl selectNextFile ]].
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  9879
!
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  9880
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  9881
selectPreviousFile
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  9882
    self 
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  9883
        applicationNamed:#DirectoryContentsBrowser 
1eb708c12e05 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 14551
diff changeset
  9884
        ifPresentDo:[:appl | appl ~~ self ifTrue:[ appl selectPreviousFile ]].
18751
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9885
!
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9886
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9887
selectedItems
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9888
    self subclassResponsibility
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9889
387323a6f3b4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 18747
diff changeset
  9890
    "Created: / 02-05-2019 / 21:27:38 / Claus Gittinger"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9891
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
  9892
3964
8697bad1c903 next stage for history
penk
parents: 3963
diff changeset
  9893
!AbstractFileBrowser methodsFor:'sorting'!
8697bad1c903 next stage for history
penk
parents: 3963
diff changeset
  9894
3989
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  9895
currentSortOrder
17790
77ef76b01d6b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17772
diff changeset
  9896
    ^ self 
77ef76b01d6b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17772
diff changeset
  9897
        aspectFor:#currentSortOrder 
77ef76b01d6b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17772
diff changeset
  9898
        ifAbsent:[ 
77ef76b01d6b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17772
diff changeset
  9899
            (Dictionary new
77ef76b01d6b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17772
diff changeset
  9900
                at:#column put:nil;
77ef76b01d6b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17772
diff changeset
  9901
                at:#reverse put:false;
77ef76b01d6b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17772
diff changeset
  9902
                at:#sortCaseless put:false;
77ef76b01d6b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17772
diff changeset
  9903
                yourself
77ef76b01d6b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17772
diff changeset
  9904
            ) asValue 
77ef76b01d6b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17772
diff changeset
  9905
        ].
77ef76b01d6b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17772
diff changeset
  9906
77ef76b01d6b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17772
diff changeset
  9907
    "Modified: / 25-11-2017 / 17:43:00 / cg"
3989
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  9908
!
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  9909
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  9910
sortBlockHolder
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  9911
    ^ self aspectFor:#sortBlockHolder ifAbsent:[
5383
ae8a426ef69e use for sorting files the new FileSorter class
penk
parents: 5380
diff changeset
  9912
        (FileSorter directoriesBeforeFiles:(self sortDirectoriesBeforeFiles value and:[self viewDirsInContentsBrowser value]) 
ae8a426ef69e use for sorting files the new FileSorter class
penk
parents: 5380
diff changeset
  9913
                    selector:#fileName 
ae8a426ef69e use for sorting files the new FileSorter class
penk
parents: 5380
diff changeset
  9914
                    sortCaseless:self sortCaseless value 
ae8a426ef69e use for sorting files the new FileSorter class
penk
parents: 5380
diff changeset
  9915
                    sortReverse:false) asValue.
3989
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  9916
    ].
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  9917
!
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  9918
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  9919
sortBlockProperty
6785
cac8107d889c clear reverseSort flag, when sort-order is changed via menu.
Claus Gittinger <cg@exept.de>
parents: 6767
diff changeset
  9920
    |v|
4027
c662c75b6bf9 *** empty log message ***
penk
parents: 4024
diff changeset
  9921
    
6785
cac8107d889c clear reverseSort flag, when sort-order is changed via menu.
Claus Gittinger <cg@exept.de>
parents: 6767
diff changeset
  9922
    v := self aspectFor:#sortBlockProperty ifAbsent:[ #baseName asValue ].
cac8107d889c clear reverseSort flag, when sort-order is changed via menu.
Claus Gittinger <cg@exept.de>
parents: 6767
diff changeset
  9923
    v addDependent:self.
cac8107d889c clear reverseSort flag, when sort-order is changed via menu.
Claus Gittinger <cg@exept.de>
parents: 6767
diff changeset
  9924
    ^ v.
3989
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  9925
!
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  9926
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  9927
sortCaseless
4201
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  9928
    " aspect for sort caseless "
3989
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  9929
13000
e3df0150a620 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12972
diff changeset
  9930
    ^ self 
e3df0150a620 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12972
diff changeset
  9931
        aspectFor:#sortCaseless 
e3df0150a620 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 12972
diff changeset
  9932
        ifAbsent:[ (Filename isCaseSensitive not) asValue ]
3989
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  9933
!
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  9934
4074
53cef1b0cdfc allow sort without directories always at first
penk
parents: 4071
diff changeset
  9935
sortDirectoriesBeforeFiles
53cef1b0cdfc allow sort without directories always at first
penk
parents: 4071
diff changeset
  9936
4201
be512c7e5ea8 save all aspects in Userpreferences now
penk
parents: 4191
diff changeset
  9937
    " aspect for sort directories always before files"
4074
53cef1b0cdfc allow sort without directories always at first
penk
parents: 4071
diff changeset
  9938
    ^ self aspectFor:#sortDirectoriesBeforeFiles ifAbsent:[ true asValue ].
53cef1b0cdfc allow sort without directories always at first
penk
parents: 4071
diff changeset
  9939
!
53cef1b0cdfc allow sort without directories always at first
penk
parents: 4071
diff changeset
  9940
3989
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  9941
sortFileListsBy:instanceName 
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  9942
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  9943
    self sortFileListsBy:instanceName withReverse:true
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  9944
!
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  9945
7eec3cb5bce6 selectedFiles method name changed
penk
parents: 3982
diff changeset
  9946
sortFileListsBy:instanceName withReverse:aBoolean
8994
b14c9dd8a662 comment/format in: #sortFileListsBy:withReverse:
Claus Gittinger <cg@exept.de>
parents: 8950
diff changeset
  9947
    | aSymbol sortCaselessLocal currentSortOrder sorter isReverse|
3964
8697bad1c903 next stage for history
penk
parents: 3963
diff changeset
  9948
8697bad1c903 next stage for history
penk
parents: 3963
diff changeset
  9949
    aSymbol := instanceName asSymbol.
4027
c662c75b6bf9 *** empty log message ***
penk
parents: 4024
diff changeset
  9950
    self sortBlockProperty setValue:instanceName asSymbol.
4151
950e04fef4ba treeBrowser has his own sort now
penk
parents: 4148
diff changeset
  9951
    sortCaselessLocal := self sortCaseless value.
4027
c662c75b6bf9 *** empty log message ***
penk
parents: 4024
diff changeset
  9952
    currentSortOrder := self currentSortOrder value.
17790
77ef76b01d6b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17772
diff changeset
  9953
7841
ea9a45f1cd5e oops - repair bad currentSorter
Claus Gittinger <cg@exept.de>
parents: 7829
diff changeset
  9954
    currentSortOrder isEmptyOrNil ifTrue:[
ea9a45f1cd5e oops - repair bad currentSorter
Claus Gittinger <cg@exept.de>
parents: 7829
diff changeset
  9955
        self currentSortOrder value:(currentSortOrder := Dictionary new).
4343
209810452034 checkin from browser
penk
parents: 4337
diff changeset
  9956
        currentSortOrder at:#column put:aSymbol.
209810452034 checkin from browser
penk
parents: 4337
diff changeset
  9957
        currentSortOrder at:#reverse put:false.
209810452034 checkin from browser
penk
parents: 4337
diff changeset
  9958
        currentSortOrder at:#sortCaseless put:sortCaselessLocal.
3964
8697bad1c903 next stage for history
penk
parents: 3963
diff changeset
  9959
    ] ifFalse:[
4343
209810452034 checkin from browser
penk
parents: 4337
diff changeset
  9960
        (currentSortOrder at:#sortCaseless) ~= sortCaselessLocal ifTrue:[
209810452034 checkin from browser
penk
parents: 4337
diff changeset
  9961
            "/ sort caseless changed
209810452034 checkin from browser
penk
parents: 4337
diff changeset
  9962
            currentSortOrder at:#sortCaseless put:sortCaselessLocal.
209810452034 checkin from browser
penk
parents: 4337
diff changeset
  9963
        ] ifFalse:[
209810452034 checkin from browser
penk
parents: 4337
diff changeset
  9964
            (currentSortOrder at:#column) = aSymbol ifTrue:[
209810452034 checkin from browser
penk
parents: 4337
diff changeset
  9965
                "/ same column like before - change sort order ifReverse is true
209810452034 checkin from browser
penk
parents: 4337
diff changeset
  9966
                aBoolean ifTrue:[
209810452034 checkin from browser
penk
parents: 4337
diff changeset
  9967
                    isReverse := currentSortOrder at:#reverse.
209810452034 checkin from browser
penk
parents: 4337
diff changeset
  9968
                    currentSortOrder at:#reverse put:(isReverse not).
209810452034 checkin from browser
penk
parents: 4337
diff changeset
  9969
                ].
209810452034 checkin from browser
penk
parents: 4337
diff changeset
  9970
            ] ifFalse:[
209810452034 checkin from browser
penk
parents: 4337
diff changeset
  9971
                "/ another column - remark column
209810452034 checkin from browser
penk
parents: 4337
diff changeset
  9972
                currentSortOrder at:#column put:aSymbol.
209810452034 checkin from browser
penk
parents: 4337
diff changeset
  9973
            ]
209810452034 checkin from browser
penk
parents: 4337
diff changeset
  9974
        ]
3964
8697bad1c903 next stage for history
penk
parents: 3963
diff changeset
  9975
    ].
4027
c662c75b6bf9 *** empty log message ***
penk
parents: 4024
diff changeset
  9976
    self currentSortOrder changed.
9111
4566dd920e09 changes for better FileDialog
Claus Gittinger <cg@exept.de>
parents: 9108
diff changeset
  9977
5383
ae8a426ef69e use for sorting files the new FileSorter class
penk
parents: 5380
diff changeset
  9978
    sorter := FileSorter directoriesBeforeFiles:(self sortDirectoriesBeforeFiles value and:[self viewDirsInContentsBrowser value]) 
ae8a426ef69e use for sorting files the new FileSorter class
penk
parents: 5380
diff changeset
  9979
                            selector:instanceName 
ae8a426ef69e use for sorting files the new FileSorter class
penk
parents: 5380
diff changeset
  9980
                            sortCaseless:sortCaselessLocal 
ae8a426ef69e use for sorting files the new FileSorter class
penk
parents: 5380
diff changeset
  9981
                            sortReverse:(currentSortOrder at:#reverse).
ae8a426ef69e use for sorting files the new FileSorter class
penk
parents: 5380
diff changeset
  9982
    self sortBlockHolder value:sorter.
7841
ea9a45f1cd5e oops - repair bad currentSorter
Claus Gittinger <cg@exept.de>
parents: 7829
diff changeset
  9983
ea9a45f1cd5e oops - repair bad currentSorter
Claus Gittinger <cg@exept.de>
parents: 7829
diff changeset
  9984
    "Modified: / 18-09-2007 / 09:42:47 / cg"
17790
77ef76b01d6b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17772
diff changeset
  9985
    "Modified (format): / 25-11-2017 / 17:43:31 / cg"
3964
8697bad1c903 next stage for history
penk
parents: 3963
diff changeset
  9986
! !
8697bad1c903 next stage for history
penk
parents: 3963
diff changeset
  9987
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9988
!AbstractFileBrowser methodsFor:'startup & release'!
321c1729db5b initial checkin
penk
parents:
diff changeset
  9989
16720
f83da83ca7c3 #OTHER by stefan
Stefan Vogel <sv@exept.de>
parents: 16538
diff changeset
  9990
initializeAspects
f83da83ca7c3 #OTHER by stefan
Stefan Vogel <sv@exept.de>
parents: 16538
diff changeset
  9991
    aspects := IdentityDictionary new.
f83da83ca7c3 #OTHER by stefan
Stefan Vogel <sv@exept.de>
parents: 16538
diff changeset
  9992
    aspects at:#applications put:(IdentityDictionary new).
f83da83ca7c3 #OTHER by stefan
Stefan Vogel <sv@exept.de>
parents: 16538
diff changeset
  9993
!
f83da83ca7c3 #OTHER by stefan
Stefan Vogel <sv@exept.de>
parents: 16538
diff changeset
  9994
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
  9995
makeDependent
4074
53cef1b0cdfc allow sort without directories always at first
penk
parents: 4071
diff changeset
  9996
    self filterModel addDependent:self.            
4004
f97168a68093 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4000
diff changeset
  9997
    self currentFileNameHolder addDependent:self.
4074
53cef1b0cdfc allow sort without directories always at first
penk
parents: 4071
diff changeset
  9998
    self sortDirectoriesBeforeFiles addDependent:self.
4004
f97168a68093 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4000
diff changeset
  9999
    self sortCaseless addDependent:self.
4011
73fa35b1963b *** empty log message ***
penk
parents: 4004
diff changeset
 10000
    self showHiddenFiles addDependent:self.
4368
ec625478fad7 remark root and selection for every change in classvar
penk
parents: 4367
diff changeset
 10001
    self rootHolder addDependent:self.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
 10002
!
321c1729db5b initial checkin
penk
parents:
diff changeset
 10003
321c1729db5b initial checkin
penk
parents:
diff changeset
 10004
masterApplication:anApplication
321c1729db5b initial checkin
penk
parents:
diff changeset
 10005
321c1729db5b initial checkin
penk
parents:
diff changeset
 10006
    masterApplication isNil ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
 10007
        (anApplication notNil and:[anApplication askFor:#isAbstractFileBrowser]) ifTrue:[
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
 10008
            aspects := anApplication aspects
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
 10009
        ] ifFalse:[
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
 10010
            aspects isNil ifTrue:[
16721
c4ac29c3d146 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 16720
diff changeset
 10011
                self initializeAspects.
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
 10012
            ]
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
 10013
        ].
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
 10014
        self applications at:(self className) put:self.
4800
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
 10015
"/        self makeDependent.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
 10016
    ].
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10017
    ^ super masterApplication:anApplication.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
 10018
!
321c1729db5b initial checkin
penk
parents:
diff changeset
 10019
4800
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
 10020
postBuildWith:aBuilder
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
 10021
    self makeDependent.
56854b83f710 subAppAspects - to be continued
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
 10022
    super postBuildWith:aBuilder.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
 10023
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
 10024
321c1729db5b initial checkin
penk
parents:
diff changeset
 10025
!AbstractFileBrowser::Clipboard methodsFor:'accessing'!
321c1729db5b initial checkin
penk
parents:
diff changeset
 10026
321c1729db5b initial checkin
penk
parents:
diff changeset
 10027
files
321c1729db5b initial checkin
penk
parents:
diff changeset
 10028
    "return the value of the instance variable 'files' (automatically generated)"
321c1729db5b initial checkin
penk
parents:
diff changeset
 10029
321c1729db5b initial checkin
penk
parents:
diff changeset
 10030
    ^ files
321c1729db5b initial checkin
penk
parents:
diff changeset
 10031
!
321c1729db5b initial checkin
penk
parents:
diff changeset
 10032
321c1729db5b initial checkin
penk
parents:
diff changeset
 10033
files:something
321c1729db5b initial checkin
penk
parents:
diff changeset
 10034
    "set the value of the instance variable 'files' (automatically generated)"
321c1729db5b initial checkin
penk
parents:
diff changeset
 10035
321c1729db5b initial checkin
penk
parents:
diff changeset
 10036
    files := something.
321c1729db5b initial checkin
penk
parents:
diff changeset
 10037
!
321c1729db5b initial checkin
penk
parents:
diff changeset
 10038
321c1729db5b initial checkin
penk
parents:
diff changeset
 10039
method
321c1729db5b initial checkin
penk
parents:
diff changeset
 10040
    "return the value of the instance variable 'method' (automatically generated)"
321c1729db5b initial checkin
penk
parents:
diff changeset
 10041
321c1729db5b initial checkin
penk
parents:
diff changeset
 10042
    ^ method
321c1729db5b initial checkin
penk
parents:
diff changeset
 10043
!
321c1729db5b initial checkin
penk
parents:
diff changeset
 10044
321c1729db5b initial checkin
penk
parents:
diff changeset
 10045
method:something
321c1729db5b initial checkin
penk
parents:
diff changeset
 10046
    "set the value of the instance variable 'method' (automatically generated)"
321c1729db5b initial checkin
penk
parents:
diff changeset
 10047
321c1729db5b initial checkin
penk
parents:
diff changeset
 10048
    method := something.
321c1729db5b initial checkin
penk
parents:
diff changeset
 10049
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
 10050
321c1729db5b initial checkin
penk
parents:
diff changeset
 10051
!AbstractFileBrowser::CodeExecutionLock methodsFor:'accessing'!
321c1729db5b initial checkin
penk
parents:
diff changeset
 10052
321c1729db5b initial checkin
penk
parents:
diff changeset
 10053
locked
321c1729db5b initial checkin
penk
parents:
diff changeset
 10054
    "return the value of the instance variable 'locked' (automatically generated)"
321c1729db5b initial checkin
penk
parents:
diff changeset
 10055
321c1729db5b initial checkin
penk
parents:
diff changeset
 10056
    locked isNil ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
 10057
        locked := false.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
 10058
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
 10059
    ^ locked
321c1729db5b initial checkin
penk
parents:
diff changeset
 10060
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
 10061
321c1729db5b initial checkin
penk
parents:
diff changeset
 10062
!AbstractFileBrowser::CodeExecutionLock methodsFor:'actions'!
321c1729db5b initial checkin
penk
parents:
diff changeset
 10063
321c1729db5b initial checkin
penk
parents:
diff changeset
 10064
doIfUnLocked:aBlock
321c1729db5b initial checkin
penk
parents:
diff changeset
 10065
321c1729db5b initial checkin
penk
parents:
diff changeset
 10066
    self locked ifFalse:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
 10067
        aBlock value.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
 10068
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
 10069
!
321c1729db5b initial checkin
penk
parents:
diff changeset
 10070
321c1729db5b initial checkin
penk
parents:
diff changeset
 10071
doLocked:aBlock
321c1729db5b initial checkin
penk
parents:
diff changeset
 10072
321c1729db5b initial checkin
penk
parents:
diff changeset
 10073
    locked  := true.
4004
f97168a68093 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4000
diff changeset
 10074
    aBlock ensure:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
 10075
        locked := false.
4004
f97168a68093 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4000
diff changeset
 10076
    ]
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
 10077
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
 10078
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10079
!AbstractFileBrowser::DirectoryHistory class methodsFor:'defaults'!
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10080
6369
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
 10081
defaultHistorySize
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
 10082
    ^ 50
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
 10083
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
 10084
6371
b5dab61da244 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6370
diff changeset
 10085
!AbstractFileBrowser::DirectoryHistory class methodsFor:'instance creation'!
4032
e19634385525 initialize of backList and forwardList
penk
parents: 4027
diff changeset
 10086
e19634385525 initialize of backList and forwardList
penk
parents: 4027
diff changeset
 10087
new
6371
b5dab61da244 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6370
diff changeset
 10088
    ^ (super new) initializeHistory.
6369
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
 10089
! !
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
 10090
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
 10091
!AbstractFileBrowser::DirectoryHistory methodsFor:'accessing'!
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
 10092
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
 10093
historySize
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
 10094
    historySize isNil ifTrue:[^ self class defaultHistorySize].
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
 10095
    ^ historySize
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
 10096
!
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
 10097
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
 10098
historySize:aNumber
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
 10099
    historySize := aNumber
4032
e19634385525 initialize of backList and forwardList
penk
parents: 4027
diff changeset
 10100
! !
e19634385525 initialize of backList and forwardList
penk
parents: 4027
diff changeset
 10101
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
 10102
!AbstractFileBrowser::DirectoryHistory methodsFor:'actions'!
321c1729db5b initial checkin
penk
parents:
diff changeset
 10103
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10104
addToHistory:aPath
15803
c81bf7d45ad0 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15675
diff changeset
 10105
    | item pathToAdd sep|
7566
3e92cf7a6706 ignore trailing file-separator in history.
Claus Gittinger <cg@exept.de>
parents: 7565
diff changeset
 10106
3e92cf7a6706 ignore trailing file-separator in history.
Claus Gittinger <cg@exept.de>
parents: 7565
diff changeset
 10107
    pathToAdd := aPath.
15803
c81bf7d45ad0 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15675
diff changeset
 10108
    (pathToAdd endsWith:(sep := Filename separator)) ifTrue:[
7566
3e92cf7a6706 ignore trailing file-separator in history.
Claus Gittinger <cg@exept.de>
parents: 7565
diff changeset
 10109
        pathToAdd asFilename isRootDirectory ifFalse:[
15803
c81bf7d45ad0 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15675
diff changeset
 10110
            pathToAdd := pathToAdd copyButLast:(sep asString size).    
7566
3e92cf7a6706 ignore trailing file-separator in history.
Claus Gittinger <cg@exept.de>
parents: 7565
diff changeset
 10111
        ]    
3e92cf7a6706 ignore trailing file-separator in history.
Claus Gittinger <cg@exept.de>
parents: 7565
diff changeset
 10112
    ].
3e92cf7a6706 ignore trailing file-separator in history.
Claus Gittinger <cg@exept.de>
parents: 7565
diff changeset
 10113
3e92cf7a6706 ignore trailing file-separator in history.
Claus Gittinger <cg@exept.de>
parents: 7565
diff changeset
 10114
    item := self getItemFor:pathToAdd.
3e92cf7a6706 ignore trailing file-separator in history.
Claus Gittinger <cg@exept.de>
parents: 7565
diff changeset
 10115
    self backForwardListAdd:pathToAdd.
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10116
    item isNil ifTrue:[
4347
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10117
        " not already in history"
6369
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
 10118
        self size >= self historySize ifTrue:[
4347
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10119
            self removeLast.
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10120
        ].
7566
3e92cf7a6706 ignore trailing file-separator in history.
Claus Gittinger <cg@exept.de>
parents: 7565
diff changeset
 10121
        item := DirectoryHistoryItem path:pathToAdd.
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10122
    ] ifFalse:[
4347
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10123
        "already been there before; move the entry to
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10124
         the beginning, so it will fall out later."
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10125
        self remove:item.
10381
ad4b61b0b2fd duplicate code in if refactored
Claus Gittinger <cg@exept.de>
parents: 10306
diff changeset
 10126
    ].
ad4b61b0b2fd duplicate code in if refactored
Claus Gittinger <cg@exept.de>
parents: 10306
diff changeset
 10127
    self addFirst:item
ad4b61b0b2fd duplicate code in if refactored
Claus Gittinger <cg@exept.de>
parents: 10306
diff changeset
 10128
ad4b61b0b2fd duplicate code in if refactored
Claus Gittinger <cg@exept.de>
parents: 10306
diff changeset
 10129
    "Modified: / 24-07-2011 / 07:12:54 / cg"
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10130
!
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10131
4347
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10132
backForwardListAdd:aPath
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10133
    |pathIndex|
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10134
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10135
    pathIndex := backForwardList indexOf:aPath.
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10136
    pathIndex == 0 ifTrue:[
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10137
        " a new path comes in remove forward paths "
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10138
        (backForwardList size) > backForwardIndex ifTrue:[
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10139
            backForwardList removeFromIndex:(backForwardIndex + 1) toIndex:(backForwardList size).    
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10140
        ].
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10141
    ] ifFalse:[
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10142
        backForwardList remove:aPath.
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10143
        pathIndex <= backForwardIndex ifTrue:[
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10144
            backForwardIndex := backForwardIndex - 1.
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10145
        ]
4022
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
 10146
    ].
4347
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10147
    backForwardList add:aPath afterIndex:backForwardIndex.
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10148
    backForwardIndex := backForwardIndex + 1.
6369
7b21b4675578 directoryHistory
Claus Gittinger <cg@exept.de>
parents: 6352
diff changeset
 10149
    backForwardIndex > self historySize ifTrue:[
4347
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10150
        backForwardList removeFirst.
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10151
        backForwardIndex := backForwardIndex - 1.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
 10152
    ].
4347
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10153
!
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10154
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10155
goBackward
4288
1433441aca41 history access
Claus Gittinger <cg@exept.de>
parents: 4250
diff changeset
 10156
    "return the first path of the backward list;
1433441aca41 history access
Claus Gittinger <cg@exept.de>
parents: 4250
diff changeset
 10157
     remove it from the back list and add it ti the forward list."
4022
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
 10158
4347
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10159
    |retPath|
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10160
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10161
    self canBackward ifTrue:[
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10162
        retPath := backForwardList at:(backForwardIndex - 1).
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10163
        backForwardIndex := backForwardIndex - 1.
4288
1433441aca41 history access
Claus Gittinger <cg@exept.de>
parents: 4250
diff changeset
 10164
    ].
4022
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
 10165
    ^ retPath.
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
 10166
!
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
 10167
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
 10168
goForward
4288
1433441aca41 history access
Claus Gittinger <cg@exept.de>
parents: 4250
diff changeset
 10169
    "return the first path of the forward list;
1433441aca41 history access
Claus Gittinger <cg@exept.de>
parents: 4250
diff changeset
 10170
     remove it from the list."
4022
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
 10171
4347
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10172
    |retPath|
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10173
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10174
    self canForward ifTrue:[
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10175
        retPath := backForwardList at:backForwardIndex + 1.
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10176
        backForwardIndex := backForwardIndex + 1.
4288
1433441aca41 history access
Claus Gittinger <cg@exept.de>
parents: 4250
diff changeset
 10177
    ].
4022
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
 10178
    ^ retPath.
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
 10179
!
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
 10180
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
 10181
resetForwardBackward
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
 10182
4347
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10183
    self initialize
4022
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
 10184
!
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
 10185
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
 10186
setPosition:aPosition for:aPath
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
 10187
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
 10188
    self do:[:item| 
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
 10189
        item path = aPath ifTrue:[
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
 10190
            item position:aPosition.
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
 10191
        ]
4022
87ab8e8c5f80 instable next try for back forward history
penk
parents: 4018
diff changeset
 10192
    ].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
 10193
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
 10194
4870
8e9a999939d3 method category rename
Claus Gittinger <cg@exept.de>
parents: 4856
diff changeset
 10195
!AbstractFileBrowser::DirectoryHistory methodsFor:'initialization'!
4032
e19634385525 initialize of backList and forwardList
penk
parents: 4027
diff changeset
 10196
6371
b5dab61da244 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6370
diff changeset
 10197
initializeHistory
4032
e19634385525 initialize of backList and forwardList
penk
parents: 4027
diff changeset
 10198
4347
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10199
    backForwardList := OrderedCollection new.
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10200
    self reverseDo:[:el|
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10201
        backForwardList add:el path.
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10202
    ].
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10203
    backForwardIndex := backForwardList size.
4032
e19634385525 initialize of backList and forwardList
penk
parents: 4027
diff changeset
 10204
! !
e19634385525 initialize of backList and forwardList
penk
parents: 4027
diff changeset
 10205
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
 10206
!AbstractFileBrowser::DirectoryHistory methodsFor:'queries'!
321c1729db5b initial checkin
penk
parents:
diff changeset
 10207
4288
1433441aca41 history access
Claus Gittinger <cg@exept.de>
parents: 4250
diff changeset
 10208
canBackward
4347
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10209
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10210
    ^ backForwardIndex > 1 
4288
1433441aca41 history access
Claus Gittinger <cg@exept.de>
parents: 4250
diff changeset
 10211
!
1433441aca41 history access
Claus Gittinger <cg@exept.de>
parents: 4250
diff changeset
 10212
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
 10213
canForward
4347
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10214
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10215
    ^ (backForwardList size >= (backForwardIndex + 1))
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10216
!
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10217
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10218
getBackCollection
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10219
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10220
    | backCol |
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10221
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10222
    backCol := OrderedCollection new.
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10223
    self canBackward ifTrue:[
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10224
        | tmpCol |
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10225
        tmpCol := backForwardList copyTo:backForwardIndex - 1.
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10226
        tmpCol reverseDo:[ :el|
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10227
            backCol add:el.
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10228
        ]
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10229
    ].
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10230
    ^ backCol
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10231
!
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10232
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10233
getForwardCollection
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10234
4347
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10235
    | forwCol |
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10236
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10237
    forwCol := OrderedCollection new.
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10238
    self canForward ifTrue:[
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10239
        forwCol := backForwardList copyFrom:(backForwardIndex + 1)    
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10240
    ].
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10241
    ^ forwCol
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10242
!
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10243
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10244
getItemFor:aPath
6627
48664e62315f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6602
diff changeset
 10245
    ^ self detect:[:item| item path = aPath] ifNone:nil.
48664e62315f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6602
diff changeset
 10246
"/    self do:[:item| item path = aPath ifTrue:[^ item]].
48664e62315f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6602
diff changeset
 10247
"/    ^ nil.
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10248
!
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10249
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10250
getPositionFor:aPath
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10251
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10252
    |item|
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10253
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10254
    item := self getItemFor:aPath.
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10255
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10256
    item notNil ifTrue:[
4414
1c1b24365d26 compare files - incomplete
Claus Gittinger <cg@exept.de>
parents: 4394
diff changeset
 10257
        ^ item position.
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10258
    ].
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10259
    ^ nil
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10260
!
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10261
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10262
includesPath:aPath
6627
48664e62315f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6602
diff changeset
 10263
    ^ self contains:[:item | item path = aPath].
48664e62315f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6602
diff changeset
 10264
48664e62315f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6602
diff changeset
 10265
"/    self do:[:item| item path = aPath ifTrue:[^ true]].
48664e62315f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6602
diff changeset
 10266
"/    ^ false.
4347
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10267
!
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10268
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10269
nextBackwardItem
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10270
    "return the first path of the backward list"
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10271
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10272
    |retPath|
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10273
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10274
    self canBackward ifTrue:[
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10275
        retPath := backForwardList at:backForwardIndex.
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10276
    ].
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10277
    ^ retPath.
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10278
!
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10279
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10280
nextForwardItem
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10281
    "return the first path of the forward list"
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10282
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10283
    |retPath|
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10284
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10285
    self canForward ifTrue:[
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10286
        retPath := backForwardList at:backForwardIndex + 1.
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10287
    ].
c70ee320b68c history back forward is running now
penk
parents: 4345
diff changeset
 10288
    ^ retPath.
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10289
! !
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10290
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10291
!AbstractFileBrowser::DirectoryHistory::DirectoryHistoryItem class methodsFor:'instance creation'!
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10292
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10293
path:aPath
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10294
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10295
    ^ self new path:aPath
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10296
! !
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10297
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10298
!AbstractFileBrowser::DirectoryHistory::DirectoryHistoryItem methodsFor:'accessing'!
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10299
6433
b90b535c1245 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6388
diff changeset
 10300
asFilename
b90b535c1245 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6388
diff changeset
 10301
    ^ path asFilename
b90b535c1245 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6388
diff changeset
 10302
!
b90b535c1245 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6388
diff changeset
 10303
3952
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10304
path
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10305
    "return the value of the instance variable 'path' (automatically generated)"
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10306
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10307
    ^ path
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10308
!
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10309
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10310
path:something
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10311
    "set the value of the instance variable 'path' (automatically generated)"
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10312
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10313
    path := something.
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10314
!
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10315
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10316
position
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10317
    "return the value of the instance variable 'position' (automatically generated)"
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10318
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10319
    ^ position
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10320
!
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10321
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10322
position:something
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10323
    "set the value of the instance variable 'position' (automatically generated)"
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10324
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10325
    position := something.
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10326
!
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10327
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10328
printString
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10329
c04d4781a37e next stage
penk
parents: 3949
diff changeset
 10330
    ^ self path asString
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
 10331
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
 10332
321c1729db5b initial checkin
penk
parents:
diff changeset
 10333
!AbstractFileBrowser::SaveAspectItem class methodsFor:'instance creation'!
321c1729db5b initial checkin
penk
parents:
diff changeset
 10334
321c1729db5b initial checkin
penk
parents:
diff changeset
 10335
withValue:aValue isHolder:aBoolean
321c1729db5b initial checkin
penk
parents:
diff changeset
 10336
321c1729db5b initial checkin
penk
parents:
diff changeset
 10337
    | instance |
321c1729db5b initial checkin
penk
parents:
diff changeset
 10338
321c1729db5b initial checkin
penk
parents:
diff changeset
 10339
    instance := self basicNew.
321c1729db5b initial checkin
penk
parents:
diff changeset
 10340
    instance value:aValue.
321c1729db5b initial checkin
penk
parents:
diff changeset
 10341
    instance isHolder:aBoolean.
321c1729db5b initial checkin
penk
parents:
diff changeset
 10342
    ^ instance
321c1729db5b initial checkin
penk
parents:
diff changeset
 10343
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
 10344
321c1729db5b initial checkin
penk
parents:
diff changeset
 10345
!AbstractFileBrowser::SaveAspectItem methodsFor:'accessing'!
321c1729db5b initial checkin
penk
parents:
diff changeset
 10346
321c1729db5b initial checkin
penk
parents:
diff changeset
 10347
isHolder
321c1729db5b initial checkin
penk
parents:
diff changeset
 10348
    "return the value of the instance variable 'isHolder' (automatically generated)"
321c1729db5b initial checkin
penk
parents:
diff changeset
 10349
321c1729db5b initial checkin
penk
parents:
diff changeset
 10350
    ^ isHolder
321c1729db5b initial checkin
penk
parents:
diff changeset
 10351
!
321c1729db5b initial checkin
penk
parents:
diff changeset
 10352
18931
0d7655a4fbf9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 18867
diff changeset
 10353
isHolder:aBoolean
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
 10354
    "set the value of the instance variable 'isHolder' (automatically generated)"
321c1729db5b initial checkin
penk
parents:
diff changeset
 10355
18931
0d7655a4fbf9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 18867
diff changeset
 10356
    isHolder := aBoolean.
0d7655a4fbf9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 18867
diff changeset
 10357
0d7655a4fbf9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 18867
diff changeset
 10358
    "Modified (format): / 19-07-2019 / 09:52:35 / Claus Gittinger"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
 10359
!
321c1729db5b initial checkin
penk
parents:
diff changeset
 10360
321c1729db5b initial checkin
penk
parents:
diff changeset
 10361
value
321c1729db5b initial checkin
penk
parents:
diff changeset
 10362
    "return the value of the instance variable 'value' (automatically generated)"
321c1729db5b initial checkin
penk
parents:
diff changeset
 10363
321c1729db5b initial checkin
penk
parents:
diff changeset
 10364
    ^ value
321c1729db5b initial checkin
penk
parents:
diff changeset
 10365
!
321c1729db5b initial checkin
penk
parents:
diff changeset
 10366
321c1729db5b initial checkin
penk
parents:
diff changeset
 10367
value:something
321c1729db5b initial checkin
penk
parents:
diff changeset
 10368
    "set the value of the instance variable 'value' (automatically generated)"
321c1729db5b initial checkin
penk
parents:
diff changeset
 10369
321c1729db5b initial checkin
penk
parents:
diff changeset
 10370
    value := something.
321c1729db5b initial checkin
penk
parents:
diff changeset
 10371
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
 10372
321c1729db5b initial checkin
penk
parents:
diff changeset
 10373
!AbstractFileBrowser class methodsFor:'documentation'!
321c1729db5b initial checkin
penk
parents:
diff changeset
 10374
10305
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
 10375
version
15803
c81bf7d45ad0 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15675
diff changeset
 10376
    ^ '$Header$'
10305
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
 10377
!
58cfe23bd6cd changed: #fileFindDuplicateFile
Claus Gittinger <cg@exept.de>
parents: 10304
diff changeset
 10378
8832
Claus Gittinger <cg@exept.de>
parents: 8808
diff changeset
 10379
version_CVS
15803
c81bf7d45ad0 class: AbstractFileBrowser
Claus Gittinger <cg@exept.de>
parents: 15675
diff changeset
 10380
    ^ '$Header$'
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
 10381
! !
12094
1ac25533a0d3 class: AbstractFileBrowser
Stefan Vogel <sv@exept.de>
parents: 12062
diff changeset
 10382