More work on ClassSearchDialog.
--- a/Make.proto Mon Apr 28 08:36:50 2014 +0100
+++ b/Make.proto Tue Apr 29 00:11:40 2014 +0100
@@ -34,7 +34,7 @@
# add the path(es) here:,
# ********** OPTIONAL: MODIFY the next lines ***
# LOCALINCLUDES=-Ifoo -Ibar
-LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/helpers -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/lint -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libcomp -I$(INCLUDE_TOP)/stx/libhtml -I$(INCLUDE_TOP)/stx/libtool -I$(INCLUDE_TOP)/stx/libview -I$(INCLUDE_TOP)/stx/libview2 -I$(INCLUDE_TOP)/stx/libwidg -I$(INCLUDE_TOP)/stx/libwidg2
+LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/helpers -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/lint -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libcomp -I$(INCLUDE_TOP)/stx/libhtml -I$(INCLUDE_TOP)/stx/libtool -I$(INCLUDE_TOP)/stx/libview -I$(INCLUDE_TOP)/stx/libview2 -I$(INCLUDE_TOP)/stx/libwidg -I$(INCLUDE_TOP)/stx/libwidg2
# if you need any additional defines for embedded C code,
@@ -137,6 +137,7 @@
cd $(TOP)/libview && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
cd $(TOP)/libview2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
cd $(TOP)/goodies/refactoryBrowser/browser && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+ cd $(TOP)/goodies/sunit && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
cd $(TOP)/libwidg && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
cd $(TOP)/goodies/refactoryBrowser/lint && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
cd $(TOP)/libhtml && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
@@ -161,7 +162,7 @@
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
-$(OUTDIR)SmallSense__AbstractSearchDialog.$(O) SmallSense__AbstractSearchDialog.$(H): SmallSense__AbstractSearchDialog.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libview2/SimpleDialog.$(H) $(STCHDR)
+$(OUTDIR)SmallSense__AbstractDIalog.$(O) SmallSense__AbstractDIalog.$(H): SmallSense__AbstractDIalog.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libview2/SimpleDialog.$(H) $(STCHDR)
$(OUTDIR)SmallSense__CodeHighlightingService.$(O) SmallSense__CodeHighlightingService.$(H): SmallSense__CodeHighlightingService.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__BackgroundSourceProcessingService.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__CodeHighlightingService.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__CodeViewService.$(H) $(STCHDR)
$(OUTDIR)SmallSense__CodeNavigationService.$(O) SmallSense__CodeNavigationService.$(H): SmallSense__CodeNavigationService.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__CodeNavigationService.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__CodeViewService.$(H) $(STCHDR)
$(OUTDIR)SmallSense__CompletionContext.$(O) SmallSense__CompletionContext.$(H): SmallSense__CompletionContext.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
@@ -193,9 +194,9 @@
$(OUTDIR)SmallSense__Type.$(O) SmallSense__Type.$(H): SmallSense__Type.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)SmallSense__TypeHolder.$(O) SmallSense__TypeHolder.$(H): SmallSense__TypeHolder.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)jv_smallsense.$(O) jv_smallsense.$(H): jv_smallsense.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
+$(OUTDIR)SmallSense__AbstractSearchDialog.$(O) SmallSense__AbstractSearchDialog.$(H): SmallSense__AbstractSearchDialog.st $(INCLUDE_TOP)/jv/smallsense/SmallSense__AbstractDIalog.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libview2/SimpleDialog.$(H) $(STCHDR)
$(OUTDIR)SmallSense__ClassInfo.$(O) SmallSense__ClassInfo.$(H): SmallSense__ClassInfo.st $(INCLUDE_TOP)/jv/smallsense/SmallSense__Info.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)SmallSense__ClassPO.$(O) SmallSense__ClassPO.$(H): SmallSense__ClassPO.st $(INCLUDE_TOP)/jv/smallsense/SmallSense__PO.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalItem.$(H) $(STCHDR)
-$(OUTDIR)SmallSense__ClassSearchDialog.$(O) SmallSense__ClassSearchDialog.$(H): SmallSense__ClassSearchDialog.st $(INCLUDE_TOP)/jv/smallsense/SmallSense__AbstractSearchDialog.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libview2/SimpleDialog.$(H) $(STCHDR)
$(OUTDIR)SmallSense__ClassType.$(O) SmallSense__ClassType.$(H): SmallSense__ClassType.st $(INCLUDE_TOP)/jv/smallsense/SmallSense__Type.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)SmallSense__ConstantPO.$(O) SmallSense__ConstantPO.$(H): SmallSense__ConstantPO.st $(INCLUDE_TOP)/jv/smallsense/SmallSense__PO.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalItem.$(H) $(STCHDR)
$(OUTDIR)SmallSense__GenericEditSupport.$(O) SmallSense__GenericEditSupport.$(H): SmallSense__GenericEditSupport.st $(INCLUDE_TOP)/jv/smallsense/SmallSense__EditSupport.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
@@ -212,6 +213,7 @@
$(OUTDIR)SmallSense__UnionType.$(O) SmallSense__UnionType.$(H): SmallSense__UnionType.st $(INCLUDE_TOP)/jv/smallsense/SmallSense__SmalltalkInferencerParameters.$(H) $(INCLUDE_TOP)/jv/smallsense/SmallSense__Type.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)SmallSense__UnknownType.$(O) SmallSense__UnknownType.$(H): SmallSense__UnknownType.st $(INCLUDE_TOP)/jv/smallsense/SmallSense__Type.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)SmallSense__VariablePO.$(O) SmallSense__VariablePO.$(H): SmallSense__VariablePO.st $(INCLUDE_TOP)/jv/smallsense/SmallSense__PO.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalItem.$(H) $(STCHDR)
+$(OUTDIR)SmallSense__ClassSearchDialog.$(O) SmallSense__ClassSearchDialog.$(H): SmallSense__ClassSearchDialog.st $(INCLUDE_TOP)/jv/smallsense/SmallSense__AbstractDIalog.$(H) $(INCLUDE_TOP)/jv/smallsense/SmallSense__AbstractSearchDialog.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libview2/SimpleDialog.$(H) $(STCHDR)
$(OUTDIR)SmallSense__GroovyCompletionEngineSimple.$(O) SmallSense__GroovyCompletionEngineSimple.$(H): SmallSense__GroovyCompletionEngineSimple.st $(INCLUDE_TOP)/jv/smallsense/SmallSense__CompletionEngine.$(H) $(INCLUDE_TOP)/jv/smallsense/SmallSense__JavaCompletionEngineSimple.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)SmallSense__GroovyEditSupport.$(O) SmallSense__GroovyEditSupport.$(H): SmallSense__GroovyEditSupport.st $(INCLUDE_TOP)/jv/smallsense/SmallSense__EditSupport.$(H) $(INCLUDE_TOP)/jv/smallsense/SmallSense__JavaEditSupport.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)SmallSense__MethodKeywordRestPO.$(O) SmallSense__MethodKeywordRestPO.$(H): SmallSense__MethodKeywordRestPO.st $(INCLUDE_TOP)/jv/smallsense/SmallSense__MethodPO.$(H) $(INCLUDE_TOP)/jv/smallsense/SmallSense__PO.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalItem.$(H) $(STCHDR)
--- a/Make.spec Mon Apr 28 08:36:50 2014 +0100
+++ b/Make.spec Tue Apr 29 00:11:40 2014 +0100
@@ -50,7 +50,7 @@
STCWARNINGS=-warnNonStandard
COMMON_CLASSES= \
- SmallSense::AbstractSearchDialog \
+ SmallSense::AbstractDIalog \
SmallSense::CodeHighlightingService \
SmallSense::CodeNavigationService \
SmallSense::CompletionContext \
@@ -82,9 +82,9 @@
SmallSense::Type \
SmallSense::TypeHolder \
jv_smallsense \
+ SmallSense::AbstractSearchDialog \
SmallSense::ClassInfo \
SmallSense::ClassPO \
- SmallSense::ClassSearchDialog \
SmallSense::ClassType \
SmallSense::ConstantPO \
SmallSense::GenericEditSupport \
@@ -101,6 +101,7 @@
SmallSense::UnionType \
SmallSense::UnknownType \
SmallSense::VariablePO \
+ SmallSense::ClassSearchDialog \
SmallSense::GroovyCompletionEngineSimple \
SmallSense::GroovyEditSupport \
SmallSense::MethodKeywordRestPO \
@@ -109,7 +110,7 @@
COMMON_OBJS= \
- $(OUTDIR_SLASH)SmallSense__AbstractSearchDialog.$(O) \
+ $(OUTDIR_SLASH)SmallSense__AbstractDIalog.$(O) \
$(OUTDIR_SLASH)SmallSense__CodeHighlightingService.$(O) \
$(OUTDIR_SLASH)SmallSense__CodeNavigationService.$(O) \
$(OUTDIR_SLASH)SmallSense__CompletionContext.$(O) \
@@ -141,9 +142,9 @@
$(OUTDIR_SLASH)SmallSense__Type.$(O) \
$(OUTDIR_SLASH)SmallSense__TypeHolder.$(O) \
$(OUTDIR_SLASH)jv_smallsense.$(O) \
+ $(OUTDIR_SLASH)SmallSense__AbstractSearchDialog.$(O) \
$(OUTDIR_SLASH)SmallSense__ClassInfo.$(O) \
$(OUTDIR_SLASH)SmallSense__ClassPO.$(O) \
- $(OUTDIR_SLASH)SmallSense__ClassSearchDialog.$(O) \
$(OUTDIR_SLASH)SmallSense__ClassType.$(O) \
$(OUTDIR_SLASH)SmallSense__ConstantPO.$(O) \
$(OUTDIR_SLASH)SmallSense__GenericEditSupport.$(O) \
@@ -160,6 +161,7 @@
$(OUTDIR_SLASH)SmallSense__UnionType.$(O) \
$(OUTDIR_SLASH)SmallSense__UnknownType.$(O) \
$(OUTDIR_SLASH)SmallSense__VariablePO.$(O) \
+ $(OUTDIR_SLASH)SmallSense__ClassSearchDialog.$(O) \
$(OUTDIR_SLASH)SmallSense__GroovyCompletionEngineSimple.$(O) \
$(OUTDIR_SLASH)SmallSense__GroovyEditSupport.$(O) \
$(OUTDIR_SLASH)SmallSense__MethodKeywordRestPO.$(O) \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/SmallSense__AbstractDIalog.st Tue Apr 29 00:11:40 2014 +0100
@@ -0,0 +1,219 @@
+"{ Package: 'jv:smallsense' }"
+
+"{ NameSpace: SmallSense }"
+
+SimpleDialog subclass:#AbstractDIalog
+ instanceVariableNames:'buttons buttonsPanelView acceptEnabledHolder'
+ classVariableNames:''
+ poolDictionaries:''
+ category:'SmallSense-Core-Interface-Search'
+!
+
+!AbstractDIalog class methodsFor:'interface specs'!
+
+windowSpec
+ "This resource specification was automatically generated
+ by the UIPainter of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the UIPainter may not be able to read the specification."
+
+ "
+ UIPainter new openOnClass:SmallSense::AbstractSearchDialog andSelector:#windowSpec
+ SmallSense::AbstractSearchDialog new openInterface:#windowSpec
+ SmallSense::AbstractSearchDialog open
+ "
+
+ <resource: #canvas>
+
+ ^
+ #(FullSpec
+ name: windowSpec
+ window:
+ (WindowSpec
+ label: 'Search...'
+ name: 'Search...'
+ min: (Point 10 10)
+ bounds: (Rectangle 0 0 708 404)
+ menu: mainMenuSpec
+ )
+ component:
+ (SpecCollection
+ collection: (
+ (UISubSpecification
+ name: 'ContentPane'
+ layout: (LayoutFrame 10 0 0 0 -10 1 -40 1)
+ minorKey: dialogSpec
+ )
+ (UISubSpecification
+ name: 'ButtonsPane'
+ layout: (LayoutFrame 10 0 -40 1 -10 1 0 1)
+ minorKey: buttonsPaneSpec
+ )
+ )
+
+ )
+ )
+! !
+
+!AbstractDIalog class methodsFor:'interface specs-content'!
+
+buttonsPaneSpec
+ "This resource specification was automatically generated
+ by the UIPainter of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the UIPainter may not be able to read the specification."
+
+ "
+ UIPainter new openOnClass:SmallSense::AbstractDIalog andSelector:#buttonsPaneSpec
+ SmallSense::AbstractDIalog new openInterface:#buttonsPaneSpec
+ "
+
+ <resource: #canvas>
+
+ ^
+ #(FullSpec
+ name: buttonsPaneSpec
+ window:
+ (WindowSpec
+ label: 'Search...'
+ name: 'Search...'
+ min: (Point 10 10)
+ bounds: (Rectangle 0 0 708 38)
+ menu: mainMenuSpec
+ )
+ component:
+ (SpecCollection
+ collection: (
+ (HorizontalPanelViewSpec
+ name: 'Buttons'
+ layout: (LayoutFrame 0 0 0 0 0 1 0 1)
+ horizontalLayout: right
+ verticalLayout: center
+ horizontalSpace: 3
+ verticalSpace: 3
+ reverseOrderIfOKAtLeft: true
+ postBuildCallback: postBuildButtonsPanelView:
+ )
+ )
+
+ )
+ )
+! !
+
+!AbstractDIalog class methodsFor:'testing'!
+
+isAbstract
+ ^ self == SmallSense::AbstractDIalog
+! !
+
+!AbstractDIalog methodsFor:'adding & removing components'!
+
+addButton: aButton
+ buttons add: aButton.
+ buttonsPanelView notNil ifTrue:[
+ buttonsPanelView addComponent: aButton.
+ ].
+
+ "Created: / 10-04-2012 / 20:49:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 28-04-2014 / 22:52:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+addButtonAccept
+
+ ^self addButtonWithLabel: (resources string:'OK') action: [ self doAccept ] enablement: self acceptEnabledHolder.
+
+ "Created: / 28-04-2014 / 22:51:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+addButtonCancel
+
+ ^self addButtonWithLabel: (resources string:'Cancel') action: [ self doCancel ]
+
+ "Created: / 28-04-2014 / 22:50:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+addButtonWithLabel: label action: action
+ ^self addButtonWithLabel: label action: action enablement: true.
+
+ "Created: / 10-04-2012 / 20:50:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 28-04-2014 / 22:55:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+addButtonWithLabel: label action: action enablement: enablement
+ | button |
+
+ button := Button label: label action: action.
+ button enableChannel: enablement.
+ ^self addButton: button.
+
+ "Created: / 28-04-2014 / 22:51:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!AbstractDIalog methodsFor:'aspects'!
+
+acceptEnabledHolder
+ <resource: #uiAspect>
+
+ "automatically generated by UIPainter ..."
+
+ "*** the code below creates a default model when invoked."
+ "*** (which may not be the one you wanted)"
+ "*** Please change as required and accept it in the browser."
+ "*** (and replace this comment by something more useful ;-)"
+
+ acceptEnabledHolder isNil ifTrue:[
+ acceptEnabledHolder := true asValue.
+"/ if your app needs to be notified of changes, uncomment one of the lines below:
+"/ acceptEnabledHolder addDependent:self.
+"/ acceptEnabledHolder onChangeSend:#acceptEnabledHolderChanged to:self.
+ ].
+ ^ acceptEnabledHolder.
+! !
+
+!AbstractDIalog methodsFor:'hooks'!
+
+postBuildButtonsPanelView: aHorizontalPanelView
+ buttonsPanelView := aHorizontalPanelView.
+
+ "Created: / 28-04-2014 / 22:42:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+postBuildWith: anUIBuilder
+ | w |
+
+ buttons isEmpty ifTrue:[
+ | savedButtonsPanelView |
+
+ savedButtonsPanelView := buttonsPanelView.
+ buttonsPanelView := nil.
+ self addButtonCancel.
+ self addButtonAccept.
+ buttonsPanelView := savedButtonsPanelView.
+ ].
+
+ w := buttons inject: 0 into: [ :width :button | width max: (button preferredExtent x) ].
+ w := (w + 20) max: 100.
+ buttons do:[:button |
+ button preferredExtent: w @ 25.
+ buttonsPanelView addComponent: button.
+ ].
+
+ "Created: / 28-04-2014 / 22:53:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!AbstractDIalog methodsFor:'initialization'!
+
+initialize
+ "Invoked when a new instance is created."
+
+ "/ please change as required (and remove this comment)
+ buttons := OrderedCollection new.
+ "/ buttonsPanelView := nil.
+
+ super initialize.
+
+ "Modified: / 28-04-2014 / 22:49:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- a/SmallSense__AbstractSearchDialog.st Mon Apr 28 08:36:50 2014 +0100
+++ b/SmallSense__AbstractSearchDialog.st Tue Apr 29 00:11:40 2014 +0100
@@ -2,21 +2,23 @@
"{ NameSpace: SmallSense }"
-SimpleDialog subclass:#AbstractSearchDialog
- instanceVariableNames:'acceptEnabledHolder matchingObjectsView matchingObjectsTree
- matchingObjectsSelectionHolder matchPatternHolder
- matchingUpdateJob matchPatternView environmentHolder filterHolder
- filter matchingLabelHolder'
+AbstractDIalog subclass:#AbstractSearchDialog
+ instanceVariableNames:'matchingObjectsView matchingObjectsTree
+ matchingObjectsSelectionHolder matchingObjectsLabelHolder
+ matchingObjectsUpdateJob matchPatternHolder matchPatternView
+ environmentHolder filterHolder filter recentlySearchedPatterns
+ recentlySearchedObjects'
classVariableNames:''
poolDictionaries:''
category:'SmallSense-Core-Interface-Search'
!
-AbstractSearchDialog class instanceVariableNames:'lastMatchPattern lastSearchedObjects'
+AbstractSearchDialog class instanceVariableNames:'recentlySearchedPatterns recentlySearchedObjects'
"
The following class instance variables are inherited by this class:
+ SmallSense::AbstractDIalog -
SimpleDialog -
ApplicationModel - ClassResources
Model -
@@ -26,25 +28,27 @@
!AbstractSearchDialog class methodsFor:'accessing'!
-lastMatchPattern
- ^ lastMatchPattern
+recentlySearchedObjects
+ recentlySearchedObjects isNil ifTrue:[
+ recentlySearchedObjects := OrderedSet new.
+ ].
+ ^ recentlySearchedObjects
+
+ "Created: / 28-04-2014 / 23:13:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-lastMatchPattern:something
- lastMatchPattern := something.
-!
+recentlySearchedPatterns
+ recentlySearchedPatterns isNil ifTrue:[
+ recentlySearchedPatterns := OrderedSet new.
+ ].
+ ^ recentlySearchedPatterns
-lastSearchedObjects
- ^ lastSearchedObjects
-!
-
-lastSearchedObjects:something
- lastSearchedObjects := something.
+ "Created: / 28-04-2014 / 23:13:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!AbstractSearchDialog class methodsFor:'interface specs'!
-windowSpec
+dialogSpec
"This resource specification was automatically generated
by the UIPainter of ST/X."
@@ -52,16 +56,15 @@
the UIPainter may not be able to read the specification."
"
- UIPainter new openOnClass:SmallSense::AbstractSearchDialog andSelector:#windowSpec
- SmallSense::AbstractSearchDialog new openInterface:#windowSpec
- SmallSense::AbstractSearchDialog open
+ UIPainter new openOnClass:SmallSense::AbstractSearchDialog andSelector:#dialogSpec
+ SmallSense::AbstractSearchDialog new openInterface:#dialogSpec
"
<resource: #canvas>
^
#(FullSpec
- name: windowSpec
+ name: 'dialogSpec'
window:
(WindowSpec
label: 'Search...'
@@ -75,7 +78,7 @@
collection: (
(VerticalPanelViewSpec
name: 'ContentAndOptionsPanel'
- layout: (LayoutFrame 10 0 0 0 -10 1 -40 1)
+ layout: (LayoutFrame 10 0 0 0 -10 1 0 1)
horizontalLayout: fit
verticalLayout: topSpaceFit
horizontalSpace: 3
@@ -97,11 +100,6 @@
)
)
- (UISubSpecification
- name: 'ButtonsPane'
- layout: (LayoutFrame 10 0 -40 1 -10 1 0 1)
- minorKey: buttonsPaneSpec
- )
)
)
@@ -110,72 +108,6 @@
!AbstractSearchDialog class methodsFor:'interface specs-content'!
-buttonsPaneSpec
- "This resource specification was automatically generated
- by the UIPainter of ST/X."
-
- "Do not manually edit this!! If it is corrupted,
- the UIPainter may not be able to read the specification."
-
- "
- UIPainter new openOnClass:SmallSense::AbstractSearchDialog andSelector:#buttonPaneSpec
- SmallSense::AbstractSearchDialog new openInterface:#buttonPaneSpec
- "
-
- <resource: #canvas>
-
- ^
- #(FullSpec
- name: 'buttonPaneSpec'
- window:
- (WindowSpec
- label: 'Search...'
- name: 'Search...'
- min: (Point 10 10)
- bounds: (Rectangle 0 0 708 40)
- menu: mainMenuSpec
- )
- component:
- (SpecCollection
- collection: (
- (HorizontalPanelViewSpec
- name: 'Buttons'
- layout: (LayoutFrame 0 0 0 0 0 1 0 1)
- horizontalLayout: right
- verticalLayout: center
- horizontalSpace: 3
- verticalSpace: 3
- reverseOrderIfOKAtLeft: true
- component:
- (SpecCollection
- collection: (
- (ActionButtonSpec
- label: 'Close'
- name: 'Button2'
- translateLabel: true
- model: doCancel
- extent: (Point 125 22)
- )
- (ActionButtonSpec
- label: 'OK'
- name: 'Button1'
- translateLabel: true
- model: doAccept
- enableChannel: acceptEnabledHolder
- extent: (Point 125 22)
- )
- )
-
- )
- )
- )
-
- )
- )
-
- "Created: / 27-04-2014 / 23:33:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
contentPaneSpec
"This resource specification was automatically generated
by the UIPainter of ST/X."
@@ -192,7 +124,7 @@
^
#(FullSpec
- name: 'contentPaneSpec'
+ name: contentPaneSpec
window:
(WindowSpec
label: 'Search...'
@@ -226,15 +158,16 @@
acceptOnReturn: true
acceptOnTab: true
acceptOnPointerLeave: true
+ entryCompletionBlock: matchPatternCompletionBlock
extent: (Point 706 25)
- postBuildCallback: postBuilderMatchPatternView:
+ postBuildCallback: postBuildMatchPatternView:
usePreferredHeight: true
)
(LabelSpec
label: 'Matching items:'
name: 'MatchingLabel'
translateLabel: true
- labelChannel: matchingLabelHolder
+ labelChannel: matchingObjectsLabelHolder
adjust: left
extent: (Point 708 25)
)
@@ -358,29 +291,26 @@
^self matchPatternHolder value: aString
"Created: / 11-03-2013 / 15:21:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+recentlySearchedObjects
+ ^ recentlySearchedObjects
+!
+
+recentlySearchedObjects:aCollection
+ recentlySearchedObjects := aCollection.
+!
+
+recentlySearchedPatterns
+ ^ recentlySearchedPatterns
+!
+
+recentlySearchedPatterns:aCollection
+ recentlySearchedPatterns := aCollection.
! !
!AbstractSearchDialog methodsFor:'aspects'!
-acceptEnabledHolder
- <resource: #uiAspect>
-
- "automatically generated by UIPainter ..."
-
- "*** the code below creates a default model when invoked."
- "*** (which may not be the one you wanted)"
- "*** Please change as required and accept it in the browser."
- "*** (and replace this comment by something more useful ;-)"
-
- acceptEnabledHolder isNil ifTrue:[
- acceptEnabledHolder := true asValue.
-"/ if your app needs to be notified of changes, uncomment one of the lines below:
-"/ acceptEnabledHolder addDependent:self.
-"/ acceptEnabledHolder onChangeSend:#acceptEnabledHolderChanged to:self.
- ].
- ^ acceptEnabledHolder.
-!
-
environmentHolder
"return/create the 'registryHolder' value holder (automatically generated)"
@@ -444,6 +374,12 @@
].
!
+matchPatternCompletionBlock
+ ^ self subclassResponsibility
+
+ "Created: / 28-04-2014 / 22:30:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
matchPatternHolder
<resource: #uiAspect>
@@ -457,7 +393,7 @@
"Modified (format): / 08-03-2013 / 14:05:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-matchingLabelHolder
+matchingObjectsLabelHolder
<resource: #uiAspect>
"automatically generated by UIPainter ..."
@@ -467,15 +403,15 @@
"*** Please change as required and accept it in the browser."
"*** (and replace this comment by something more useful ;-)"
- matchingLabelHolder isNil ifTrue:[
- matchingLabelHolder := ValueHolder with:(resources string:'Matching items:').
+ matchingObjectsLabelHolder isNil ifTrue:[
+ matchingObjectsLabelHolder := ValueHolder with:(resources string:'Matching items:').
"/ if your app needs to be notified of changes, uncomment one of the lines below:
"/ matchingLabelHolder addDependent:self.
"/ matchingLabelHolder onChangeSend:#matchingLabelHolderChanged to:self.
].
- ^ matchingLabelHolder.
+ ^ matchingObjectsLabelHolder.
- "Modified: / 18-03-2013 / 12:54:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Created: / 28-04-2014 / 22:29:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
matchingObjectsSelectionHolder
@@ -522,20 +458,13 @@
!AbstractSearchDialog methodsFor:'change & update'!
-savePattern
- self lastMatchPattern: self pattern.
-
- "Created: / 11-03-2013 / 15:45:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 28-04-2014 / 00:09:13 / 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."
"stub code automatically generated - please change as required"
changedObject == matchPatternHolder ifTrue:[
- matchingUpdateJob restart.
+ matchingObjectsUpdateJob restart.
^ self.
].
changedObject == matchingObjectsSelectionHolder ifTrue:[
@@ -544,8 +473,9 @@
].
changedObject == accept ifTrue:[
accept value ifTrue:[
- self savePattern.
+ recentlySearchedPatterns add: self pattern.
acceptedValue := matchingObjectsSelectionHolder value collect:[:e|e subject].
+ recentlySearchedObjects addAll: acceptedValue.
].
^ self.
].
@@ -560,7 +490,7 @@
].
super update:something with:aParameter from:changedObject
- "Modified: / 28-04-2014 / 00:12:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 28-04-2014 / 23:17:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
updateAcceptEnabled
@@ -571,27 +501,35 @@
!
updateMatchingLabelToNormal
- self matchingLabelHolder value: (resources string: 'Matching items:').
+ self matchingObjectsLabelHolder value: (resources string: 'Matching items:').
"Created: / 18-03-2013 / 14:02:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 28-04-2014 / 00:22:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 28-04-2014 / 22:29:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
updateMatchingLabelToSearching
- self matchingLabelHolder value: (resources string: 'Searching...').
+ self matchingObjectsLabelHolder value: (resources string: 'Searching...').
"Created: / 18-03-2013 / 14:01:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 28-04-2014 / 22:29:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
updateMatchingObjects
- [
- self updateMatchingLabelToSearching.
- self computeMatchingObjects.
- ] ensure:[
- self updateMatchingLabelToNormal.
- ]
+ | pattern environment |
+
+ self matchPatternHolder value notEmptyOrNil ifTrue:[
+ pattern := StringPattern fromString: self matchPatternHolder value.
+ environment := self environment.
+"/ [
+"/ self updateMatchingLabelToSearching.
+ self computeMatchingObjectsForPattern: pattern inEnvironment: environment
+"/ ] ensure:[
+"/ self updateMatchingLabelToNormal.
+"/ ]
+ ].
"Created: / 27-04-2014 / 23:48:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 28-04-2014 / 23:23:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
updateNoResults: root
@@ -618,6 +556,17 @@
"Created: / 22-04-2014 / 11:59:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!AbstractSearchDialog methodsFor:'events'!
+
+closeCancel
+ "cancel was pressed. close the dialog"
+
+ accept setValue: nil.
+ ^ super closeCancel.
+
+ "Created: / 28-04-2014 / 23:56:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!AbstractSearchDialog methodsFor:'forced actions'!
doAcceptByDoubleClick
@@ -640,12 +589,22 @@
commonPostOpen
"/ self updateMatching.
- self pattern: self lastMatchPattern.
+ recentlySearchedPatterns notEmptyOrNil ifTrue:[
+ matchPatternView contents: self recentlySearchedPatterns last.
+ ].
matchPatternView selectAll.
self updateAcceptEnabled.
"Created: / 08-03-2013 / 13:15:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 28-04-2014 / 00:22:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 28-04-2014 / 23:15:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+postBuildMatchPatternView:aView
+ matchPatternView := aView scrolledView.
+"/ matchPatternView delegate: self.
+ matchPatternView onKey:#CursorDown leaveWith:[ self keyPressCursorDownInPatternView ]
+
+ "Created: / 28-04-2014 / 22:27:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
postBuildMatchingObjectsView:aView
@@ -653,14 +612,6 @@
matchingObjectsView delegate: self.
"Created: / 22-04-2014 / 13:21:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-postBuilderMatchPatternView:aView
- matchPatternView := aView scrolledView.
-"/ matchPatternView delegate: self.
- matchPatternView onKey:#CursorDown leaveWith:[ self keyPressCursorDownInPatternView ]
-
- "Modified: / 22-04-2014 / 11:59:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!AbstractSearchDialog methodsFor:'initialization'!
@@ -680,9 +631,12 @@
self accept addDependent: self.
self matchingObjectsTree. "/force its initialization
- matchingUpdateJob := BackgroundJob named: 'SmallSense search dialog updater' on:[self updateMatchingObjects]
+ matchingObjectsUpdateJob := BackgroundJob named: 'SmallSense search dialog updater' on:[self updateMatchingObjects].
- "Modified: / 27-04-2014 / 23:48:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ recentlySearchedPatterns := self class recentlySearchedPatterns.
+ recentlySearchedObjects := self class recentlySearchedObjects.
+
+ "Modified: / 28-04-2014 / 23:14:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!AbstractSearchDialog methodsFor:'menu actions'!
@@ -761,9 +715,10 @@
!AbstractSearchDialog methodsFor:'searching'!
-computeMatchingObjects
+computeMatchingObjectsForPattern: pattern inEnvironment: environment
+
self subclassResponsibility
- "Created: / 27-04-2014 / 23:48:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Created: / 28-04-2014 / 23:20:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
--- a/SmallSense__ClassSearchDialog.st Mon Apr 28 08:36:50 2014 +0100
+++ b/SmallSense__ClassSearchDialog.st Tue Apr 29 00:11:40 2014 +0100
@@ -53,6 +53,12 @@
"Modified: / 18-03-2013 / 11:19:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+matchPatternCompletionBlock
+ ^ DoWhatIMeanSupport classNameEntryCompletionBlock
+
+ "Created: / 28-04-2014 / 22:31:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
showOnlyInterfacesHolder
"return/create the 'showOnlyIntefacesHolder' value holder (automatically generated)"
@@ -91,11 +97,11 @@
update:something with:aParameter from:changedObject
changedObject == matchFullyQualifiedClassNameHolder ifTrue:[
- matchingUpdateJob restart.
+ matchingObjectsUpdateJob restart.
^ self.
].
changedObject == showOnlyInterfacesHolder ifTrue:[
- matchingUpdateJob restart.
+ matchingObjectsUpdateJob restart.
^ self.
].
@@ -110,21 +116,19 @@
| po |
po := selection isInteger ifTrue:[ matchingObjectsTree at: selection ] ifFalse:[ selection ].
- ^ po isSmallSenseClassPO.
+ ^ po askFor: #isSmallSenseClassPO.
"Created: / 22-04-2014 / 13:08:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 28-04-2014 / 00:11:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 28-04-2014 / 23:56:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ClassSearchDialog methodsFor:'searching'!
-computeMatchingObjects
- | environment pattern matching root matchFullyQualifiedClassName |
+computeMatchingObjectsForPattern: pattern inEnvironment: environment
+ | matching root matchFullyQualifiedClassName |
matching := OrderedCollection new.
root := self matchingObjectsTree root.
- pattern := StringPattern fromString: self matchPatternHolder value.
- environment := self environment.
matchFullyQualifiedClassName := self matchFullyQualifiedClassNameHolder value.
self matchPatternHolder value notEmptyOrNil ifTrue:[
@@ -160,6 +164,6 @@
self matchingObjectsSelectionHolder value: matching anElement
]
- "Created: / 28-04-2014 / 00:03:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Created: / 28-04-2014 / 23:20:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
--- a/SmallSense__TestCase.st Mon Apr 28 08:36:50 2014 +0100
+++ b/SmallSense__TestCase.st Tue Apr 29 00:11:40 2014 +0100
@@ -56,6 +56,11 @@
!TestCase class methodsFor:'documentation'!
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+!
+
version_SVN
^ '$Id: SmallSense__TestCase.st,v 1.2 2014/02/12 14:49:29 sr Exp $'
! !
--- a/abbrev.stc Mon Apr 28 08:36:50 2014 +0100
+++ b/abbrev.stc Tue Apr 29 00:11:40 2014 +0100
@@ -1,7 +1,8 @@
# automagically generated by the project definition
# this file is needed for stc to be able to compile modules independently.
# it provides information about a classes filename, category and especially namespace.
-SmallSense::AbstractSearchDialog SmallSense__AbstractSearchDialog jv:smallsense 'SmallSense-Core-Interface-Search' 3
+SmallSense::AbstractDIalog SmallSense__AbstractDIalog jv:smallsense 'SmallSense-Core-Interface-Search' 1
+SmallSense::BaseTestClass SmallSense__BaseTestClass jv:smallsense 'SmallSense-Tests' 1
SmallSense::CodeHighlightingService SmallSense__CodeHighlightingService jv:smallsense 'SmallSense-Core-Services' 0
SmallSense::CodeNavigationService SmallSense__CodeNavigationService jv:smallsense 'SmallSense-Core-Services' 0
SmallSense::CompletionContext SmallSense__CompletionContext jv:smallsense 'SmallSense-Core' 0
@@ -30,33 +31,33 @@
SmallSense::SmalltalkQuickFixer SmallSense__SmalltalkQuickFixer jv:smallsense 'SmallSense-Smalltalk-Lint' 0
SmallSense::SmalltalkSyntaxHighlighter SmallSense__SmalltalkSyntaxHighlighter jv:smallsense 'SmallSense-Smalltalk' 3
SmallSense::SmalltalkUnacceptedMethodEnvironment SmallSense__SmalltalkUnacceptedMethodEnvironment jv:smallsense 'SmallSense-Smalltalk-Lint' 0
+SmallSense::TestCase SmallSense__TestCase jv:smallsense 'SmallSense-Tests' 1
SmallSense::Type SmallSense__Type jv:smallsense 'SmallSense-Smalltalk-Types' 0
SmallSense::TypeHolder SmallSense__TypeHolder jv:smallsense 'SmallSense-Smalltalk-Types' 0
jv_smallsense jv_smallsense jv:smallsense '* Projects & Packages *' 3
+SmallSense::AbstractSearchDialog SmallSense__AbstractSearchDialog jv:smallsense 'SmallSense-Core-Interface-Search' 3
SmallSense::ClassInfo SmallSense__ClassInfo jv:smallsense 'SmallSense-Smalltalk-Types-Info' 0
SmallSense::ClassPO SmallSense__ClassPO jv:smallsense 'SmallSense-Core-Interface-PO' 0
-SmallSense::ClassSearchDialog SmallSense__ClassSearchDialog jv:smallsense 'SmallSense-Core-Interface-Search' 3
SmallSense::ClassType SmallSense__ClassType jv:smallsense 'SmallSense-Smalltalk-Types' 0
SmallSense::ConstantPO SmallSense__ConstantPO jv:smallsense 'SmallSense-Core-Interface-PO' 0
+SmallSense::FinderTests SmallSense__FinderTests jv:smallsense 'SmallSense-Tests' 1
SmallSense::GenericEditSupport SmallSense__GenericEditSupport jv:smallsense 'SmallSense-Core-Services' 0
SmallSense::JavaCompletionEngineSimple SmallSense__JavaCompletionEngineSimple jv:smallsense 'SmallSense-Java' 0
SmallSense::JavaEditSupport SmallSense__JavaEditSupport jv:smallsense 'SmallSense-Java' 0
SmallSense::JavaImportPO SmallSense__JavaImportPO jv:smallsense 'SmallSense-Java-Interface-PO' 0
SmallSense::MethodInfo SmallSense__MethodInfo jv:smallsense 'SmallSense-Smalltalk-Types-Info' 0
SmallSense::MethodPO SmallSense__MethodPO jv:smallsense 'SmallSense-Core-Interface-PO' 0
+SmallSense::RecognizerTests SmallSense__RecognizerTests jv:smallsense 'SmallSense-Tests' 1
SmallSense::SmalltalkCompletionEngine SmallSense__SmalltalkCompletionEngine jv:smallsense 'SmallSense-Smalltalk' 0
SmallSense::SmalltalkEditSupport SmallSense__SmalltalkEditSupport jv:smallsense 'SmallSense-Smalltalk' 0
SmallSense::SmalltalkInferencer SmallSense__SmalltalkInferencer jv:smallsense 'SmallSense-Smalltalk-Types-Inference' 0
SmallSense::SmalltalkParseNodeFinder SmallSense__SmalltalkParseNodeFinder jv:smallsense 'SmallSense-Smalltalk' 0
+SmallSense::SmalltalkParserTests SmallSense__SmalltalkParserTests jv:smallsense 'SmallSense-Tests' 1
SmallSense::SnippetPO SmallSense__SnippetPO jv:smallsense 'SmallSense-Core-Interface-PO' 0
SmallSense::UnionType SmallSense__UnionType jv:smallsense 'SmallSense-Smalltalk-Types' 0
SmallSense::UnknownType SmallSense__UnknownType jv:smallsense 'SmallSense-Smalltalk-Types' 1
SmallSense::VariablePO SmallSense__VariablePO jv:smallsense 'SmallSense-Core-Interface-PO' 0
+SmallSense::ClassSearchDialog SmallSense__ClassSearchDialog jv:smallsense 'SmallSense-Core-Interface-Search' 3
SmallSense::GroovyCompletionEngineSimple SmallSense__GroovyCompletionEngineSimple jv:smallsense 'SmallSense-Groovy' 0
SmallSense::GroovyEditSupport SmallSense__GroovyEditSupport jv:smallsense 'SmallSense-Groovy' 0
SmallSense::MethodKeywordRestPO SmallSense__MethodKeywordRestPO jv:smallsense 'SmallSense-Core-Interface-PO' 0
-SmallSense::BaseTestClass SmallSense__BaseTestClass jv:smallsense 'SmallSense-Tests' 1
-SmallSense::FinderTests SmallSense__FinderTests jv:smallsense 'SmallSense-Tests' 1
-SmallSense::RecognizerTests SmallSense__RecognizerTests jv:smallsense 'SmallSense-Tests' 1
-SmallSense::SmalltalkParserTests SmallSense__SmalltalkParserTests jv:smallsense 'SmallSense-Tests' 1
-SmallSense::TestCase SmallSense__TestCase jv:smallsense 'SmallSense-Tests' 1
--- a/bc.mak Mon Apr 28 08:36:50 2014 +0100
+++ b/bc.mak Tue Apr 29 00:11:40 2014 +0100
@@ -34,7 +34,7 @@
-LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\helpers -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\lint -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libcomp -I$(INCLUDE_TOP)\stx\libhtml -I$(INCLUDE_TOP)\stx\libtool -I$(INCLUDE_TOP)\stx\libview -I$(INCLUDE_TOP)\stx\libview2 -I$(INCLUDE_TOP)\stx\libwidg -I$(INCLUDE_TOP)\stx\libwidg2
+LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\helpers -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\lint -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libcomp -I$(INCLUDE_TOP)\stx\libhtml -I$(INCLUDE_TOP)\stx\libtool -I$(INCLUDE_TOP)\stx\libview -I$(INCLUDE_TOP)\stx\libview2 -I$(INCLUDE_TOP)\stx\libwidg -I$(INCLUDE_TOP)\stx\libwidg2
LOCALDEFINES=
STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -varPrefix=$(LIBNAME)
@@ -60,6 +60,7 @@
pushd ..\..\stx\libview & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\..\stx\libview2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\..\stx\goodies\refactoryBrowser\browser & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\..\stx\goodies\sunit & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\..\stx\libwidg & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\..\stx\goodies\refactoryBrowser\lint & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\..\stx\libhtml & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
@@ -85,7 +86,7 @@
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
-$(OUTDIR)SmallSense__AbstractSearchDialog.$(O) SmallSense__AbstractSearchDialog.$(H): SmallSense__AbstractSearchDialog.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libview2\SimpleDialog.$(H) $(STCHDR)
+$(OUTDIR)SmallSense__AbstractDIalog.$(O) SmallSense__AbstractDIalog.$(H): SmallSense__AbstractDIalog.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libview2\SimpleDialog.$(H) $(STCHDR)
$(OUTDIR)SmallSense__CodeHighlightingService.$(O) SmallSense__CodeHighlightingService.$(H): SmallSense__CodeHighlightingService.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__BackgroundSourceProcessingService.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__CodeHighlightingService.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__CodeViewService.$(H) $(STCHDR)
$(OUTDIR)SmallSense__CodeNavigationService.$(O) SmallSense__CodeNavigationService.$(H): SmallSense__CodeNavigationService.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__CodeNavigationService.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__CodeViewService.$(H) $(STCHDR)
$(OUTDIR)SmallSense__CompletionContext.$(O) SmallSense__CompletionContext.$(H): SmallSense__CompletionContext.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
@@ -117,9 +118,9 @@
$(OUTDIR)SmallSense__Type.$(O) SmallSense__Type.$(H): SmallSense__Type.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)SmallSense__TypeHolder.$(O) SmallSense__TypeHolder.$(H): SmallSense__TypeHolder.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)jv_smallsense.$(O) jv_smallsense.$(H): jv_smallsense.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
+$(OUTDIR)SmallSense__AbstractSearchDialog.$(O) SmallSense__AbstractSearchDialog.$(H): SmallSense__AbstractSearchDialog.st $(INCLUDE_TOP)\jv\smallsense\SmallSense__AbstractDIalog.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libview2\SimpleDialog.$(H) $(STCHDR)
$(OUTDIR)SmallSense__ClassInfo.$(O) SmallSense__ClassInfo.$(H): SmallSense__ClassInfo.st $(INCLUDE_TOP)\jv\smallsense\SmallSense__Info.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)SmallSense__ClassPO.$(O) SmallSense__ClassPO.$(H): SmallSense__ClassPO.st $(INCLUDE_TOP)\jv\smallsense\SmallSense__PO.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalItem.$(H) $(STCHDR)
-$(OUTDIR)SmallSense__ClassSearchDialog.$(O) SmallSense__ClassSearchDialog.$(H): SmallSense__ClassSearchDialog.st $(INCLUDE_TOP)\jv\smallsense\SmallSense__AbstractSearchDialog.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libview2\SimpleDialog.$(H) $(STCHDR)
$(OUTDIR)SmallSense__ClassType.$(O) SmallSense__ClassType.$(H): SmallSense__ClassType.st $(INCLUDE_TOP)\jv\smallsense\SmallSense__Type.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)SmallSense__ConstantPO.$(O) SmallSense__ConstantPO.$(H): SmallSense__ConstantPO.st $(INCLUDE_TOP)\jv\smallsense\SmallSense__PO.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalItem.$(H) $(STCHDR)
$(OUTDIR)SmallSense__GenericEditSupport.$(O) SmallSense__GenericEditSupport.$(H): SmallSense__GenericEditSupport.st $(INCLUDE_TOP)\jv\smallsense\SmallSense__EditSupport.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
@@ -136,6 +137,7 @@
$(OUTDIR)SmallSense__UnionType.$(O) SmallSense__UnionType.$(H): SmallSense__UnionType.st $(INCLUDE_TOP)\jv\smallsense\SmallSense__SmalltalkInferencerParameters.$(H) $(INCLUDE_TOP)\jv\smallsense\SmallSense__Type.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)SmallSense__UnknownType.$(O) SmallSense__UnknownType.$(H): SmallSense__UnknownType.st $(INCLUDE_TOP)\jv\smallsense\SmallSense__Type.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)SmallSense__VariablePO.$(O) SmallSense__VariablePO.$(H): SmallSense__VariablePO.st $(INCLUDE_TOP)\jv\smallsense\SmallSense__PO.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalItem.$(H) $(STCHDR)
+$(OUTDIR)SmallSense__ClassSearchDialog.$(O) SmallSense__ClassSearchDialog.$(H): SmallSense__ClassSearchDialog.st $(INCLUDE_TOP)\jv\smallsense\SmallSense__AbstractDIalog.$(H) $(INCLUDE_TOP)\jv\smallsense\SmallSense__AbstractSearchDialog.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libview2\SimpleDialog.$(H) $(STCHDR)
$(OUTDIR)SmallSense__GroovyCompletionEngineSimple.$(O) SmallSense__GroovyCompletionEngineSimple.$(H): SmallSense__GroovyCompletionEngineSimple.st $(INCLUDE_TOP)\jv\smallsense\SmallSense__CompletionEngine.$(H) $(INCLUDE_TOP)\jv\smallsense\SmallSense__JavaCompletionEngineSimple.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)SmallSense__GroovyEditSupport.$(O) SmallSense__GroovyEditSupport.$(H): SmallSense__GroovyEditSupport.st $(INCLUDE_TOP)\jv\smallsense\SmallSense__EditSupport.$(H) $(INCLUDE_TOP)\jv\smallsense\SmallSense__JavaEditSupport.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)SmallSense__MethodKeywordRestPO.$(O) SmallSense__MethodKeywordRestPO.$(H): SmallSense__MethodKeywordRestPO.st $(INCLUDE_TOP)\jv\smallsense\SmallSense__MethodPO.$(H) $(INCLUDE_TOP)\jv\smallsense\SmallSense__PO.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalItem.$(H) $(STCHDR)
--- a/extensions.st Mon Apr 28 08:36:50 2014 +0100
+++ b/extensions.st Tue Apr 29 00:11:40 2014 +0100
@@ -502,6 +502,96 @@
"Created: / 06-04-2012 / 12:56:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!Tools::NewSystemBrowser class methodsFor:'utilities'!
+
+smallsense_askForClassToSearch:doWhatByDefault single:singleClass msgTail:msgTail resources:resourcesOrNil filter:filterOrNil forBrowser:aBrowserOrNil thenDo:aBlock
+ "utility common code for both opening a new browser on a class and
+ to search for a class in an existing browser.
+ If singleClass is true, a single class will be asked for and browsed,
+ otherwise, a match pattern is allowed and a multi-class browser is opened.
+ Moved from instance protocol for better reusability."
+
+ <swizzle: #askForClassToSearch:single:msgTail:resources:filter:forBrowser:thenDo:>
+
+ |classes box boxLabel title okText okText2 okText3 className canFind doWhat doWhat2 doWhat3 resources showFullNameHolder onlyShowJavaClassesHolder|
+
+ resources := resourcesOrNil ? self classResources.
+ showFullNameHolder := (LastClassSearchBoxShowedFullName ? false) asValue.
+ onlyShowJavaClassesHolder := (LastClassSearchBoxShowedJavaOnly ? false) asValue.
+
+ doWhat := doWhatByDefault.
+ canFind := aBrowserOrNil notNil
+ and:[aBrowserOrNil navigationState notNil and:[ aBrowserOrNil navigationState isFullBrowser ]].
+
+ (doWhat isNil or:[aBrowserOrNil isNil]) ifTrue:[
+ title := 'Select a class'.
+ boxLabel := (resources string:'Select a class').
+ okText := 'OK'.
+ okText2 := nil. doWhat2 := nil.
+ okText3 := nil. doWhat3 := nil.
+ ] ifFalse:[
+ title := (singleClass ifTrue:[ 'Class to browse' ] ifFalse:[ 'Class(es) to browse' ]).
+ boxLabel := (resources string:'Browse or Search').
+
+ (doWhat isNil and:[canFind not]) ifTrue:[
+ doWhat := #newBuffer.
+ ].
+
+ doWhat == #newBrowser ifTrue:[
+ okText := 'Open New Window'.
+ okText2 := 'Open New Buffer'. doWhat2 := #newBuffer.
+ okText3 := 'Open'. doWhat3 := nil.
+ ] ifFalse:[ doWhat == #newBuffer ifTrue:[
+ okText := 'Open New Buffer'.
+ okText2 := 'Open New Window'. doWhat2 := #newBrowser.
+ okText3 := 'Open'. doWhat3 := nil.
+ ] ifFalse:[
+ title := (singleClass ifTrue:[ 'Class to find' ] ifFalse:[ 'Class(es) to find' ]).
+ okText := 'Open'.
+ okText2 := 'Open New Window'. doWhat2 := #newBrowser.
+ okText3 := 'Open New Buffer'. doWhat3 := #newBuffer.
+ ]].
+ ].
+
+ box := SmallSense::ClassSearchDialog new.
+
+ "button3" "okButton" "button2" "cancel"
+
+ box addButtonCancel.
+ doWhat notNil ifTrue:[
+ box addButtonWithLabel: (resources string:okText) action: [ box doAccept ] enablement: box acceptEnabledHolder.
+ (aBrowserOrNil notNil and:[aBrowserOrNil navigationState isFullBrowser]) "singleClass" ifTrue:[
+ box addButtonWithLabel: (resources string:okText3) action: [ doWhat := doWhat3. box doAccept ] enablement: box acceptEnabledHolder.
+ ].
+ box addButtonWithLabel: (resources string:okText2) action: [ doWhat := doWhat2. box doAccept ] enablement: box acceptEnabledHolder.
+ ] ifFalse:[
+ box addButtonAccept.
+ ].
+
+
+
+ classes := box open.
+ classes isEmptyOrNil ifTrue:[ ^ nil ].
+ self assert: classes size == 1.
+ className := classes anElement name.
+
+
+ LastClassSearchBoxShowedFullName := showFullNameHolder value.
+ LastClassSearchBoxShowedJavaOnly := onlyShowJavaClassesHolder value.
+
+ (doWhat isNil or:[aBrowserOrNil isNil]) ifTrue:[
+ aBlock notNil ifTrue:[aBlock value:className optionalArgument:singleClass and:doWhat].
+ ^ className
+ ].
+
+ aBrowserOrNil withSearchCursorDo:[
+ aBlock value:className value:singleClass value:doWhat.
+ ].
+ ^ className
+
+ "Created: / 28-04-2014 / 23:41:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!UserPreferences methodsFor:'accessing-SmallSense'!
smallSenseBackgroundLintEnabled
--- a/jv_smallsense.st Mon Apr 28 08:36:50 2014 +0100
+++ b/jv_smallsense.st Tue Apr 29 00:11:40 2014 +0100
@@ -46,7 +46,8 @@
^ #(
#'stx:goodies/refactoryBrowser/helpers' "BrowserEnvironment - superclass of SmallSense::SmalltalkUnacceptedMethodEnvironment "
#'stx:goodies/refactoryBrowser/lint' "RBLintRule - extended "
- #'stx:libbasic' "Autoload - superclass of SmallSense::BaseTestClass "
+ #'stx:goodies/sunit' "TestAsserter - superclass of SmallSense::BaseTestClass "
+ #'stx:libbasic' "Collection - extended "
#'stx:libcomp' "AbstractSyntaxHighlighter - superclass of SmallSense::SmalltalkParser "
#'stx:libhtml' "HTMLDocumentFrame - extended "
#'stx:libtool' "AbstractSettingsApplication - superclass of SmallSense::SettingsAppl "
@@ -160,7 +161,8 @@
^ #(
"<className> or (<className> attributes...) in load order"
- #'SmallSense::AbstractSearchDialog'
+ #'SmallSense::AbstractDIalog'
+ (#'SmallSense::BaseTestClass' autoload)
#'SmallSense::CodeHighlightingService'
#'SmallSense::CodeNavigationService'
#'SmallSense::CompletionContext'
@@ -189,36 +191,36 @@
#'SmallSense::SmalltalkQuickFixer'
#'SmallSense::SmalltalkSyntaxHighlighter'
#'SmallSense::SmalltalkUnacceptedMethodEnvironment'
+ (#'SmallSense::TestCase' autoload)
#'SmallSense::Type'
#'SmallSense::TypeHolder'
#'jv_smallsense'
+ #'SmallSense::AbstractSearchDialog'
#'SmallSense::ClassInfo'
#'SmallSense::ClassPO'
- #'SmallSense::ClassSearchDialog'
#'SmallSense::ClassType'
#'SmallSense::ConstantPO'
+ (#'SmallSense::FinderTests' autoload)
#'SmallSense::GenericEditSupport'
#'SmallSense::JavaCompletionEngineSimple'
#'SmallSense::JavaEditSupport'
#'SmallSense::JavaImportPO'
#'SmallSense::MethodInfo'
#'SmallSense::MethodPO'
+ (#'SmallSense::RecognizerTests' autoload)
#'SmallSense::SmalltalkCompletionEngine'
#'SmallSense::SmalltalkEditSupport'
#'SmallSense::SmalltalkInferencer'
#'SmallSense::SmalltalkParseNodeFinder'
+ (#'SmallSense::SmalltalkParserTests' autoload)
#'SmallSense::SnippetPO'
#'SmallSense::UnionType'
#'SmallSense::UnknownType'
#'SmallSense::VariablePO'
+ #'SmallSense::ClassSearchDialog'
#'SmallSense::GroovyCompletionEngineSimple'
#'SmallSense::GroovyEditSupport'
#'SmallSense::MethodKeywordRestPO'
- (#'SmallSense::BaseTestClass' autoload)
- (#'SmallSense::FinderTests' autoload)
- (#'SmallSense::RecognizerTests' autoload)
- (#'SmallSense::SmalltalkParserTests' autoload)
- (#'SmallSense::TestCase' autoload)
)
!
@@ -275,6 +277,7 @@
Method inspector2TabParseTreeInspector
Method inspector2Tabs
ReturnNode childNamesAndValuesDo:
+ 'Tools::NewSystemBrowser class' #'smallsense_askForClassToSearch:single:msgTail:resources:filter:forBrowser:thenDo:'
)
! !
--- a/libInit.cc Mon Apr 28 08:36:50 2014 +0100
+++ b/libInit.cc Tue Apr 29 00:11:40 2014 +0100
@@ -27,7 +27,7 @@
void _libjv_smallsense_Init(pass, __pRT__, snd)
OBJ snd; struct __vmData__ *__pRT__; {
__BEGIN_PACKAGE2__("libjv_smallsense", _libjv_smallsense_Init, "jv:smallsense");
-_SmallSense__AbstractSearchDialog_Init(pass,__pRT__,snd);
+_SmallSense__AbstractDIalog_Init(pass,__pRT__,snd);
_SmallSense__CodeHighlightingService_Init(pass,__pRT__,snd);
_SmallSense__CodeNavigationService_Init(pass,__pRT__,snd);
_SmallSense__CompletionContext_Init(pass,__pRT__,snd);
@@ -59,9 +59,9 @@
_SmallSense__Type_Init(pass,__pRT__,snd);
_SmallSense__TypeHolder_Init(pass,__pRT__,snd);
_jv_137smallsense_Init(pass,__pRT__,snd);
+_SmallSense__AbstractSearchDialog_Init(pass,__pRT__,snd);
_SmallSense__ClassInfo_Init(pass,__pRT__,snd);
_SmallSense__ClassPO_Init(pass,__pRT__,snd);
-_SmallSense__ClassSearchDialog_Init(pass,__pRT__,snd);
_SmallSense__ClassType_Init(pass,__pRT__,snd);
_SmallSense__ConstantPO_Init(pass,__pRT__,snd);
_SmallSense__GenericEditSupport_Init(pass,__pRT__,snd);
@@ -78,6 +78,7 @@
_SmallSense__UnionType_Init(pass,__pRT__,snd);
_SmallSense__UnknownType_Init(pass,__pRT__,snd);
_SmallSense__VariablePO_Init(pass,__pRT__,snd);
+_SmallSense__ClassSearchDialog_Init(pass,__pRT__,snd);
_SmallSense__GroovyCompletionEngineSimple_Init(pass,__pRT__,snd);
_SmallSense__GroovyEditSupport_Init(pass,__pRT__,snd);
_SmallSense__MethodKeywordRestPO_Init(pass,__pRT__,snd);
--- a/smallsense.rc Mon Apr 28 08:36:50 2014 +0100
+++ b/smallsense.rc Tue Apr 29 00:11:40 2014 +0100
@@ -3,7 +3,7 @@
// automagically generated from the projectDefinition: jv_smallsense.
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 6,2,32767,32767
+ FILEVERSION 6,2,24,24
PRODUCTVERSION 6,2,3,0
#if (__BORLANDC__)
FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE
@@ -20,12 +20,12 @@
BEGIN
VALUE "CompanyName", "eXept Software AG\0"
VALUE "FileDescription", "Smalltalk/X Class library (LIB)\0"
- VALUE "FileVersion", "6.2.32767.32767\0"
+ VALUE "FileVersion", "6.2.24.24\0"
VALUE "InternalName", "jv:smallsense\0"
VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2011\nCopyright eXept Software AG 1998-2011\0"
VALUE "ProductName", "Smalltalk/X\0"
VALUE "ProductVersion", "6.2.3.0\0"
- VALUE "ProductDate", "Mon, 28 Apr 2014 07:36:11 GMT\0"
+ VALUE "ProductDate", "Mon, 28 Apr 2014 23:11:13 GMT\0"
END
END