Project.st
author Claus Gittinger <cg@exept.de>
Tue, 23 Mar 1999 12:10:24 +0100
changeset 4066 74e64b5cedce
parent 4013 f06d31702f2a
child 4069 7d36633a470a
permissions -rw-r--r--
checkin from browser
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
89
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
     1
"
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
     2
 COPYRIGHT (c) 1993 by Claus Gittinger
203
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
     3
	      All Rights Reserved
89
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
     4
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
     5
 This software is furnished under a license and may be used
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
     6
 only in accordance with the terms of that license and with the
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
     8
 be provided or otherwise made available to, or used by, any
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
     9
 other person.  No title to or ownership of the software is
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    10
 hereby transferred.
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    11
"
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    12
a27a279701f8 Initial revision
claus
parents:
diff changeset
    13
Object subclass:#Project
939
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
    14
	instanceVariableNames:'name changeSet views directoryName properties packageName
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
    15
		repositoryDirectory repositoryModule defaultNameSpace
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
    16
		overwrittenMethods subProjects prerequisites bitmapFiles
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
    17
		documentFiles otherFiles'
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
    18
	classVariableNames:'CurrentProject SystemProject NextSequential AllProjects'
939
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
    19
	poolDictionaries:''
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
    20
	category:'System-Support'
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    21
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
    22
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
    23
Object subclass:#ClassInfo
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
    24
	instanceVariableNames:'conditionForInclusion className classFileName'
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
    25
	classVariableNames:''
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
    26
	poolDictionaries:''
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
    27
	privateIn:Project
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
    28
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
    29
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
    30
!Project class methodsFor:'documentation'!
89
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    31
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    32
copyright
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    33
"
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    34
 COPYRIGHT (c) 1993 by Claus Gittinger
203
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
    35
	      All Rights Reserved
89
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    36
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    37
 This software is furnished under a license and may be used
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    38
 only in accordance with the terms of that license and with the
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    39
 inclusion of the above copyright notice.   This software may not
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    40
 be provided or otherwise made available to, or used by, any
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    41
 other person.  No title to or ownership of the software is
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    42
 hereby transferred.
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    43
"
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    44
!
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    45
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    46
documentation
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    47
"
338
claus
parents: 336
diff changeset
    48
    this class is still under construction (especially the build features are unfinished).
235
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
    49
    Currently, all it does is keep track of per-project views 
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
    50
    (to hide or show them), define the directory when filing-out,
725
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    51
    and define packageNames for new classes and methods.
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    52
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    53
    instance variables:
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    54
        name            <String>        the name of this project, as shown
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    55
                                        in a ProjectView
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    56
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    57
        changeSet       <ChangeSet>     changes done, while this was the active project
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    58
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    59
        views           <Collection>    views opened while this was the active project
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    60
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    61
        directoryName   <String>        directory name, where fileOuts are done
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    62
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    63
        properties 
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    64
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    65
        packageName     <String>        given to classes/methods which are created while
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    66
                                        this is the active project
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    67
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    68
        repositoryDirectory             (default) name of the repository, when a new source containers are
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    69
                                        created.
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    70
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    71
        repositoryModule                (default) name of the module, when new source containers are
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    72
                                        created.
235
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
    73
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
    74
    Future: 
725
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    75
        - keep track of per-project changes
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    76
        - allow speficiation of the type of the project (application, library, etc)
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    77
        - allow building of whatever the target (as defined by the type) is
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    78
          (this will allow build of class libs and apps by clicking a button)
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    79
        - allow removal of project specific classes, methods etc.
1286
4270a0b4917d documentation
Claus Gittinger <cg@exept.de>
parents: 1115
diff changeset
    80
4270a0b4917d documentation
Claus Gittinger <cg@exept.de>
parents: 1115
diff changeset
    81
    [author:]
4270a0b4917d documentation
Claus Gittinger <cg@exept.de>
parents: 1115
diff changeset
    82
        Claus Gittinger
89
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    83
"
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    84
! !
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    85
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
    86
!Project class methodsFor:'initialization'!
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
    87
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
    88
initKnownProjects
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
    89
    "this is a temporary experimental kludge -
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
    90
     once the ProjectBrowser is finished, this info is read from
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
    91
     '.prj' files ..."
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
    92
4066
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
    93
"/    |stx p|
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
    94
"/
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
    95
"/    stx := self new name:'stx'.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
    96
"/    stx packageName:'noPackage'.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
    97
"/    stx changeSet:nil.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
    98
"/    stx type:#smalltalk.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
    99
"/    stx comment:'The ST/X project itself'.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   100
"/
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   101
"/    AllProjects add:stx.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   102
"/
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   103
"/    #(
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   104
"/        ('libbasic'      #'stx:libbasic'            'Basic (non-GUI) classes. Required for all applications')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   105
"/        ('libbasic2'     #'stx:libbasic2'           'More basic (non-GUI) classes. Required for most applications')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   106
"/        ('libbasic3'     #'stx:libbasic3'           'More basic (non-GUI) classes. Required for development')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   107
"/        ('libcomp'       #'stx:libcomp'             'The bytecode compiler. Required for all applications')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   108
"/        ('libview'       #'stx:libview'             'Low level GUI classes. Required for all GUI applications')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   109
"/        ('libview2'      #'stx:libview2'            'Additional low level GUI classes. Required for most GUI applications')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   110
"/        ('libwidg'       #'stx:libwidg'             'Basic widgets. Required for all GUI applications')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   111
"/        ('libwidg2'      #'stx:libwidg2'            'More widgets. Required for most GUI applications')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   112
"/        ('libwidg3'      #'stx:libwidg3'            'More (fun) widgets. Seldom required')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   113
"/        ('libtool'       #'stx:libtool'             'Development applications. Required for program development')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   114
"/        ('libtool2'      #'stx:libtool2'            'More development applications. Required for GUI development')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   115
"/        ('libui'         #'stx:libui'               'UI spec classes. Required for UIPainter applications')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   116
"/        ('libhtml'       #'stx:libhtml'             'HTML related classes. Required for Web applications and the HTML browser')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   117
"/        ('libodbc'       #'stx:libodbc'             'ODBC interface classes.')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   118
"/        ('libopengl'     #'stx:libopengl'           'OpenGL interface classes.')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   119
"/        ('persistency'   #'stx:goodies/persistency' 'Simple DB interface')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   120
"/        ('goodies'       #'stx:goodies'             'Misc goodies - not really maintained')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   121
"/    ) do:[:entry |
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   122
"/        |libName package comment|
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   123
"/
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   124
"/        libName := entry at:1.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   125
"/        package := entry at:2.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   126
"/        comment := entry at:3.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   127
"/
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   128
"/        p := self new name:libName.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   129
"/        p packageName:package.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   130
"/        p type:#library.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   131
"/        p comment:comment.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   132
"/        stx addSubProject:p.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   133
"/    ].
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   134
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   135
    "
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   136
     self initKnownProjects
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   137
    "
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   138
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   139
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   140
initialize
338
claus
parents: 336
diff changeset
   141
    SystemProject isNil ifTrue:[
2028
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   142
        NextSequential := 1.
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   143
        SystemProject := self new name:'default'.
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   144
        SystemProject packageName:'private'.
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   145
        SystemProject defaultNameSpace:Smalltalk.
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   146
        SystemProject comment:'A default (dummy) project. 
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   147
Will be made the current project in case no real project is ever activated.'.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   148
2028
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   149
        "
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   150
         the SystemProject does not keep a record if changes,
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   151
         but instead depends on the changes file - recording anything there.
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   152
        "
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   153
        SystemProject changeSet:nil.
338
claus
parents: 336
diff changeset
   154
    ].
claus
parents: 336
diff changeset
   155
claus
parents: 336
diff changeset
   156
    CurrentProject := SystemProject.
4066
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   157
    AllProjects := OrderedCollection new.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   158
"/    AllProjects := OrderedCollection with:SystemProject.
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   159
    self initKnownProjects.
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   160
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   161
    "
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   162
     SystemProject := nil.
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   163
     Project initialize
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   164
    "
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   165
! !
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   166
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
   167
!Project class methodsFor:'instance creation'!
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   168
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   169
new
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   170
    ^ self basicNew initialize
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   171
! !
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   172
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
   173
!Project class methodsFor:'accessing'!
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   174
a27a279701f8 Initial revision
claus
parents:
diff changeset
   175
current
10
claus
parents: 2
diff changeset
   176
    "return the currently active project"
claus
parents: 2
diff changeset
   177
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   178
    ^ CurrentProject
a27a279701f8 Initial revision
claus
parents:
diff changeset
   179
362
claus
parents: 356
diff changeset
   180
    "
claus
parents: 356
diff changeset
   181
     Project current
claus
parents: 356
diff changeset
   182
    "
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   183
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   184
a27a279701f8 Initial revision
claus
parents:
diff changeset
   185
current:aProject
10
claus
parents: 2
diff changeset
   186
    "set the currently active project"
claus
parents: 2
diff changeset
   187
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   188
    CurrentProject := aProject.
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   189
    self changed:#currentProject
334
claus
parents: 330
diff changeset
   190
!
claus
parents: 330
diff changeset
   191
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   192
currentPackageName
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   193
    CurrentProject notNil ifTrue:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   194
	^ CurrentProject packageName
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   195
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   196
    ^ 'no package' 
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   197
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   198
    "
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   199
     Project currentPackageName
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   200
    "
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   201
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   202
336
claus
parents: 334
diff changeset
   203
defaultProject
claus
parents: 334
diff changeset
   204
    "return the SystemDefault project"
claus
parents: 334
diff changeset
   205
claus
parents: 334
diff changeset
   206
    ^ SystemProject.
claus
parents: 334
diff changeset
   207
!
claus
parents: 334
diff changeset
   208
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   209
knownProjects
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   210
    ^ AllProjects ? #()
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   211
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   212
334
claus
parents: 330
diff changeset
   213
setDefaultProject
claus
parents: 330
diff changeset
   214
    "set the currently active project to be the SystemDEfault project"
claus
parents: 330
diff changeset
   215
claus
parents: 330
diff changeset
   216
    self current:SystemProject.
939
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   217
!
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   218
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   219
setProject:aProjectOrNil
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   220
    "set the currently active project without updating others"
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   221
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   222
    CurrentProject := aProjectOrNil.
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   223
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   224
    "Created: 7.2.1996 / 14:00:45 / cg"
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   225
    "Modified: 7.2.1996 / 14:01:16 / cg"
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   226
! !
a27a279701f8 Initial revision
claus
parents:
diff changeset
   227
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
   228
!Project class methodsFor:'changes management'!
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   229
664
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   230
addClassDefinitionChangeFor:aClass
1115
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   231
    "add a class-def-change for aClass to the current project"
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   232
664
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   233
    |p c|
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   234
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   235
    p := CurrentProject.
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   236
    (p notNil 
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   237
    and:[(c := p changeSet) notNil]) ifTrue:[
666
6d4175de8c55 fixed primitiveDefinitions changes
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
   238
	c addClassDefinitionChangeFor:aClass 
664
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   239
    ]
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   240
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   241
    "Created: 3.12.1995 / 13:44:58 / cg"
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   242
    "Modified: 3.12.1995 / 13:58:04 / cg"
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   243
!
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   244
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   245
addMethodCategoryChange:aMethod category:newCategory in:aClass
1115
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   246
    "add a method-category-change for aMethod in aClass to the current project"
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   247
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   248
    |p c|
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   249
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   250
    p := CurrentProject.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   251
    (p notNil 
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   252
    and:[(c := p changeSet) notNil]) ifTrue:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   253
	c addMethodCategoryChange:aMethod category:newCategory in:aClass 
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   254
    ]
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   255
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   256
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   257
addMethodChange:aMethod in:aClass
1115
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   258
    "add a method change in aClass to the current project"
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   259
235
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
   260
    |p c|
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   261
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   262
    p := CurrentProject.
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   263
    (p notNil 
235
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
   264
    and:[(c := p changeSet) notNil]) ifTrue:[
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
   265
	c addMethodChange:aMethod in:aClass 
203
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
   266
    ]
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
   267
!
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
   268
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   269
addMethodPrivacyChange:aMethod in:aClass
1115
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   270
    "add a privacy change for aMethod in aClass to the current project"
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   271
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   272
    |p c|
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   273
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   274
    p := CurrentProject.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   275
    (p notNil 
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   276
    and:[(c := p changeSet) notNil]) ifTrue:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   277
	c addMethodPrivacyChange:aMethod in:aClass 
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   278
    ]
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   279
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   280
    "Modified: 27.8.1995 / 22:48:17 / claus"
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   281
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   282
705
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   283
addPrimitiveDefinitionsChangeFor:aClass
1115
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   284
    "add a primitiveDef change for aClass to the current project"
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   285
705
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   286
    |p c|
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   287
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   288
    p := CurrentProject.
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   289
    (p notNil 
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   290
    and:[(c := p changeSet) notNil]) ifTrue:[
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   291
	c addPrimitiveDefinitionsChangeFor:aClass 
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   292
    ]
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   293
!
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   294
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   295
addPrimitiveFunctionsChangeFor:aClass
1115
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   296
    "add a primitiveFuncs change for aClass to the current project"
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   297
705
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   298
    |p c|
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   299
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   300
    p := CurrentProject.
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   301
    (p notNil 
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   302
    and:[(c := p changeSet) notNil]) ifTrue:[
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   303
	c addPrimitiveFunctionsChangeFor:aClass 
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   304
    ]
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   305
!
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   306
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   307
addPrimitiveVariablesChangeFor:aClass
1115
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   308
    "add a primitiveVars change for aClass to the current project"
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   309
705
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   310
    |p c|
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   311
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   312
    p := CurrentProject.
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   313
    (p notNil 
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   314
    and:[(c := p changeSet) notNil]) ifTrue:[
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   315
	c addPrimitiveVariablesChangeFor:aClass 
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   316
    ]
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   317
!
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   318
3288
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   319
addRemoveSelectorChange:aSelector in:aClass
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   320
    "add a method-remove change in aClass to the current project"
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   321
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   322
    |p c|
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   323
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   324
    p := CurrentProject.
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   325
    (p notNil 
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   326
    and:[(c := p changeSet) notNil]) ifTrue:[
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   327
        c addRemoveSelectorChange:aSelector in:aClass 
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   328
    ]
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   329
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   330
    "Created: / 16.2.1998 / 12:45:10 / cg"
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   331
!
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   332
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   333
currentProjectDirectory
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   334
    "return the name of the directory to use for fileOut.
235
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
   335
     The returned name already includes a file-separator at the end, 
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
   336
     so the filename can be concatenated to it."
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   337
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   338
    |p dirName|
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   339
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   340
    p := CurrentProject.
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   341
    p notNil ifTrue:[
2907
1666bf27f351 VMS changes
Claus Gittinger <cg@exept.de>
parents: 2664
diff changeset
   342
        dirName := p directory  
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   343
    ] ifFalse:[
2907
1666bf27f351 VMS changes
Claus Gittinger <cg@exept.de>
parents: 2664
diff changeset
   344
        dirName := Filename currentDirectory name
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   345
    ].
2962
038a8f143e49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2956
diff changeset
   346
    ^ dirName
2907
1666bf27f351 VMS changes
Claus Gittinger <cg@exept.de>
parents: 2664
diff changeset
   347
1666bf27f351 VMS changes
Claus Gittinger <cg@exept.de>
parents: 2664
diff changeset
   348
    "Modified: 7.9.1997 / 23:52:25 / cg"
2334
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   349
!
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   350
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   351
rememberOverwrittenMethod:newMethod from:oldMethod
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   352
    "remember a method (from another package) being overwritten.
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   353
     This is only remembered, if the current project is not the
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   354
     system project (to avoid filling this remembered-table)"
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   355
2558
07e7d6fef46d removed unused var
Claus Gittinger <cg@exept.de>
parents: 2334
diff changeset
   356
    |p|
2334
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   357
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   358
    p := CurrentProject.
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   359
    (p notNil 
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   360
    and:[p ~~ SystemProject]) ifTrue:[
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   361
        p rememberOverwrittenMethod:newMethod from:oldMethod
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   362
    ] ifFalse:[
3332
8014b817988b remove the 'does not remember ...' message.
Claus Gittinger <cg@exept.de>
parents: 3288
diff changeset
   363
"/        'Project [info]: DefaultProject does not remember overwritten methods' infoPrintCR
2334
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   364
    ]
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   365
3332
8014b817988b remove the 'does not remember ...' message.
Claus Gittinger <cg@exept.de>
parents: 3288
diff changeset
   366
    "Modified: / 7.3.1998 / 13:38:39 / cg"
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   367
! !
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   368
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   369
!Project methodsFor:'accessing'!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   370
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   371
addSubProject:aProject
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   372
    subProjects isNil ifTrue:[
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   373
        subProjects := OrderedCollection new.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   374
    ].
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   375
    subProjects add:aProject
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   376
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   377
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   378
changeSet
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   379
    "return the set of changes made in this project"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   380
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   381
    ^ changeSet
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   382
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   383
    "Modified: 27.1.1997 / 11:58:36 / cg"
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   384
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   385
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   386
changeSet:aChangeSet
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   387
    "set the set of changes made in this project - dangerous, you may loose
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   388
     the actual changeSet."
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   389
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   390
    changeSet := aChangeSet
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   391
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   392
    "Modified: 27.1.1997 / 11:59:02 / cg"
73
a6640cc96199 *** empty log message ***
claus
parents: 13
diff changeset
   393
!
a6640cc96199 *** empty log message ***
claus
parents: 13
diff changeset
   394
2028
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   395
defaultNameSpace
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   396
    "return the defaultNameSpace of this project.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   397
     New classes will (if not specified by a directive) be installed
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   398
     in this nameSpace. Useful, when filing in ST-80 code, to avoid
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   399
     overwriting of standard classes."
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   400
2028
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   401
    ^ defaultNameSpace
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   402
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   403
    "Created: 2.1.1997 / 19:54:42 / cg"
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   404
    "Modified: 27.1.1997 / 11:59:53 / cg"
2028
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   405
!
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   406
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   407
defaultNameSpace:aNamespace
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   408
    "set the defaultNameSpace of this project.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   409
     New classes will (if not specified by a directive) be installed
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   410
     in this nameSpace. Useful, when filing in ST-80 code, to avoid
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   411
     overwriting of standard classes."
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   412
2032
e39ca6532e1a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
   413
    defaultNameSpace := aNamespace.
e39ca6532e1a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
   414
    self == CurrentProject ifTrue:[
e39ca6532e1a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
   415
        Project changed:#defaultNameSpace 
e39ca6532e1a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
   416
    ]
2028
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   417
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   418
    "Created: 2.1.1997 / 19:54:37 / cg"
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   419
    "Modified: 27.1.1997 / 12:00:01 / cg"
2028
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   420
!
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   421
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   422
directory
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   423
    "return the projects directory.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   424
     If not specified, a fileOut will be done into that directory"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   425
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   426
    directoryName isNil ifTrue:[^ '.'].
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   427
    ^ directoryName
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   428
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   429
    "Modified: 27.1.1997 / 12:00:41 / cg"
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   430
!
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   431
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   432
directory:aDirectoryName
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   433
    "set the projects directory.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   434
     If not specified, a fileOut will be done into that directory"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   435
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   436
    directoryName := aDirectoryName.
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   437
    self == CurrentProject ifTrue:[
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   438
        Project changed:#directory 
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   439
    ]
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   440
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   441
    "Modified: 27.1.1997 / 12:00:47 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   442
!
356
claus
parents: 338
diff changeset
   443
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   444
name
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   445
    "return the projects name.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   446
     This is for the user only - shown in the projectViews label"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   447
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   448
    ^ name
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   449
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   450
    "Modified: 27.1.1997 / 12:01:16 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   451
!
356
claus
parents: 338
diff changeset
   452
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   453
name:aString
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   454
    "set the projects name.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   455
     This is for the user only - shown in the projectViews label"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   456
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   457
    name := aString.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   458
    self == CurrentProject ifTrue:[
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   459
        Project changed:#name
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   460
    ]
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   461
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   462
    "Modified: 27.1.1997 / 12:01:09 / cg"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   463
!
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   464
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   465
overwrittenMethods
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   466
    "return the set of methods which were overwritten in this project.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   467
     This information allows uninstalling, by switching back to the
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   468
     original methods."
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   469
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   470
    ^ overwrittenMethods
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   471
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   472
    "Created: 27.1.1997 / 11:57:21 / cg"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   473
    "Modified: 27.1.1997 / 12:09:14 / cg"
356
claus
parents: 338
diff changeset
   474
!
claus
parents: 338
diff changeset
   475
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   476
packageName
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   477
    "return the projects package identifier.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   478
     This identifier marks all methods and new classes which were created
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   479
     in this project."
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   480
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   481
    ^ packageName
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   482
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   483
    "Modified: 27.1.1997 / 12:10:00 / cg"
10
claus
parents: 2
diff changeset
   484
!
claus
parents: 2
diff changeset
   485
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   486
packageName:aStringOrSymbol
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   487
    "set the projects package identifier.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   488
     This identifier marks all methods and new classes which were created
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   489
     in this project."
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   490
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   491
    packageName := aStringOrSymbol asSymbol.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   492
    self == CurrentProject ifTrue:[
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   493
        Project changed:#package
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   494
    ]
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   495
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   496
    "Modified: 27.1.1997 / 12:10:09 / cg"
10
claus
parents: 2
diff changeset
   497
!
claus
parents: 2
diff changeset
   498
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   499
prerequisites
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   500
    ^ prerequisites ? #()
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   501
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   502
3973
7065a27b136b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3972
diff changeset
   503
prerequisites:aCollectionOfProjects
7065a27b136b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3972
diff changeset
   504
    prerequisites := aCollectionOfProjects
7065a27b136b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3972
diff changeset
   505
!
7065a27b136b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3972
diff changeset
   506
654
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   507
repositoryDirectory
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   508
    "return the projects default repository location.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   509
     This is offered initially, when classes are checked into the
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   510
     source repository initially"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   511
725
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   512
    ^ repositoryDirectory
654
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   513
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   514
    "Created: 25.11.1995 / 18:04:51 / cg"
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   515
    "Modified: 27.1.1997 / 12:13:35 / cg"
654
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   516
!
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   517
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   518
repositoryDirectory:aRelativePathName
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   519
    "set the projects default repository location.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   520
     This will be offered initially, when classes are checked into the
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   521
     source repository initially"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   522
725
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   523
    repositoryDirectory := aRelativePathName
654
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   524
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   525
    "Created: 25.11.1995 / 18:05:06 / cg"
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   526
    "Modified: 27.1.1997 / 12:13:28 / cg"
725
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   527
!
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   528
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   529
repositoryModule
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   530
    "return the projects default repository module name.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   531
     This is offered initially, when classes are checked into the
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   532
     source repository initially"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   533
725
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   534
    ^ repositoryModule
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   535
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   536
    "Created: 25.11.1995 / 18:04:51 / cg"
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   537
    "Modified: 27.1.1997 / 12:13:50 / cg"
725
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   538
!
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   539
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   540
repositoryModule:aString
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   541
    "set the projects default repository module name.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   542
     This is offered initially, when classes are checked into the
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   543
     source repository initially"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   544
725
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   545
    repositoryModule := aString
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   546
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   547
    "Created: 25.11.1995 / 18:05:06 / cg"
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   548
    "Modified: 27.1.1997 / 12:13:57 / cg"
654
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   549
!
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   550
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   551
subProjects
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   552
    ^ subProjects ? #()
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   553
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   554
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   555
views
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   556
    "return a collection of views which were opened in this project"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   557
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   558
    ^ views asArray
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   559
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   560
    "Modified: 27.1.1997 / 12:14:18 / cg"
338
claus
parents: 336
diff changeset
   561
!
claus
parents: 336
diff changeset
   562
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   563
views:aSetOfViews
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   564
    "set the collection of views which were opened in this project"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   565
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   566
    views := WeakIdentitySet withAll:aSetOfViews
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   567
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   568
    "Modified: 27.1.1997 / 12:14:26 / cg"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   569
! !
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   570
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   571
!Project methodsFor:'changes'!
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   572
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   573
rememberOverwrittenMethod:newMethod from:oldMethod
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   574
    "this is sent whenever a method is installed, which overwrites
2334
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   575
     an existing method from a different package.
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   576
     Allows previous methods to be reconstructed."
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   577
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   578
    overwrittenMethods isNil ifTrue:[
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   579
        overwrittenMethods := IdentityDictionary new.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   580
    ].
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   581
    overwrittenMethods at:newMethod put:oldMethod
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   582
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   583
    "Created: 27.1.1997 / 11:52:01 / cg"
2334
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   584
    "Modified: 30.1.1997 / 21:10:51 / cg"
10
claus
parents: 2
diff changeset
   585
! !
claus
parents: 2
diff changeset
   586
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   587
!Project methodsFor:'initialization'!
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   588
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   589
initialize
338
claus
parents: 336
diff changeset
   590
    |numString|
claus
parents: 336
diff changeset
   591
330
claus
parents: 318
diff changeset
   592
    views := WeakIdentitySet new.
338
claus
parents: 336
diff changeset
   593
    numString := NextSequential printString.
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   594
    NextSequential := NextSequential + 1.
338
claus
parents: 336
diff changeset
   595
claus
parents: 336
diff changeset
   596
    name := 'new Project-' , numString.
claus
parents: 336
diff changeset
   597
    packageName := 'private-' , numString.
2034
1c96469c3df8 preinit the defaultNamespace of new projects (to Smalltalk)
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
   598
    defaultNameSpace := Smalltalk.
1c96469c3df8 preinit the defaultNamespace of new projects (to Smalltalk)
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
   599
848
76a83f34c26a moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
   600
    "/
76a83f34c26a moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
   601
    "/ for tiny-configurations, allow ChangeSet to be absent
76a83f34c26a moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
   602
    "/
76a83f34c26a moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
   603
    ChangeSet notNil ifTrue:[
76a83f34c26a moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
   604
        changeSet := ChangeSet new.
76a83f34c26a moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
   605
    ].
654
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   606
    self directory:'.'.
725
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   607
    self repositoryModule:(OperatingSystem getLoginName).
654
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   608
    self repositoryDirectory:'private'
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   609
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   610
    "Created: 25.11.1995 / 18:05:44 / cg"
2034
1c96469c3df8 preinit the defaultNamespace of new projects (to Smalltalk)
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
   611
    "Modified: 3.1.1997 / 13:24:10 / cg"
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   612
! !
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   613
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   614
!Project methodsFor:'load & save'!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   615
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   616
loadFromProjectFile:aFilename
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   617
    |f l pack targetConditions s|
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   618
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   619
    f := aFilename asFilename.
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   620
    directoryName := f directory pathName.
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   621
    self directory:(f directory pathName).
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   622
    pack := ResourcePack fromFile:f baseName directory:directoryName.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   623
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   624
    "/ convert the resourcePack ...
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   625
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   626
    packageName := pack at:'package' ifAbsent:packageName.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   627
    name := pack at:'name' ifAbsent:name.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   628
    repositoryModule := pack at:'repository.module' ifAbsent:repositoryModule.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   629
    repositoryDirectory := pack at:'repository.directory' ifAbsent:repositoryDirectory.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   630
    subProjects := pack at:'subProjects' ifAbsent:subProjects.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   631
    (s := pack at:'comment' ifAbsent:nil) notNil ifTrue:[
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   632
        self comment:s
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   633
    ].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   634
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   635
    "/ first, all of the conditions ...
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   636
    targetConditions := Dictionary new.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   637
    pack keysAndValuesDo:[:key :val |
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   638
        |conditionKey|
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   639
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   640
        (key startsWith:'target.condition.') ifTrue:[
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   641
            conditionKey := key copyFrom:'target.condition.' size + 1.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   642
            targetConditions at:conditionKey put:val.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   643
        ]
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   644
    ].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   645
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   646
    properties isNil ifTrue:[
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   647
        properties := IdentityDictionary new
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   648
    ].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   649
    properties at:'targetconditions' put:targetConditions.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   650
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   651
    "/ fetch class info
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   652
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   653
    (pack at:'classes') do:[:info |
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   654
        |condKey className optionalFileName|
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   655
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   656
        condKey := info at:1.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   657
        className := info at:2.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   658
        info size > 2 ifTrue:[
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   659
            optionalFileName := info at:3.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   660
        ].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   661
        self 
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   662
            addClass:className 
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   663
            conditionForInclusion:condKey 
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   664
            classFileName:optionalFileName
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   665
    ].
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   666
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   667
    "
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   668
     Project current saveAsProjectFile.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   669
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   670
     Project new loadFromProjectFile:'default.prj'
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   671
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   672
     Project new loadFromProjectFile:'../../libbasic/libbasic.prj'
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   673
    "
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   674
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   675
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   676
saveAsProjectFile
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   677
    |fn s|
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   678
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   679
    fn := self directory asFilename.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   680
    fn := fn construct:self name.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   681
    fn := fn withSuffix:'prj'.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   682
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   683
    s := fn writeStream.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   684
    self saveAsProjectFileOn:s.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   685
    s close.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   686
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   687
    "
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   688
     Project current saveAsProjectFile
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   689
    "
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   690
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   691
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   692
saveAsProjectFileOn:aStream
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   693
    |s coll|
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   694
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   695
    s := aStream.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   696
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   697
    s nextPutLine:'[name]'. 
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   698
    s tab. s nextPutLine:(name storeString).
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   699
    s nextPutLine:'[type]'. 
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   700
    s tab. s nextPutLine:(self type storeString).
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   701
    s nextPutLine:'[package]'. 
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   702
    s tab. s nextPutLine:(self packageName storeString).
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   703
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   704
    coll := self subProjects.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   705
    coll size > 0 ifTrue:[
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   706
        s nextPutLine:'[subprojects]'. 
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   707
        coll do:[:aSubProject |
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   708
            s tab. s nextPutLine:(aSubProject name soreString).
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   709
        ].
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   710
    ].
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   711
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   712
    coll := self prerequisites.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   713
    coll size > 0 ifTrue:[
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   714
        s nextPutLine:'[prerequisites]'. 
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   715
        coll do:[:aProject |
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   716
            s tab. s nextPutLine:(aProject name soreString).
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   717
        ].
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   718
    ].
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   719
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   720
    coll := self classes.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   721
    coll size > 0 ifTrue:[
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   722
        s nextPutLine:'[classes]'. 
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   723
        coll do:[:aClass |
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   724
            s tab. s nextPutLine:(aClass name).
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   725
       ]
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   726
    ]
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   727
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   728
    "
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   729
     Project current saveOn:Transcript
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   730
    "
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   731
! !
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   732
2
claus
parents: 1
diff changeset
   733
!Project methodsFor:'maintenance'!
claus
parents: 1
diff changeset
   734
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   735
buildProject
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   736
    OperatingSystem executeCommand:('cd ' , self directory , ' ; make')
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   737
!
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   738
2
claus
parents: 1
diff changeset
   739
createMakefile
claus
parents: 1
diff changeset
   740
    "creates an initial makefile, which will recreate a correct
claus
parents: 1
diff changeset
   741
     Makefile, then compile all"
claus
parents: 1
diff changeset
   742
362
claus
parents: 356
diff changeset
   743
    |d f out in topName|
2
claus
parents: 1
diff changeset
   744
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   745
    Transcript showCR:'creating Makefile'.
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   746
356
claus
parents: 338
diff changeset
   747
    d := directoryName asFilename.
2
claus
parents: 1
diff changeset
   748
    f := d construct:'Makefile'.
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   749
    f exists ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   750
        f renameTo:(d construct:'Makefile.bak')
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   751
    ].
2
claus
parents: 1
diff changeset
   752
    out := f writeStream.
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   753
    out isNil ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   754
        self warn:'cannot create Makefile'.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   755
        ^ self
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   756
    ].
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   757
    in := Smalltalk systemFileStreamFor:'rules/stdHeader'.
2
claus
parents: 1
diff changeset
   758
    out nextPutAll:in contents asString.
claus
parents: 1
diff changeset
   759
    in close.
362
claus
parents: 356
diff changeset
   760
claus
parents: 356
diff changeset
   761
    topName := self findTopFrom:directoryName.
claus
parents: 356
diff changeset
   762
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   763
    out nextPutAll:'#TOP=/usr/local/lib/smalltalk'; cr.
362
claus
parents: 356
diff changeset
   764
    out nextPutAll:'TOP=' , topName; cr.
2
claus
parents: 1
diff changeset
   765
    out nextPutAll:'target:'; cr.
claus
parents: 1
diff changeset
   766
    out tab; nextPutAll:'touch Make.proto'; cr.
claus
parents: 1
diff changeset
   767
    out tab; nextPutAll:'$(MAKE) Makefile'; cr.
claus
parents: 1
diff changeset
   768
    out tab; nextPutAll:'make'; cr; cr.
claus
parents: 1
diff changeset
   769
362
claus
parents: 356
diff changeset
   770
    in := Smalltalk systemFileStreamFor:'configurations/COMMON/defines'.
claus
parents: 356
diff changeset
   771
    out nextPutAll:in contents asString.
claus
parents: 356
diff changeset
   772
    in close.
claus
parents: 356
diff changeset
   773
claus
parents: 356
diff changeset
   774
    in := Smalltalk systemFileStreamFor:'configurations/vendorConf'.
claus
parents: 356
diff changeset
   775
    out nextPutAll:in contents asString.
claus
parents: 356
diff changeset
   776
    in close.
claus
parents: 356
diff changeset
   777
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   778
    in := Smalltalk systemFileStreamFor:'configurations/myConf'.
2
claus
parents: 1
diff changeset
   779
    out nextPutAll:in contents asString.
claus
parents: 1
diff changeset
   780
    in close.
362
claus
parents: 356
diff changeset
   781
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   782
    in := Smalltalk systemFileStreamFor:'rules/stdRules'.
2
claus
parents: 1
diff changeset
   783
    out nextPutAll:in contents asString.
claus
parents: 1
diff changeset
   784
    in close.
claus
parents: 1
diff changeset
   785
    out close
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   786
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   787
    "Modified: 18.5.1996 / 15:44:25 / cg"
2
claus
parents: 1
diff changeset
   788
!
claus
parents: 1
diff changeset
   789
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   790
createProjectFiles
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   791
    "actually, creates all files to do a make in the project directory"
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   792
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   793
    directoryName asFilename exists ifFalse:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   794
	(self confirm:'create new projectDirectory: ' , directoryName) 
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   795
	    ifFalse:[^ self].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   796
	OperatingSystem recursiveCreateDirectory:directoryName.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   797
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   798
    self createMakefile.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   799
    self createSourcefiles.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   800
    self createProtoMakefile.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   801
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   802
2
claus
parents: 1
diff changeset
   803
createProtoMakefile
claus
parents: 1
diff changeset
   804
    "creates a Make.proto file"
claus
parents: 1
diff changeset
   805
362
claus
parents: 356
diff changeset
   806
    |d f s type appName libName startUpClass startUpSelector
claus
parents: 356
diff changeset
   807
     topName classes|
2
claus
parents: 1
diff changeset
   808
362
claus
parents: 356
diff changeset
   809
    topName := self findTopFrom:directoryName.
2
claus
parents: 1
diff changeset
   810
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   811
    Transcript showCR:'creating Make.proto'.
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   812
356
claus
parents: 338
diff changeset
   813
    d := directoryName asFilename.
2
claus
parents: 1
diff changeset
   814
    f := d construct:'Make.proto'.
claus
parents: 1
diff changeset
   815
    f exists ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   816
        f renameTo:(d construct:'Make.proto.bak')
2
claus
parents: 1
diff changeset
   817
    ].
claus
parents: 1
diff changeset
   818
    s := f writeStream.
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   819
    s isNil ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   820
        self warn:'cannot create prototype Makefile'.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   821
        ^ self
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   822
    ].
2
claus
parents: 1
diff changeset
   823
    s nextPutAll:'#
362
claus
parents: 356
diff changeset
   824
# ' , Smalltalk timeStamp , '
claus
parents: 356
diff changeset
   825
#
235
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
   826
# created by Smalltalks Project support
2
claus
parents: 1
diff changeset
   827
#
362
claus
parents: 356
diff changeset
   828
claus
parents: 356
diff changeset
   829
claus
parents: 356
diff changeset
   830
# the next line defines the path to the TOP directory,
claus
parents: 356
diff changeset
   831
# (where the directories "configurations" and "include" are found)
claus
parents: 356
diff changeset
   832
#
claus
parents: 356
diff changeset
   833
#TOP=/usr/local/lib/smalltalk
claus
parents: 356
diff changeset
   834
TOP=' , topName ,'
claus
parents: 356
diff changeset
   835
claus
parents: 356
diff changeset
   836
#
claus
parents: 356
diff changeset
   837
# add any subdirectories that have to be visited by make
claus
parents: 356
diff changeset
   838
#
claus
parents: 356
diff changeset
   839
SUBDIRS=
claus
parents: 356
diff changeset
   840
claus
parents: 356
diff changeset
   841
#
claus
parents: 356
diff changeset
   842
# do not change
claus
parents: 356
diff changeset
   843
#
2
claus
parents: 1
diff changeset
   844
SHELL=/bin/sh
claus
parents: 1
diff changeset
   845
362
claus
parents: 356
diff changeset
   846
'.
claus
parents: 356
diff changeset
   847
claus
parents: 356
diff changeset
   848
    s nextPutAll:'#
claus
parents: 356
diff changeset
   849
# set the stc options
claus
parents: 356
diff changeset
   850
#
claus
parents: 356
diff changeset
   851
STCOPT=$(DEFAULT_STCOPT)
claus
parents: 356
diff changeset
   852
# STCOPT=+optspace2
claus
parents: 356
diff changeset
   853
# STCOPT=+optspace2 -warnNonStandard
claus
parents: 356
diff changeset
   854
claus
parents: 356
diff changeset
   855
#
claus
parents: 356
diff changeset
   856
# and packageName option
claus
parents: 356
diff changeset
   857
#
claus
parents: 356
diff changeset
   858
STCLOCALOPT=''-Pprivate-classes-(libapp)''
2
claus
parents: 1
diff changeset
   859
claus
parents: 1
diff changeset
   860
'.
claus
parents: 1
diff changeset
   861
356
claus
parents: 338
diff changeset
   862
    type := #library.
claus
parents: 338
diff changeset
   863
    appName := 'app'.
claus
parents: 338
diff changeset
   864
    libName := 'lib'.
claus
parents: 338
diff changeset
   865
    startUpClass := 'Smalltalk'.
claus
parents: 338
diff changeset
   866
    startUpSelector := 'start'.
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   867
356
claus
parents: 338
diff changeset
   868
    properties notNil ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   869
        type := properties at:#projectType ifAbsent:type.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   870
        appName := properties at:#applicationName ifAbsent:appName.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   871
        startUpClass := properties at:#startupClass ifAbsent:startUpClass.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   872
        startUpSelector := properties at:#startupSelector ifAbsent:startUpSelector.
356
claus
parents: 338
diff changeset
   873
    ].
claus
parents: 338
diff changeset
   874
362
claus
parents: 356
diff changeset
   875
    s nextPutAll:'#
claus
parents: 356
diff changeset
   876
# define the name of the library to create
claus
parents: 356
diff changeset
   877
#
claus
parents: 356
diff changeset
   878
'.
claus
parents: 356
diff changeset
   879
    s nextPutAll:'LIBNAME=lib' , appName; cr; cr.
claus
parents: 356
diff changeset
   880
claus
parents: 356
diff changeset
   881
    s nextPutAll:'#
claus
parents: 356
diff changeset
   882
# the target rule:
claus
parents: 356
diff changeset
   883
#
claus
parents: 356
diff changeset
   884
all::   abbrev.stc objs genClassList $(OBJTARGET)
claus
parents: 356
diff changeset
   885
claus
parents: 356
diff changeset
   886
'.
2
claus
parents: 1
diff changeset
   887
claus
parents: 1
diff changeset
   888
    type == #executable ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   889
        s nextPutAll:'PROGS = ' , appName; cr.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   890
        s nextPutAll:('STARTUP_CLASS=' , startUpClass); cr.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   891
        s nextPutAll:'STARTUP_SELECTOR="' , startUpSelector; nextPutAll:'"'; cr.
2
claus
parents: 1
diff changeset
   892
    ].
claus
parents: 1
diff changeset
   893
362
claus
parents: 356
diff changeset
   894
    s nextPutAll:'#
claus
parents: 356
diff changeset
   895
# define the object files that are to be created
claus
parents: 356
diff changeset
   896
#
claus
parents: 356
diff changeset
   897
'.
2
claus
parents: 1
diff changeset
   898
    s nextPutAll:'OBJS='.
claus
parents: 1
diff changeset
   899
362
claus
parents: 356
diff changeset
   900
    (classes := self classes) notNil ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   901
        classes do:[:aClass |
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   902
            |abbrev|
362
claus
parents: 356
diff changeset
   903
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   904
            s nextPutAll:' \'. s cr.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   905
            abbrev := Smalltalk fileNameForClass:aClass name.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   906
            s nextPutAll:'  '; nextPutAll:abbrev; nextPutAll:'.o'.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   907
        ].
2
claus
parents: 1
diff changeset
   908
    ].
claus
parents: 1
diff changeset
   909
    s cr; cr.
claus
parents: 1
diff changeset
   910
362
claus
parents: 356
diff changeset
   911
    s nextPutAll:'#
claus
parents: 356
diff changeset
   912
# dependencies:
claus
parents: 356
diff changeset
   913
#
claus
parents: 356
diff changeset
   914
I=$(TOP)/include
claus
parents: 356
diff changeset
   915
RT_STUFF=$(I)/Object.H $(I)/stc.h $(I)/stcIntern.h
claus
parents: 356
diff changeset
   916
claus
parents: 356
diff changeset
   917
'.
claus
parents: 356
diff changeset
   918
    classes notNil ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   919
        classes do:[:aClass |
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   920
            |abbrev|
362
claus
parents: 356
diff changeset
   921
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   922
            abbrev := Smalltalk fileNameForClass:aClass name.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   923
            s nextPutAll:abbrev; nextPutAll:'.o: '.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   924
            s nextPutAll:abbrev; nextPutAll:'.st '.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   925
            aClass allSuperclassesDo:[:superClass|
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   926
                s nextPutAll:'$(I)/'.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   927
                s nextPutAll:(Smalltalk fileNameForClass:superClass name) , '.H '.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   928
            ].
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   929
            s nextPutAll:'$(RT_STUFF)';  cr.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   930
        ].
362
claus
parents: 356
diff changeset
   931
    ].
claus
parents: 356
diff changeset
   932
    s cr; cr.
2
claus
parents: 1
diff changeset
   933
claus
parents: 1
diff changeset
   934
    type == #executable ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   935
        s nextPutAll:'all:: $(PROGS)'; cr.
2
claus
parents: 1
diff changeset
   936
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   937
        s nextPutAll:appName.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   938
        s nextPutAll:':: main.o classList.o $(OBJS)'; cr.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   939
        s tab;      nextPutAll:'$(LD) $(ST_LDFLAG) $(LDFLAGS) -o ';
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   940
                    nextPutAll:appName;
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   941
                    nextPutAll:' \'; cr.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   942
        s tab; tab; nextPutAll:'$(CRT0) main.$(O) classList.$(O) $(OBJS) $(EXTRA_OBJ) $(LIBOBJS) \'; cr.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   943
        s tab; tab; nextPutAll:'$(LIBRUNDIR)/hidata.o $(LIBRUN) \'; cr.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   944
        s tab; tab; nextPutAll:'$(MATHLIB) $(EXTRALIBS) -lXext $(SYSLIBS) $(OTHERLIBS) $(CRTN)'; cr.
2
claus
parents: 1
diff changeset
   945
    ].
claus
parents: 1
diff changeset
   946
claus
parents: 1
diff changeset
   947
    s close
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   948
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   949
    "Modified: 18.5.1996 / 15:44:28 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   950
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   951
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   952
createSourcefiles
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   953
    "creates all Smalltalk-source files in the project directory"
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   954
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   955
    |classes methods methodClasses dir stream|
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   956
2956
952a09bdeed1 Use Filename instead of obsolete FileDirectory
Stefan Vogel <sv@exept.de>
parents: 2907
diff changeset
   957
    dir := self directory asFilename.
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   958
    Transcript showCR:'creating sources in ' , dir pathName , ' ...'; endEntry.
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   959
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   960
    classes := self classes.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   961
    classes isNil ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   962
        self warn:'no classes in current project'
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   963
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   964
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   965
    classes notNil ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   966
        classes do:[:aClass |
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   967
            aClass isLoaded ifFalse:[
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   968
                aClass autoload.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   969
            ].
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   970
        ].
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   971
        classes := classes topologicalSort:[:a :b | a isSubclassOf:b].
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   972
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   973
        classes do:[:aClass |
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   974
            Transcript show:' ... '; showCR:aClass name, '.st'; endEntry.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   975
            aClass fileOutIn:dir
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   976
        ]
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   977
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   978
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   979
    methods := self individualMethods.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   980
    methods notNil ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   981
        methods := methods asIdentitySet.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   982
        "
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   983
         get classes ...
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   984
        "
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   985
        methodClasses := IdentitySet new.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   986
        methods do:[:m | 
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   987
                        |mCls|
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   988
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
   989
                        mCls := m containingClass.
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   990
                        mCls isMeta ifTrue:[
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   991
                            mCls := mCls soleInstance.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   992
                        ].
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   993
                        methodClasses add:mCls].
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   994
        "
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   995
         fileOut by class
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   996
        "
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   997
        methodClasses do:[:cls |
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
   998
            stream := (self directory asFilename construct:(cls name , '.chg')) writeStream.
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   999
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1000
            Transcript show:' ... '; showCR:cls name, '.chg'; endEntry.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1001
            methods do:[:m |
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1002
                |mCls|
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1003
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
  1004
                mCls := m containingClass.
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1005
                (mCls == cls or:[mCls == cls class]) ifTrue:[
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1006
                    mCls fileOutMethod:m on:stream.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1007
                ].
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1008
                stream cr.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1009
            ].
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1010
            stream close.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1011
        ].
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1012
    ].
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1013
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
  1014
    "Modified: 1.11.1996 / 16:37:15 / cg"
2956
952a09bdeed1 Use Filename instead of obsolete FileDirectory
Stefan Vogel <sv@exept.de>
parents: 2907
diff changeset
  1015
    "Modified: 18.9.1997 / 18:50:34 / stefan"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1016
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1017
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1018
findTopFrom:directoryName
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1019
    "returns the relative path from directoryName to the TOP
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1020
     directory."
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1021
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1022
    |topName relParent foundTop|
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1023
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1024
    "/ find TOP
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1025
    relParent := '..'.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1026
    foundTop := false.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1027
    [foundTop] whileFalse:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1028
	topName := directoryName , '/' , relParent.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1029
	topName asFilename pathName = '/' ifTrue:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1030
	    self warn:'could not find TOP; assume absoulte path to TOP'.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1031
	    topName := '/usr/local/lib/smalltalk'.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1032
	    foundTop := true.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1033
	] ifFalse:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1034
	    (topName , '/configurations') asFilename exists ifTrue:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1035
		(topName , '/include') asFilename exists ifTrue:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1036
		    foundTop := true.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1037
		    topName := relParent.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1038
		]
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1039
	    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1040
	    foundTop ifFalse:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1041
		relParent := relParent , '/..'.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1042
	    ]        
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1043
	]
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1044
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1045
    ^ topName
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1046
! !
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1047
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1048
!Project methodsFor:'printing & storing'!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1049
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1050
displayString
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1051
    ^ super displayString , '(''' , (name ? '<unnamed>') , ''')'
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1052
! !
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1053
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1054
!Project methodsFor:'properties'!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1055
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1056
addClass:className conditionForInclusion:conditionBlock classFileName:fileName
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1057
    "return the class info of the project"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1058
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1059
    |i|
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1060
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1061
    i := ClassInfo new.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1062
    i className:className.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1063
    i classFileName:fileName.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1064
    i conditionForInclusion:conditionBlock.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1065
    self addClassInfo:i
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1066
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1067
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1068
addClassInfo:info
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1069
    "add a class info to the project"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1070
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1071
    |infoCollection|
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1072
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1073
    (infoCollection := self classInfo) isNil ifTrue:[
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1074
        self classInfo:(infoCollection := OrderedCollection new).
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1075
    ].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1076
    infoCollection add:info
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1077
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1078
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1079
classInfo:aClassInfoCollection
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1080
    "set the class info of the project"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1081
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1082
    properties isNil ifTrue:[
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1083
        properties := IdentityDictionary new
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1084
    ].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1085
    properties at:#classInfo put:aClassInfoCollection
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1086
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1087
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1088
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1089
comment
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1090
    "return the comment of the project"
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1091
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1092
    properties isNil ifTrue:[^ ''].
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1093
    ^ properties at:#comment ifAbsent:''
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1094
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1095
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1096
comment:aString
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1097
    "set the projects comment"
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1098
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1099
    properties isNil ifTrue:[
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1100
        properties := IdentityDictionary new
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1101
    ].
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1102
    properties at:#comment put:aString
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1103
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1104
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1105
documentationURL
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1106
    "return the documentation-URL of the project"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1107
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1108
    properties isNil ifTrue:[^ nil].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1109
    ^ properties at:#documentationURL ifAbsent:nil
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1110
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1111
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1112
documentationURL:anURLString
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1113
    "set the projects documentation-URL"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1114
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1115
    properties isNil ifTrue:[
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1116
        properties := IdentityDictionary new
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1117
    ].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1118
    properties at:#documentationURL put:anURLString
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1119
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1120
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1121
properties
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1122
    ^ properties
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1123
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1124
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1125
properties:p
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1126
    properties := p
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1127
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1128
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1129
type
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1130
    "return the type of project"
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1131
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1132
    properties isNil ifTrue:[^ #application].
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1133
    ^ properties at:#type ifAbsent:#application
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1134
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1135
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1136
type:aSymbol
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1137
    "set the projects type"
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1138
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1139
    (#(application library smalltalk) includes:aSymbol) ifFalse:[
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1140
        self warn:'invalid project type'.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1141
        ^ self
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1142
    ].
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1143
    properties isNil ifTrue:[
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1144
        properties := IdentityDictionary new
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1145
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1146
    properties at:#type put:aSymbol
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1147
! !
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1148
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1149
!Project methodsFor:'queries'!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1150
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1151
classInfo
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1152
    "return a classInfo collection of classes belonging to that project"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1153
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1154
    |classes classInfo|
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1155
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1156
    properties notNil ifTrue:[
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1157
        classInfo := properties at:#classInfo ifAbsent:nil.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1158
        classInfo notNil ifTrue:[^ classInfo].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1159
    ].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1160
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1161
    ^ (self classes ? #()) collect:[:class |
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1162
        |i fn|
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1163
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1164
        i := ClassInfo new.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1165
        i conditionForInclusion:#always.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1166
        i className:class name.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1167
        fn := class classFilename ? ((Smalltalk fileNameForClass:class) , '.st').
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1168
        i classFileName:fn.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1169
        i
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1170
    ]
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1171
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1172
    "Modified: 4.1.1997 / 16:51:18 / cg"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1173
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1174
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1175
classes
4013
f06d31702f2a ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents: 4010
diff changeset
  1176
    "return a collection of classes belonging to that project.
f06d31702f2a ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents: 4010
diff changeset
  1177
     This excludes any private classes."
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1178
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1179
    |classes classInfo|
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1180
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1181
    properties notNil ifTrue:[
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1182
        classInfo := properties at:#classInfo ifAbsent:nil.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1183
        classInfo notNil ifTrue:[
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1184
            classes := classInfo collect:[:i | i className]
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1185
        ] ifFalse:[
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1186
            classes := properties at:#classes ifAbsent:nil
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1187
        ]
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1188
    ].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1189
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1190
    classes isNil ifTrue:[
2056
1beb5756e9e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2034
diff changeset
  1191
        classes := OrderedCollection new.
1beb5756e9e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2034
diff changeset
  1192
        Smalltalk 
4013
f06d31702f2a ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents: 4010
diff changeset
  1193
            allClassesDo:[:aClass |
f06d31702f2a ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents: 4010
diff changeset
  1194
                aClass owningClass isNil ifTrue:[
f06d31702f2a ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents: 4010
diff changeset
  1195
                    aClass package = packageName ifTrue:[
f06d31702f2a ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents: 4010
diff changeset
  1196
                        classes add:aClass
f06d31702f2a ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents: 4010
diff changeset
  1197
                    ]
2056
1beb5756e9e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2034
diff changeset
  1198
                ]
1beb5756e9e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2034
diff changeset
  1199
            ].
1beb5756e9e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2034
diff changeset
  1200
        classes isEmpty ifTrue:[^ nil].
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1201
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1202
    ^ classes
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1203
2056
1beb5756e9e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2034
diff changeset
  1204
    "Modified: 4.1.1997 / 16:51:18 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1205
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1206
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1207
individualMethods
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1208
    "return a collection of individual methods belonging to that project,
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1209
     only methods are returned which are not contained in the
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1210
     projects class set."
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1211
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1212
    |classes methods|
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1213
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1214
    classes := self classes.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1215
    classes notNil ifTrue:[
1461
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1216
        classes := classes asIdentitySet.
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1217
    ] ifFalse:[
1461
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1218
        classes := #()
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1219
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1220
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1221
    methods := IdentitySet new.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1222
    Smalltalk allBehaviorsDo:[:cls |
1461
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1223
        (classes isNil or:[(classes includes:cls) not]) ifTrue:[
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1224
            cls methodDictionary do:[:m |
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1225
                m package = packageName ifTrue:[
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1226
                    methods add:m
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1227
                ]
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1228
            ].
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1229
            cls class methodDictionary do:[:m |
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1230
                m package = packageName ifTrue:[
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1231
                    methods add:m
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1232
                ]
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1233
            ].
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1234
        ]
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1235
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1236
    ^ methods asArray
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1237
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1238
    "
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1239
     Project current classes
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1240
     Project current individualMethods
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1241
    "
1461
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1242
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1243
    "Modified: 7.6.1996 / 09:16:25 / stefan"
2
claus
parents: 1
diff changeset
  1244
! !
claus
parents: 1
diff changeset
  1245
claus
parents: 1
diff changeset
  1246
!Project methodsFor:'specifications'!
claus
parents: 1
diff changeset
  1247
claus
parents: 1
diff changeset
  1248
readSpec
claus
parents: 1
diff changeset
  1249
    |s chunk fileName|
claus
parents: 1
diff changeset
  1250
claus
parents: 1
diff changeset
  1251
    fileName := (properties at:#directoryName) asFilename construct:'.project'.
claus
parents: 1
diff changeset
  1252
    s := fileName readStream.
claus
parents: 1
diff changeset
  1253
    s isNil ifTrue:[^ self].
claus
parents: 1
diff changeset
  1254
    [s atEnd] whileFalse:[
203
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
  1255
	chunk := s nextChunk.
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
  1256
	Compiler evaluate:chunk receiver:properties notifying:nil
2
claus
parents: 1
diff changeset
  1257
    ].
claus
parents: 1
diff changeset
  1258
    s close.
claus
parents: 1
diff changeset
  1259
claus
parents: 1
diff changeset
  1260
    "(Project new directory:'../projects/Clock') readSpec"
claus
parents: 1
diff changeset
  1261
!
claus
parents: 1
diff changeset
  1262
claus
parents: 1
diff changeset
  1263
saveSpec
claus
parents: 1
diff changeset
  1264
    |f d s|
claus
parents: 1
diff changeset
  1265
claus
parents: 1
diff changeset
  1266
    d := (properties at:#directoryName) asFilename.
claus
parents: 1
diff changeset
  1267
    d exists ifFalse:[
203
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
  1268
	self error:'directory does not exist'.
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
  1269
	^ self
2
claus
parents: 1
diff changeset
  1270
    ].
claus
parents: 1
diff changeset
  1271
    f := d construct:'.project'.
claus
parents: 1
diff changeset
  1272
    s := f writeStream.
claus
parents: 1
diff changeset
  1273
    s isNil ifTrue:[^ self].
claus
parents: 1
diff changeset
  1274
    properties associationsDo:[:aProp |
203
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
  1275
	(aProp == #directoryName) ifFalse:[
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
  1276
	    s nextChunkPut:('self at:' , aProp key storeString, 
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
  1277
			       ' put:' , aProp value storeString).
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
  1278
	    s cr
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
  1279
	]
2
claus
parents: 1
diff changeset
  1280
    ].
claus
parents: 1
diff changeset
  1281
    s close
claus
parents: 1
diff changeset
  1282
claus
parents: 1
diff changeset
  1283
    "((Project new directory:'../projects/Clock') readSpec
203
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
  1284
	 directory:'../projects/xxx') saveSpec"
2
claus
parents: 1
diff changeset
  1285
! !
claus
parents: 1
diff changeset
  1286
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1287
!Project methodsFor:'views'!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1288
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1289
addView:aView
2164
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1290
    "add a view to this projects set of views"
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1291
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1292
    views notNil ifTrue:[views add:aView]
2164
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1293
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1294
    "Modified: 14.2.1997 / 15:36:51 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1295
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1296
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1297
destroyViews
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1298
    "destroy all views of this project"
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1299
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1300
    views notNil ifTrue:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1301
	views do:[:aView |
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1302
	    aView notNil ifTrue:[aView destroy]
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1303
	]
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1304
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1305
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1306
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1307
hideViews
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1308
    "hide all views of this project"
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1309
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1310
    views notNil ifTrue:[
1332
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  1311
        views do:[:aView |
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  1312
            aView notNil ifTrue:[aView unmap]
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  1313
        ]
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1314
    ].
1332
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  1315
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  1316
    "Modified: 3.5.1996 / 23:48:51 / stefan"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1317
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1318
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1319
removeView:aView
2164
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1320
    "remove a view from this projects set of views"
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1321
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1322
    views notNil ifTrue:[
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1323
        views remove:aView ifAbsent:nil
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1324
    ]
2164
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1325
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1326
    "Modified: 14.2.1997 / 15:37:20 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1327
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1328
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1329
showViews
2164
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1330
    "show all views of this project"
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1331
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1332
    views notNil ifTrue:[
1332
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  1333
        views do:[:aView |
2164
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1334
            aView notNil ifTrue:[aView remap]
1332
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  1335
        ]
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1336
    ].
1332
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  1337
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  1338
    "Modified: 3.5.1996 / 23:59:10 / stefan"
2164
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1339
    "Modified: 14.2.1997 / 15:38:47 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1340
! !
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1341
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1342
!Project::ClassInfo methodsFor:'accessing'!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1343
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1344
classFileName
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1345
    "return the value of the instance variable 'classFileName' (automatically generated)"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1346
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1347
    ^ classFileName!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1348
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1349
classFileName:something
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1350
    "set the value of the instance variable 'classFileName' (automatically generated)"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1351
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1352
    classFileName := something.!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1353
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1354
className
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1355
    "return the value of the instance variable 'className' (automatically generated)"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1356
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1357
    ^ className!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1358
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1359
className:something
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1360
    "set the value of the instance variable 'className' (automatically generated)"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1361
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1362
    className := something.!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1363
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1364
conditionForInclusion
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1365
    "return the value of the instance variable 'conditionForInclusion' (automatically generated)"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1366
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1367
    ^ conditionForInclusion!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1368
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1369
conditionForInclusion:something
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1370
    "set the value of the instance variable 'conditionForInclusion' (automatically generated)"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1371
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1372
    conditionForInclusion := something.! !
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1373
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
  1374
!Project class methodsFor:'documentation'!
630
b785d23d7c5b version at the end
Claus Gittinger <cg@exept.de>
parents: 617
diff changeset
  1375
b785d23d7c5b version at the end
Claus Gittinger <cg@exept.de>
parents: 617
diff changeset
  1376
version
4066
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
  1377
    ^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.66 1999-03-23 11:10:24 cg Exp $'
1298
23d0ba91c9be documentation
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
  1378
! !
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
  1379
Project initialize!