ProjectView.st
author Claus Gittinger <cg@exept.de>
Sun, 21 Sep 1997 00:42:12 +0200
changeset 1326 aab1605ad945
parent 1013 e71df344f4f0
child 1348 f958dbefe269
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
88
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
     1
"
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
     2
 COPYRIGHT (c) 1994 by Claus Gittinger
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
     3
	      All Rights Reserved
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
     4
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
     5
 This software is furnished under a license and may be used
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
     6
 only in accordance with the terms of that license and with the
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
     8
 be provided or otherwise made available to, or used by, any
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
     9
 other person.  No title to or ownership of the software is
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
    10
 hereby transferred.
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
    11
"
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
    12
1326
aab1605ad945 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
    13
'From Smalltalk/X, Version:3.1.10 on 19-sep-1997 at 10:58:38 pm'                !
aab1605ad945 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
    14
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
    15
StandardSystemView subclass:#ProjectView
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    16
	instanceVariableNames:'myProject toggle'
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    17
	classVariableNames:'ActiveProjectView'
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    18
	poolDictionaries:''
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    19
	category:'Interface-Smalltalk'
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
    20
!
571fd5eee315 Initial revision
claus
parents:
diff changeset
    21
796
b8edcbceaa18 XtHTML is no longer there ...
Claus Gittinger <cg@exept.de>
parents: 692
diff changeset
    22
!ProjectView class methodsFor:'documentation'!
88
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
    23
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
    24
copyright
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
    25
"
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
    26
 COPYRIGHT (c) 1994 by Claus Gittinger
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
    27
	      All Rights Reserved
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
    28
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
    29
 This software is furnished under a license and may be used
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
    30
 only in accordance with the terms of that license and with the
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
    32
 be provided or otherwise made available to, or used by, any
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
    33
 other person.  No title to or ownership of the software is
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
    34
 hereby transferred.
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
    35
"
272
9eeb8aa5d1d7 commentary
Claus Gittinger <cg@exept.de>
parents: 265
diff changeset
    36
!
9eeb8aa5d1d7 commentary
Claus Gittinger <cg@exept.de>
parents: 265
diff changeset
    37
9eeb8aa5d1d7 commentary
Claus Gittinger <cg@exept.de>
parents: 265
diff changeset
    38
documentation
9eeb8aa5d1d7 commentary
Claus Gittinger <cg@exept.de>
parents: 265
diff changeset
    39
"
9eeb8aa5d1d7 commentary
Claus Gittinger <cg@exept.de>
parents: 265
diff changeset
    40
    ProjectViews basically offer two functionalities:
9eeb8aa5d1d7 commentary
Claus Gittinger <cg@exept.de>
parents: 265
diff changeset
    41
9eeb8aa5d1d7 commentary
Claus Gittinger <cg@exept.de>
parents: 265
diff changeset
    42
      - keep a group of windows in order to organize the desktop
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    43
        (I am not sure, if this is really a useful feature, now that we
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    44
         have modern windowManagers which have multiple desktops as well).
272
9eeb8aa5d1d7 commentary
Claus Gittinger <cg@exept.de>
parents: 265
diff changeset
    45
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    46
        All views as created while a project is active are remembered
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    47
        and can be hidden/shown altogether.
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    48
        (this has nothing to do with windowGroups)
272
9eeb8aa5d1d7 commentary
Claus Gittinger <cg@exept.de>
parents: 265
diff changeset
    49
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    50
        Also, it is possible to close down all those windows (by destroying the project).
272
9eeb8aa5d1d7 commentary
Claus Gittinger <cg@exept.de>
parents: 265
diff changeset
    51
9eeb8aa5d1d7 commentary
Claus Gittinger <cg@exept.de>
parents: 265
diff changeset
    52
      - keep defaults for various system activities:
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    53
                - the fileOut directory (i.e. where the SystemBrowser creates fileOut sources)
272
9eeb8aa5d1d7 commentary
Claus Gittinger <cg@exept.de>
parents: 265
diff changeset
    54
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    55
                - keep the source module/package
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    56
                    thats the default offered when classes are checkedIn the very first time
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    57
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    58
                - keep a default package-identifier assigned when classes/methods are created/modified.
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    59
                    thats mostly useful to browse all classes/methods that have been touched
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    60
                    in a projects context
272
9eeb8aa5d1d7 commentary
Claus Gittinger <cg@exept.de>
parents: 265
diff changeset
    61
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    62
                - keep a per-project changeList
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    63
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    64
      - allow opening a browser on all classes/methods which were created or modified
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    65
        while a project was active.
272
9eeb8aa5d1d7 commentary
Claus Gittinger <cg@exept.de>
parents: 265
diff changeset
    66
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    67
      - allow opening a browser on this projects changeList (which contains the subset of changes
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    68
         which were done while this project was active)
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    69
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
    70
      - allow removal of all classes/methods which have the current projects packageIdentifier
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
    71
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
    72
    [author:]
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
    73
        Claus Gittinger
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
    74
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
    75
    [see also:]
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
    76
        Project
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
    77
        Namespace
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
    78
        CVSSourceCodemanager
272
9eeb8aa5d1d7 commentary
Claus Gittinger <cg@exept.de>
parents: 265
diff changeset
    79
"
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
    80
88
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
    81
! !
a38a2e87687b *** empty log message ***
claus
parents: 85
diff changeset
    82
796
b8edcbceaa18 XtHTML is no longer there ...
Claus Gittinger <cg@exept.de>
parents: 692
diff changeset
    83
!ProjectView class methodsFor:'instance creation'!
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
    84
571fd5eee315 Initial revision
claus
parents:
diff changeset
    85
for:aProject
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
    86
    "create & open a new projectView on some project"
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
    87
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
    88
    |newView|
571fd5eee315 Initial revision
claus
parents:
diff changeset
    89
571fd5eee315 Initial revision
claus
parents:
diff changeset
    90
    newView := super new.
571fd5eee315 Initial revision
claus
parents:
diff changeset
    91
    newView setProject:aProject.
571fd5eee315 Initial revision
claus
parents:
diff changeset
    92
    ^ newView
571fd5eee315 Initial revision
claus
parents:
diff changeset
    93
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
    94
    "
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
    95
     ProjectView for:(Project new)
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
    96
    "
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
    97
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
    98
    "Modified: 14.2.1997 / 13:46:07 / cg"
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
    99
! !
571fd5eee315 Initial revision
claus
parents:
diff changeset
   100
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   101
!ProjectView methodsFor:'initialization'!
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   102
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   103
addToCurrentProject
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   104
    "add this view to the current projects set of views.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   105
     Ignored here - ProjectViews are global."
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   106
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   107
    ^ self
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   108
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   109
    "Modified: 14.2.1997 / 13:35:58 / cg"
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   110
!
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   111
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   112
initialize
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   113
    super initialize.
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   114
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   115
    "/
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   116
    "/ create the toggle ...
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   117
    "/
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   118
    toggle := Toggle in:self.
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   119
    toggle borderWidth:0.
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   120
    toggle pressAction:[self showProject].
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   121
    toggle releaseAction:[self hideProject].
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   122
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   123
    "/
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   124
    "/ and give it a menu
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   125
    "/
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   126
1001
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   127
    toggle menuHolder:self; menuMessage:#projectMenu.
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   128
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   129
    "Created: 25.11.1995 / 18:06:32 / cg"
1001
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   130
    "Modified: 27.1.1997 / 11:53:18 / cg"
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   131
!
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   132
1001
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   133
projectMenu
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   134
    "return a popUpMenu"
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   135
468
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   136
    |labels selectors m|
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   137
468
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   138
    labels := #(
513
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   139
                    'class documentation'
468
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   140
                    '-'
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   141
                    'show'
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   142
                    'hide'
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   143
                    '-'
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   144
                    'changes'
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   145
                    'browse'
1001
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   146
                    'browse redefined'
468
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   147
                    'fileOut classes'
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   148
                    '-'
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   149
                    'fileOut directory ...'
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   150
                    'repository defaults ...'
468
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   151
                    'package name ...'
893
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   152
                    'default nameSpace ...'
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   153
"/                        '-'
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   154
"/                        'save project code'
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   155
"/                        'build'
468
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   156
                    '-'
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   157
                    'remove package code'
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   158
                    'remove project'
513
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   159
                    '-'
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   160
                    'rename ...'
468
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   161
               ).
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   162
468
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   163
     selectors := #(        
513
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   164
                    showClassDocumentation
468
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   165
                    nil
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   166
                    showProject
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   167
                    hideProject
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   168
                    nil
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   169
                    browseChanges
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   170
                    browsePackage
1001
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   171
                    browseRedefined
468
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   172
                    fileOutClasses
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   173
                    nil
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   174
                    projectDirectory
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   175
                    projectRepositoryAndModule
468
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   176
                    projectPackage
893
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   177
                    projectNameSpace
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   178
"/                        nil
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   179
"/                        saveProjectFiles
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   180
"/                        buildProject
468
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   181
                    nil
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   182
                    removePackage
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   183
                    destroy
513
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   184
                    nil
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   185
                    renameProject
468
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   186
                ).
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   187
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   188
    m := PopUpMenu
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   189
                labels:(resources array:labels)
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   190
                selectors:selectors
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   191
                receiver:self.
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   192
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   193
    SourceCodeManager isNil ifTrue:[
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   194
        m disableAll:#(#projectRepository #projectPackage).
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   195
    ].
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   196
1001
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   197
    ^ m
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   198
1001
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   199
    "Created: 27.1.1997 / 11:53:30 / cg"
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   200
    "Modified: 27.1.1997 / 11:54:52 / cg"
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   201
! !
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   202
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   203
!ProjectView methodsFor:'menu actions'!
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   204
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   205
browseChanges
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   206
    "open a changeBrowser showing all changes made in this project
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   207
     (i.e. while this project was the active project)"
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   208
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   209
    |changes b|
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   210
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   211
    changes := myProject changeSet.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   212
    changes size == 0 ifTrue:[
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   213
        self warn:(resources string:'no changes made in this project (yet)').
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   214
        ^ self
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   215
    ].
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   216
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   217
    b := ChangeSetBrowser openOn:(myProject changeSet).
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   218
    b label:(resources string:'Changes in %1' with:myProject name)
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   219
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   220
    "Modified: 14.2.1997 / 13:36:40 / cg"
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   221
!
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   222
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   223
browsePackage
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   224
    "launch browsers for all classes/methods which are defined in this package
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   225
     (i.e. whose packageIdentifier is the same as my Projects packageIdentifier)"
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   226
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   227
    self topView withWaitCursorDo:[
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   228
        |classes packageName methods methodList anyClasses anyMethods ignoredClasses|
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   229
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   230
        anyMethods := anyClasses := false.
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   231
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   232
        packageName := myProject packageName.
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   233
        classes := myProject classes.
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   234
        (classes notNil and:[classes notEmpty]) ifTrue:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   235
            anyClasses := true.
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   236
        ].
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   237
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   238
        methods := myProject individualMethods.
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   239
        methods notEmpty ifTrue:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   240
            anyMethods := true.
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   241
            SystemBrowser browseMethods:methods
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   242
                                  title:(resources string:'individual methods in package %1' with:packageName).
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   243
        ].
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   244
        anyClasses ifTrue:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   245
            SystemBrowser browseClasses:classes
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   246
                                  title:(resources string:'classes in package %1' with:packageName).
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   247
        ].
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   248
        (anyClasses or:[anyMethods]) ifFalse:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   249
            self information:(resources string:'no classes or methods in this project (yet)')
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   250
        ]
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   251
    ]
265
3b1d5710e4a5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   252
3b1d5710e4a5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   253
    "Created: 10.12.1995 / 00:08:58 / cg"
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   254
    "Modified: 12.12.1995 / 16:35:07 / cg"
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   255
!
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   256
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   257
browseProps
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   258
    "show the projects properties.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   259
     This is not yet finished ...
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   260
     ... and will look better, once property inspector runs ..."
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   261
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   262
    myProject properties inspect
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   263
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   264
    "Modified: 14.2.1997 / 13:37:15 / cg"
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   265
!
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   266
1001
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   267
browseRedefined
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   268
    "launch browsers for all redefined methods.
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   269
     Thats methods which existed before and were redefined by package methods"
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   270
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   271
    self topView withWaitCursorDo:[
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   272
        |redefined methods|
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   273
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   274
        redefined := myProject overwrittenMethods.
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   275
        redefined notNil ifTrue:[
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   276
            methods := redefined values.
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   277
        ].
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   278
        methods size > 0 ifTrue:[
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   279
            SystemBrowser browseMethods:methods
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   280
                                  title:(resources string:'redefined methods in package %1' with:myProject packageName).
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   281
        ] ifFalse:[
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   282
            self information:(resources string:'no redefined methods in this project (yet)')
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   283
        ]
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   284
    ]
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   285
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   286
    "Created: 27.1.1997 / 11:57:03 / cg"
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   287
    "Modified: 27.1.1997 / 11:58:06 / cg"
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   288
!
b7dc91d2499d added 'browse redefined'
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   289
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   290
buildProject
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   291
    "build the project; this is not yet finished ...
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   292
     ... and will eventually create all sources, makefile and
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   293
     build what is to be built: either a classLibrary or an application"
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   294
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   295
    self topView withWaitCursorDo:[
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   296
        |dir|
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   297
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   298
        self saveProjectFiles.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   299
        (self confirm:'make object files in: ' ,  dir , ' ?') ifTrue:[
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   300
            myProject buildProject.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   301
        ]
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   302
    ].
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   303
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   304
    "Modified: 14.2.1997 / 13:38:06 / cg"
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   305
!
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   306
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   307
destroy
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   308
    "Let user confirm, then close all of my views, and get rid of the changeList.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   309
     However, methods and classes are not restored to their
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   310
     previous state."
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   311
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   312
    (myProject views notNil
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   313
    and:[myProject views notEmpty]) ifTrue:[
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   314
        |box|
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   315
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   316
        box := YesNoBox new.
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   317
        box title:(resources string:'PROJECT_DESTROY') withCRs.
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   318
        box okText:(resources string:'yes').
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   319
        (box confirm) ifFalse:[^ self]
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   320
    ].
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   321
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   322
    self doDestroy
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   323
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   324
    "Modified: 14.2.1997 / 13:39:03 / cg"
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   325
!
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   326
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   327
doDestroy
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   328
    "close all of my views, and get rid of the changeList.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   329
     However, methods and classes are not restored to their
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   330
     previous state.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   331
     No confiramtion here."
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   332
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   333
    self hideProject.
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   334
    myProject := nil.
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   335
    super destroy
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   336
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   337
    "Modified: 14.2.1997 / 13:39:18 / cg"
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   338
!
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   339
468
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   340
fileOutClasses
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   341
    "fileout all classes belonging to that package.
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   342
     CAVEAT: individual methods are not yet supported."
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   343
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   344
    self topView withWaitCursorDo:[
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   345
        |classes packageName methods methodList anyClasses anyMethods ignoredClasses|
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   346
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   347
        anyMethods := anyClasses := false.
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   348
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   349
        packageName := myProject packageName.
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   350
        classes := myProject classes.
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   351
        (classes notNil and:[classes notEmpty]) ifTrue:[
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   352
            anyClasses := true.
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   353
        ].
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   354
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   355
        methods := myProject individualMethods.
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   356
        methods notEmpty ifTrue:[
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   357
            anyMethods := true.
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   358
            self warn:'individual methods are currently not handled'
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   359
        ].
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   360
        anyClasses ifTrue:[
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   361
            classes do:[:aClass |
553
b67caadfe334 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
   362
                Transcript showCR:'fileOut: ' , aClass name , ' ...'.
468
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   363
                aClass fileOut
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   364
            ].
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   365
        ].
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   366
        (anyClasses or:[anyMethods]) ifFalse:[
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   367
            self information:(resources string:'no classes or methods in this project (yet)')
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   368
        ]
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   369
    ]
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   370
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   371
    "Created: 11.4.1996 / 19:29:50 / cg"
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   372
!
66637cf315a5 added fileOutClasses menu entry
Claus Gittinger <cg@exept.de>
parents: 278
diff changeset
   373
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   374
hideProject
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   375
    "hide all views belonging to that project and switch
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   376
     to the default project"
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   377
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   378
    myProject hideViews.
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   379
    ActiveProjectView := nil.
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   380
    toggle turnOff.
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   381
    Project setDefaultProject.
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   382
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   383
    "Modified: 14.2.1997 / 13:39:43 / cg"
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   384
!
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   385
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   386
projectDirectory
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   387
    "ask for the default directory, where fileOut will write
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   388
     its files. Will eventually also be the place, where makefiles
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   389
     and additional stuff is saved, for project building."
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   390
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   391
    |box d|
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   392
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   393
    box := FilenameEnterBox new.
85
d9713a3ca092 *** empty log message ***
claus
parents: 57
diff changeset
   394
    box directoriesOnly.
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   395
    box title:(resources string:'PROJECT_DIRECTPORY') withCRs.
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   396
    (d := myProject directory) notNil ifTrue:[
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   397
        box initialText:d
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   398
    ].
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   399
    box action:[:dirName |
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   400
        (OperatingSystem isDirectory:dirName) ifFalse:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   401
            (OperatingSystem isValidPath:dirName) ifTrue:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   402
                self warn:(resources string:'%1 is not a valid directory' with:dirName).
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   403
                ^ self
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   404
            ].
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   405
            (self confirm:(resources string:'%1 does not exist\\create ?' with:dirName) withCRs) ifTrue:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   406
                (OperatingSystem recursiveCreateDirectory:dirName) ifFalse:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   407
                    self warn:(resources string:'cannot create %1' with:dirName)
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   408
                ]
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   409
            ].
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   410
        ].
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   411
        "did it work ?"
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   412
        (OperatingSystem isDirectory:dirName) ifTrue:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   413
            myProject directory:dirName
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   414
        ].
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   415
    ].
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   416
    box showAtPointer
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   417
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   418
    "Modified: 14.2.1997 / 13:44:59 / cg"
265
3b1d5710e4a5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   419
!
3b1d5710e4a5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   420
893
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   421
projectNameSpace
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   422
    "ask for the default nameSpace, into which new classes
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   423
     are loaded while this project is active.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   424
     Useful before filing in alien code, to make certain that loaded
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   425
     classes do not conflict with existing ones ..."
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   426
893
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   427
    self topView withWaitCursorDo:[
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   428
        |box allNameSpaces|
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   429
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   430
        allNameSpaces := Namespace allNamespaces collect:[:ns | ns name].
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   431
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   432
        box := ListSelectionBox title:(resources string:'default nameSpace:') withCRs.
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   433
        box list:(allNameSpaces asOrderedCollection sort).
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   434
        box action:[:nsName |
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   435
            |ns|
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   436
963
3d9083fde09f provide Smalltalk as homeNameSpace, when defining the projects
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   437
            "/ only create topLevel nameSpaces here
3d9083fde09f provide Smalltalk as homeNameSpace, when defining the projects
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   438
3d9083fde09f provide Smalltalk as homeNameSpace, when defining the projects
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   439
            Class nameSpaceQuerySignal 
3d9083fde09f provide Smalltalk as homeNameSpace, when defining the projects
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   440
            answer:Smalltalk
3d9083fde09f provide Smalltalk as homeNameSpace, when defining the projects
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   441
            do:[
3d9083fde09f provide Smalltalk as homeNameSpace, when defining the projects
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   442
                ns := Namespace name:nsName.
3d9083fde09f provide Smalltalk as homeNameSpace, when defining the projects
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   443
            ].    
893
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   444
            myProject defaultNameSpace:ns
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   445
        ].
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   446
        box showAtPointer
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   447
    ]
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   448
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   449
    "Created: 9.12.1995 / 16:50:45 / cg"
963
3d9083fde09f provide Smalltalk as homeNameSpace, when defining the projects
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   450
    "Modified: 16.1.1997 / 01:00:06 / cg"
893
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   451
!
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   452
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   453
projectPackage
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   454
    "ask for the package identifier of this project.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   455
     New classes and methods get this identifier, to find them
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   456
     quickly later."
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   457
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   458
    self topView withWaitCursorDo:[
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   459
        |box p existingPackages allClasses|
259
c651fecef457 better defaults when creating a container
Claus Gittinger <cg@exept.de>
parents: 217
diff changeset
   460
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   461
        existingPackages := Set new.
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   462
        (allClasses := Smalltalk allClasses) do:[:aClass |
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   463
            |p|
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   464
1326
aab1605ad945 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   465
            aClass isLoaded ifTrue:[
aab1605ad945 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   466
                (p := aClass package) notNil ifTrue:[
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   467
                    existingPackages add:(p asString)
1326
aab1605ad945 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   468
                ].
aab1605ad945 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   469
                aClass methodDictionary do:[:aMethod |
aab1605ad945 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   470
                    (p := aMethod package) notNil ifTrue:[
aab1605ad945 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   471
                        existingPackages add:(p asString)
aab1605ad945 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   472
                    ]
aab1605ad945 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   473
                ].
aab1605ad945 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   474
                aClass class methodDictionary do:[:aMethod |
aab1605ad945 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   475
                    (p := aMethod package) notNil ifTrue:[
aab1605ad945 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   476
                        existingPackages add:(p asString)
aab1605ad945 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   477
                    ]
aab1605ad945 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   478
                ].
aab1605ad945 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   479
            ]
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   480
        ].
259
c651fecef457 better defaults when creating a container
Claus Gittinger <cg@exept.de>
parents: 217
diff changeset
   481
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   482
        box := ListSelectionBox title:(resources string:'PROJECT_PACKAGENAME') withCRs.
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   483
        box list:(existingPackages asOrderedCollection sort).
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   484
        (p := myProject packageName) notNil ifTrue:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   485
            box initialText:p
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   486
        ].
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   487
        box action:[:packageName |
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   488
            |someClass module directory|
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   489
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   490
            "/ (try) to extract the module & repository directory from someClass which
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   491
            "/ is already contained in that package
259
c651fecef457 better defaults when creating a container
Claus Gittinger <cg@exept.de>
parents: 217
diff changeset
   492
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   493
            Smalltalk allClasses 
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   494
                detect:[:cls | 
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   495
                                |info|
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   496
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   497
                                (cls package = packageName) ifTrue:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   498
                                    (info := cls packageSourceCodeInfo) notNil ifTrue:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   499
                                        module := info at:#module ifAbsent:nil.
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   500
                                        directory := info at:#directory ifAbsent:nil.
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   501
                                    ]
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   502
                                ].
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   503
                                module notNil and:[directory notNil].
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   504
                        ]
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   505
                ifNone:nil.
259
c651fecef457 better defaults when creating a container
Claus Gittinger <cg@exept.de>
parents: 217
diff changeset
   506
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   507
            module notNil ifTrue:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   508
                myProject repositoryModule:module
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   509
            ].
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   510
            directory notNil ifTrue:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   511
                myProject repositoryDirectory:directory
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   512
            ].
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   513
            myProject packageName:packageName.
259
c651fecef457 better defaults when creating a container
Claus Gittinger <cg@exept.de>
parents: 217
diff changeset
   514
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   515
        ].
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   516
        box showAtPointer
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   517
    ]
259
c651fecef457 better defaults when creating a container
Claus Gittinger <cg@exept.de>
parents: 217
diff changeset
   518
c651fecef457 better defaults when creating a container
Claus Gittinger <cg@exept.de>
parents: 217
diff changeset
   519
    "Created: 9.12.1995 / 16:50:45 / cg"
1326
aab1605ad945 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   520
    "Modified: 19.9.1997 / 10:55:19 / cg"
110
claus
parents: 106
diff changeset
   521
!
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   522
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   523
projectRepositoryAndModule
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   524
    "ask for a default module and package directory.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   525
     This is offered as default, when new containers are
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   526
     created. However, when creating, these can still be changed"
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   527
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   528
    |box d moduleHolder dirHolder|
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   529
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   530
    box := DialogBox new.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   531
    (box addTextLabel:(resources string:'PROJECT_MODULEANDDIR') withCRs)
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   532
        adjust:#left.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   533
    box addHorizontalLine.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   534
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   535
    moduleHolder := myProject repositoryModule asValue.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   536
    dirHolder := myProject repositoryDirectory asValue.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   537
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   538
    (box addTextLabel:(resources string:'PROJECT_MODULEDIR') withCRs)
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   539
        adjust:#left.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   540
    box addFilenameInputFieldOn:moduleHolder in:nil tabable:true.
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   541
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   542
    box addVerticalSpace.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   543
    box addHorizontalLine.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   544
    box addVerticalSpace.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   545
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   546
    (box addTextLabel:(resources string:'PROJECT_PACKAGEDIR') withCRs)
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   547
        adjust:#left.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   548
    box addFilenameInputFieldOn:dirHolder in:nil tabable:true.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   549
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   550
    box addAbortButton; addOkButton.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   551
    box showAtPointer.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   552
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   553
    box accepted ifTrue:[
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   554
        myProject repositoryModule:moduleHolder value.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   555
        myProject repositoryDirectory:dirHolder value.
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   556
    ].
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   557
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   558
    box destroy.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   559
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   560
    "Modified: 14.2.1997 / 13:42:05 / cg"
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   561
!
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   562
110
claus
parents: 106
diff changeset
   563
removePackage
claus
parents: 106
diff changeset
   564
    "remove all classes and individual methods from the system.
claus
parents: 106
diff changeset
   565
     Currently, this cannot fully restore the state to before
claus
parents: 106
diff changeset
   566
     the time the package was loaded (redefined methods are lost).
claus
parents: 106
diff changeset
   567
     In the future, we may keep a backref of overwritten methods
claus
parents: 106
diff changeset
   568
     and restore them from their source ..."
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   569
110
claus
parents: 106
diff changeset
   570
    |classesToRemove methodsToRemove theProject|
claus
parents: 106
diff changeset
   571
claus
parents: 106
diff changeset
   572
    (myProject isNil
claus
parents: 106
diff changeset
   573
    or:[(theProject := myProject packageName) isNil]) ifTrue:[
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   574
        self warn:(resources string:'No current package.').
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   575
        ^ self
110
claus
parents: 106
diff changeset
   576
    ].
claus
parents: 106
diff changeset
   577
claus
parents: 106
diff changeset
   578
    classesToRemove := IdentitySet new.
claus
parents: 106
diff changeset
   579
    methodsToRemove := IdentitySet new.
claus
parents: 106
diff changeset
   580
claus
parents: 106
diff changeset
   581
    Smalltalk allClassesDo:[:aClass |
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   582
        |p|
110
claus
parents: 106
diff changeset
   583
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   584
        (p := aClass package) notNil ifTrue:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   585
            p = theProject  ifTrue:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   586
                classesToRemove add:aClass
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   587
            ]
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   588
        ].
110
claus
parents: 106
diff changeset
   589
    ].
claus
parents: 106
diff changeset
   590
    Smalltalk allClassesDo:[:aClass |
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   591
        |p|
110
claus
parents: 106
diff changeset
   592
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   593
        (classesToRemove includes:aClass) ifFalse:[
904
df0b2ed7a462 access methodDictionary instead of the old methodArray
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
   594
            aClass methodDictionary keysAndValuesDo:[:sel :aMethod |
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   595
                (p := aMethod package) notNil ifTrue:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   596
                    p = theProject  ifTrue:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   597
                        methodsToRemove add:aMethod
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   598
                    ]
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   599
                ]
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   600
            ].
904
df0b2ed7a462 access methodDictionary instead of the old methodArray
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
   601
            aClass class methodDictionary keysAndValuesDo:[:sel :aMethod |
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   602
                (p := aMethod package) notNil ifTrue:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   603
                    p = theProject  ifTrue:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   604
                        methodsToRemove add:aMethod
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   605
                    ]
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   606
                ]
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   607
            ].
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   608
        ].
110
claus
parents: 106
diff changeset
   609
    ].
claus
parents: 106
diff changeset
   610
claus
parents: 106
diff changeset
   611
    (classesToRemove isEmpty
claus
parents: 106
diff changeset
   612
    and:[methodsToRemove isEmpty]) ifTrue:[
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   613
        self warn:(resources string:'No classes or methods found in %1' with:theProject).
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   614
        ^ self
110
claus
parents: 106
diff changeset
   615
    ].
claus
parents: 106
diff changeset
   616
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   617
    (self confirm:(resources
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   618
                        string:'About to remove %1 classes and %2 additional methods.\\Are you certain you want this ?'
516
f007fd40377a examples
Claus Gittinger <cg@exept.de>
parents: 515
diff changeset
   619
                        with:classesToRemove size
f007fd40377a examples
Claus Gittinger <cg@exept.de>
parents: 515
diff changeset
   620
                        with:methodsToRemove size) withCRs)
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   621
        ifTrue:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   622
            classesToRemove do:[:aClass |
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   623
                ('PROJECT: removing ' , aClass name) infoPrintNL.
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   624
                Smalltalk removeClass:aClass.   
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   625
            ].
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   626
            methodsToRemove do:[:aMethod |
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   627
                |where|
110
claus
parents: 106
diff changeset
   628
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   629
                ('PROJECT: removing ' , aMethod displayString) infoPrintNL.
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   630
                where := aMethod who.
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   631
                where isNil ifTrue:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   632
                    'PROJECT: oops, some method is gone' infoPrintNL.
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   633
                ] ifFalse:[
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   634
                    (where at:1) removeSelector:(where at:2)
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   635
                ]
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   636
            ]
110
claus
parents: 106
diff changeset
   637
    ].
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   638
!
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   639
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   640
renameProject
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   641
    "give that project another name - has no semantic meaning,
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   642
     and does not affect any class/method"
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   643
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   644
    |box|
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   645
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   646
    box := EnterBox new.
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   647
    box title:(resources string:'new name of project:').
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   648
    box okText:(resources string:'rename').
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   649
    box initialText:(myProject name).
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   650
    box action:[:newName |
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   651
        myProject name:newName.
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   652
        self setProject:myProject.
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   653
        self windowGroup process name:'Project: ' , newName.
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   654
    ].
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   655
    box showAtPointer
278
9d33deca396c better message (nationalized)
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   656
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   657
    "Modified: 14.2.1997 / 13:41:15 / cg"
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   658
!
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   659
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   660
saveProjectFiles
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   661
    "create the projects files.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   662
     This is not yet finished."
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   663
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   664
    self topView withWaitCursorDo:[
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   665
        |dir|
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   666
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   667
        dir := myProject directory.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   668
        (self confirm:'create source files in: ' ,  dir , ' ?') ifTrue:[
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   669
            myProject createProjectFiles.
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   670
        ]
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   671
    ].
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   672
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   673
    "Modified: 14.2.1997 / 13:40:40 / cg"
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   674
!
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   675
513
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   676
showClassDocumentation
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   677
    "open a documentViewer on the projects classes documentation only"
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   678
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   679
    self topView withWaitCursorDo:[
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   680
        |classes packageName methods methodList anyClasses anyMethods 
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   681
         html|
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   682
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   683
        anyMethods := anyClasses := false.
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   684
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   685
        packageName := myProject packageName.
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   686
        classes := myProject classes.
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   687
        (classes notNil and:[classes notEmpty]) ifTrue:[
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   688
            anyClasses := true.
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   689
        ].
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   690
        (anyClasses or:[anyMethods]) ifFalse:[
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   691
            self information:(resources string:'no classes or methods in this project (yet)').
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   692
            ^ self.
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   693
        ].
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   694
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   695
        methods := myProject individualMethods.
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   696
        methods notEmpty ifTrue:[
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   697
            anyMethods := true.
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   698
            "/ not yet shown ...
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   699
        ].
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   700
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   701
        anyClasses ifFalse:[ ^ self].
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   702
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   703
        html := HTMLDocGenerator 
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   704
                        htmlClasses:classes 
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   705
                        title:'project classes' 
515
3f2035620126 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 513
diff changeset
   706
                        backTo:#none.
513
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   707
796
b8edcbceaa18 XtHTML is no longer there ...
Claus Gittinger <cg@exept.de>
parents: 692
diff changeset
   708
        HTMLDocumentView openFullOnText:html
513
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   709
    ]
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   710
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   711
    "Created: 11.4.1996 / 19:29:50 / cg"
515
3f2035620126 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 513
diff changeset
   712
    "Modified: 26.4.1996 / 17:48:33 / cg"
513
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   713
!
4c5b95c8c520 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   714
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   715
showProject
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   716
    "show all views belonging to that project and hide
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   717
     the active projects views (except for those opened before)"
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   718
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   719
    ActiveProjectView notNil ifTrue:[
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   720
        ActiveProjectView hideProject
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   721
    ].
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   722
    ActiveProjectView := self.
110
claus
parents: 106
diff changeset
   723
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   724
    myProject showViews.
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   725
    Project current:myProject.
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   726
    toggle turnOn
955
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   727
31a5221235f1 commentary;
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
   728
    "Modified: 14.2.1997 / 13:40:10 / cg"
57
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   729
! !
36e13831b62d *** empty log message ***
claus
parents: 52
diff changeset
   730
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
   731
!ProjectView methodsFor:'private accessing'!
571fd5eee315 Initial revision
claus
parents:
diff changeset
   732
571fd5eee315 Initial revision
claus
parents:
diff changeset
   733
setProject:aProject
571fd5eee315 Initial revision
claus
parents:
diff changeset
   734
    |name e|
571fd5eee315 Initial revision
claus
parents:
diff changeset
   735
571fd5eee315 Initial revision
claus
parents:
diff changeset
   736
    name := aProject name.
571fd5eee315 Initial revision
claus
parents:
diff changeset
   737
    self label:name.
17
58c360f199be *** empty log message ***
claus
parents: 9
diff changeset
   738
    self iconLabel:name.
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
   739
    toggle label:'Project: ' , name.
571fd5eee315 Initial revision
claus
parents:
diff changeset
   740
    toggle resize.
571fd5eee315 Initial revision
claus
parents:
diff changeset
   741
    myProject := aProject.
571fd5eee315 Initial revision
claus
parents:
diff changeset
   742
    e := (toggle width @ toggle height).
29
8a72e10043f6 *** empty log message ***
claus
parents: 17
diff changeset
   743
    drawableId isNil ifTrue:[
1013
e71df344f4f0 Use #map and #remap instead of #unrealize and #rerealize.
Stefan Vogel <sv@exept.de>
parents: 1001
diff changeset
   744
        self minExtent:e.
e71df344f4f0 Use #map and #remap instead of #unrealize and #rerealize.
Stefan Vogel <sv@exept.de>
parents: 1001
diff changeset
   745
        self maxExtent:e.
e71df344f4f0 Use #map and #remap instead of #unrealize and #rerealize.
Stefan Vogel <sv@exept.de>
parents: 1001
diff changeset
   746
        self open
29
8a72e10043f6 *** empty log message ***
claus
parents: 17
diff changeset
   747
    ] ifFalse:[
1013
e71df344f4f0 Use #map and #remap instead of #unrealize and #rerealize.
Stefan Vogel <sv@exept.de>
parents: 1001
diff changeset
   748
        self unmap.
e71df344f4f0 Use #map and #remap instead of #unrealize and #rerealize.
Stefan Vogel <sv@exept.de>
parents: 1001
diff changeset
   749
        self minExtent:e.
e71df344f4f0 Use #map and #remap instead of #unrealize and #rerealize.
Stefan Vogel <sv@exept.de>
parents: 1001
diff changeset
   750
        self maxExtent:e.
e71df344f4f0 Use #map and #remap instead of #unrealize and #rerealize.
Stefan Vogel <sv@exept.de>
parents: 1001
diff changeset
   751
        self extent:e.
e71df344f4f0 Use #map and #remap instead of #unrealize and #rerealize.
Stefan Vogel <sv@exept.de>
parents: 1001
diff changeset
   752
        self remap
29
8a72e10043f6 *** empty log message ***
claus
parents: 17
diff changeset
   753
    ]
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
   754
! !
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   755
796
b8edcbceaa18 XtHTML is no longer there ...
Claus Gittinger <cg@exept.de>
parents: 692
diff changeset
   756
!ProjectView class methodsFor:'documentation'!
217
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   757
a4b6b0d44c3b repository added
Claus Gittinger <cg@exept.de>
parents: 175
diff changeset
   758
version
1326
aab1605ad945 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   759
    ^ '$Header: /cvs/stx/stx/libtool/ProjectView.st,v 1.39 1997-09-20 22:42:12 cg Exp $'
515
3f2035620126 per project class docu added
Claus Gittinger <cg@exept.de>
parents: 513
diff changeset
   760
! !