- Tools::LintHighlighter jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sat, 21 Apr 2012 09:36:31 +0100
branchjv
changeset 12236 8ec3d6230b65
parent 12235 32590d2e813d
child 12237 786dd9d46334
- Tools::LintHighlighter changed: #emphasisForError #emphasisForInformation #emphasisForWarning - Tools::NewSystemBrowser changed: #searchCompletionNewForClass: #switchToClassNameOrSelectorMatching: - FileBrowserV3 added: #currentFileNameHolderChanged #fileEntryFieldHolderChanged #switchToBookmarkEntry: #update:with:from: changed: #updateBookmark - EditFieldWithCompletion changed: #doCompletion
EditFieldWithCompletion.st
FileBrowserV3.st
Tools__Inspector2.st
Tools__LintHighlighter.st
Tools__NewSystemBrowser.st
libtool.rc
--- a/EditFieldWithCompletion.st	Sat Apr 21 09:36:11 2012 +0100
+++ b/EditFieldWithCompletion.st	Sat Apr 21 09:36:31 2012 +0100
@@ -316,7 +316,7 @@
                     ifNone:[ best ]
     ].
     options isSortedCollection ifFalse:[
-        options := options asSortedCollection:[:a :b | a asString < b asString ]
+        options := options asSortedCollection:[:a :b | a displayString < b displayString ]
     ].
     self sensor 
         pushUserEvent:#completion:options:
@@ -325,9 +325,9 @@
 
     "Created: / 26-07-2009 / 17:45:09 / Jan Vrany <vranyj1@fel.cvut.cz>"
     "Modified: / 09-08-2009 / 02:51:44 / Jan Vrany <vranyj1@fel.cvut.cz>"
-    "Modified: / 09-02-2010 / 20:46:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 18-11-2011 / 14:33:56 / cg"
     "Modified (format): / 20-11-2011 / 09:42:25 / cg"
+    "Modified: / 20-04-2012 / 18:20:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 hideOptionsWindow
@@ -410,5 +410,5 @@
 !
 
 version_SVN
-    ^ '$Id: EditFieldWithCompletion.st 7969 2012-04-04 16:35:25Z vranyj1 $'
+    ^ '$Id: EditFieldWithCompletion.st 7985 2012-04-21 08:36:31Z vranyj1 $'
 ! !
--- a/FileBrowserV3.st	Sat Apr 21 09:36:11 2012 +0100
+++ b/FileBrowserV3.st	Sat Apr 21 09:36:31 2012 +0100
@@ -723,6 +723,13 @@
     self bookmarkBarVisibleHolder value
 
     "Created: / 04-04-2012 / 12:08:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+switchToBookmarkEntry: bookmark
+
+    self gotoFile: bookmark path asFilename
+
+    "Created: / 20-04-2012 / 18:07:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !FileBrowserV3 methodsFor:'aspects'!
@@ -776,23 +783,30 @@
 
 !FileBrowserV3 methodsFor:'change & update'!
 
+currentFileNameHolderChanged
+    super currentFileNameHolderChanged.
+    self updateBookmark
+
+    "Created: / 20-04-2012 / 18:04:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 update:something with:aParameter from:changedObject
     "Invoked when an object that I depend upon sends a change notification."
 
-    changedObject == fileEntryFieldHolder ifTrue:[
-        self updateBookmark.
-    ].
+    "stub code automatically generated - please change as required"
 
+    "/ changedObject == someOfMyValueHolders ifTrue:[
+    "/     self doSomethingApropriate.
+    "/     ^ self.
+    "/ ].
     super update:something with:aParameter from:changedObject
-
-    "Modified: / 13-04-2012 / 12:36:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 updateBookmark
 
     | file bookmark |
     file := fileEntryFieldHolder value.
-    file notEmptyOrNil ifFalse:[
+    file notEmptyOrNil ifTrue:[
         bookmark := Bookmark forFile: file.
     ].
     self bookmarkHolder value: bookmark.
@@ -851,5 +865,5 @@
 !FileBrowserV3 class methodsFor:'documentation'!
 
 version_SVN
-    ^ '$Id: FileBrowserV3.st 7979 2012-04-13 18:16:04Z vranyj1 $'
+    ^ '$Id: FileBrowserV3.st 7985 2012-04-21 08:36:31Z vranyj1 $'
 ! !
--- a/Tools__Inspector2.st	Sat Apr 21 09:36:11 2012 +0100
+++ b/Tools__Inspector2.st	Sat Apr 21 09:36:31 2012 +0100
@@ -1053,11 +1053,11 @@
 !Inspector2::NavigationState class methodsFor:'documentation'!
 
 version
-    ^'$Header: /cvs/stx/stx/libtool/Tools__Inspector2.st,v 1.30 2012/03/06 14:44:17 cg Exp $'
+    ^'$Id: Tools__Inspector2.st 7985 2012-04-21 08:36:31Z vranyj1 $'
 !
 
 version_SVN
-    ^'$Id: Tools__Inspector2.st 7952 2012-03-21 17:50:14Z vranyj1 $'
+    ^'$Id: Tools__Inspector2.st 7985 2012-04-21 08:36:31Z vranyj1 $'
 ! !
 
 !Inspector2::NavigationState methodsFor:'accessing'!
@@ -1207,7 +1207,8 @@
 initializeCommonTabs
 
     "Unfinished code"
-    self initializeClassBrowserTab
+"/    JV@2012-04-20: Don't add class tab, only takes time and nobody uses it anyway
+"/    self initializeClassBrowserTab
 
 "/    tabs add:
 "/        (Tools::Inspector2Tab new
@@ -1218,7 +1219,7 @@
 
     "Created: / 16-01-2008 / 16:56:48 / janfrog"
     "Modified: / 17-02-2008 / 10:29:54 / janfrog"
-    "Modified: / 21-08-2011 / 10:03:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified (comment): / 20-04-2012 / 20:23:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 initializeExtraTabs
@@ -1264,7 +1265,7 @@
 !Inspector2 class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__Inspector2.st,v 1.30 2012/03/06 14:44:17 cg Exp $'
+    ^ '$Id: Tools__Inspector2.st 7985 2012-04-21 08:36:31Z vranyj1 $'
 !
 
 version_CVS
@@ -1276,7 +1277,7 @@
 !
 
 version_SVN
-    ^ '$Id: Tools__Inspector2.st 7952 2012-03-21 17:50:14Z vranyj1 $'
+    ^ '$Id: Tools__Inspector2.st 7985 2012-04-21 08:36:31Z vranyj1 $'
 ! !
 
 Inspector2 initialize!
--- a/Tools__LintHighlighter.st	Sat Apr 21 09:36:11 2012 +0100
+++ b/Tools__LintHighlighter.st	Sat Apr 21 09:36:31 2012 +0100
@@ -61,7 +61,7 @@
     emphasisError isNil ifTrue:[
         warnColor := Color red.
         emphasisError := Array 
-            with: #backgroundColor -> warnColor lightened lightened 
+            "/with: #backgroundColor -> warnColor lightened lightened 
             with: #underwave 
             with: #underlineColor -> warnColor                    
     ].
@@ -69,6 +69,7 @@
 
     "Created: / 05-08-2011 / 09:31:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 08-03-2012 / 03:00:51 / cg"
+    "Modified: / 20-04-2012 / 18:29:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 emphasisForInformation
@@ -77,7 +78,7 @@
     emphasisInformation isNil ifTrue:[
         warnColor := Color blue lighter.
         emphasisInformation := Array 
-            with: #backgroundColor -> warnColor lightened lightened
+            "/with: #backgroundColor -> warnColor lightened lightened
             with: #underwave 
             with: #underlineColor -> warnColor                    
     ].
@@ -85,6 +86,7 @@
 
     "Created: / 05-08-2011 / 09:31:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 08-03-2012 / 03:01:22 / cg"
+    "Modified: / 20-04-2012 / 18:29:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 emphasisForSeverity: severity
@@ -103,7 +105,7 @@
     emphasisWarning isNil ifTrue:[
         warnColor := (Color redByte: 224 greenByte: 200 blueByte: 45).
         emphasisWarning := Array 
-            with: #backgroundColor -> warnColor lightened lightened
+            "/with: #backgroundColor -> warnColor lightened lightened
             with: #underwave 
             with: #underlineColor -> warnColor                  
     ].
@@ -111,6 +113,7 @@
 
     "Created: / 05-08-2011 / 09:31:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 08-03-2012 / 03:00:19 / cg"
+    "Modified: / 20-04-2012 / 18:29:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !LintHighlighter methodsFor:'formatting'!
@@ -175,8 +178,6 @@
     "Created: / 04-08-2011 / 23:51:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-
-
 format: text tree: tree
 
     annotations := SortedCollection new.
@@ -248,7 +249,7 @@
 !LintHighlighter class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintHighlighter.st,v 1.5 2012/03/08 03:16:18 cg Exp $'
+    ^ '$Id: Tools__LintHighlighter.st 7985 2012-04-21 08:36:31Z vranyj1 $'
 !
 
 version_CVS
@@ -256,5 +257,5 @@
 !
 
 version_SVN
-    ^ '$Id: Tools__LintHighlighter.st 7952 2012-03-21 17:50:14Z vranyj1 $'
+    ^ '$Id: Tools__LintHighlighter.st 7985 2012-04-21 08:36:31Z vranyj1 $'
 ! !
--- a/Tools__NewSystemBrowser.st	Sat Apr 21 09:36:11 2012 +0100
+++ b/Tools__NewSystemBrowser.st	Sat Apr 21 09:36:31 2012 +0100
@@ -47611,6 +47611,17 @@
         ].
     ].
 
+    "Look for Java class..."
+    (JAVA notNil and:[aMatchString includes: $.]) ifTrue:[
+        | javaClass |
+
+        javaClass := Java at: aMatchString.
+        javaClass notNil ifTrue:[ 
+            self switchToClass: javaClass.
+            ^self
+        ].
+    ].
+
     className := self askForClassNameMatching:aMatchString.
     className notNil ifTrue:[
         self switchToClassNamed:className.
@@ -47618,6 +47629,7 @@
 
     "Modified: / 04-07-2006 / 18:48:25 / fm"
     "Modified (comment): / 07-03-2012 / 12:05:07 / cg"
+    "Modified: / 20-04-2012 / 19:44:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 switchToClassNamed:aString
@@ -51982,7 +51994,7 @@
 
 searchCompletionNewForClass: patternString
 
-    | env pattern matcher matches relax withPrefix nmWihoutPrefix |
+    | env pattern matcher matches relax withPrefix |
 
     patternString isEmptyOrNil ifTrue:[^#('' #())].
 
@@ -51997,7 +52009,7 @@
     withPrefix ifTrue:[
         matcher := [:cls|pattern match: cls name]
     ] ifFalse:[
-        matcher := [:cls|pattern match: (nmWihoutPrefix := cls nameWithoutPrefix)]
+        matcher := [:cls|pattern match: cls nameWithoutPrefix]
     ].
 
     relax := 1.
@@ -52007,9 +52019,9 @@
             | cls |
 
             cls := env at: nm.
-            (cls notNil and:[cls isBehavior]) ifTrue:[
+            (cls notNil and:[cls isBehavior and:[(matches includesIdentical: cls)not]]) ifTrue:[
                 (matcher value: cls) ifTrue:[
-                    matches add: (self searchCompletionEntryForClass: cls showPrefix: withPrefix)
+                    matches add: cls
                 ].
             ].
         ].
@@ -52019,6 +52031,7 @@
     matches isEmpty ifTrue:[
         ^ #(nil #())
     ] ifFalse:[
+        matches := matches collect:[:cls|self searchCompletionEntryForClass: cls showPrefix: withPrefix].
         ^ { matches first . matches }
     ]
 
@@ -56518,8 +56531,11 @@
 !NewSystemBrowser::ClassCompletionEntry methodsFor:'converting'!
 
 asString
-
-    ^klass name
+    ^klass isJavaClass ifTrue:[
+        klass javaName
+    ] ifFalse:[
+        klass name
+    ].
 
     "Created: / 04-04-2012 / 13:00:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
@@ -56535,7 +56551,11 @@
         namespace := nil
     ] ifFalse:[
         name := klass nameWithoutPrefix.
-        namespace := klass  nameSpace name.
+        klass isJavaClass ifFalse:[
+            namespace := klass  nameSpace name.
+        ] ifTrue:[
+            namespace := klass javaPackage.
+        ]
     ].
 
     name displayOn:aGC x:x y:y opaque:opaque.
@@ -56554,6 +56574,20 @@
     ]
 
     "Created: / 04-04-2012 / 13:03:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+displayString
+
+    | name |
+
+    showPrefix ifTrue:[
+        name := klass name.
+    ] ifFalse:[
+        name := klass nameWithoutPrefix.
+    ].
+    ^name
+
+    "Created: / 20-04-2012 / 18:19:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !NewSystemBrowser::ClassCompletionEntry methodsFor:'printing & storing'!
@@ -56572,7 +56606,7 @@
 !NewSystemBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Tools__NewSystemBrowser.st 7979 2012-04-13 18:16:04Z vranyj1 $'
+    ^ '$Id: Tools__NewSystemBrowser.st 7985 2012-04-21 08:36:31Z vranyj1 $'
 !
 
 version_CVS
@@ -56580,7 +56614,7 @@
 !
 
 version_SVN
-    ^ '$Id: Tools__NewSystemBrowser.st 7979 2012-04-13 18:16:04Z vranyj1 $'
+    ^ '$Id: Tools__NewSystemBrowser.st 7985 2012-04-21 08:36:31Z vranyj1 $'
 ! !
 
 NewSystemBrowser initialize!
--- a/libtool.rc	Sat Apr 21 09:36:11 2012 +0100
+++ b/libtool.rc	Sat Apr 21 09:36:31 2012 +0100
@@ -25,7 +25,7 @@
       VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2011\nCopyright eXept Software AG 1998-2011\0"
       VALUE "ProductName", "Smalltalk/X\0"
       VALUE "ProductVersion", "6.2.1.1\0"
-      VALUE "ProductDate", "Wed, 18 Apr 2012 20:24:28 GMT\0"
+      VALUE "ProductDate", "Sat, 21 Apr 2012 08:36:42 GMT\0"
     END
 
   END