#REFACTORING by exept
authorClaus Gittinger <cg@exept.de>
Wed, 18 Dec 2019 00:29:30 +0100
changeset 19369 52d2aa01b22f
parent 19368 09321bc5411e
child 19370 4944c9c815ed
#REFACTORING by exept class: CodeView2 class definition added: #smallLintRulesHolder: #smalllintRulesHolder changed: #browseMethod:label: class: CodeView2 class added: #documentation class: Tools::CodeView2 class removed: #version_SVN
Tools__CodeView2.st
--- a/Tools__CodeView2.st	Wed Dec 18 00:26:46 2019 +0100
+++ b/Tools__CodeView2.st	Wed Dec 18 00:29:30 2019 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
               All Rights Reserved
@@ -33,7 +35,7 @@
 		showGutterChannel showAcceptCancelBarChannel modeHolder services
 		servicesFromClient syntaxElements currentParseNodeHolder
 		currentBlockNodeHolder syntaxElementSelection highlightEmphasis
-		diffMode synchronizedCodeViews'
+		diffMode synchronizedCodeViews smallLintRulesHolder'
 	classVariableNames:'TraceSelectors'
 	poolDictionaries:''
 	category:'Interface-CodeView'
@@ -95,6 +97,40 @@
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 "
+!
+
+documentation
+"
+    documentation to be added.
+
+    class:
+        <a short class summary here, describing what instances represent>
+
+    responsibilities:    
+        <describing what my main role is>
+
+    collaborators:    
+        <describing with whom and how I talk to>
+
+    API:
+        <public api and main messages>
+        
+    example:
+        <a one-line examples on how to use - can also be in a separate example method>
+
+    implementation:
+        <implementation points>
+
+    [author:]
+        exept MBP
+
+    [instance variables:]
+
+    [class variables:]
+
+    [see also:]
+
+"
 ! !
 
 !CodeView2 class methodsFor:'initialization'!
@@ -769,6 +805,12 @@
     "Created: / 09-03-2017 / 10:50:29 / cg"
 !
 
+smallLintRulesHolder:aHolder
+    "if set, this is returned and the browser is not asked"
+
+    smallLintRulesHolder := aHolder.
+!
+
 synchronizeWith: aCodeView
 
     self assert: aCodeView ~= self.
@@ -1118,6 +1160,17 @@
     self changed: #modeHolder with: modeHolder
 
     "Modified: / 17-06-2011 / 12:55:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+smalllintRulesHolder
+    |browser|
+
+    smallLintRulesHolder notNil ifTrue:[^ smallLintRulesHolder].
+
+    (browser := self browser) notNil ifTrue:[
+        ^ browser smalllintRulesOrDefaultHolder.
+    ].
+    ^ nil
 ! !
 
 !CodeView2 methodsFor:'change & update'!
@@ -1326,17 +1379,18 @@
 !
 
 browseMethod: method label: label
-
-    self browser isNil ifTrue: [^NewSystemBrowser openInMethod:method].
+    |browser|
+
+    (browser := self browser) isNil ifTrue: [^NewSystemBrowser openInMethod:method].
     (UserPreferences current alwaysOpenNewTabWhenCtrlClick 
-        or:[self browser navigationState modified])  
+        or:[browser navigationState modified])  
         ifTrue:
-            [self browser 
+            [browser 
                 spawnFullBrowserInClass: method mclass 
                 selector:method selector 
                 in:#newBuffer]
         ifFalse:
-            [self browser 
+            [ browser 
                 switchToClass: method containingClass 
                 selector: method selector].
 
@@ -4661,10 +4715,6 @@
 
 version_CVS
     ^ '$Header$'
-!
-
-version_SVN
-    ^ '$Id$'
 ! !