added: #addCheckBoxesForClassAndMetaSearch
changed: #setupToAskForMethodSearchTitle:forBrowser:searchWhat:searchArea:withCaseIgnore:withMatch:withMethodList:allowFind:allowBuffer:allowBrowser:withTextEntry:
category of:
#addCheckBoxForClassMethodSearch
#addCheckBoxForInstanceMethodSearch
--- a/Tools_SearchDialog.st Sun Dec 04 22:46:25 2011 +0100
+++ b/Tools_SearchDialog.st Tue Dec 06 11:47:22 2011 +0100
@@ -110,6 +110,26 @@
^ selectorOrCode.
! !
+!SearchDialog methodsFor:'obsolete'!
+
+addCheckBoxForClassMethodSearch
+ |b|
+
+ b := CheckBox label:(resources string:'Class Protocol').
+ b model:(self searchClassProtocolHolder).
+ currentPanel add:b.
+ ^ b.
+!
+
+addCheckBoxForInstanceMethodSearch
+ |b|
+
+ b := CheckBox label:(resources string:'Instance Protocol').
+ b model:(self searchInstanceProtocolHolder).
+ currentPanel add:b.
+ ^ b.
+! !
+
!SearchDialog methodsFor:'private'!
searchClassProtocolHolder
@@ -340,10 +360,11 @@
withTextEntry ifTrue:[
self addTextEntryWithCaseIgnore:withCaseIgnore withMatch:withMatch.
].
+
searchAreas := OrderedCollection new.
self addHorizontalLine.
- self addVerticalSpace.
+ "/ self addVerticalSpace.
hPanel := HorizontalPanelView "SimpleView" new.
hPanel verticalLayout:#top.
@@ -485,26 +506,36 @@
hPanel add:leftVerticalPanel.
+false ifTrue:[
+ "/ noone liked the right panel...
rightVerticalPanel := currentPanel := VerticalPanelView new.
rightVerticalPanel verticalLayout:#topSpace.
rightVerticalPanel horizontalLayout:#fitSpace.
-false ifTrue:[
self addCheckBoxForClassMethodSearch.
self addCheckBoxForInstanceMethodSearch.
-].
+"/ rightVerticalPanel origin:0.75@0.0 corner:1.0@1.0.
+ hPanel
+ preferredExtent:(leftVerticalPanel preferredWidth + rightVerticalPanel preferredWidth)
+ @
+ (leftVerticalPanel preferredHeight max:rightVerticalPanel preferredHeight).
+ hPanel add:rightVerticalPanel.
+] ifFalse:[
"/ rightVerticalPanel origin:0.75@0.0 corner:1.0@1.0.
hPanel
- preferredExtent:(leftVerticalPanel preferredHeight + rightVerticalPanel preferredHeight)
- @
- (leftVerticalPanel preferredHeight max:rightVerticalPanel preferredHeight).
- hPanel add:rightVerticalPanel.
+ preferredExtent:(leftVerticalPanel preferredWidth) @ (leftVerticalPanel preferredHeight).
+].
+
self addComponent:hPanel indent:0.
"/ panel has its own idea of indenting
- self addVerticalSpace.
+ "/ self addVerticalSpace.
searchWhat == #selector ifTrue:[
+ "/ not yet implemented
+ "/ self addHorizontalLine.
+ "/ self addCheckBoxesForClassAndMetaSearch.
+
selectionList := self addFilteredListOfMatchingSelectors.
self stickAtBottomWithVariableHeight:selectionList.
matchHolder notNil ifTrue:[
@@ -518,8 +549,7 @@
self label:(resources string:'Search').
- "Modified: / 10-10-2006 / 15:30:52 / cg"
- "Modified (format): / 06-07-2011 / 11:53:23 / cg"
+ "Modified: / 06-12-2011 / 11:47:06 / cg"
! !
!SearchDialog methodsFor:'setup'!
@@ -553,15 +583,6 @@
^ b.
!
-addCheckBoxForClassMethodSearch
- |b|
-
- b := CheckBox label:(resources string:'Class Protocol').
- b model:(self searchClassProtocolHolder).
- currentPanel add:b.
- ^ b.
-!
-
addCheckBoxForClassesNamespace:ns
|b|
@@ -623,15 +644,6 @@
^ b.
!
-addCheckBoxForInstanceMethodSearch
- |b|
-
- b := CheckBox label:(resources string:'Instance Protocol').
- b model:(self searchInstanceProtocolHolder).
- currentPanel add:b.
- ^ b.
-!
-
addCheckBoxForMethodList
|b|
@@ -828,6 +840,20 @@
^ b.
!
+addCheckBoxesForClassAndMetaSearch
+ |y b1 b2|
+
+ y := self yPosition.
+ b1 := self addCheckBox:(resources string:'Instance Protocol') on:(self searchInstanceProtocolHolder).
+ "/ b1 width:0.5.
+
+ "/ self yPosition:y.
+ b2 := self addCheckBox:(resources string:'Class Protocol') on:(self searchClassProtocolHolder).
+ "/ b2 left:0.5; width:0.5.
+
+ "Created: / 06-12-2011 / 11:24:11 / cg"
+!
+
addDummyCheckBoxForEverywhere
|b|
@@ -1265,7 +1291,7 @@
!SearchDialog class methodsFor:'documentation'!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools_SearchDialog.st,v 1.66 2011-10-05 14:14:01 az Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools_SearchDialog.st,v 1.67 2011-12-06 10:47:22 cg Exp $'
! !
SearchDialog initialize!