[Pkg] The Trunk: Morphic-dtl.247.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Nov 23 20:19:41 UTC 2009


David T. Lewis uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-dtl.247.mcz

==================== Summary ====================

Name: Morphic-dtl.247
Author: dtl
Time: 23 November 2009, 4:11:32 am
UUID: 0412758f-6868-4e4a-9c30-41520a99031e
Ancestors: Morphic-ul.246

Implement #interruptName:preemptedProcess: on instance side
MorphicProject>>findProjectView: refactored from Project
MorphicProject>>jumpToProject refactored from Project


=============== Diff against Morphic-ul.246 ===============

Item was added:
+ ----- Method: MorphicProject class>>jumpToProject (in category 'utilities') -----
+ jumpToProject
+ 	"Project jumpToProject"
+ 	"Present a list of potential projects and enter the one selected."
+ 	| menu |
+ menu:=MenuMorph new.
+ menu defaultTarget: self.
+ 	menu := self buildJumpToMenu: menu.
+ 	menu popUpInWorld!

Item was added:
+ ----- Method: MorphicProject>>findProjectView: (in category 'utilities') -----
+ findProjectView: projectDescription
+ 	"In this world, find the morph that holds onto the project described by projectDescription.
+ 	projectDescription can be a project, or the name of a project.  The project may be
+ 	represented by a DiskProxy. The holder morph may be at any depth in the world.."
+ 
+ 	| pName dpName |
+ 	pName := (projectDescription isString) 
+ 		ifTrue: [projectDescription]
+ 		ifFalse: [projectDescription name].
+ 	world allMorphsDo: [:pvm |
+ 	pvm class == ProjectViewMorph ifTrue: [
+ 		(pvm project class == Project and: 
+ 			[pvm project name = pName]) ifTrue: [^ pvm].
+ 			pvm project class == DiskProxy ifTrue: [ 
+ 			dpName := pvm project constructorArgs first.
+ 			dpName := (dpName findTokens: '/') last.
+ 			dpName := (Project parseProjectFileName: dpName unescapePercents) first.
+ 			dpName = pName ifTrue: [^ pvm]]]].
+ 	^ nil!

Item was added:
+ ----- Method: MorphicProject>>interruptName:preemptedProcess: (in category 'utilities') -----
+ interruptName: labelString preemptedProcess: theInterruptedProcess
+ 	"Create a Notifier on the active scheduling process with the given label."
+ 
+ 	| preemptedProcess projectProcess |
+ 	ActiveHand ifNotNil:[ActiveHand interrupted].
+ 	ActiveWorld := World. "reinstall active globals"
+ 	ActiveHand := World primaryHand.
+ 	ActiveHand interrupted. "make sure this one's interrupted too"
+ 	ActiveEvent := nil.
+ 
+ 	projectProcess := UIProcess.	"we still need the accessor for a while"
+ 	preemptedProcess := theInterruptedProcess ifNil: [Processor preemptedProcess].
+ 	"Only debug preempted process if its priority is >= projectProcess' priority"
+ 	preemptedProcess priority < projectProcess priority 
+ 		ifTrue:[preemptedProcess := projectProcess].
+ 	preemptedProcess suspend.
+ 	Debugger openInterrupt: labelString onProcess: preemptedProcess
+ !



More information about the Packages mailing list