WorkspaceApplication.st
changeset 7403 73712386ea82
parent 6865 c69e5225b03b
child 7412 ebab1a211cc5
equal deleted inserted replaced
7402:a0d38bb3a02e 7403:73712386ea82
     7  inclusion of the above copyright notice.   This software may not
     7  inclusion of the above copyright notice.   This software may not
     8  be provided or otherwise made available to, or used by, any
     8  be provided or otherwise made available to, or used by, any
     9  other person.  No title to or ownership of the software is
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    10  hereby transferred.
    11 "
    11 "
    12 
       
    13 "{ Package: 'stx:libtool' }"
    12 "{ Package: 'stx:libtool' }"
    14 
    13 
    15 MultiViewToolApplication subclass:#WorkspaceApplication
    14 MultiViewToolApplication subclass:#WorkspaceApplication
    16 	instanceVariableNames:'autoDefineVariables syntaxHolder'
    15 	instanceVariableNames:'autoDefineVariables syntaxHolder'
    17 	classVariableNames:'LastFilterBlockString LastProcessingBlockString LastTeaWaitTime'
    16 	classVariableNames:'LastFilterBlockString LastProcessingBlockString LastTeaWaitTime'
   125                   translateLabel: true
   124                   translateLabel: true
   126                 )
   125                 )
   127                (MenuItem
   126                (MenuItem
   128                   label: 'New SystemWorkspace'
   127                   label: 'New SystemWorkspace'
   129                   itemValue: newSystemWorkspace
   128                   itemValue: newSystemWorkspace
       
   129                   translateLabel: true
       
   130                 )
       
   131                (MenuItem
       
   132                   label: 'New EvaluationWorkspace'
       
   133                   itemValue: newEvaluationWorkspace
   130                   translateLabel: true
   134                   translateLabel: true
   131                 )
   135                 )
   132                (MenuItem
   136                (MenuItem
   133                   label: '-'
   137                   label: '-'
   134                 )
   138                 )
   605           )
   609           )
   606          )
   610          )
   607         nil
   611         nil
   608         nil
   612         nil
   609       )
   613       )
       
   614 
       
   615     "Modified: / 13-10-2006 / 12:19:34 / cg"
   610 !
   616 !
   611 
   617 
   612 tabMenu
   618 tabMenu
   613     "This resource specification was automatically generated
   619     "This resource specification was automatically generated
   614      by the MenuEditor of ST/X."
   620      by the MenuEditor of ST/X."
   657       )
   663       )
   658 ! !
   664 ! !
   659 
   665 
   660 !WorkspaceApplication class methodsFor:'special startup'!
   666 !WorkspaceApplication class methodsFor:'special startup'!
   661 
   667 
       
   668 openEvaluationWorkspace
       
   669     |wsApp path needRemove font|
       
   670 
       
   671     needRemove := true.
       
   672 
       
   673     wsApp := self new.
       
   674     wsApp allButOpen.
       
   675     wsApp window extent:400@500.
       
   676 
       
   677     wsApp addEvaluationWorkspace.
       
   678     wsApp removeWorkspace:1.
       
   679     wsApp renameWorkspace:1 to:'Evaluator'.
       
   680 
       
   681     wsApp openWindow.
       
   682     wsApp selectedWorkspaceIndexHolder value:1.
       
   683 
       
   684     "
       
   685      self openEvaluationWorkspace
       
   686     "
       
   687 
       
   688     "Created: / 13-10-2006 / 12:14:13 / cg"
       
   689 !
       
   690 
   662 openOnFile:aFilename
   691 openOnFile:aFilename
   663     "launch a new workspace on the contents of some file"
   692     "launch a new workspace on the contents of some file"
   664 
   693 
   665     |ws|
   694     |ws|
   666 
   695 
   851 
   880 
   852     "Modified: / 05-07-2006 / 15:37:49 / cg"
   881     "Modified: / 05-07-2006 / 15:37:49 / cg"
   853 !
   882 !
   854 
   883 
   855 addEvaluationWorkspace
   884 addEvaluationWorkspace
   856     self addWindow:(self createEvaluationWorkspace) named:'Eval%1'
   885     ^ self addWindow:(self createEvaluationWorkspace) named:'Eval%1'
       
   886 
       
   887     "Modified: / 13-10-2006 / 12:16:35 / cg"
   857 !
   888 !
   858 
   889 
   859 addGlobalVariable
   890 addGlobalVariable
   860     |name nameKey selection|
   891     |name nameKey selection|
   861 
   892 
   888 
   919 
   889     v := self addInspectorOn:Smalltalk inspectorClass:SmalltalkInspectorView suppressPseudoSlots:true.
   920     v := self addInspectorOn:Smalltalk inspectorClass:SmalltalkInspectorView suppressPseudoSlots:true.
   890 
   921 
   891     v fieldListLabel:'Name'.
   922     v fieldListLabel:'Name'.
   892     self renameWorkspace:(self selectedWorkspaceIndexHolder value) to:'Globals (Smalltalk)'.
   923     self renameWorkspace:(self selectedWorkspaceIndexHolder value) to:'Globals (Smalltalk)'.
   893 
   924     ^ v
   894     "Modified: / 05-07-2006 / 15:37:27 / cg"
   925 
       
   926     "Modified: / 13-10-2006 / 12:17:00 / cg"
   895 !
   927 !
   896 
   928 
   897 addInspectorOn:aValue basic:isBasicInspector suppressPseudoSlots:suppressPseudoSlots
   929 addInspectorOn:aValue basic:isBasicInspector suppressPseudoSlots:suppressPseudoSlots
   898     |inspectorClass|
   930     |inspectorClass|
   899 
   931 
  1133 
  1165 
  1134     file := Dialog requestFileName:(resources string:'Load file') default:'file.wsp' pattern:'*.wsp'.
  1166     file := Dialog requestFileName:(resources string:'Load file') default:'file.wsp' pattern:'*.wsp'.
  1135     file size ~~ 0 ifTrue:[
  1167     file size ~~ 0 ifTrue:[
  1136         self loadFile:file
  1168         self loadFile:file
  1137     ]
  1169     ]
       
  1170 !
       
  1171 
       
  1172 newEvaluationWorkspace
       
  1173     self class openEvaluationWorkspace
       
  1174 
       
  1175     "Created: / 13-10-2006 / 12:19:47 / cg"
  1138 !
  1176 !
  1139 
  1177 
  1140 newSystemWorkspace
  1178 newSystemWorkspace
  1141     self class openSystemWorkspace
  1179     self class openSystemWorkspace
  1142 !
  1180 !
  1631 ! !
  1669 ! !
  1632 
  1670 
  1633 !WorkspaceApplication class methodsFor:'documentation'!
  1671 !WorkspaceApplication class methodsFor:'documentation'!
  1634 
  1672 
  1635 version
  1673 version
  1636     ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.115 2006-08-09 12:57:35 cg Exp $'
  1674     ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.116 2006-10-13 11:06:59 cg Exp $'
  1637 ! !
  1675 ! !