'From Squeak3.2gamma of 15 January 2002 [latest update: #4811] on 6 April 2002 at 3:21:34 pm'! "Change Set: FixProjectsList-sbw Date: 6 April 2002 Author: Stephan B. Wessels The project organizes some of the project management related menus, fixes the project hierarchy display. Changes include: Add the 'make link to project...' menu item to the world project sub-menu. Fix the contents of the #showProjectHierarchyInWindow."! !Project class methodsFor: 'utilities' stamp: 'sbw 4/6/2002 15:19'! projectHierarchy "Answer a string representing all the projects in the system in hierarchical order." "Project projectHierarchy" ^ String streamContents: [:aStream | Project hierarchyOfNamesAndProjects do: [:aPair | aStream nextPutAll: aPair first; cr ]]! ! !Project class methodsFor: 'utilities' stamp: 'sbw 4/6/2002 15:16'! showProjectHierarchyInWindow "Open a window that displays the project hierarchy" "Project showProjectHierarchyInWindow" | hierarchyString numberOfProjects | hierarchyString _ self projectHierarchy. numberOfProjects _ hierarchyString lineCount. ((StringHolder new contents: hierarchyString) embeddedInMorphicWindowLabeled: 'Projects (' , numberOfProjects printString , ') ' , Date today printString , ' ' , Time now printString) setWindowColor: (Color r: 1.0 g: 0.829 b: 0.909); openInWorld: self currentWorld extent: 300 @ (numberOfProjects * (TextStyle defaultFont lineGrid + 4) min: self currentWorld height - 50) ! ! !TheWorldMenu methodsFor: 'construction' stamp: 'sbw 4/6/2002 14:46'! projectMenu "Build the project menu for the world." | menu | self flag: #bob0302. menu _ self menu: 'projects...'. self fillIn: menu from: {{'save on server (also makes a local copy)'. {#myProject. #storeOnServer}}. {'save to a different server'. {#myProject. #saveAs}}. {'save project on local file only'. {#myWorld. #saveOnFile}}. {'see if server version is more recent...'. {#myProject. #loadFromServer}}. {'load project from file...'. {self. #loadProject}}. nil}. self fillIn: menu from: {{'show project hierarchy'. {Project. #showProjectHierarchyInWindow}. 'Opens a window that shows names and relationships of all the projects in your system.'}. nil}. self mvcProjectsAllowed ifTrue: [self fillIn: menu from: {{'create new mvc project'. {self. #openMVCProject}}}]. self fillIn: menu from: {{'create new morphic project'. {self. #openMorphicProject}}. {'make link to project...'. {self. #projectThumbnail}}. nil. {'go to previous project'. {Project. #returnToPreviousProject}}. {'go to next project'. {Project. #advanceToNextProject}}. {'jump to project...'. {#myWorld. #jumpToProject}}}. Preferences simpleMenus ifFalse: [self fillIn: menu from: {nil. {'save for future revert'. {#myProject. #saveForRevert}}. {'revert to saved copy'. {#myProject. #revert}}}]. ^ menu! !