#QUALITY by exept
authorClaus Gittinger <cg@exept.de>
Sun, 27 Oct 2019 10:36:53 +0100
changeset 19225 76fd22135c81
parent 19224 2bc390828a2c
child 19226 d06a38cd54e9
#QUALITY by exept class: FileApplicationNoteBook::TextEditor changed: #setUpTextView
FileApplicationNoteBook.st
--- a/FileApplicationNoteBook.st	Sun Oct 27 10:32:16 2019 +0100
+++ b/FileApplicationNoteBook.st	Sun Oct 27 10:36:53 2019 +0100
@@ -7066,7 +7066,7 @@
         - change the editorOperationsMenu
     "
 
-    |item mimeType suffix parenthesis commentStrings parentesisSpec col|
+    |item mimeType suffix commentStrings parenthesisSpec col|
 
     editView notNil ifTrue:[
         item := self item.
@@ -7076,23 +7076,25 @@
                 suffix := self fileName asFilename suffix.
 
                 (mimeType isHtmlType or:[mimeType isXmlType]) ifTrue:[
-                    parenthesis := editView parenthesisSpecification copy.
-                    ((parenthesis at:#open) includes:$<) ifFalse:[
-                        col := ((parenthesis at:#open) asOrderedCollection).
+                    parenthesisSpec := editView parenthesisSpecification.
+                    ((parenthesisSpec at:#open) includes:$<) ifFalse:[
+                        |parenthesisSpecCopy|
+
+                        parenthesisSpecCopy := parenthesisSpec copy.
+                        col := ((parenthesisSpecCopy at:#open) asNewOrderedCollection).
                         col add:$<.
-                        parenthesis at:#open put:col.
-
-                        col := ((parenthesis at:#close) asOrderedCollection).
+                        parenthesisSpecCopy at:#open put:col.
+
+                        col := ((parenthesisSpecCopy at:#close) asNewOrderedCollection).
                         col add:$>.
-                        parenthesis at:#close put:col.
-
-                        editView parenthesisSpecification:parenthesis
+                        parenthesisSpecCopy at:#close put:col.
+
+                        editView parenthesisSpecification:parenthesisSpecCopy
                     ].
                 ].
 
                 commentStrings := MIMETypes 
-                                    commentStringsForMimeType:mimeType 
-                                    suffix:suffix 
+                                    commentStringsForMimeType:mimeType suffix:suffix 
                                     ifUnknown:[
                                         "/ st:
                                         #('"/' ('"' '"'))
@@ -7102,9 +7104,8 @@
                     editView perform:#commentStrings: with:commentStrings ifNotUnderstood:nil
                 ].
 
-                parentesisSpec := MIMETypes 
-                                    parenthesisSpecForMimeType:mimeType 
-                                    suffix:suffix 
+                parenthesisSpec := MIMETypes 
+                                    parenthesisSpecForMimeType:mimeType suffix:suffix 
                                     ifUnknown:[
                                         |spec|
                                         spec := IdentityDictionary new.       
@@ -7113,8 +7114,8 @@
                                         spec
                                     ]. 
 
-                parentesisSpec notNil ifTrue:[
-                    editView perform:#parenthesisSpecification: with:parentesisSpec ifNotUnderstood:nil
+                parenthesisSpec notNil ifTrue:[
+                    editView perform:#parenthesisSpecification: with:parenthesisSpec ifNotUnderstood:nil
                 ].
                 self setupEditorOperationsMenuForMimeType:mimeType.
             ] ifFalse:[