AbstractFileApplicationNoteBookComponent.st
author Stefan Vogel <sv@exept.de>
Mon, 30 Nov 2015 11:01:06 +0100
changeset 15974 8a850b3f2d90
parent 15822 161ba719c870
child 15978 2e1c1fcc135d
child 16198 7aca47a2689a
permissions -rw-r--r--
#REFACTORING class: AbstractFileApplicationNoteBookComponent changed: #getTabString #getTabValueString
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5140
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
     1
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
     2
 COPYRIGHT (c) 2002 by eXept Software AG
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
     3
              All Rights Reserved
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
     4
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
     5
 This software is furnished under a license and may be used
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
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: 5120
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
     8
 be provided or otherwise made available to, or used by, any
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
     9
 other person.  No title to or ownership of the software is
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
    10
 hereby transferred.
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
    11
"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    12
"{ Package: 'stx:libtool' }"
321c1729db5b initial checkin
penk
parents:
diff changeset
    13
15588
558245ed3e2d class: AbstractFileApplicationNoteBookComponent
Stefan Vogel <sv@exept.de>
parents: 14800
diff changeset
    14
"{ NameSpace: Smalltalk }"
558245ed3e2d class: AbstractFileApplicationNoteBookComponent
Stefan Vogel <sv@exept.de>
parents: 14800
diff changeset
    15
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    16
ApplicationModel subclass:#AbstractFileApplicationNoteBookComponent
321c1729db5b initial checkin
penk
parents:
diff changeset
    17
	instanceVariableNames:'sameFileIndex item type notifyChannel'
321c1729db5b initial checkin
penk
parents:
diff changeset
    18
	classVariableNames:''
321c1729db5b initial checkin
penk
parents:
diff changeset
    19
	poolDictionaries:''
321c1729db5b initial checkin
penk
parents:
diff changeset
    20
	category:'Interface-Tools-File'
321c1729db5b initial checkin
penk
parents:
diff changeset
    21
!
321c1729db5b initial checkin
penk
parents:
diff changeset
    22
5140
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
    23
!AbstractFileApplicationNoteBookComponent class methodsFor:'documentation'!
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
    24
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
    25
copyright
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
    26
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
    27
 COPYRIGHT (c) 2002 by eXept Software AG
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
    28
              All Rights Reserved
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
    29
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
    30
 This software is furnished under a license and may be used
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
    31
 only in accordance with the terms of that license and with the
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
    33
 be provided or otherwise made available to, or used by, any
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
    34
 other person.  No title to or ownership of the software is
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
    35
 hereby transferred.
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
    36
"
5967
ff5e8356fcb7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5737
diff changeset
    37
!
ff5e8356fcb7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5737
diff changeset
    38
ff5e8356fcb7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5737
diff changeset
    39
documentation
ff5e8356fcb7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5737
diff changeset
    40
"
ff5e8356fcb7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5737
diff changeset
    41
    [Author:]
ff5e8356fcb7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5737
diff changeset
    42
        Christian Penk
ff5e8356fcb7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5737
diff changeset
    43
"
5140
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5120
diff changeset
    44
! !
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    45
321c1729db5b initial checkin
penk
parents:
diff changeset
    46
!AbstractFileApplicationNoteBookComponent class methodsFor:'defaults'!
321c1729db5b initial checkin
penk
parents:
diff changeset
    47
321c1729db5b initial checkin
penk
parents:
diff changeset
    48
tabStringFor:aApplicationType
7689
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
    49
    "the formatString shown in a tab (language translated)"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    50
321c1729db5b initial checkin
penk
parents:
diff changeset
    51
    ^ nil
7689
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
    52
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
    53
    "Modified: / 01-03-2007 / 21:43:10 / cg"
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
    54
!
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
    55
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
    56
tabStringFor:aApplicationType forContents:shownContents
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
    57
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
    58
    ^ nil
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
    59
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
    60
    "Created: / 01-03-2007 / 21:35:39 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    61
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
    62
321c1729db5b initial checkin
penk
parents:
diff changeset
    63
!AbstractFileApplicationNoteBookComponent class methodsFor:'queries'!
321c1729db5b initial checkin
penk
parents:
diff changeset
    64
5010
27aa6fa93dcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4529
diff changeset
    65
canOpenItem:anItem
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
    example:
5010
27aa6fa93dcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4529
diff changeset
    69
    ^ (anItem suffix == 'cc')
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    70
"
321c1729db5b initial checkin
penk
parents:
diff changeset
    71
    ^ false
321c1729db5b initial checkin
penk
parents:
diff changeset
    72
!
321c1729db5b initial checkin
penk
parents:
diff changeset
    73
321c1729db5b initial checkin
penk
parents:
diff changeset
    74
wantNewApplicationAnyway
321c1729db5b initial checkin
penk
parents:
diff changeset
    75
321c1729db5b initial checkin
penk
parents:
diff changeset
    76
    ^ true
321c1729db5b initial checkin
penk
parents:
diff changeset
    77
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
    78
321c1729db5b initial checkin
penk
parents:
diff changeset
    79
!AbstractFileApplicationNoteBookComponent methodsFor:'accessing'!
321c1729db5b initial checkin
penk
parents:
diff changeset
    80
4529
134c48ecdef5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4523
diff changeset
    81
notify:msg
134c48ecdef5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4523
diff changeset
    82
    self notifyChannel value:msg
134c48ecdef5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4523
diff changeset
    83
!
134c48ecdef5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4523
diff changeset
    84
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
    85
notifyChannel
321c1729db5b initial checkin
penk
parents:
diff changeset
    86
    notifyChannel isNil ifTrue:[
321c1729db5b initial checkin
penk
parents:
diff changeset
    87
        self masterApplication notNil ifTrue:[
321c1729db5b initial checkin
penk
parents:
diff changeset
    88
            notifyChannel := masterApplication notifyChannel.
321c1729db5b initial checkin
penk
parents:
diff changeset
    89
        ] ifFalse:[
321c1729db5b initial checkin
penk
parents:
diff changeset
    90
            notifyChannel := ValueHolder with:''.
321c1729db5b initial checkin
penk
parents:
diff changeset
    91
        ].
321c1729db5b initial checkin
penk
parents:
diff changeset
    92
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
    93
    ^ notifyChannel
321c1729db5b initial checkin
penk
parents:
diff changeset
    94
!
321c1729db5b initial checkin
penk
parents:
diff changeset
    95
321c1729db5b initial checkin
penk
parents:
diff changeset
    96
sameFileIndex
321c1729db5b initial checkin
penk
parents:
diff changeset
    97
321c1729db5b initial checkin
penk
parents:
diff changeset
    98
    ^ sameFileIndex
321c1729db5b initial checkin
penk
parents:
diff changeset
    99
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   100
321c1729db5b initial checkin
penk
parents:
diff changeset
   101
sameFileIndex:something
321c1729db5b initial checkin
penk
parents:
diff changeset
   102
321c1729db5b initial checkin
penk
parents:
diff changeset
   103
    sameFileIndex := something.
321c1729db5b initial checkin
penk
parents:
diff changeset
   104
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
   105
321c1729db5b initial checkin
penk
parents:
diff changeset
   106
!AbstractFileApplicationNoteBookComponent methodsFor:'actions'!
321c1729db5b initial checkin
penk
parents:
diff changeset
   107
5010
27aa6fa93dcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4529
diff changeset
   108
changeItem:anItem
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   109
5010
27aa6fa93dcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4529
diff changeset
   110
    ^ self item:anItem.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   111
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   112
321c1729db5b initial checkin
penk
parents:
diff changeset
   113
doClose
321c1729db5b initial checkin
penk
parents:
diff changeset
   114
    |master|
321c1729db5b initial checkin
penk
parents:
diff changeset
   115
321c1729db5b initial checkin
penk
parents:
diff changeset
   116
    "/ tell the NoteBookApplication to close me
321c1729db5b initial checkin
penk
parents:
diff changeset
   117
    (master := self masterApplication) notNil ifTrue:[
321c1729db5b initial checkin
penk
parents:
diff changeset
   118
        master closeSubCanvas:self.
3933
2e083e6e224f must send #release manually (to release processes)
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
   119
        self release.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   120
    ] ifFalse:[
321c1729db5b initial checkin
penk
parents:
diff changeset
   121
        self closeRequest.
321c1729db5b initial checkin
penk
parents:
diff changeset
   122
    ].
3954
78e29a3ea4c1 next stage
penk
parents: 3933
diff changeset
   123
    ^ true
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   124
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
   125
5120
e4c15c9d82ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
   126
!AbstractFileApplicationNoteBookComponent methodsFor:'aspects'!
e4c15c9d82ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
   127
e4c15c9d82ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
   128
cursorColLabelHolder
e4c15c9d82ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
   129
    ^ ''
e4c15c9d82ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
   130
!
e4c15c9d82ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
   131
15822
161ba719c870 class: AbstractFileApplicationNoteBookComponent
Claus Gittinger <cg@exept.de>
parents: 15588
diff changeset
   132
cursorLineAndColumnLabelHolder
161ba719c870 class: AbstractFileApplicationNoteBookComponent
Claus Gittinger <cg@exept.de>
parents: 15588
diff changeset
   133
    ^ ''
161ba719c870 class: AbstractFileApplicationNoteBookComponent
Claus Gittinger <cg@exept.de>
parents: 15588
diff changeset
   134
!
161ba719c870 class: AbstractFileApplicationNoteBookComponent
Claus Gittinger <cg@exept.de>
parents: 15588
diff changeset
   135
5120
e4c15c9d82ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
   136
cursorLineLabelHolder
e4c15c9d82ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
   137
    ^ ''
e4c15c9d82ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
   138
!
e4c15c9d82ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
   139
5528
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5460
diff changeset
   140
fileEncodingHolder
5586
aba072239d9a default encoding
Claus Gittinger <cg@exept.de>
parents: 5528
diff changeset
   141
    ^ #'iso8859-1'
5528
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5460
diff changeset
   142
!
54e3fbee2822 fileEncoding
Claus Gittinger <cg@exept.de>
parents: 5460
diff changeset
   143
5737
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5604
diff changeset
   144
lockFileEncodingHolder
7289
1ce678e321fb lockEncoding fix
Claus Gittinger <cg@exept.de>
parents: 7105
diff changeset
   145
    ^ nil 
5737
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5604
diff changeset
   146
!
c5a659e2c4c7 added lockFileEncoding
Claus Gittinger <cg@exept.de>
parents: 5604
diff changeset
   147
5120
e4c15c9d82ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
   148
modeLabelHolder
e4c15c9d82ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
   149
    ^ ''
7105
215c0573cf42 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 5967
diff changeset
   150
!
215c0573cf42 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 5967
diff changeset
   151
215c0573cf42 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 5967
diff changeset
   152
modeLabelMenu
215c0573cf42 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 5967
diff changeset
   153
    ^ nil
215c0573cf42 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 5967
diff changeset
   154
215c0573cf42 edit mode menu
Claus Gittinger <cg@exept.de>
parents: 5967
diff changeset
   155
    "Created: / 11-09-2006 / 12:32:37 / cg"
5120
e4c15c9d82ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
   156
! !
e4c15c9d82ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5010
diff changeset
   157
9358
cb6f7757c128 support drag&drop from the find-file resultlist
Claus Gittinger <cg@exept.de>
parents: 8683
diff changeset
   158
!AbstractFileApplicationNoteBookComponent methodsFor:'drag & drop support'!
cb6f7757c128 support drag&drop from the find-file resultlist
Claus Gittinger <cg@exept.de>
parents: 8683
diff changeset
   159
cb6f7757c128 support drag&drop from the find-file resultlist
Claus Gittinger <cg@exept.de>
parents: 8683
diff changeset
   160
doStartDrag:aDropSource in:aView
cb6f7757c128 support drag&drop from the find-file resultlist
Claus Gittinger <cg@exept.de>
parents: 8683
diff changeset
   161
    "common code, used in subclasses"
cb6f7757c128 support drag&drop from the find-file resultlist
Claus Gittinger <cg@exept.de>
parents: 8683
diff changeset
   162
cb6f7757c128 support drag&drop from the find-file resultlist
Claus Gittinger <cg@exept.de>
parents: 8683
diff changeset
   163
    |hdl|
cb6f7757c128 support drag&drop from the find-file resultlist
Claus Gittinger <cg@exept.de>
parents: 8683
diff changeset
   164
cb6f7757c128 support drag&drop from the find-file resultlist
Claus Gittinger <cg@exept.de>
parents: 8683
diff changeset
   165
    hdl := DragAndDropManager new.
cb6f7757c128 support drag&drop from the find-file resultlist
Claus Gittinger <cg@exept.de>
parents: 8683
diff changeset
   166
cb6f7757c128 support drag&drop from the find-file resultlist
Claus Gittinger <cg@exept.de>
parents: 8683
diff changeset
   167
    hdl disabledCursor:AbstractFileBrowser disabledCursorImage.
cb6f7757c128 support drag&drop from the find-file resultlist
Claus Gittinger <cg@exept.de>
parents: 8683
diff changeset
   168
    hdl enabledCursor:AbstractFileBrowser enabledCursorImage.
cb6f7757c128 support drag&drop from the find-file resultlist
Claus Gittinger <cg@exept.de>
parents: 8683
diff changeset
   169
    hdl alienCursor:nil.
cb6f7757c128 support drag&drop from the find-file resultlist
Claus Gittinger <cg@exept.de>
parents: 8683
diff changeset
   170
cb6f7757c128 support drag&drop from the find-file resultlist
Claus Gittinger <cg@exept.de>
parents: 8683
diff changeset
   171
    hdl startDragFrom:aView dropSource:aDropSource offset:#topLeft
cb6f7757c128 support drag&drop from the find-file resultlist
Claus Gittinger <cg@exept.de>
parents: 8683
diff changeset
   172
! !
cb6f7757c128 support drag&drop from the find-file resultlist
Claus Gittinger <cg@exept.de>
parents: 8683
diff changeset
   173
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   174
!AbstractFileApplicationNoteBookComponent methodsFor:'queries'!
321c1729db5b initial checkin
penk
parents:
diff changeset
   175
7468
5fa8d2662e45 additional info
Claus Gittinger <cg@exept.de>
parents: 7289
diff changeset
   176
additionalInfo
5fa8d2662e45 additional info
Claus Gittinger <cg@exept.de>
parents: 7289
diff changeset
   177
    ^ ''
5fa8d2662e45 additional info
Claus Gittinger <cg@exept.de>
parents: 7289
diff changeset
   178
5fa8d2662e45 additional info
Claus Gittinger <cg@exept.de>
parents: 7289
diff changeset
   179
    "Created: / 24-10-2006 / 12:25:51 / cg"
5fa8d2662e45 additional info
Claus Gittinger <cg@exept.de>
parents: 7289
diff changeset
   180
!
5fa8d2662e45 additional info
Claus Gittinger <cg@exept.de>
parents: 7289
diff changeset
   181
11225
2f252f501b9e added: #closeButtonShown
Claus Gittinger <cg@exept.de>
parents: 9358
diff changeset
   182
closeButtonShown
2f252f501b9e added: #closeButtonShown
Claus Gittinger <cg@exept.de>
parents: 9358
diff changeset
   183
    ^ false.
2f252f501b9e added: #closeButtonShown
Claus Gittinger <cg@exept.de>
parents: 9358
diff changeset
   184
2f252f501b9e added: #closeButtonShown
Claus Gittinger <cg@exept.de>
parents: 9358
diff changeset
   185
    "Created: / 27-01-2012 / 15:00:22 / cg"
2f252f501b9e added: #closeButtonShown
Claus Gittinger <cg@exept.de>
parents: 9358
diff changeset
   186
!
2f252f501b9e added: #closeButtonShown
Claus Gittinger <cg@exept.de>
parents: 9358
diff changeset
   187
12492
1c485310f1ca class: AbstractFileApplicationNoteBookComponent
Claus Gittinger <cg@exept.de>
parents: 11225
diff changeset
   188
cvsMenusAreShown
1c485310f1ca class: AbstractFileApplicationNoteBookComponent
Claus Gittinger <cg@exept.de>
parents: 11225
diff changeset
   189
    ^ ConfigurableFeatures includesFeature: #CVSSupportEnabled
1c485310f1ca class: AbstractFileApplicationNoteBookComponent
Claus Gittinger <cg@exept.de>
parents: 11225
diff changeset
   190
!
1c485310f1ca class: AbstractFileApplicationNoteBookComponent
Claus Gittinger <cg@exept.de>
parents: 11225
diff changeset
   191
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   192
fileName
321c1729db5b initial checkin
penk
parents:
diff changeset
   193
    item notNil ifTrue:[
321c1729db5b initial checkin
penk
parents:
diff changeset
   194
        ^ item fileName.
321c1729db5b initial checkin
penk
parents:
diff changeset
   195
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
   196
    ^ nil
321c1729db5b initial checkin
penk
parents:
diff changeset
   197
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   198
321c1729db5b initial checkin
penk
parents:
diff changeset
   199
getDirWithoutFileName:aFileName
321c1729db5b initial checkin
penk
parents:
diff changeset
   200
321c1729db5b initial checkin
penk
parents:
diff changeset
   201
    | dir |
321c1729db5b initial checkin
penk
parents:
diff changeset
   202
    aFileName isNil ifTrue:[
321c1729db5b initial checkin
penk
parents:
diff changeset
   203
        ^ aFileName.    
321c1729db5b initial checkin
penk
parents:
diff changeset
   204
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
   205
    dir := aFileName asFilename.
321c1729db5b initial checkin
penk
parents:
diff changeset
   206
    dir isDirectory ifFalse:[
321c1729db5b initial checkin
penk
parents:
diff changeset
   207
        dir := dir directory.
321c1729db5b initial checkin
penk
parents:
diff changeset
   208
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
   209
    ^ dir.
321c1729db5b initial checkin
penk
parents:
diff changeset
   210
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   211
14800
993062566d3f class: AbstractFileApplicationNoteBookComponent
Claus Gittinger <cg@exept.de>
parents: 12492
diff changeset
   212
getTabIcon
993062566d3f class: AbstractFileApplicationNoteBookComponent
Claus Gittinger <cg@exept.de>
parents: 12492
diff changeset
   213
    "the item shown in a tab"
993062566d3f class: AbstractFileApplicationNoteBookComponent
Claus Gittinger <cg@exept.de>
parents: 12492
diff changeset
   214
993062566d3f class: AbstractFileApplicationNoteBookComponent
Claus Gittinger <cg@exept.de>
parents: 12492
diff changeset
   215
    ^ nil
993062566d3f class: AbstractFileApplicationNoteBookComponent
Claus Gittinger <cg@exept.de>
parents: 12492
diff changeset
   216
!
993062566d3f class: AbstractFileApplicationNoteBookComponent
Claus Gittinger <cg@exept.de>
parents: 12492
diff changeset
   217
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   218
getTabString
7689
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
   219
    "get the tab string from the application"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   220
15974
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   221
    |formatString valueString stream|
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   222
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   223
    stream := CharacterWriteStream on:''.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   224
15974
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   225
    valueString := self getTabValueString.
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   226
    valueString isNil ifTrue:[
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   227
        valueString := resources string:'<unnamed>'
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   228
    ].
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   229
    formatString := self class tabStringFor:type.
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   230
    formatString isNil ifTrue:[
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   231
        "/ default: take the class name
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   232
        formatString := self className.
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   233
    ].
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   234
    stream nextPutAll:(resources string:formatString with:valueString).
8387
44efd774e4fc care for wide filenames
Claus Gittinger <cg@exept.de>
parents: 7689
diff changeset
   235
15974
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   236
    ^ stream contents.
7689
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
   237
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
   238
    "Modified: / 01-03-2007 / 21:45:02 / cg"
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   239
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   240
321c1729db5b initial checkin
penk
parents:
diff changeset
   241
getTabStringEnd
15588
558245ed3e2d class: AbstractFileApplicationNoteBookComponent
Stefan Vogel <sv@exept.de>
parents: 14800
diff changeset
   242
    " get the tab string from the application list on the class side "
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   243
5460
305f441da48a window label and tab string changed
penk
parents: 5140
diff changeset
   244
    | stream|
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   245
321c1729db5b initial checkin
penk
parents:
diff changeset
   246
    self item notNil ifTrue:[
15588
558245ed3e2d class: AbstractFileApplicationNoteBookComponent
Stefan Vogel <sv@exept.de>
parents: 14800
diff changeset
   247
        stream := CharacterWriteStream new.
5460
305f441da48a window label and tab string changed
penk
parents: 5140
diff changeset
   248
        self type = #directoryDescription ifTrue:[
305f441da48a window label and tab string changed
penk
parents: 5140
diff changeset
   249
            stream nextPutAll:self fileName directory baseName.
305f441da48a window label and tab string changed
penk
parents: 5140
diff changeset
   250
            stream space.
305f441da48a window label and tab string changed
penk
parents: 5140
diff changeset
   251
            stream nextPut:$[.
305f441da48a window label and tab string changed
penk
parents: 5140
diff changeset
   252
            stream nextPutAll:self fileName baseName.
305f441da48a window label and tab string changed
penk
parents: 5140
diff changeset
   253
            stream nextPut:$].
305f441da48a window label and tab string changed
penk
parents: 5140
diff changeset
   254
        ] ifFalse:[
305f441da48a window label and tab string changed
penk
parents: 5140
diff changeset
   255
            stream nextPutAll:self fileName baseName.
305f441da48a window label and tab string changed
penk
parents: 5140
diff changeset
   256
            stream space.
305f441da48a window label and tab string changed
penk
parents: 5140
diff changeset
   257
            self sameFileIndex notNil ifTrue:[
305f441da48a window label and tab string changed
penk
parents: 5140
diff changeset
   258
                stream nextPutAll:self sameFileIndex asString.
305f441da48a window label and tab string changed
penk
parents: 5140
diff changeset
   259
            ].
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   260
        ].
5460
305f441da48a window label and tab string changed
penk
parents: 5140
diff changeset
   261
        ^ stream contents.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   262
    ].
321c1729db5b initial checkin
penk
parents:
diff changeset
   263
    ^ nil
321c1729db5b initial checkin
penk
parents:
diff changeset
   264
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   265
7689
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
   266
getTabValueString
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
   267
    "the item shown in a tab (not language translated)"
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
   268
15974
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   269
    |stream fn baseName|
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   270
7689
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
   271
    self item isNil ifTrue:[^ nil].
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
   272
15974
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   273
    stream := CharacterWriteStream on:''.
7689
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
   274
15974
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   275
    fn := self fileName.
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   276
    baseName := fn baseName.
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   277
    self type = #directoryDescription ifTrue:[
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   278
        stream nextPutAll:(fn directory baseName).
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   279
        stream space.
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   280
        stream nextPut:$[.
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   281
        stream nextPutAll:baseName.
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   282
        stream nextPut:$].
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   283
    ] ifFalse:[
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   284
        stream nextPutAll:baseName.
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   285
        stream space.
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   286
        self sameFileIndex notNil ifTrue:[
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   287
            stream nextPutAll:self sameFileIndex asString.
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   288
        ].
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   289
    ].
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   290
8a850b3f2d90 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15822
diff changeset
   291
    ^ stream contents
7689
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
   292
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
   293
    "Created: / 01-03-2007 / 21:40:03 / cg"
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
   294
!
f044f38e823c code cleanup
Claus Gittinger <cg@exept.de>
parents: 7468
diff changeset
   295
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   296
isEmbeddedApplication
321c1729db5b initial checkin
penk
parents:
diff changeset
   297
321c1729db5b initial checkin
penk
parents:
diff changeset
   298
     ^ self masterApplication notNil
321c1729db5b initial checkin
penk
parents:
diff changeset
   299
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   300
321c1729db5b initial checkin
penk
parents:
diff changeset
   301
isModified
321c1729db5b initial checkin
penk
parents:
diff changeset
   302
321c1729db5b initial checkin
penk
parents:
diff changeset
   303
    ^ false
321c1729db5b initial checkin
penk
parents:
diff changeset
   304
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   305
4147
e00eefe3f8fd querie for isTextEditor added
penk
parents: 3954
diff changeset
   306
isTextEditor
e00eefe3f8fd querie for isTextEditor added
penk
parents: 3954
diff changeset
   307
e00eefe3f8fd querie for isTextEditor added
penk
parents: 3954
diff changeset
   308
    ^ false
e00eefe3f8fd querie for isTextEditor added
penk
parents: 3954
diff changeset
   309
!
e00eefe3f8fd querie for isTextEditor added
penk
parents: 3954
diff changeset
   310
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   311
item
321c1729db5b initial checkin
penk
parents:
diff changeset
   312
321c1729db5b initial checkin
penk
parents:
diff changeset
   313
    ^ item
321c1729db5b initial checkin
penk
parents:
diff changeset
   314
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   315
5010
27aa6fa93dcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4529
diff changeset
   316
item:anItem
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   317
5010
27aa6fa93dcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4529
diff changeset
   318
    item := anItem.
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   319
    ^ true
321c1729db5b initial checkin
penk
parents:
diff changeset
   320
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   321
321c1729db5b initial checkin
penk
parents:
diff changeset
   322
presentation
321c1729db5b initial checkin
penk
parents:
diff changeset
   323
321c1729db5b initial checkin
penk
parents:
diff changeset
   324
    ^ nil
321c1729db5b initial checkin
penk
parents:
diff changeset
   325
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   326
321c1729db5b initial checkin
penk
parents:
diff changeset
   327
type
321c1729db5b initial checkin
penk
parents:
diff changeset
   328
321c1729db5b initial checkin
penk
parents:
diff changeset
   329
    ^ type
321c1729db5b initial checkin
penk
parents:
diff changeset
   330
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   331
321c1729db5b initial checkin
penk
parents:
diff changeset
   332
type:aType
321c1729db5b initial checkin
penk
parents:
diff changeset
   333
321c1729db5b initial checkin
penk
parents:
diff changeset
   334
    type := aType
321c1729db5b initial checkin
penk
parents:
diff changeset
   335
!
321c1729db5b initial checkin
penk
parents:
diff changeset
   336
321c1729db5b initial checkin
penk
parents:
diff changeset
   337
wantChangeAnyWay
321c1729db5b initial checkin
penk
parents:
diff changeset
   338
321c1729db5b initial checkin
penk
parents:
diff changeset
   339
    ^ (self type == #directoryDescription)
321c1729db5b initial checkin
penk
parents:
diff changeset
   340
! !
321c1729db5b initial checkin
penk
parents:
diff changeset
   341
5604
1c2e0582bcd9 resource access
Claus Gittinger <cg@exept.de>
parents: 5586
diff changeset
   342
!AbstractFileApplicationNoteBookComponent methodsFor:'resources'!
1c2e0582bcd9 resource access
Claus Gittinger <cg@exept.de>
parents: 5586
diff changeset
   343
1c2e0582bcd9 resource access
Claus Gittinger <cg@exept.de>
parents: 5586
diff changeset
   344
resources
1c2e0582bcd9 resource access
Claus Gittinger <cg@exept.de>
parents: 5586
diff changeset
   345
    masterApplication notNil ifTrue:[
1c2e0582bcd9 resource access
Claus Gittinger <cg@exept.de>
parents: 5586
diff changeset
   346
        ^ masterApplication resources
1c2e0582bcd9 resource access
Claus Gittinger <cg@exept.de>
parents: 5586
diff changeset
   347
    ].
1c2e0582bcd9 resource access
Claus Gittinger <cg@exept.de>
parents: 5586
diff changeset
   348
    ^ super resources
1c2e0582bcd9 resource access
Claus Gittinger <cg@exept.de>
parents: 5586
diff changeset
   349
! !
1c2e0582bcd9 resource access
Claus Gittinger <cg@exept.de>
parents: 5586
diff changeset
   350
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   351
!AbstractFileApplicationNoteBookComponent class methodsFor:'documentation'!
321c1729db5b initial checkin
penk
parents:
diff changeset
   352
321c1729db5b initial checkin
penk
parents:
diff changeset
   353
version
15822
161ba719c870 class: AbstractFileApplicationNoteBookComponent
Claus Gittinger <cg@exept.de>
parents: 15588
diff changeset
   354
    ^ '$Header$'
9358
cb6f7757c128 support drag&drop from the find-file resultlist
Claus Gittinger <cg@exept.de>
parents: 8683
diff changeset
   355
!
cb6f7757c128 support drag&drop from the find-file resultlist
Claus Gittinger <cg@exept.de>
parents: 8683
diff changeset
   356
cb6f7757c128 support drag&drop from the find-file resultlist
Claus Gittinger <cg@exept.de>
parents: 8683
diff changeset
   357
version_CVS
15822
161ba719c870 class: AbstractFileApplicationNoteBookComponent
Claus Gittinger <cg@exept.de>
parents: 15588
diff changeset
   358
    ^ '$Header$'
3892
321c1729db5b initial checkin
penk
parents:
diff changeset
   359
! !
12492
1c485310f1ca class: AbstractFileApplicationNoteBookComponent
Claus Gittinger <cg@exept.de>
parents: 11225
diff changeset
   360