eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'NewLauncher':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: NewLauncher


Inheritance:

   Object
   |
   +--Model
      |
      +--ApplicationModel
         |
         +--ToolApplicationModel
            |
            +--AbstractLauncherApplication
               |
               +--NewLauncher

Package:
stx:libtool
Category:
Interface-Smalltalk
Version:
rev: 1.582 date: 2018/04/30 20:51:19
user: cg
file: NewLauncher.st directory: libtool
module: stx stc-classLibrary: libtool
Author:
Thomas Zwick, eXept Software AG
Claus Gittinger, eXept Software AG

Description:


The new launcher.
This one provides all of the Launchers functionality,
but has been written using the new GUI painter tools.
(i.e. its menu and toolbar is defined by specs, which can be
 easily modified).
Functionality which can be shared with the old launcher
has been moved to a common superclass.

If you want to write your own (application-)launcher, we recommend
creating a subclass, and redefining the appropriate menu & menuToolBar
methods there.


Related information:

    Launcher

Class protocol:

accessing
o  label

defaults
o  defaultInfoLineTemplate
available values:
PACKAGE - the current packageID
PACKAGEOREMPTY - the current packageID or empty if it's __NoPackage__
IMAGE - the current snapshot image
CVS - the CVS source repository or empty
DB - the Store source repository DB or empty
SVN_WORKING_COPY- the SVN working copy dir or empty
NOREPOSITORY - the tring 'No Repository' empty
NS - the default namespace, or empty (if Smalltalk)
PROJECTDIR - the default fileOut directory or empty (if current)

o  windowIcon

help specs
o  helpSpec
This resource specification was automatically generated
by the UIHelpTool of ST/X.

interface specs
o  windowSpec
^ self windowSpec_new.

o  windowSpec_new
This resource specification was automatically generated
by the UIPainter of ST/X.
usage example(s):
     UIPainter new openOnClass:NewLauncher andSelector:#windowSpec_new
     NewLauncher new openInterface:#windowSpec_new

o  windowSpec_old
This resource specification was automatically generated
by the UIPainter of ST/X.
usage example(s):
     UIPainter new openOnClass:NewLauncher andSelector:#windowSpec_old
     NewLauncher new openInterface:#windowSpec_old

o  windowSpec_pda
This resource specification was automatically generated
by the UIPainter of ST/X.
usage example(s):
     UIPainter new openOnClass:NewLauncher andSelector:#windowSpec_pda
     NewLauncher new openInterface:#windowSpec_pda

menu configuration
o  addMenuItem: newItem from: anApplicationWhichProvidesResourcesOrNil in: where position: positionSpecOrNilArg space: space
add to instance

o  addMenuItem: newItem in: where position: positionSpecOrNilArg space: space

o  addToolMenuEntryNamed: aString action: aBlock
NewLauncher addToolMenuEntryNamed:'My Workspace' action:[Workspace open]
NewLauncher addToolMenuEntryNamed:'Bla' action:[self halt]

o  removeAllUserAddedTools
self removeAllUserAddedTools

o  removeUserTool: toolNameOrMenuItem
removes a menu item labeled toolName
This can be invoked by a classes #deinitialize method,
to remove its item from the toolbar or menu.

usage example(s):
     Transcript topView application
	removeUserTool:'Bar'
usage example(s):
     Transcript topView application
	removeUserTool:'Foo'

o  removeUserTool: toolNameOrMenuItem from: addedToolsCollection
removes a menu item labeled toolName
This can be invoked by a classes #deinitialize method,
to remove its item from the toolbar or menu.

usage example(s):
     Transcript topView application
	removeUserTool:'Bar'
usage example(s):
     Transcript topView application
	removeUserTool:'Foo'

menu specs
o  aboutMenu
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:NewLauncher andSelector:#aboutMenu
     (Menu new fromLiteralArrayEncoding:(NewLauncher aboutMenu)) startUp

o  classesMenu
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:NewLauncher andSelector:#classesMenu
     (Menu new fromLiteralArrayEncoding:(NewLauncher classesMenu)) startUp

o  classesSpecialBrowserMenu
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:NewLauncher andSelector:#classesSpecialBrowserMenu
     (Menu new fromLiteralArrayEncoding:(NewLauncher classesSpecialBrowserMenu)) startUp

o  demosMenu
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:NewLauncher andSelector:#demosMenu
     (Menu new fromLiteralArrayEncoding:(NewLauncher demosMenu)) startUp

o  fileMenu
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:NewLauncher andSelector:#fileMenu
     (Menu new fromLiteralArrayEncoding:(NewLauncher fileMenu)) startUp

o  helpMenu
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:NewLauncher andSelector:#helpMenu
     (Menu new fromLiteralArrayEncoding:(NewLauncher helpMenu)) startUp

o  menu
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:NewLauncher andSelector:#menu
     (Menu new fromLiteralArrayEncoding:(NewLauncher menu)) startUp

o  menuOpenWorkspaceTypes
This resource specification was automatically generated
by the MenuEditor of ST/X.

o  menuToolbar
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:NewLauncher andSelector:#menuToolbar
     (Menu new fromLiteralArrayEncoding:(NewLauncher menuToolbar)) startUp

o  menuToolbar_pda
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:NewLauncher andSelector:#menuToolbar_pda
     (Menu new fromLiteralArrayEncoding:(NewLauncher menuToolbar_pda)) startUp

o  menu_pda
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:NewLauncher andSelector:#menu_pda
     (Menu new fromLiteralArrayEncoding:(NewLauncher menu_pda)) startUp

o  systemMenu
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:NewLauncher andSelector:#systemMenu
     (Menu new fromLiteralArrayEncoding:(NewLauncher systemMenu)) startUp

o  toolsMenu
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:NewLauncher andSelector:#toolsMenu
     (Menu new fromLiteralArrayEncoding:(NewLauncher toolsMenu)) startUp

o  toolsMiscMenu
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:NewLauncher andSelector:#toolsMiscMenu
     (Menu new fromLiteralArrayEncoding:(NewLauncher toolsMiscMenu)) startUp

o  windowsMenu
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:NewLauncher andSelector:#windowsMenu
     (Menu new fromLiteralArrayEncoding:(NewLauncher windowsMenu)) startUp

oldstyle-menu specs
o  settingsMenu
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:NewLauncher andSelector:#settingsMenu
     (Menu new fromLiteralArrayEncoding:(NewLauncher settingsMenu)) startUp


Instance protocol:

accessing
o  errorListCanvas

o  examples
reopening a standard launcher (without any added tools)
[exBegin]
NewLauncher removeAllUserAddedTools.
NewLauncher open.
[exEnd]



adding your own menu items (for user-applications)

an additional item in the tools menu:
[exBegin]
Transcript topView application
addMenuItem:(MenuItem new
label: 'Foo';
value: [Transcript showCR:'foo invoked'];
isButton: false;
labelImage: nil;
nameKey: #foo;
activeHelpKey: #Foo)
in:#menu
position:#(before workspace)
space:true
[exEnd]

an additional item in the tools menu:
[exBegin]
Transcript topView application
addMenuItem:(MenuItem new
label: 'Foo';
value: [Transcript showCR:'foo invoked'];
isButton: false;
labelImage: nil;
activeHelpKey: #Foo)
in:#menu
position:#(after guiPainter)
space:true
[exEnd]

an additional item in one of the tools sub menus:
[exBegin]
Transcript topView application
addMenuItem:(MenuItem new
label: 'Foo';
value: [Transcript showCR:'foo invoked'];
isButton: false;
labelImage: nil;
activeHelpKey: #Foo)
in:#toolbar
position:#(after Workspace)
space:true
[exEnd]

o  infoLineTemplate
controls what is shown in the lower info - line.
See classes defaultInfoLineTemplate and updateInfo for desription.

o  infoLineTemplate: aString
controls what is shown in the lower info - line.
See classes defaultInfoLineTemplate and updateInfo for desription.

o  menuToolbar
provide access to my toolBar

o  transcriptView
provide access to my transcript view

aspects
o  canDoTerminal
return a 'valueHolder', which returns true if the terminal application
is available. For now, this is true if we run under unix

o  canOpenRemoteLauncher

o  chickenFunIsRunning
return a 'valueHolder', which returns true if the chickenFun demo is running.

o  debuggerHasIgnoredHalts

o  debuggerHasIgnoredHaltsOrSmalltalkIsIgnoringHalts

o  displaySupportsGLDrawing
return a 'valueHolder', which returns true if the GL support
is available.

o  enableDangerousMenuItemsInRemoteLauncher

o  fileBrowserItemVisible

o  historyManagerActive
Answer whether the history manager is active.

o  isMainLauncherHolder

o  isNotMainLauncherHolder

o  javaSupportPresent
return a 'valueHolder', which returns true if the java support
is available.

o  libraryBuilderAvailable

o  noteBookCanvasHolder

o  oomPackageLoaded
true if the oom (metrics) package is loaded

o  selectedTabHolder

o  showActiveHelpMenuItem

o  smaccPackageLoaded
true if the smacc (compiler-compiler) package is loaded

o  smallTeamAvailable

o  sqlWorkspaceItemVisible

o  tabList

o  webDocumentsItemShownInHelpMenu

change & update
o  update: something with: aParameter from: changedObject
care for project changes & update my infoView

o  updateInfo
update the infoLabel (at the bottom) from the current project

help
o  defaultInfoLabel

o  helpTextForKey: aKey

menu configuration
o  addMenuItem: newItem from: anApplicationClassWhichProvidesResourcesOrNil in: where position: positionSpecOrNilArg space: space
adds a menu item;
where == #menu - menu item is added at the end of the sub menu 'Tools',
where == #toolbar - menu item is added at the end of the tool bar,
where == #menu.<name> - menu item is added at the end of the sub menu named 'name',

position may be one of:
#(before <someItemPath>)
#(after <someItemPath>)
#( #first ) or #first
#( #last ) or #last or nil

If space is true, some empty space is inserted.
This can be invoked by a classes #initialize method, to add an item
for itself to the toolbar or menu.
usage example(s):
     UserAddedToolBarItems := nil.
     UserAddedMenuItems := nil.
     NewLauncher open.

     Transcript topView application
        addMenuItem:(MenuItem new
                        label: 'Foo';
                        value: [Transcript showCR:'foo'];
                        isButton: false;
                        labelImage: nil;
                        nameKey: #foo)
        in:'menu.'
        position:#(last)
        space:true.

     Transcript topView application
        addMenuItem:(MenuItem new
                        label: 'Foo';
                        value: [Transcript showCR:'foo'];
                        isButton: false;
                        labelImage: nil;
                        nameKey: #foo)
        in:#menu
        position:#(before Workspace)
        space:true.

     Transcript topView application
        addMenuItem:(MenuItem new
                        label: 'Bar';
                        value: [Transcript showCR:'bar'];
                        isButton: false;
                        labelImage: nil;
                        nameKey: #bar)
        in:#menu
        position:#(after foo)
        space:true.

     Transcript topView application
        addMenuItem:(MenuItem new
                        label: 'Baz';
                        value: [Transcript showCR:'baz'];
                        isButton: false;
                        labelImage: nil;
                        nameKey: #baz)
        in:#menu
        position:#(before bar)
        space:false.

     Transcript topView application
        addMenuItem:(MenuItem new
                        label: 'Baz2';
                        value: [Transcript showCR:'baz2'];
                        isButton: false;
                        labelImage: nil;
                        nameKey: #baz2)
        in:#menu
        position:#(after bar)
        space:false.

     Transcript topView application
        addMenuItem:(MenuItem new
                        label: 'Foo2';
                        value: [Transcript showCR:'foo2'];
                        isButton: false;
                        labelImage: nil;
                        nameKey: #foo2)
        in:'menu.classes'
        position:#last
        space:false.

     Transcript topView application
        addMenuItem:(MenuItem new
                        label: 'Foo3';
                        value: [Transcript showCR:'foo3'];
                        isButton: false;
                        labelImage: nil;
                        nameKey: #foo3)
        in:'menu.classes.special'
        position:#first
        space:true.

o  addMenuItem: newItem in: where position: positionSpecOrNilArg space: space
adds a menu item;
where == #menu - menu item is added at the end of the sub menu 'Tools',
where == #toolbar - menu item is added at the end of the tool bar,
where == #menu.<name> - menu item is added at the end of the sub menu named 'name',

position may be one of:
#(before <someItemPath>)
#(after <someItemPath>)
#( #first ) or #first
#( #last ) or #last or nil

If space is true, some empty space is inserted.
This can be invoked by a classes #initialize method, to add an item
for itself to the toolbar or menu.

o  findItem: menuItem inMenuPanel: menuPanel
find a menu item in the menupanel.
Return the index of the item in the panel or 0
if not found

o  removeUserTool: toolNameOrMenuItem
removes a menu item labeled toolName
This can be invoked by a classes #deinitialize method,
to remove its item from the toolbar or menu.

o  removeUserTool: toolNameOrMenuItem from: addedToolsCollection
removes a menu item labeled toolName
This can be invoked by a classes #deinitialize method,
to remove its item from the toolbar or menu.

usage example(s):
     Transcript topView application
	removeUserTool:'Bar'
usage example(s):
     Transcript topView application
	removeUserTool:'Foo'

o  userAddedMenuItems
return a dictionary of user-added menu item infos.

o  userAddedToolBarItems
return a dictionary of user-added toolBar item infos.

menus-dynamic
o  allWindowsMenu
returns a subMenu with one oeprations-submenu entry per open window

o  menuChangeHistory
returns a sub menu on the last changes

o  menuClassHistory
returns a sub menu on the history of the classes

o  menuClassHistoryFor: whichBrowserClass
returns a sub menu on the history of the classes

o  menuClassHistoryNew
returns a sub menu on the history of the classes

o  menuFileHistory
returns a subMenu on the history of the filebrowsers directories

o  recentlyOpenedApplicationsMenu

o  startBrowserOnSmallTeamChangesMenu
returns a subMenu on the history of the filebrowsers directories

private-settings callBacks
o  reopenLauncher
reopen a new launcher.
for now (since style & language settings currently do
not affect living views ...)
WARNING: bad design: Message known in LauncherDialogs

queries
o  preferredExtent

o  useNewSettingsApplication

o  useOldSettingsApplication

o  windowMigrationFunctionsAreShown

startup & release
o  allButOpenInterface: anInterface
sent by my superclass to open up my interface

o  postBuildWith: aBuilder
setup my preferred size

o  postOpenWith: aBuilder
increase my priority"

o  release

o  requestForWindowClose
remote launchers may not finish ST/X

o  setupTranscript
create the transcript view

user actions-classes
o  enableGlobalCoverageAnalysis

o  findApplicationAndOpen

o  findClassAndBrowse

o  openMethodFinder
open the methodFinder (ported from squeak)

o  startBrowserOnChangesOnSmallTeamHost: aHostName

o  startOOMBrowser

o  startToDoListBrowser

o  stopIgnoringHalts

user actions-debugging
o  openTranscriptDebugDialog

o  openTranscriptTraceDialog

o  timestampTranscriptMessages

o  timestampTranscriptMessages: aBoolean

user actions-demos
o  openDemo: className
open a demo, given its name.
Looks in both the Smalltalk- and the Demos-Namespace
for that class.

o  openMandelbrotDemo

o  startPingPong2
opens a 2-user PingPong game

o  startReversi
opens a reversi game (java)

o  startStopDemo: className
start/stop a demo, given its name.
Looks in both the Smalltalk- and the Demos-Namespace
for that class.

o  startTicTacToe2
opens a 2-user ticTacToe game

user actions-file
o  clearTranscript

o  saveImage
save image

o  saveImageAs
save image, after asking for a file name

o  saveSessionChangesAs
save the current default changeset as a patch file,
after asking for a file name

o  saveSessionChangesAs: changesFilename
save the current default changeset as a patch file

user actions-help
o  activeHelp
helpIsOn addDependent:self.

o  toggleFlyByHelp: aBoolean
turn on/off active help

user actions-system
o  initJavaVM

o  startLatencyMonitor
open an interruptLatencyMonitor view

o  startProcessMonitor
open an ProcessMonitor view

o  startSQLScratchpad

o  startSQLWorkspace

o  toggleHistoryManager
Toggle history manager usage.

user actions-tools
o  menuResumeFirefox

o  menuSuspendFirefox

user actions-windows
o  redrawAllWindows


Private classes:

    AddedToolInfo

Demonstration:


    NewLauncher open


Examples:


reopening a standard launcher (without any added tools)
 NewLauncher removeAllUserAddedTools.
 NewLauncher open.
adding your own menu items (for user-applications) an additional item in the tools menu:
 Transcript topView application
    addMenuItem:(MenuItem new
                    label: 'Foo';
                    value: [Transcript showCR:'foo invoked'];
                    isButton: false;
                    labelImage: nil;
                    nameKey: #foo;
                    activeHelpKey: #Foo)
    in:#menu
    position:#(before workspace)
    space:true
an additional item in the tools menu:
 Transcript topView application
    addMenuItem:(MenuItem new
                    label: 'Foo';
                    value: [Transcript showCR:'foo invoked'];
                    isButton: false;
                    labelImage: nil;
                    activeHelpKey: #Foo)
    in:#menu
    position:#(after guiPainter)
    space:true
an additional item in one of the tools sub menus:
 Transcript topView application
    addMenuItem:(MenuItem new
                    label: 'Foo';
                    value: [Transcript showCR:'foo invoked'];
                    isButton: false;
                    labelImage: nil;
                    activeHelpKey: #Foo)
    in:#menu
    position:#(after Workspace)
    space:true


ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Wed, 19 Sep 2018 08:33:26 GMT