Hi,
i always find the Package-Chooser-Dialog (See Screenshot) when using "Move to package..." (e.g. from Nautilus) very strange to use. Why not replacing it with "SearchFacade rPackageSearch" (See second Screenshot)? I tried by changing AbstractTool >> moveInNewPackage: from: moveInNewPackage: aCollection | labels reject lines oldIndex newName item aPackage | aCollection ifEmpty: [^ nil ]. aPackage := aCollection first package. labels := self model packages collect: [:each | each name]. lines := {0}. newName := UIManager default chooseOrRequestFrom: labels lines: lines title: ('Change Package (current: ', aPackage name,')'). newName ifNil: [ ^ nil ]. newName := newName asSymbol. item := self browsedEnvironment packageOrganizer packageNamed: newName. aCollection do: [:aClass | aPackage removeClass: aClass. item addClassDefinition: aClass. aClass category: item name ]. ^ item to: moveInNewPackage: aCollection | originalPackage newPackage | aCollection ifEmpty: [^ nil ]. originalPackage := aCollection first package. newPackage := SearchFacade rPackageSearch chooseFromOwner: self window. newPackage ifNil: [ ^ nil ]. aCollection do: [:aClass | originalPackage removeClass: aClass. newPackage addClassDefinition: aClass. aClass category: newPackage name ]. ^ newPackage |
+ 1
;) Stef On Jul 23, 2013, at 3:02 PM, MartinW <[hidden email]> wrote: > Hi, > i always find the Package-Chooser-Dialog (See Screenshot) when using "Move > to package..." (e.g. from Nautilus) very strange to use. > Why not replacing it with "SearchFacade rPackageSearch" (See second > Screenshot)? > > I tried by changing AbstractTool >> moveInNewPackage: > > from: > moveInNewPackage: aCollection > > | labels reject lines oldIndex newName item aPackage | > aCollection ifEmpty: [^ nil ]. > aPackage := aCollection first package. > labels := self model packages collect: [:each | each name]. > lines := {0}. > > newName := UIManager default chooseOrRequestFrom: labels lines: lines > title: ('Change Package (current: ', aPackage name,')'). > newName ifNil: [ ^ nil ]. > newName := newName asSymbol. > > item := self browsedEnvironment packageOrganizer packageNamed: newName. > aCollection do: [:aClass | > aPackage removeClass: aClass. > item addClassDefinition: aClass. > aClass category: item name ]. > ^ item > > to: > moveInNewPackage: aCollection > > | originalPackage newPackage | > aCollection ifEmpty: [^ nil ]. > originalPackage := aCollection first package. > > newPackage := SearchFacade rPackageSearch chooseFromOwner: self window. > newPackage ifNil: [ ^ nil ]. > > aCollection do: [:aClass | > originalPackage removeClass: aClass. > newPackage addClassDefinition: aClass. > aClass category: newPackage name ]. > ^ newPackage > > <http://forum.world.st/file/n4700280/Old_Change_Package_Dialog.png> > <http://forum.world.st/file/n4700280/Package_search.png> > > > > -- > View this message in context: http://forum.world.st/Change-the-Package-Chooser-Dialog-when-using-Move-to-package-tp4700280.html > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. > |
+ 1 000 000
Ben On Jul 23, 2013, at 5:31 PM, Stéphane Ducasse <[hidden email]> wrote: + 1 |
Free forum by Nabble | Edit this page |