--- a/Tools__NewSystemBrowser.st Wed Apr 04 12:12:00 2012 +0100
+++ b/Tools__NewSystemBrowser.st Wed Apr 04 17:35:25 2012 +0100
@@ -48,6 +48,13 @@
category:'Interface-Browsers-New'
!
+Object subclass:#ClassCompletionEntry
+ instanceVariableNames:'klass'
+ classVariableNames:''
+ poolDictionaries:''
+ privateIn:NewSystemBrowser
+!
+
!NewSystemBrowser class methodsFor:'documentation'!
aboutThisApplicationText
@@ -27653,41 +27660,6 @@
self codeAspect:#newError.
!
-classMenuNewGroovyClass
-
- | currentClass superClass code category |
- JavaVM booted ifFalse:[JavaVM boot].
-
- currentClass := self theSingleSelectedClass.
- currentClass notNil ifTrue:[
- superClass := currentClass theNonMetaclass superclass.
- superClass notNil ifTrue:[
- superClass isJavaClass ifFalse:[
- superClass := Java classForName:'java.lang.Object'.
- ]
- ]
- ] ifFalse:[
- superClass := Java classForName:'java.lang.Object'.
- ].
-
- category := self hasCategorySelected
- ifTrue:[self selectedCategoriesValue first]
- ifFalse:[Compiler defaultMethodCategory]. "/ '* As yet uncategorized *'
-
-
- code := GroovyLanguage instance
- classTemplateFor: superClass
- in: category
- asNamespace: false
- private: false.
-
- self showCode: code.
- self setAcceptAction: [:theCode | self doAcceptGroovyClassDefinition: theCode asString ].
- self codeAspect:#newClassDefinition.
-
- "Created: / 18-02-2012 / 17:16:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
classMenuNewHaskellModule
self classMenuNewClass:HaskellModule
!
@@ -51899,6 +51871,13 @@
"Created: / 04-12-2011 / 22:11:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+searchCompletionEntryForClass: aClass
+
+ ^ClassCompletionEntry new klass: aClass
+
+ "Created: / 04-04-2012 / 12:58:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
searchCompletionNew: patternString
| env pattern matches |
@@ -51918,7 +51897,7 @@
cls := env at: nm.
(cls notNil and:[cls isBehavior]) ifTrue:[
(pattern match: (nmWihoutPrefix := cls nameWithoutPrefix)) ifTrue:[
- matches add: nmWihoutPrefix
+ matches add: (self searchCompletionEntryForClass: cls)
].
].
].
@@ -56396,10 +56375,56 @@
"Modified (format): / 29-11-2011 / 14:49:08 / cg"
! !
+!NewSystemBrowser::ClassCompletionEntry methodsFor:'accessing'!
+
+klass
+ ^ klass
+!
+
+klass:something
+ klass := something.
+! !
+
+!NewSystemBrowser::ClassCompletionEntry methodsFor:'converting'!
+
+asString
+
+ ^klass name
+
+ "Created: / 04-04-2012 / 13:00:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!NewSystemBrowser::ClassCompletionEntry methodsFor:'displaying'!
+
+displayOn:aGC x:x y:y opaque:opaque
+
+ | name namespace lw cnw fg |
+
+ name := klass nameWithoutPrefix.
+ namespace := klass nameSpace name.
+
+ name displayOn:aGC x:x y:y opaque:opaque.
+
+ namespace ~~ #Smalltalk ifTrue:[
+ namespace := 'in ', namespace.
+ lw := x + 16 + (name widthOn: aGC).
+ cnw := aGC widthOfString: namespace.
+
+ (aGC width > (lw + cnw + 5)) ifTrue:[
+ fg := aGC paint.
+ aGC paint: (Color gray: 40).
+ namespace displayOn:aGC x: aGC width - cnw - 5 y:y opaque:opaque.
+ aGC paint: fg.
+ ]
+ ]
+
+ "Created: / 04-04-2012 / 13:03:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!NewSystemBrowser class methodsFor:'documentation'!
version
- ^ '$Id: Tools__NewSystemBrowser.st 7966 2012-04-04 09:30:46Z vranyj1 $'
+ ^ '$Id: Tools__NewSystemBrowser.st 7969 2012-04-04 16:35:25Z vranyj1 $'
!
version_CVS
@@ -56407,7 +56432,7 @@
!
version_SVN
- ^ '$Id: Tools__NewSystemBrowser.st 7966 2012-04-04 09:30:46Z vranyj1 $'
+ ^ '$Id: Tools__NewSystemBrowser.st 7969 2012-04-04 16:35:25Z vranyj1 $'
! !
NewSystemBrowser initialize!