Project.st
author Claus Gittinger <cg@exept.de>
Mon, 06 Sep 1999 16:58:20 +0200
changeset 4685 d145298696b7
parent 4670 21eec331e1e9
child 4688 1b27165b9f97
permissions -rw-r--r--
more package loading support
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
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
    17
		documentFiles otherFiles isLoaded'
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
    18
	classVariableNames:'CurrentProject SystemProject NextSequential AllProjects
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
    19
		LoadedProjects'
939
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
    20
	poolDictionaries:''
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
    21
	category:'System-Support'
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    22
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
    23
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
    24
Object subclass:#MethodInfo
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
    25
	instanceVariableNames:'methodName className fileName'
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
    26
	classVariableNames:''
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
    27
	poolDictionaries:''
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
    28
	privateIn:Project
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
    29
!
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
    30
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
    31
Object subclass:#ClassInfo
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
    32
	instanceVariableNames:'conditionForInclusion className classFileName'
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
    33
	classVariableNames:''
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
    34
	poolDictionaries:''
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
    35
	privateIn:Project
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
    36
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
    37
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
    38
!Project class methodsFor:'documentation'!
89
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    39
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    40
copyright
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    41
"
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    42
 COPYRIGHT (c) 1993 by Claus Gittinger
203
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
    43
	      All Rights Reserved
89
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    44
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    45
 This software is furnished under a license and may be used
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    46
 only in accordance with the terms of that license and with the
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    47
 inclusion of the above copyright notice.   This software may not
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    48
 be provided or otherwise made available to, or used by, any
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    49
 other person.  No title to or ownership of the software is
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    50
 hereby transferred.
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    51
"
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    52
!
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    53
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    54
documentation
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    55
"
338
claus
parents: 336
diff changeset
    56
    this class is still under construction (especially the build features are unfinished).
235
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
    57
    Currently, all it does is keep track of per-project views 
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
    58
    (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
    59
    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
    60
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    61
    instance variables:
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    62
        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
    63
                                        in a ProjectView
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
        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
    66
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    67
        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
    68
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    69
        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
    70
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    71
        properties 
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    72
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    73
        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
    74
                                        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
    75
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    76
        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
    77
                                        created.
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    78
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    79
        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
    80
                                        created.
235
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
    81
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
    82
    Future: 
725
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    83
        - keep track of per-project changes
4069
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
    84
        - allow speficiation of the type of the project (application or library)
725
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    85
        - 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
    86
          (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
    87
        - allow removal of project specific classes, methods etc.
1286
4270a0b4917d documentation
Claus Gittinger <cg@exept.de>
parents: 1115
diff changeset
    88
4270a0b4917d documentation
Claus Gittinger <cg@exept.de>
parents: 1115
diff changeset
    89
    [author:]
4270a0b4917d documentation
Claus Gittinger <cg@exept.de>
parents: 1115
diff changeset
    90
        Claus Gittinger
89
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    91
"
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    92
! !
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    93
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
    94
!Project class methodsFor:'initialization'!
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
    95
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
    96
initKnownProjects
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
    97
    "this is a temporary experimental kludge -
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
    98
     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
    99
     '.prj' files ..."
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   100
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   101
    "/ collect project info while scanning all classes
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   102
    "/ and methods ...
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   103
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   104
    |packages anyUnloaded|
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   105
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   106
    packages := IdentitySet new.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   107
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   108
    AllProjects isNil ifTrue:[
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   109
        AllProjects := OrderedCollection new.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   110
    ] ifFalse:[
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   111
        AllProjects do:[:p | packages add:p packageName asSymbol].
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   112
    ].
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   113
    Smalltalk allClassesDo:[:aClass |
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   114
        |packageID prj classFilename pkgInfo revInfo 
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   115
         repositoryPath dir module lib nm|
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   116
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   117
        aClass isMeta ifFalse:[
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   118
            (aClass isNamespace not or:[aClass == Smalltalk]) ifTrue:[
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   119
                packageID := aClass package asSymbol.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   120
                (packages includes:packageID) ifFalse:[
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   121
                    packages add:packageID.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   122
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   123
                    "/ a new one ...
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   124
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   125
                    prj := self new.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   126
                    prj packageName:packageID.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   127
                    prj directory:'???'.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   128
                    prj repositoryModule:'unknown'.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   129
                    prj repositoryDirectory:'unknown'.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   130
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   131
                    nm := 'unknown'.
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   132
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   133
                    pkgInfo := aClass packageSourceCodeInfo.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   134
                    pkgInfo notNil ifTrue:[
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   135
                        module := pkgInfo at:#module ifAbsent:nil.
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   136
                        module notNil ifTrue:[
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   137
                            prj repositoryModule:module    
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   138
                        ].
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   139
                        dir := pkgInfo at:#directory ifAbsent:nil.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   140
                        dir notNil ifTrue:[
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   141
                            prj directory:dir    
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   142
                        ].
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   143
                        lib := pkgInfo at:#library ifAbsent:nil.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   144
                        lib notNil ifTrue:[
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   145
                            prj type:#library.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   146
                        ].
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   147
                        prj isLoaded:true.
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   148
                    ].
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   149
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   150
                    nm := (module ? 'unknown')
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   151
                          , ':'
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   152
                          , (dir ? (lib ? 'unknown')).
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   153
                        
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   154
                    prj name:nm.
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   155
                    AllProjects add:prj.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   156
                ].
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   157
            ].
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   158
        ].
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   159
    ].
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   160
    Method allSubInstancesDo:[:aMethod |
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   161
        |packageID prj who mthdClass|
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   162
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   163
        packageID := aMethod package asSymbol.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   164
        who := aMethod who.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   165
        who notNil ifTrue:[ "/ skip unbound methods ...
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   166
            mthdClass := who methodClass.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   167
            mthdClass package ~= packageID ifTrue:[
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   168
                (packages includes:packageID) ifFalse:[
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   169
                    packages add:packageID.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   170
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   171
                    "/ a new one ...
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   172
                    prj := self new.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   173
        "/            prj name:libName.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   174
                    prj package:packageID.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   175
                    prj type:#library.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   176
                    prj directory:'???'.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   177
                    prj repositoryModule:'stx'.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   178
                    prj repositoryDirectory:'???'.
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   179
                    prj isLoaded:true.
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   180
                    AllProjects add:prj.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   181
                ].
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   182
            ]
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   183
        ]
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   184
    ].
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   185
    self changed:#allProjects
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   186
4066
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   187
"/    |stx p|
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   188
"/
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   189
"/    stx := self new name:'stx'.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   190
"/    stx packageName:'noPackage'.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   191
"/    stx changeSet:nil.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   192
"/    stx type:#smalltalk.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   193
"/    stx comment:'The ST/X project itself'.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   194
"/
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   195
"/    AllProjects add:stx.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   196
"/
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   197
"/    #(
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   198
"/        ('libbasic'      #'stx:libbasic'            'Basic (non-GUI) classes. Required for all applications')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   199
"/        ('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
   200
"/        ('libbasic3'     #'stx:libbasic3'           'More basic (non-GUI) classes. Required for development')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   201
"/        ('libcomp'       #'stx:libcomp'             'The bytecode compiler. Required for all applications')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   202
"/        ('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
   203
"/        ('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
   204
"/        ('libwidg'       #'stx:libwidg'             'Basic widgets. Required for all GUI applications')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   205
"/        ('libwidg2'      #'stx:libwidg2'            'More widgets. Required for most GUI applications')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   206
"/        ('libwidg3'      #'stx:libwidg3'            'More (fun) widgets. Seldom required')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   207
"/        ('libtool'       #'stx:libtool'             'Development applications. Required for program development')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   208
"/        ('libtool2'      #'stx:libtool2'            'More development applications. Required for GUI development')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   209
"/        ('libui'         #'stx:libui'               'UI spec classes. Required for UIPainter applications')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   210
"/        ('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
   211
"/        ('libodbc'       #'stx:libodbc'             'ODBC interface classes.')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   212
"/        ('libopengl'     #'stx:libopengl'           'OpenGL interface classes.')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   213
"/        ('persistency'   #'stx:goodies/persistency' 'Simple DB interface')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   214
"/        ('goodies'       #'stx:goodies'             'Misc goodies - not really maintained')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   215
"/    ) do:[:entry |
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   216
"/        |libName package comment|
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   217
"/
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   218
"/        libName := entry at:1.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   219
"/        package := entry at:2.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   220
"/        comment := entry at:3.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   221
"/
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   222
"/        p := self new name:libName.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   223
"/        p packageName:package.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   224
"/        p type:#library.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   225
"/        p comment:comment.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   226
"/        stx addSubProject:p.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   227
"/    ].
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   228
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   229
    "
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   230
     AllProjects := nil.
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   231
     self initKnownProjects
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   232
    "
4069
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
   233
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
   234
    "Modified: / 23.3.1999 / 14:20:12 / cg"
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   235
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   236
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   237
initialize
338
claus
parents: 336
diff changeset
   238
    SystemProject isNil ifTrue:[
2028
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   239
        NextSequential := 1.
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   240
        SystemProject := self new name:'default'.
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   241
        SystemProject packageName:'private'.
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   242
        SystemProject defaultNameSpace:Smalltalk.
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   243
        SystemProject comment:'A default (dummy) project. 
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   244
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
   245
2028
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   246
        "
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   247
         the SystemProject does not keep a record if changes,
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   248
         but instead depends on the changes file - recording anything there.
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   249
        "
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   250
        SystemProject changeSet:nil.
338
claus
parents: 336
diff changeset
   251
    ].
claus
parents: 336
diff changeset
   252
claus
parents: 336
diff changeset
   253
    CurrentProject := SystemProject.
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   254
    AllProjects := nil.
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   255
"/ now done lazy ...
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   256
"/    self initKnownProjects.
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   257
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   258
    "
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   259
     SystemProject := nil.
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   260
     Project initialize
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   261
    "
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   262
! !
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   263
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
   264
!Project class methodsFor:'instance creation'!
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   265
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   266
new
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   267
    ^ self basicNew initialize
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   268
! !
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   269
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
   270
!Project class methodsFor:'accessing'!
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   271
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
   272
addKnownProject:aProject
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   273
    |allProjects|
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   274
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   275
    allProjects := self knownProjects.
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   276
    (allProjects detect:[:p | p package = aProject package] ifNone:nil) notNil ifTrue:[
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   277
        self warn:'Project for ' , aProject package , ' is already present.'.
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   278
        ^ self.
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
   279
    ].
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   280
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
   281
    AllProjects add:aProject.
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
   282
    self changed:#allProjects
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
   283
!
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
   284
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   285
addLoadedProject:aProject
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   286
    aProject isLoaded:true.
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   287
    self addKnownProject:aProject.
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   288
!
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   289
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   290
current
10
claus
parents: 2
diff changeset
   291
    "return the currently active project"
claus
parents: 2
diff changeset
   292
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   293
    ^ CurrentProject
a27a279701f8 Initial revision
claus
parents:
diff changeset
   294
362
claus
parents: 356
diff changeset
   295
    "
claus
parents: 356
diff changeset
   296
     Project current
claus
parents: 356
diff changeset
   297
    "
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   298
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   299
a27a279701f8 Initial revision
claus
parents:
diff changeset
   300
current:aProject
10
claus
parents: 2
diff changeset
   301
    "set the currently active project"
claus
parents: 2
diff changeset
   302
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   303
    CurrentProject := aProject.
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   304
    self changed:#currentProject
334
claus
parents: 330
diff changeset
   305
!
claus
parents: 330
diff changeset
   306
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   307
currentPackageName
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   308
    CurrentProject notNil ifTrue:[
4112
5ee841c34b10 return nil (instead of 'no package') if no current package is defined.
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
   309
        ^ CurrentProject packageName
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   310
    ].
4112
5ee841c34b10 return nil (instead of 'no package') if no current package is defined.
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
   311
    ^ nil
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   312
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   313
    "
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   314
     Project currentPackageName
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   315
    "
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   316
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   317
336
claus
parents: 334
diff changeset
   318
defaultProject
claus
parents: 334
diff changeset
   319
    "return the SystemDefault project"
claus
parents: 334
diff changeset
   320
claus
parents: 334
diff changeset
   321
    ^ SystemProject.
claus
parents: 334
diff changeset
   322
!
claus
parents: 334
diff changeset
   323
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   324
knownProjects
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   325
    AllProjects isNil ifTrue:[
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   326
        self initKnownProjects
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   327
    ].
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   328
    ^ AllProjects ? #()
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   329
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   330
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   331
loadedProjects
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   332
    ^ self knownProjects select:[:p | p isLoaded]
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   333
!
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   334
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   335
projectNamed:aProjectName
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   336
    "retrieve the named project; return nil if not known"
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   337
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   338
    ^ self knownProjects detect:[:p | p name = aProjectName] ifNone:nil.
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   339
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   340
    "
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   341
     Project projectNamed:'libbasic'
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   342
    "
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   343
!
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   344
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   345
projectWithId:aPackageId
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   346
    "retrieve the project with a particular id; return nil if not known"
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   347
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   348
    ^ self knownProjects detect:[:p | p package = aPackageId] ifNone:nil.
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   349
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   350
    "
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   351
     Project projectWithId:#'stx:libbasic'
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   352
    "
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   353
!
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   354
334
claus
parents: 330
diff changeset
   355
setDefaultProject
claus
parents: 330
diff changeset
   356
    "set the currently active project to be the SystemDEfault project"
claus
parents: 330
diff changeset
   357
claus
parents: 330
diff changeset
   358
    self current:SystemProject.
939
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   359
!
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   360
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   361
setProject:aProjectOrNil
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   362
    "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
   363
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   364
    CurrentProject := aProjectOrNil.
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   365
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   366
    "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
   367
    "Modified: 7.2.1996 / 14:01:16 / cg"
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   368
! !
a27a279701f8 Initial revision
claus
parents:
diff changeset
   369
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
   370
!Project class methodsFor:'changes management'!
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   371
664
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   372
addClassDefinitionChangeFor:aClass
1115
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   373
    "add a class-def-change for aClass to the current project"
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   374
664
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   375
    |p c|
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   376
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   377
    p := CurrentProject.
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   378
    (p notNil 
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   379
    and:[(c := p changeSet) notNil]) ifTrue:[
666
6d4175de8c55 fixed primitiveDefinitions changes
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
   380
	c addClassDefinitionChangeFor:aClass 
664
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   381
    ]
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   382
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   383
    "Created: 3.12.1995 / 13:44:58 / cg"
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   384
    "Modified: 3.12.1995 / 13:58:04 / cg"
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   385
!
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   386
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   387
addMethodCategoryChange:aMethod category:newCategory in:aClass
1115
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   388
    "add a method-category-change for aMethod in aClass to the current project"
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   389
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   390
    |p c|
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   391
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   392
    p := CurrentProject.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   393
    (p notNil 
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   394
    and:[(c := p changeSet) notNil]) ifTrue:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   395
	c addMethodCategoryChange:aMethod category:newCategory in:aClass 
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   396
    ]
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   397
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   398
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   399
addMethodChange:aMethod in:aClass
1115
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   400
    "add a method change in aClass to the current project"
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   401
235
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
   402
    |p c|
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   403
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   404
    p := CurrentProject.
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   405
    (p notNil 
235
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
   406
    and:[(c := p changeSet) notNil]) ifTrue:[
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
   407
	c addMethodChange:aMethod in:aClass 
203
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
   408
    ]
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
   409
!
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
   410
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   411
addMethodPrivacyChange:aMethod in:aClass
1115
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   412
    "add a privacy change for aMethod in aClass to the current project"
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   413
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   414
    |p c|
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   415
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   416
    p := CurrentProject.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   417
    (p notNil 
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   418
    and:[(c := p changeSet) notNil]) ifTrue:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   419
	c addMethodPrivacyChange:aMethod in:aClass 
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   420
    ]
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   421
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   422
    "Modified: 27.8.1995 / 22:48:17 / claus"
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   423
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   424
705
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   425
addPrimitiveDefinitionsChangeFor:aClass
1115
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   426
    "add a primitiveDef change for aClass to the current project"
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   427
705
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   428
    |p c|
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   429
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   430
    p := CurrentProject.
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   431
    (p notNil 
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   432
    and:[(c := p changeSet) notNil]) ifTrue:[
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   433
	c addPrimitiveDefinitionsChangeFor:aClass 
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   434
    ]
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   435
!
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   436
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   437
addPrimitiveFunctionsChangeFor:aClass
1115
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   438
    "add a primitiveFuncs change for aClass to the current project"
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   439
705
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   440
    |p c|
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   441
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   442
    p := CurrentProject.
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   443
    (p notNil 
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   444
    and:[(c := p changeSet) notNil]) ifTrue:[
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   445
	c addPrimitiveFunctionsChangeFor:aClass 
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   446
    ]
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   447
!
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   448
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   449
addPrimitiveVariablesChangeFor:aClass
1115
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   450
    "add a primitiveVars change for aClass to the current project"
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   451
705
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   452
    |p c|
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   453
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   454
    p := CurrentProject.
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   455
    (p notNil 
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   456
    and:[(c := p changeSet) notNil]) ifTrue:[
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   457
	c addPrimitiveVariablesChangeFor:aClass 
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   458
    ]
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   459
!
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   460
3288
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   461
addRemoveSelectorChange:aSelector in:aClass
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   462
    "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
   463
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   464
    |p c|
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   465
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   466
    p := CurrentProject.
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   467
    (p notNil 
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   468
    and:[(c := p changeSet) notNil]) ifTrue:[
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   469
        c addRemoveSelectorChange:aSelector in:aClass 
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   470
    ]
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   471
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   472
    "Created: / 16.2.1998 / 12:45:10 / cg"
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   473
!
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   474
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   475
currentProjectDirectory
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   476
    "return the name of the directory to use for fileOut.
235
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
   477
     The returned name already includes a file-separator at the end, 
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
   478
     so the filename can be concatenated to it."
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   479
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   480
    |p dirName|
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   481
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   482
    p := CurrentProject.
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   483
    p notNil ifTrue:[
2907
1666bf27f351 VMS changes
Claus Gittinger <cg@exept.de>
parents: 2664
diff changeset
   484
        dirName := p directory  
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   485
    ] ifFalse:[
2907
1666bf27f351 VMS changes
Claus Gittinger <cg@exept.de>
parents: 2664
diff changeset
   486
        dirName := Filename currentDirectory name
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   487
    ].
2962
038a8f143e49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2956
diff changeset
   488
    ^ dirName
2907
1666bf27f351 VMS changes
Claus Gittinger <cg@exept.de>
parents: 2664
diff changeset
   489
1666bf27f351 VMS changes
Claus Gittinger <cg@exept.de>
parents: 2664
diff changeset
   490
    "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
   491
!
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   492
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   493
rememberOverwrittenMethod:newMethod from:oldMethod
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   494
    "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
   495
     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
   496
     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
   497
2558
07e7d6fef46d removed unused var
Claus Gittinger <cg@exept.de>
parents: 2334
diff changeset
   498
    |p|
2334
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   499
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   500
    p := CurrentProject.
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   501
    (p notNil 
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   502
    and:[p ~~ SystemProject]) ifTrue:[
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   503
        p rememberOverwrittenMethod:newMethod from:oldMethod
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   504
    ] ifFalse:[
3332
8014b817988b remove the 'does not remember ...' message.
Claus Gittinger <cg@exept.de>
parents: 3288
diff changeset
   505
"/        '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
   506
    ]
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   507
3332
8014b817988b remove the 'does not remember ...' message.
Claus Gittinger <cg@exept.de>
parents: 3288
diff changeset
   508
    "Modified: / 7.3.1998 / 13:38:39 / cg"
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   509
! !
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   510
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   511
!Project methodsFor:'accessing'!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   512
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   513
addSubProject:aProject
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
   514
    "add a subproject - obsolete; we use prerequisites now"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
   515
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   516
    subProjects isNil ifTrue:[
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   517
        subProjects := OrderedCollection new.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   518
    ].
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   519
    subProjects add:aProject
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   520
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   521
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   522
changeSet
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   523
    "return the set of changes made in this project"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   524
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   525
    ^ changeSet
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   526
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   527
    "Modified: 27.1.1997 / 11:58:36 / cg"
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   528
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   529
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   530
changeSet:aChangeSet
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   531
    "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
   532
     the actual changeSet."
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   533
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   534
    changeSet := aChangeSet
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   535
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   536
    "Modified: 27.1.1997 / 11:59:02 / cg"
73
a6640cc96199 *** empty log message ***
claus
parents: 13
diff changeset
   537
!
a6640cc96199 *** empty log message ***
claus
parents: 13
diff changeset
   538
2028
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   539
defaultNameSpace
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   540
    "return the defaultNameSpace of this project.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   541
     New classes will (if not specified by a directive) be installed
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   542
     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
   543
     overwriting of standard classes."
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   544
2028
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   545
    ^ defaultNameSpace
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   546
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   547
    "Created: 2.1.1997 / 19:54:42 / cg"
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   548
    "Modified: 27.1.1997 / 11:59:53 / cg"
2028
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   549
!
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   550
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   551
defaultNameSpace:aNamespace
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   552
    "set the defaultNameSpace of this project.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   553
     New classes will (if not specified by a directive) be installed
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   554
     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
   555
     overwriting of standard classes."
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   556
4077
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
   557
    aNamespace ~~ defaultNameSpace ifTrue:[
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
   558
        defaultNameSpace := aNamespace.
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
   559
        self changed:#defaultNameSpace.
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
   560
        self == CurrentProject ifTrue:[
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
   561
            Project changed:#defaultNameSpace 
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
   562
        ]
2032
e39ca6532e1a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
   563
    ]
2028
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   564
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   565
    "Created: 2.1.1997 / 19:54:37 / cg"
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   566
    "Modified: 27.1.1997 / 12:00:01 / cg"
2028
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   567
!
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   568
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   569
directory
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   570
    "return the projects directory.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   571
     If not specified, a fileOut will be done into that directory"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   572
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   573
    directoryName isNil ifTrue:[^ '.'].
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   574
    ^ directoryName
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   575
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   576
    "Modified: 27.1.1997 / 12:00:41 / cg"
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   577
!
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   578
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   579
directory:aDirectoryName
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   580
    "set the projects directory.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   581
     If not specified, a fileOut will be done into that directory"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   582
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   583
    directoryName := aDirectoryName.
4070
682f720cd0f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4069
diff changeset
   584
    self changed:#directory.
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   585
    self == CurrentProject ifTrue:[
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   586
        Project changed:#directory 
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   587
    ]
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   588
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   589
    "Modified: 27.1.1997 / 12:00:47 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   590
!
356
claus
parents: 338
diff changeset
   591
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   592
isLoaded:aBoolean
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   593
    isLoaded := aBoolean
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   594
!
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   595
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   596
name
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   597
    "return the projects name.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   598
     This is for the user only - shown in the projectViews label"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   599
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   600
    ^ name
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   601
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   602
    "Modified: 27.1.1997 / 12:01:16 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   603
!
356
claus
parents: 338
diff changeset
   604
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   605
name:aString
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   606
    "set the projects name.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   607
     This is for the user only - shown in the projectViews label"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   608
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   609
    name := aString.
4070
682f720cd0f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4069
diff changeset
   610
    self changed:#name.
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   611
    self == CurrentProject ifTrue:[
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   612
        Project changed:#name
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   613
    ]
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   614
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   615
    "Modified: 27.1.1997 / 12:01:09 / cg"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   616
!
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   617
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   618
overwrittenMethods
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   619
    "return the set of methods which were overwritten in this project.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   620
     This information allows uninstalling, by switching back to the
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   621
     original methods."
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   622
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   623
    ^ overwrittenMethods
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   624
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   625
    "Created: 27.1.1997 / 11:57:21 / cg"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   626
    "Modified: 27.1.1997 / 12:09:14 / cg"
356
claus
parents: 338
diff changeset
   627
!
claus
parents: 338
diff changeset
   628
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   629
package
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   630
    "return the projects package identifier.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   631
     This identifier marks all methods and new classes which were created
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   632
     in this project."
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   633
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   634
    ^ packageName
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   635
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   636
    "Modified: 27.1.1997 / 12:10:00 / cg"
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   637
!
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   638
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   639
package:aPackageId
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   640
    "set the projects package identifier.
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   641
     This identifier marks all methods and new classes which were created
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   642
     in this project."
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   643
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   644
    packageName := aPackageId
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   645
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   646
    "Modified: 27.1.1997 / 12:10:00 / cg"
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   647
!
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   648
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   649
packageName
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   650
    "return the projects package identifier.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   651
     This identifier marks all methods and new classes which were created
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   652
     in this project."
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   653
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   654
    ^ packageName
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   655
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   656
    "Modified: 27.1.1997 / 12:10:00 / cg"
10
claus
parents: 2
diff changeset
   657
!
claus
parents: 2
diff changeset
   658
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   659
packageName:aStringOrSymbol
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   660
    "set the projects package identifier.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   661
     This identifier marks all methods and new classes which were created
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   662
     in this project."
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   663
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   664
    packageName := aStringOrSymbol asSymbol.
4070
682f720cd0f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4069
diff changeset
   665
    self changed:#package.
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   666
    self == CurrentProject ifTrue:[
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   667
        Project changed:#package
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   668
    ]
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   669
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   670
    "Modified: 27.1.1997 / 12:10:09 / cg"
10
claus
parents: 2
diff changeset
   671
!
claus
parents: 2
diff changeset
   672
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   673
prerequisiteClasses
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   674
    "return the prerequisiteClasses of the project"
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   675
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   676
    ^ (self propertyAt:#prerequisiteClasses) ? #()
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   677
!
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   678
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   679
prerequisiteClasses:aCollectionOfClassesOrClassNames
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   680
    "set the prerequisiteClasses of the project"
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   681
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   682
    ^ self propertyAt:#prerequisiteClasses put:aCollectionOfClassesOrClassNames
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   683
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   684
    "Modified: / 26.4.1999 / 23:33:44 / cg"
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   685
!
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   686
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   687
prerequisitePackages
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   688
    "return the prerequisitePackages of the project"
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   689
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   690
    ^ self prerequisites
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   691
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   692
    "Created: / 26.4.1999 / 23:33:22 / cg"
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   693
!
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   694
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   695
prerequisitePackages:aCollectionOfPackagesOrPackageNames
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   696
    "set the prerequisitePackages of the project"
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   697
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   698
    ^ self prerequisites:aCollectionOfPackagesOrPackageNames
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   699
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   700
    "Modified: / 26.4.1999 / 23:34:40 / cg"
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   701
!
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   702
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   703
prerequisites
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
   704
    "return the prerequisites of the project"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
   705
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   706
    ^ prerequisites ? #()
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   707
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   708
3973
7065a27b136b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3972
diff changeset
   709
prerequisites:aCollectionOfProjects
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
   710
    "set the prerequisites of the project"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
   711
3973
7065a27b136b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3972
diff changeset
   712
    prerequisites := aCollectionOfProjects
7065a27b136b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3972
diff changeset
   713
!
7065a27b136b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3972
diff changeset
   714
654
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   715
repositoryDirectory
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   716
    "return the projects default repository location.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   717
     This is offered initially, when classes are checked into the
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   718
     source repository initially"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   719
725
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   720
    ^ repositoryDirectory
654
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   721
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   722
    "Created: 25.11.1995 / 18:04:51 / cg"
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   723
    "Modified: 27.1.1997 / 12:13:35 / cg"
654
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   724
!
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   725
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   726
repositoryDirectory:aRelativePathName
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   727
    "set the projects default repository location.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   728
     This will be offered initially, when classes are checked into the
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   729
     source repository initially"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   730
725
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   731
    repositoryDirectory := aRelativePathName
654
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   732
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   733
    "Created: 25.11.1995 / 18:05:06 / cg"
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   734
    "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
   735
!
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   736
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   737
repositoryModule
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   738
    "return the projects default repository module name.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   739
     This is offered initially, when classes are checked into the
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   740
     source repository initially"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   741
725
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   742
    ^ repositoryModule
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   743
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   744
    "Created: 25.11.1995 / 18:04:51 / cg"
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   745
    "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
   746
!
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   747
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   748
repositoryModule:aString
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   749
    "set the projects default repository module name.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   750
     This is offered initially, when classes are checked into the
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   751
     source repository initially"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   752
725
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   753
    repositoryModule := aString
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   754
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   755
    "Created: 25.11.1995 / 18:05:06 / cg"
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   756
    "Modified: 27.1.1997 / 12:13:57 / cg"
654
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   757
!
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   758
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   759
subProjects
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
   760
    "return the subprojects - obsolete; we use prerequisites now"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
   761
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   762
    ^ subProjects ? #()
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   763
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   764
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   765
views
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   766
    "return a collection of views which were opened in this project"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   767
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   768
    ^ views asArray
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   769
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   770
    "Modified: 27.1.1997 / 12:14:18 / cg"
338
claus
parents: 336
diff changeset
   771
!
claus
parents: 336
diff changeset
   772
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   773
views:aSetOfViews
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   774
    "set the collection of views which were opened in this project"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   775
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   776
    views := WeakIdentitySet withAll:aSetOfViews
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   777
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   778
    "Modified: 27.1.1997 / 12:14:26 / cg"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   779
! !
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   780
4079
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   781
!Project methodsFor:'administration'!
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   782
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   783
removeClassesFromSystem
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   784
    "remove the all of my classes & patches from the system"
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   785
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   786
    self classInfo do:[:clsInfo |
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   787
        |clsName cls|
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   788
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   789
        clsName := clsInfo className.
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   790
        clsName isSymbol ifTrue:[
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   791
            cls := Smalltalk at:clsName.
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   792
            cls notNil ifTrue:[
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   793
                cls removeFromSystem.
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   794
            ].
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   795
        ] ifFalse:[
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   796
            self halt
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   797
        ].
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   798
    ].
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   799
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   800
!
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   801
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   802
removeFromSystem
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   803
    "remove the project and all of its classes & patches from the
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   804
     system"
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   805
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   806
    self removeClassesFromSystem.
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   807
    AllProjects remove:self ifAbsent:nil.
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   808
! !
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   809
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   810
!Project methodsFor:'changes'!
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   811
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   812
rememberOverwrittenMethod:newMethod from:oldMethod
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   813
    "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
   814
     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
   815
     Allows previous methods to be reconstructed."
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   816
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   817
    overwrittenMethods isNil ifTrue:[
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   818
        overwrittenMethods := IdentityDictionary new.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   819
    ].
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   820
    overwrittenMethods at:newMethod put:oldMethod
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   821
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   822
    "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
   823
    "Modified: 30.1.1997 / 21:10:51 / cg"
10
claus
parents: 2
diff changeset
   824
! !
claus
parents: 2
diff changeset
   825
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   826
!Project methodsFor:'initialization'!
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   827
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   828
initialize
338
claus
parents: 336
diff changeset
   829
    |numString|
claus
parents: 336
diff changeset
   830
330
claus
parents: 318
diff changeset
   831
    views := WeakIdentitySet new.
338
claus
parents: 336
diff changeset
   832
    numString := NextSequential printString.
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   833
    NextSequential := NextSequential + 1.
338
claus
parents: 336
diff changeset
   834
claus
parents: 336
diff changeset
   835
    name := 'new Project-' , numString.
claus
parents: 336
diff changeset
   836
    packageName := 'private-' , numString.
2034
1c96469c3df8 preinit the defaultNamespace of new projects (to Smalltalk)
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
   837
    defaultNameSpace := Smalltalk.
1c96469c3df8 preinit the defaultNamespace of new projects (to Smalltalk)
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
   838
848
76a83f34c26a moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
   839
    "/
76a83f34c26a moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
   840
    "/ for tiny-configurations, allow ChangeSet to be absent
76a83f34c26a moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
   841
    "/
76a83f34c26a moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
   842
    ChangeSet notNil ifTrue:[
76a83f34c26a moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
   843
        changeSet := ChangeSet new.
76a83f34c26a moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
   844
    ].
654
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   845
    self directory:'.'.
725
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   846
    self repositoryModule:(OperatingSystem getLoginName).
654
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   847
    self repositoryDirectory:'private'
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   848
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   849
    "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
   850
    "Modified: 3.1.1997 / 13:24:10 / cg"
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   851
! !
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   852
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   853
!Project methodsFor:'load & save'!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   854
4079
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   855
loadClassesFromProjectDirectory
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   856
    "load my classes into the system.
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   857
     The classes are loaded from the directory as defined by my
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   858
     directory insTvar"
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   859
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   860
    |myDirectory|
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   861
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   862
    myDirectory := self directory asFilename.
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   863
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   864
    self classInfo do:[:clsInfo |
4080
eee0f8bfc598 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4079
diff changeset
   865
        |clsName clsFileNameString cls clsFilename|
4079
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   866
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   867
        clsName := clsInfo className.
4080
eee0f8bfc598 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4079
diff changeset
   868
        clsFileNameString := clsInfo classFileName.
eee0f8bfc598 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4079
diff changeset
   869
        clsFileNameString isNil ifTrue:[clsFileNameString := clsName , '.st'].
4079
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   870
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   871
        clsName isSymbol ifTrue:[
4080
eee0f8bfc598 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4079
diff changeset
   872
            clsFilename := myDirectory construct:clsFileNameString.
4079
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   873
            cls := Smalltalk at:clsName.
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   874
            cls isNil ifTrue:[
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   875
                "/ ok - really not yet loaded.
4080
eee0f8bfc598 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4079
diff changeset
   876
                Transcript showCR:'loading ' , clsFilename pathName , ' ...'.
4079
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   877
            ] ifFalse:[
4080
eee0f8bfc598 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4079
diff changeset
   878
                Transcript showCR:'reloading ' , clsFilename pathName , ' ...'.
4079
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   879
            ].
4080
eee0f8bfc598 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4079
diff changeset
   880
            Smalltalk fileIn:clsFilename
4079
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   881
        ] ifFalse:[
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   882
            self halt
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   883
        ].
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   884
    ].
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   885
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   886
    "/ read again; if the load order was not correct,
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   887
    "/ this will fix things (i.e. nil superclasses ...)
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   888
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   889
    self classInfo do:[:clsInfo |
4080
eee0f8bfc598 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4079
diff changeset
   890
        |clsName clsFileNameString clsFilename|
4079
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   891
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   892
        clsName := clsInfo className.
4080
eee0f8bfc598 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4079
diff changeset
   893
        clsFileNameString := clsInfo classFileName.
eee0f8bfc598 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4079
diff changeset
   894
        clsFileNameString isNil ifTrue:[clsFileNameString := clsName , '.st'].
4079
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   895
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   896
        clsName isSymbol ifTrue:[
4080
eee0f8bfc598 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4079
diff changeset
   897
            clsFilename := myDirectory construct:clsFileNameString.
eee0f8bfc598 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4079
diff changeset
   898
            Transcript showCR:'reloading ' , clsFilename pathName , ' ...'.
eee0f8bfc598 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4079
diff changeset
   899
            Smalltalk fileIn:clsFilename
4079
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   900
        ] ifFalse:[
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   901
            self halt
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   902
        ].
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   903
    ].
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   904
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   905
!
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   906
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   907
loadFromProjectFile:aFilename
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
   908
    "fill all of my attributes from a projects file (.prj-file)"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
   909
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   910
    |f l pack targetConditions s sourcesSubDir files module|
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   911
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   912
    f := aFilename asFilename.
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   913
    directoryName := f directory pathName.
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   914
    self directory:(f directory pathName).
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   915
    pack := ResourcePack fromFile:f baseName directory:directoryName.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   916
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   917
    "/ convert the resourcePack ...
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   918
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   919
    packageName := pack at:'package' ifAbsent:packageName.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   920
    name := pack at:'name' ifAbsent:name.
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
   921
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   922
    module := pack at:'repository.module' ifAbsent:nil.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   923
    module notNil ifTrue:[
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   924
        repositoryModule := module.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   925
        repositoryDirectory := pack at:'repository.directory' ifAbsent:''.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   926
    ].
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
   927
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   928
    prerequisites := pack at:'prerequisites' ifAbsent:#().
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   929
    self prerequisiteClasses:(pack at:'prerequisiteClasses' ifAbsent:#()).
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   930
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
   931
    s := pack at:'nameSpace' ifAbsent:nil.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
   932
    s notNil ifTrue:[
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
   933
        defaultNameSpace := Namespace name:s.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
   934
    ].
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
   935
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   936
    subProjects := pack at:'subProjects' ifAbsent:subProjects.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   937
    (s := pack at:'comment' ifAbsent:nil) notNil ifTrue:[
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   938
        self comment:s
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   939
    ].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   940
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   941
    "/ first, all of the conditions ...
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   942
    targetConditions := Dictionary new.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   943
    pack keysAndValuesDo:[:key :val |
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   944
        |conditionKey|
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   945
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   946
        (key startsWith:'target.condition.') ifTrue:[
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   947
            conditionKey := key copyFrom:'target.condition.' size + 1.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   948
            targetConditions at:conditionKey put:val.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   949
        ]
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   950
    ].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   951
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   952
    properties isNil ifTrue:[
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   953
        properties := IdentityDictionary new
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   954
    ].
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   955
    properties at:#'targetconditions' put:targetConditions.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   956
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   957
    sourcesSubDir := pack at:'sources' ifAbsent:nil.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   958
    sourcesSubDir notNil ifTrue:[
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   959
        properties at:#'sourcesDirectory' put:sourcesSubDir.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   960
    ].
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   961
    files := pack at:'files' ifAbsent:nil.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   962
    files notNil ifTrue:[
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   963
        properties at:#'files' put:files.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   964
    ].
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   965
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   966
    "/ fetch class info
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   967
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
   968
    (pack at:'classes' default:#()) do:[:info |
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   969
        |condKey className optionalFileName|
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   970
4078
ce18e95e0826 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4077
diff changeset
   971
        condKey := #always.
4073
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
   972
        info isSymbol ifTrue:[
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
   973
            className := info.
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
   974
        ] ifFalse:[
4078
ce18e95e0826 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4077
diff changeset
   975
            className := info at:1.
ce18e95e0826 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4077
diff changeset
   976
            info size > 1 ifTrue:[
ce18e95e0826 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4077
diff changeset
   977
                optionalFileName := info at:2.
ce18e95e0826 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4077
diff changeset
   978
                info size > 2 ifTrue:[
ce18e95e0826 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4077
diff changeset
   979
                    condKey := info at:3.
ce18e95e0826 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4077
diff changeset
   980
                ]
4073
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
   981
            ].
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   982
        ].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   983
        self 
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   984
            addClass:className 
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   985
            conditionForInclusion:condKey 
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   986
            classFileName:optionalFileName
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   987
    ].
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   988
4069
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
   989
    self wasLoadedFromFile:true.
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
   990
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   991
    "/ all remaining properties
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   992
    pack keysAndValuesDo:[:key :val |
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   993
        (key startsWith:'property.') ifTrue:[
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   994
            self propertyAt:(key copyFrom:'property.' size+1) asSymbol put:val.
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   995
        ]
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   996
    ].
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   997
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   998
    "
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   999
     Project current saveAsProjectFile.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1000
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1001
     Project new loadFromProjectFile:'default.prj'
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1002
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1003
     Project new loadFromProjectFile:'../../libbasic/libbasic.prj'
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1004
    "
4069
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  1005
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1006
    "Modified: / 26.4.1999 / 23:21:33 / cg"
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1007
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1008
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1009
saveAsProjectFile
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1010
    "store all of my attributes into a projects file (.prj-file)
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1011
     (in the project-directory and named as <projectName>.prj)"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1012
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1013
    |fn s|
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1014
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1015
    fn := self directory asFilename.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1016
    fn := fn construct:self name.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1017
    fn := fn withSuffix:'prj'.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1018
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1019
    fn exists ifTrue:[
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1020
        fn copyTo:(fn pathName , '.bak')
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1021
    ].
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1022
    s := fn writeStream.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1023
    self saveAsProjectFileOn:s.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1024
    s close.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1025
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1026
    "
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1027
     Project current saveAsProjectFile
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1028
    "
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1029
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1030
    "Modified: / 26.4.1999 / 22:53:38 / cg"
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1031
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1032
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1033
saveAsProjectFileOn:aStream
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1034
    "save the project info in a format which is both usable for reload
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1035
     and somehow readable for humans.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1036
     Actually, the format is the same as used for resources (i.e. key - value pairs)
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1037
     and the code below could be much simpler - if there where no humans to read it ..."
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1038
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1039
    |s coll first maxLen t|
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1040
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1041
    s := aStream.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1042
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1043
    s nextPutLine:'; $Header' , '$'; nextPutLine:';'.
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1044
    s nextPutLine:'; Project saved ' , Smalltalk timeStamp; nextPutLine:';'.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1045
    s nextPutLine:'; Be careful when editing - do not corrupt the files syntax.'.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1046
    s nextPutLine:'; (Lines starting with a semicolon are comment lines)'.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1047
    s nextPutLine:'; (Lines ending with a backslash are concatenated with the following line)'.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1048
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1049
    s cr; nextPutLine:';'; nextPutLine:'; general:'; nextPutLine:';'.
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1050
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1051
    s nextPutAll:'comment'. 
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1052
    s tab. s nextPutLine:(self comment storeString).
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1053
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1054
    s nextPutAll:'name'. 
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1055
    s tab. s nextPutLine:(name storeString).
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1056
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1057
    s nextPutAll:'type'. 
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1058
    s tab. s nextPutLine:(self type storeString).
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1059
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1060
    s nextPutAll:'package'. 
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1061
    s tab. s nextPutLine:(self packageName storeString).
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1062
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1063
    (defaultNameSpace notNil and:[defaultNameSpace ~~ Smalltalk]) ifTrue:[
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1064
        s nextPutAll:'nameSpace'. 
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1065
        s tab. s nextPutLine:(defaultNameSpace name storeString).
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1066
    ].
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1067
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1068
    s cr; nextPutLine:';'; nextPutLine:'; repository:'; nextPutLine:';'.
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1069
    s nextPutAll:'repository.module'. 
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1070
    s tab. s nextPutLine:(repositoryModule ? 'private') storeString.
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1071
    s nextPutAll:'repository.directory'. 
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1072
    s tab. s nextPutLine:(repositoryDirectory ? self packageName) storeString.
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1073
    s cr.
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1074
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1075
    (t := properties at:#'sourcesDirectory' ifAbsent:nil) notNil ifTrue:[
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1076
        s nextPutAll:'sources'. 
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1077
        s tab. s nextPutLine:(t storeString).
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1078
    ].
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1079
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1080
    first := true.
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1081
    properties keysAndValuesDo:[:key :val |
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1082
        (#(
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1083
            comment
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1084
            wasLoadedFromFile
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1085
            targetconditions
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1086
            classes
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1087
            classInfo
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1088
            prerequisiteClasses
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1089
            files
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1090
        ) includes:key) ifFalse:[
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1091
            first ifTrue:[
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1092
                first := false.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1093
                s cr; nextPutLine:';'; nextPutLine:'; properties:'; nextPutLine:';'.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1094
            ].    
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1095
            s nextPutAll:'property.'; nextPutAll:key. 
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1096
            s tab. s nextPutLine:val storeString.
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1097
        ]
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1098
    ].
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1099
        
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1100
"/    coll := self subProjects.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1101
"/    coll size > 0 ifTrue:[
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1102
"/        s nextPutLine:'[subprojects]'. 
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1103
"/        coll do:[:aSubProject |
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1104
"/            s tab. s nextPutLine:(aSubProject name soreString).
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1105
"/        ].
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1106
"/    ].
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1107
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1108
    s cr; nextPutLine:';'; nextPutLine:'; required packages:'; nextPutLine:';'.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1109
    s nextPutAll:'prerequisites'; tab.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1110
    coll := self prerequisites.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1111
    coll size = 0 ifTrue:[
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1112
        s nextPutLine:'#()'. 
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1113
    ] ifFalse:[    
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1114
        s nextPutLine:'#( \'. 
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1115
        coll do:[:aProjectOrProjectNameList |
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1116
            |pName pPath|
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1117
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1118
            aProjectOrProjectNameList isString ifTrue:[
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1119
                pName := aProjectOrProjectNameList.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1120
            ] ifFalse:[
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1121
                aProjectOrProjectNameList isArray ifTrue:[
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1122
                    pName := aProjectOrProjectNameList at:1.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1123
                    pPath := aProjectOrProjectNameList at:2.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1124
                ] ifFalse:[
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1125
                    pName := aProjectOrProjectNameList name.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1126
                    pPath := aProjectOrProjectNameList repositoryPath.    
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1127
                ]
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1128
            ].
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1129
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1130
            pPath isNil ifTrue:[
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1131
                s tab. s nextPutAll:(pName storeString); nextPutLine:' \'.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1132
            ] ifFalse:[
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1133
                s tab. s nextPutAll:'( '.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1134
                s nextPutAll:(pName storeString); space;
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1135
                  nextPutAll:(pPath storeString); nextPutLine:') \'.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1136
            ]
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1137
        ].
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1138
        s nextPutLine:')'.
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1139
    ].
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1140
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1141
    s cr; nextPutLine:';'; nextPutLine:'; required classes:'; nextPutLine:';'.
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1142
    s nextPutAll:'prerequisiteClasses'; tab.
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1143
    coll := self prerequisiteClasses.
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1144
    s nextPutLine:'#( \'. 
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1145
    coll do:[:aClassOrSymbol | |className|
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1146
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1147
        (className := aClassOrSymbol) isSymbol ifFalse:[
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1148
            className := aClassOrSymbol name
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1149
        ].
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1150
        s tab. s nextPutAll:(className storeString); nextPutLine:' \'.
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1151
    ].
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1152
    s nextPutLine:')'.
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1153
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1154
    s cr; nextPutLine:';'; nextPutLine:'; classes:'; nextPutLine:';'.
4078
ce18e95e0826 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4077
diff changeset
  1155
    s nextPutLine:'; (for each class, one line of the form: ( #''className'' [fileName [condition]] )'.
4315
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1156
    s nextPutLine:'; (where fileName and condition are optional)'.
4078
ce18e95e0826 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4077
diff changeset
  1157
    s nextPutLine:';'.
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1158
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1159
    coll := self classInfo.
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1160
    s nextPutAll:'classes'; tab; nextPutLine:'#( \'.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1161
    "/ find the longest className (for layout only)
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1162
    
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1163
    maxLen := coll inject:0 into:[:maxSoFar :aClassInfo |
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1164
                                    |clsName|
4078
ce18e95e0826 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4077
diff changeset
  1165
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1166
                                    clsName := aClassInfo className.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1167
                                    maxSoFar max:clsName storeString size
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1168
                                 ].
4078
ce18e95e0826 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4077
diff changeset
  1169
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1170
    coll do:[:aClassInfo |
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1171
        |clsName fileName cond|
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1172
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1173
        clsName := aClassInfo className.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1174
        fileName := aClassInfo classFileName.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1175
        fileName isNil ifTrue:[
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1176
            fileName := clsName , '.st'
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1177
        ].
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1178
        cond := aClassInfo conditionForInclusion.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1179
        s tab. s nextPutAll:'( '; 
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1180
                 nextPutAll:(clsName storeString paddedTo:maxLen); 
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1181
                 tab; nextPutAll:fileName storeString.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1182
        cond == #always ifFalse:[
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1183
            s tab; nextPutAll:cond storeString.
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1184
        ].
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1185
        s nextPutLine:') \'.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1186
    ].
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1187
    s nextPutLine:')'.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1188
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1189
    s cr; nextPutLine:';'; nextPutLine:'; files (for deployment):'; nextPutLine:';'.
4314
b973832ffe15 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4124
diff changeset
  1190
"/
b973832ffe15 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4124
diff changeset
  1191
"/ already in properties
b973832ffe15 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4124
diff changeset
  1192
"/
b973832ffe15 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4124
diff changeset
  1193
"/    s nextPutAll:'installDirectoryUnix'; tab.
b973832ffe15 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4124
diff changeset
  1194
"/    s nextPutLine:self installDirectoryUnix.
b973832ffe15 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4124
diff changeset
  1195
"/    s nextPutAll:'installDirectoryWin32'; tab.
b973832ffe15 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4124
diff changeset
  1196
"/    s nextPutLine:self installDirectoryWin32.
b973832ffe15 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4124
diff changeset
  1197
"/    s nextPutAll:'installDirectoryVMS'; tab.
b973832ffe15 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4124
diff changeset
  1198
"/    s nextPutLine:self installDirectoryVMS.
b973832ffe15 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4124
diff changeset
  1199
"/    s nextPutAll:'installDirectoryMacOS'; tab.
b973832ffe15 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4124
diff changeset
  1200
"/    s nextPutLine:self installDirectoryMacOS.
b973832ffe15 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4124
diff changeset
  1201
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1202
    s nextPutAll:'files'; tab.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1203
    coll := properties at:#'files' ifAbsent:#().
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1204
    s nextPutLine:'#( \'. 
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1205
    coll do:[:aFileEntry |
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1206
        s tab. s nextPutAll:(aFileEntry storeString); nextPutLine:' \'.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1207
    ].
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1208
    s nextPutLine:')'.
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1209
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1210
    "
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1211
     Project current saveOn:Transcript
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1212
    "
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1213
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1214
    "Modified: / 26.4.1999 / 23:24:12 / cg"
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1215
! !
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1216
2
claus
parents: 1
diff changeset
  1217
!Project methodsFor:'maintenance'!
claus
parents: 1
diff changeset
  1218
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1219
buildProject
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1220
    "invoke 'make' in the project directory"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1221
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1222
    OperatingSystem executeCommand:('cd ' , self directory , ' ; make')
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1223
!
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1224
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1225
createLoadAllFile
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1226
    "creates a 'loadAll' file, which will load all classes
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1227
     of the project - this loadAll file is supposed to be located
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1228
     in the projects source directory."
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1229
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1230
    |d f out in topName classes classInfo numBad firstBad msg|
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1231
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1232
    classes := self classes.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1233
    numBad := 0.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1234
    firstBad := nil.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1235
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1236
    classes := classes collect:[:clsOrSymbol |  |cls|
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1237
                                        clsOrSymbol isSymbol ifTrue:[
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1238
                                            cls := Smalltalk at:clsOrSymbol.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1239
                                            cls isNil ifTrue:[
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1240
                                                numBad := numBad + 1.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1241
                                                firstBad := firstBad ? clsOrSymbol.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1242
                                            ] ifFalse:[
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1243
                                                cls isLoaded ifFalse:[
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1244
                                                    cls autoLoad.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1245
                                                    cls isLoaded ifFalse:[
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1246
                                                        cls := nil
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1247
                                                    ]
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1248
                                                ].
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1249
                                            ].
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1250
                                            cls.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1251
                                        ] ifFalse:[
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1252
                                            clsOrSymbol
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1253
                                        ]
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1254
                              ].
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1255
    numBad ~~ 0 ifTrue:[
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1256
        msg := 'Cannot generate ''loadAll''-file.\\'.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1257
        msg := msg , 'Reason: Class ''' , firstBad asText allBold
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1258
                   , ''' is not loaded.'.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1259
        numBad ~~ 1 ifTrue:[
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1260
            msg := msg , '\(' , (numBad-1) printString , ' more unloaded classes were found)'
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1261
        ].
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1262
        self warn:msg withCRs.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1263
        ^ self.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1264
    ].
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1265
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1266
    classes := classes copy topologicalSort:[:a :b | b isSubclassOf:a].
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1267
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1268
    Transcript showCR:'creating loadAll file'.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1269
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1270
    d := directoryName asFilename.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1271
    f := d construct:'loadAll'.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1272
    f exists ifTrue:[
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1273
        f renameTo:(d construct:'loadAll.bak')
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1274
    ].
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1275
    out := f writeStream.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1276
    out isNil ifTrue:[
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1277
        self warn:'cannot create loadAll'.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1278
        (d construct:'loadAll.bak') renameTo:f.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1279
        ^ self
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1280
    ].
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1281
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1282
    out nextPutAll:'
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1283
|files|
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1284
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1285
files := #(
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1286
'.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1287
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1288
    classes do:[:cls |
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1289
         out nextPut:$'.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1290
         cls nameWithoutNameSpacePrefix printOn:out.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1291
         out nextPutAll:'.st'''.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1292
         out cr.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1293
    ].
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1294
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1295
    out nextPutAll:').
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1296
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1297
files do:[:s |
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1298
    ''.'' print.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1299
    Smalltalk fileIn:s.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1300
].
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1301
'' done'' printCR.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1302
'.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1303
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1304
    out close
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1305
!
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1306
2
claus
parents: 1
diff changeset
  1307
createMakefile
claus
parents: 1
diff changeset
  1308
    "creates an initial makefile, which will recreate a correct
claus
parents: 1
diff changeset
  1309
     Makefile, then compile all"
claus
parents: 1
diff changeset
  1310
362
claus
parents: 356
diff changeset
  1311
    |d f out in topName|
2
claus
parents: 1
diff changeset
  1312
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1313
    Transcript showCR:'creating Makefile'.
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1314
356
claus
parents: 338
diff changeset
  1315
    d := directoryName asFilename.
2
claus
parents: 1
diff changeset
  1316
    f := d construct:'Makefile'.
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1317
    f exists ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1318
        f renameTo:(d construct:'Makefile.bak')
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1319
    ].
2
claus
parents: 1
diff changeset
  1320
    out := f writeStream.
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1321
    out isNil ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1322
        self warn:'cannot create Makefile'.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1323
        ^ self
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1324
    ].
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1325
    in := Smalltalk systemFileStreamFor:'rules/stdHeader'.
2
claus
parents: 1
diff changeset
  1326
    out nextPutAll:in contents asString.
claus
parents: 1
diff changeset
  1327
    in close.
362
claus
parents: 356
diff changeset
  1328
claus
parents: 356
diff changeset
  1329
    topName := self findTopFrom:directoryName.
claus
parents: 356
diff changeset
  1330
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1331
    out nextPutAll:'#TOP=/usr/local/lib/smalltalk'; cr.
362
claus
parents: 356
diff changeset
  1332
    out nextPutAll:'TOP=' , topName; cr.
2
claus
parents: 1
diff changeset
  1333
    out nextPutAll:'target:'; cr.
claus
parents: 1
diff changeset
  1334
    out tab; nextPutAll:'touch Make.proto'; cr.
claus
parents: 1
diff changeset
  1335
    out tab; nextPutAll:'$(MAKE) Makefile'; cr.
claus
parents: 1
diff changeset
  1336
    out tab; nextPutAll:'make'; cr; cr.
claus
parents: 1
diff changeset
  1337
362
claus
parents: 356
diff changeset
  1338
    in := Smalltalk systemFileStreamFor:'configurations/COMMON/defines'.
claus
parents: 356
diff changeset
  1339
    out nextPutAll:in contents asString.
claus
parents: 356
diff changeset
  1340
    in close.
claus
parents: 356
diff changeset
  1341
claus
parents: 356
diff changeset
  1342
    in := Smalltalk systemFileStreamFor:'configurations/vendorConf'.
claus
parents: 356
diff changeset
  1343
    out nextPutAll:in contents asString.
claus
parents: 356
diff changeset
  1344
    in close.
claus
parents: 356
diff changeset
  1345
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1346
    in := Smalltalk systemFileStreamFor:'configurations/myConf'.
2
claus
parents: 1
diff changeset
  1347
    out nextPutAll:in contents asString.
claus
parents: 1
diff changeset
  1348
    in close.
362
claus
parents: 356
diff changeset
  1349
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1350
    in := Smalltalk systemFileStreamFor:'rules/stdRules'.
2
claus
parents: 1
diff changeset
  1351
    out nextPutAll:in contents asString.
claus
parents: 1
diff changeset
  1352
    in close.
claus
parents: 1
diff changeset
  1353
    out close
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1354
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1355
    "Modified: 18.5.1996 / 15:44:25 / cg"
2
claus
parents: 1
diff changeset
  1356
!
claus
parents: 1
diff changeset
  1357
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1358
createProjectFiles
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1359
    "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
  1360
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1361
    directoryName asFilename exists ifFalse:[
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1362
        (self confirm:'create new projectDirectory: ' , directoryName) 
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1363
            ifFalse:[^ self].
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1364
        OperatingSystem recursiveCreateDirectory:directoryName.
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1365
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1366
    self createMakefile.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1367
    self createSourcefiles.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1368
    self createProtoMakefile.
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1369
    (self propertyAt:#deliverLoadAllFile) == true ifTrue:[
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1370
        self createLoadAllFile
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1371
    ].
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1372
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1373
2
claus
parents: 1
diff changeset
  1374
createProtoMakefile
claus
parents: 1
diff changeset
  1375
    "creates a Make.proto file"
claus
parents: 1
diff changeset
  1376
362
claus
parents: 356
diff changeset
  1377
    |d f s type appName libName startUpClass startUpSelector
claus
parents: 356
diff changeset
  1378
     topName classes|
2
claus
parents: 1
diff changeset
  1379
362
claus
parents: 356
diff changeset
  1380
    topName := self findTopFrom:directoryName.
2
claus
parents: 1
diff changeset
  1381
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1382
    Transcript showCR:'creating Make.proto'.
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1383
356
claus
parents: 338
diff changeset
  1384
    d := directoryName asFilename.
2
claus
parents: 1
diff changeset
  1385
    f := d construct:'Make.proto'.
claus
parents: 1
diff changeset
  1386
    f exists ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1387
        f renameTo:(d construct:'Make.proto.bak')
2
claus
parents: 1
diff changeset
  1388
    ].
claus
parents: 1
diff changeset
  1389
    s := f writeStream.
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1390
    s isNil ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1391
        self warn:'cannot create prototype Makefile'.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1392
        ^ self
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1393
    ].
2
claus
parents: 1
diff changeset
  1394
    s nextPutAll:'#
362
claus
parents: 356
diff changeset
  1395
# ' , Smalltalk timeStamp , '
claus
parents: 356
diff changeset
  1396
#
235
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
  1397
# created by Smalltalks Project support
2
claus
parents: 1
diff changeset
  1398
#
362
claus
parents: 356
diff changeset
  1399
claus
parents: 356
diff changeset
  1400
claus
parents: 356
diff changeset
  1401
# the next line defines the path to the TOP directory,
claus
parents: 356
diff changeset
  1402
# (where the directories "configurations" and "include" are found)
claus
parents: 356
diff changeset
  1403
#
claus
parents: 356
diff changeset
  1404
#TOP=/usr/local/lib/smalltalk
claus
parents: 356
diff changeset
  1405
TOP=' , topName ,'
claus
parents: 356
diff changeset
  1406
claus
parents: 356
diff changeset
  1407
#
claus
parents: 356
diff changeset
  1408
# add any subdirectories that have to be visited by make
claus
parents: 356
diff changeset
  1409
#
claus
parents: 356
diff changeset
  1410
SUBDIRS=
claus
parents: 356
diff changeset
  1411
claus
parents: 356
diff changeset
  1412
#
claus
parents: 356
diff changeset
  1413
# do not change
claus
parents: 356
diff changeset
  1414
#
2
claus
parents: 1
diff changeset
  1415
SHELL=/bin/sh
claus
parents: 1
diff changeset
  1416
362
claus
parents: 356
diff changeset
  1417
'.
claus
parents: 356
diff changeset
  1418
claus
parents: 356
diff changeset
  1419
    s nextPutAll:'#
claus
parents: 356
diff changeset
  1420
# set the stc options
claus
parents: 356
diff changeset
  1421
#
claus
parents: 356
diff changeset
  1422
STCOPT=$(DEFAULT_STCOPT)
claus
parents: 356
diff changeset
  1423
# STCOPT=+optspace2
claus
parents: 356
diff changeset
  1424
# STCOPT=+optspace2 -warnNonStandard
claus
parents: 356
diff changeset
  1425
claus
parents: 356
diff changeset
  1426
#
claus
parents: 356
diff changeset
  1427
# and packageName option
claus
parents: 356
diff changeset
  1428
#
claus
parents: 356
diff changeset
  1429
STCLOCALOPT=''-Pprivate-classes-(libapp)''
2
claus
parents: 1
diff changeset
  1430
claus
parents: 1
diff changeset
  1431
'.
claus
parents: 1
diff changeset
  1432
356
claus
parents: 338
diff changeset
  1433
    type := #library.
claus
parents: 338
diff changeset
  1434
    appName := 'app'.
claus
parents: 338
diff changeset
  1435
    libName := 'lib'.
claus
parents: 338
diff changeset
  1436
    startUpClass := 'Smalltalk'.
claus
parents: 338
diff changeset
  1437
    startUpSelector := 'start'.
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1438
356
claus
parents: 338
diff changeset
  1439
    properties notNil ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1440
        type := properties at:#projectType ifAbsent:type.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1441
        appName := properties at:#applicationName ifAbsent:appName.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1442
        startUpClass := properties at:#startupClass ifAbsent:startUpClass.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1443
        startUpSelector := properties at:#startupSelector ifAbsent:startUpSelector.
356
claus
parents: 338
diff changeset
  1444
    ].
claus
parents: 338
diff changeset
  1445
362
claus
parents: 356
diff changeset
  1446
    s nextPutAll:'#
claus
parents: 356
diff changeset
  1447
# define the name of the library to create
claus
parents: 356
diff changeset
  1448
#
claus
parents: 356
diff changeset
  1449
'.
claus
parents: 356
diff changeset
  1450
    s nextPutAll:'LIBNAME=lib' , appName; cr; cr.
claus
parents: 356
diff changeset
  1451
claus
parents: 356
diff changeset
  1452
    s nextPutAll:'#
claus
parents: 356
diff changeset
  1453
# the target rule:
claus
parents: 356
diff changeset
  1454
#
claus
parents: 356
diff changeset
  1455
all::   abbrev.stc objs genClassList $(OBJTARGET)
claus
parents: 356
diff changeset
  1456
claus
parents: 356
diff changeset
  1457
'.
2
claus
parents: 1
diff changeset
  1458
claus
parents: 1
diff changeset
  1459
    type == #executable ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1460
        s nextPutAll:'PROGS = ' , appName; cr.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1461
        s nextPutAll:('STARTUP_CLASS=' , startUpClass); cr.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1462
        s nextPutAll:'STARTUP_SELECTOR="' , startUpSelector; nextPutAll:'"'; cr.
2
claus
parents: 1
diff changeset
  1463
    ].
claus
parents: 1
diff changeset
  1464
362
claus
parents: 356
diff changeset
  1465
    s nextPutAll:'#
claus
parents: 356
diff changeset
  1466
# define the object files that are to be created
claus
parents: 356
diff changeset
  1467
#
claus
parents: 356
diff changeset
  1468
'.
2
claus
parents: 1
diff changeset
  1469
    s nextPutAll:'OBJS='.
claus
parents: 1
diff changeset
  1470
362
claus
parents: 356
diff changeset
  1471
    (classes := self classes) notNil ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1472
        classes do:[:aClass |
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1473
            |abbrev|
362
claus
parents: 356
diff changeset
  1474
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1475
            s nextPutAll:' \'. s cr.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1476
            abbrev := Smalltalk fileNameForClass:aClass name.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1477
            s nextPutAll:'  '; nextPutAll:abbrev; nextPutAll:'.o'.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1478
        ].
2
claus
parents: 1
diff changeset
  1479
    ].
claus
parents: 1
diff changeset
  1480
    s cr; cr.
claus
parents: 1
diff changeset
  1481
362
claus
parents: 356
diff changeset
  1482
    s nextPutAll:'#
claus
parents: 356
diff changeset
  1483
# dependencies:
claus
parents: 356
diff changeset
  1484
#
claus
parents: 356
diff changeset
  1485
I=$(TOP)/include
claus
parents: 356
diff changeset
  1486
RT_STUFF=$(I)/Object.H $(I)/stc.h $(I)/stcIntern.h
claus
parents: 356
diff changeset
  1487
claus
parents: 356
diff changeset
  1488
'.
claus
parents: 356
diff changeset
  1489
    classes notNil ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1490
        classes do:[:aClass |
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1491
            |abbrev|
362
claus
parents: 356
diff changeset
  1492
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1493
            abbrev := Smalltalk fileNameForClass:aClass name.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1494
            s nextPutAll:abbrev; nextPutAll:'.o: '.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1495
            s nextPutAll:abbrev; nextPutAll:'.st '.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1496
            aClass allSuperclassesDo:[:superClass|
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1497
                s nextPutAll:'$(I)/'.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1498
                s nextPutAll:(Smalltalk fileNameForClass:superClass name) , '.H '.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1499
            ].
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1500
            s nextPutAll:'$(RT_STUFF)';  cr.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1501
        ].
362
claus
parents: 356
diff changeset
  1502
    ].
claus
parents: 356
diff changeset
  1503
    s cr; cr.
2
claus
parents: 1
diff changeset
  1504
claus
parents: 1
diff changeset
  1505
    type == #executable ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1506
        s nextPutAll:'all:: $(PROGS)'; cr.
2
claus
parents: 1
diff changeset
  1507
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1508
        s nextPutAll:appName.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1509
        s nextPutAll:':: main.o classList.o $(OBJS)'; cr.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1510
        s tab;      nextPutAll:'$(LD) $(ST_LDFLAG) $(LDFLAGS) -o ';
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1511
                    nextPutAll:appName;
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1512
                    nextPutAll:' \'; cr.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1513
        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
  1514
        s tab; tab; nextPutAll:'$(LIBRUNDIR)/hidata.o $(LIBRUN) \'; cr.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1515
        s tab; tab; nextPutAll:'$(MATHLIB) $(EXTRALIBS) -lXext $(SYSLIBS) $(OTHERLIBS) $(CRTN)'; cr.
2
claus
parents: 1
diff changeset
  1516
    ].
claus
parents: 1
diff changeset
  1517
claus
parents: 1
diff changeset
  1518
    s close
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1519
4069
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  1520
    "Modified: / 23.3.1999 / 14:20:09 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1521
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1522
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1523
createSourcefiles
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1524
    "creates all Smalltalk-source files in the project directory"
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1525
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1526
    |classes methods methodClasses dir stream|
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1527
2956
952a09bdeed1 Use Filename instead of obsolete FileDirectory
Stefan Vogel <sv@exept.de>
parents: 2907
diff changeset
  1528
    dir := self directory asFilename.
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1529
    Transcript showCR:'creating sources in ' , dir pathName , ' ...'; endEntry.
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1530
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1531
    classes := self classes.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1532
    classes isNil ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1533
        self warn:'no classes in current project'
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1534
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1535
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1536
    classes notNil ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1537
        classes do:[:aClass |
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1538
            aClass isLoaded ifFalse:[
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1539
                aClass autoload.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1540
            ].
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1541
        ].
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1542
        classes := classes topologicalSort:[:a :b | a isSubclassOf:b].
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1543
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1544
        classes do:[:aClass |
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1545
            Transcript show:' ... '; showCR:aClass name, '.st'; endEntry.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1546
            aClass fileOutIn:dir
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1547
        ]
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1548
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1549
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1550
    methods := self individualMethods.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1551
    methods notNil ifTrue:[
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1552
        methods := methods asIdentitySet.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1553
        "
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1554
         get classes ...
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1555
        "
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1556
        methodClasses := IdentitySet new.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1557
        methods do:[:m | 
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1558
                        |mCls|
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1559
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
  1560
                        mCls := m containingClass.
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1561
                        mCls isMeta ifTrue:[
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1562
                            mCls := mCls soleInstance.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1563
                        ].
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1564
                        methodClasses add:mCls].
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1565
        "
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1566
         fileOut by class
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1567
        "
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1568
        methodClasses do:[:cls |
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1569
            stream := (self directory asFilename construct:(cls name , '.chg')) writeStream.
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1570
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1571
            Transcript show:' ... '; showCR:cls name, '.chg'; endEntry.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1572
            methods do:[:m |
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1573
                |mCls|
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1574
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
  1575
                mCls := m containingClass.
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1576
                (mCls == cls or:[mCls == cls class]) ifTrue:[
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1577
                    mCls fileOutMethod:m on:stream.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1578
                ].
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1579
                stream cr.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1580
            ].
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1581
            stream close.
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1582
        ].
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1583
    ].
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  1584
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
  1585
    "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
  1586
    "Modified: 18.9.1997 / 18:50:34 / stefan"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1587
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1588
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1589
findTopFrom:directoryName
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1590
    "returns the relative path from directoryName to the TOP
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1591
     directory."
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1592
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1593
    |topName relParent foundTop|
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1594
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1595
    "/ find TOP
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1596
    relParent := '..'.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1597
    foundTop := false.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1598
    [foundTop] whileFalse:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1599
	topName := directoryName , '/' , relParent.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1600
	topName asFilename pathName = '/' ifTrue:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1601
	    self warn:'could not find TOP; assume absoulte path to TOP'.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1602
	    topName := '/usr/local/lib/smalltalk'.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1603
	    foundTop := true.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1604
	] ifFalse:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1605
	    (topName , '/configurations') asFilename exists ifTrue:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1606
		(topName , '/include') asFilename exists ifTrue:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1607
		    foundTop := true.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1608
		    topName := relParent.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1609
		]
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1610
	    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1611
	    foundTop ifFalse:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1612
		relParent := relParent , '/..'.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1613
	    ]        
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1614
	]
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1615
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1616
    ^ topName
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1617
! !
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1618
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1619
!Project methodsFor:'printing & storing'!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1620
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1621
displayString
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1622
    ^ super displayString , '(''' , (name ? '<unnamed>') , ''')'
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1623
! !
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1624
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1625
!Project methodsFor:'properties'!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1626
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1627
addClass:classOrClassName classFileName:fileName
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1628
    "add a class to the project"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1629
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1630
    self
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1631
        addClass:classOrClassName 
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1632
        conditionForInclusion:#always 
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1633
        classFileName:fileName
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1634
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1635
!
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1636
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1637
addClass:classOrClassName conditionForInclusion:conditionBlock classFileName:fileName
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1638
    "add a class to the project"
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1639
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1640
    |i|
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1641
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1642
    i := ClassInfo new.
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1643
    i className:classOrClassName.
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1644
    i classFileName:fileName.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1645
    i conditionForInclusion:conditionBlock.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1646
    self addClassInfo:i
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1647
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1648
4089
abcd3430bb9c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  1649
addClassInfo:newInfo
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1650
    "add a class info to the project"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1651
4315
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1652
    |infoCollection index nm prefix|
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1653
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1654
    (infoCollection := self classInfo) isNil ifTrue:[
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1655
        self classInfo:(infoCollection := OrderedCollection new).
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1656
    ].
4315
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1657
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1658
    index := infoCollection findFirst:[:i | |nm1 nm2|
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1659
                                        nm1 := i className.
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1660
                                        nm2 := newInfo className.
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1661
                                        (nm1 includes:$:) ifFalse:[
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1662
                                            nm1 := self defaultNameSpace name , '::' , nm1
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1663
                                        ].
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1664
                                        (nm2 includes:$:) ifFalse:[
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1665
                                            nm2 := self defaultNameSpace name , '::' , nm2
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1666
                                        ].
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1667
                                        nm1 = nm2
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1668
                                      ].
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1669
    "/ strip off nameSpace prefix, if its the same as
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1670
    "/ the default ...
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1671
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1672
    nm := newInfo className.
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1673
    prefix := self defaultNameSpace name , '::'.
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1674
    (nm startsWith:prefix) ifTrue:[
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1675
        nm := nm copyFrom:(prefix size + 1).
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1676
        newInfo className:nm asSymbol.
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  1677
    ].
4089
abcd3430bb9c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  1678
    index ~~ 0 ifTrue:[
abcd3430bb9c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  1679
        infoCollection at:index put:newInfo
abcd3430bb9c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  1680
    ] ifFalse:[
abcd3430bb9c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  1681
        infoCollection add:newInfo
abcd3430bb9c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  1682
    ]
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1683
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1684
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  1685
addMethod:methodOrSelector inClass:aClassOrClassName fileName:fileName
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  1686
    "add an individual method to the project"
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  1687
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  1688
    |i|
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  1689
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  1690
    i := MethodInfo new.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  1691
    i methodName:methodOrSelector.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  1692
    i className:aClassOrClassName.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  1693
    i fileName:fileName.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  1694
    self addMethodInfo:i
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  1695
!
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  1696
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1697
classInfo:aClassInfoCollection
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1698
    "set the class info of the project"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1699
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1700
    self propertyAt:#classInfo put:aClassInfoCollection
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1701
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1702
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1703
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1704
comment
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1705
    "return the comment of the project"
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1706
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1707
    properties isNil ifTrue:[^ ''].
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1708
    ^ properties at:#comment ifAbsent:''
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1709
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1710
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1711
comment:aString
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1712
    "set the projects comment"
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1713
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1714
    self propertyAt:#comment put:aString
4070
682f720cd0f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4069
diff changeset
  1715
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1716
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1717
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1718
documentationURL
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1719
    "return the documentation-URL of the project"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1720
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1721
    properties isNil ifTrue:[^ nil].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1722
    ^ properties at:#documentationURL ifAbsent:nil
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1723
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1724
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1725
documentationURL:anURLString
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1726
    "set the projects documentation-URL"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1727
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1728
    self propertyAt:#documentationURL put:anURLString
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1729
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1730
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1731
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1732
properties
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1733
    "return the property dictionary"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1734
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1735
    ^ properties
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1736
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1737
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1738
properties:p
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1739
    "set the property dictionary"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1740
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1741
    properties := p
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1742
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1743
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1744
propertyAt:aKey
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1745
    "return a property; the key is a symbol"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1746
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1747
    properties isNil ifTrue:[^ nil].
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1748
    ^ properties at:aKey ifAbsent:nil.
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1749
!
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1750
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1751
propertyAt:aKey put:aValue
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1752
    "set a property; the key is a symbol"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1753
4077
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  1754
    |oldValue|
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  1755
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  1756
    oldValue := self propertyAt:aKey.
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  1757
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1758
    properties isNil ifTrue:[
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1759
        properties := IdentityDictionary new
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1760
    ].
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1761
    properties at:aKey put:aValue.
4077
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  1762
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  1763
    oldValue ~~ aValue ifTrue:[
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  1764
        self changed:aKey.
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  1765
    ].
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1766
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1767
    "Created: / 23.3.1999 / 14:21:11 / cg"
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1768
!
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1769
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1770
type
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1771
    "return the type of project (one of #application, #library, #smalltalk)"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1772
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1773
    properties isNil ifTrue:[^ #application].
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1774
    ^ properties at:#type ifAbsent:#application
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1775
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1776
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1777
type:aSymbol
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1778
    "set the projects type (one of #application, #library, #smalltalk)"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1779
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1780
    (#(application library smalltalk) includes:aSymbol) ifFalse:[
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1781
        self warn:'invalid project type'.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1782
        ^ self
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1783
    ].
4077
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  1784
    self propertyAt:#type put:aSymbol
4069
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  1785
!
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  1786
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  1787
wasLoadedFromFile
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  1788
    "return true, if the project was loaded from a file"
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  1789
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  1790
    properties isNil ifTrue:[^ nil].
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  1791
    ^ properties at:#wasLoadedFromFile ifAbsent:false
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  1792
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  1793
    "Modified: / 23.3.1999 / 13:59:32 / cg"
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  1794
    "Created: / 23.3.1999 / 14:21:06 / cg"
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  1795
!
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  1796
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  1797
wasLoadedFromFile:aBoolean
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1798
    "set/clear the flag stating that the project was loaded from a file"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1799
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1800
    self propertyAt:#wasLoadedFromFile put:aBoolean
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1801
! !
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1802
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1803
!Project methodsFor:'queries'!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1804
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1805
classInfo
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1806
    "return a classInfo collection of classes belonging to that project"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1807
4073
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  1808
    |classInfo classes|
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1809
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1810
    properties notNil ifTrue:[
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1811
        classInfo := properties at:#classInfo ifAbsent:nil.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1812
        classInfo notNil ifTrue:[^ classInfo].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1813
    ].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1814
4073
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  1815
    classes := self classes.
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  1816
    classes size == 0 ifTrue:[
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  1817
        classInfo := OrderedCollection new
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  1818
    ] ifFalse:[
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  1819
        classInfo := classes asOrderedCollection
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  1820
                        collect:[:class |
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  1821
                            |i fn|
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1822
4073
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  1823
                            i := ClassInfo new.
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  1824
                            i conditionForInclusion:#always.
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  1825
                            i className:class name.
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  1826
                            fn := class classFilename ? ((Smalltalk fileNameForClass:class) , '.st').
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  1827
                            i classFileName:fn.
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  1828
                            i
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  1829
                        ]
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  1830
    ].
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  1831
    self propertyAt:#classInfo put:classInfo.
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  1832
    ^ classInfo
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1833
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1834
    "Modified: 4.1.1997 / 16:51:18 / cg"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1835
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1836
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1837
classes
4013
f06d31702f2a ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents: 4010
diff changeset
  1838
    "return a collection of classes belonging to that project.
f06d31702f2a ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents: 4010
diff changeset
  1839
     This excludes any private classes."
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1840
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1841
    |classes classInfo|
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1842
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1843
    properties notNil ifTrue:[
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1844
        classInfo := properties at:#classInfo ifAbsent:nil.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1845
        classInfo notNil ifTrue:[
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1846
            classes := classInfo collect:[:i | i className]
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1847
        ] ifFalse:[
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1848
            classes := properties at:#classes ifAbsent:nil
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1849
        ]
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1850
    ].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1851
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1852
    classes isNil ifTrue:[
2056
1beb5756e9e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2034
diff changeset
  1853
        classes := OrderedCollection new.
1beb5756e9e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2034
diff changeset
  1854
        Smalltalk 
4013
f06d31702f2a ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents: 4010
diff changeset
  1855
            allClassesDo:[:aClass |
4670
21eec331e1e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4668
diff changeset
  1856
                (true "aClass owningClass isNil"
4089
abcd3430bb9c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  1857
                and:[aClass isMeta not
4670
21eec331e1e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4668
diff changeset
  1858
                and:[aClass package = packageName
21eec331e1e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4668
diff changeset
  1859
                and:[aClass isNamespace not or:[aClass == Smalltalk]]]]) ifTrue:[
4089
abcd3430bb9c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  1860
                    classes add:aClass
2056
1beb5756e9e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2034
diff changeset
  1861
                ]
1beb5756e9e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2034
diff changeset
  1862
            ].
1beb5756e9e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2034
diff changeset
  1863
        classes isEmpty ifTrue:[^ nil].
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1864
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1865
    ^ classes
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1866
2056
1beb5756e9e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2034
diff changeset
  1867
    "Modified: 4.1.1997 / 16:51:18 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1868
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1869
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1870
individualMethods
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1871
    "return a collection of individual methods belonging to that project,
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1872
     only methods are returned which are not contained in the
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1873
     projects class set."
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1874
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1875
    |classes methods|
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1876
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1877
    classes := self classes.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1878
    classes notNil ifTrue:[
1461
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1879
        classes := classes asIdentitySet.
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1880
    ] ifFalse:[
1461
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1881
        classes := #()
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1882
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1883
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1884
    methods := IdentitySet new.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1885
    Smalltalk allBehaviorsDo:[:cls |
4119
ffdbfb5ffad8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  1886
        |classToCheck|
ffdbfb5ffad8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  1887
ffdbfb5ffad8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  1888
        classToCheck := cls.
4670
21eec331e1e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4668
diff changeset
  1889
"/        cls isPrivate ifTrue:[
21eec331e1e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4668
diff changeset
  1890
"/            classToCheck := cls topOwningClass
21eec331e1e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4668
diff changeset
  1891
"/        ].
4119
ffdbfb5ffad8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  1892
        (classes isNil 
ffdbfb5ffad8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  1893
        or:[((classes includes:classToCheck) 
ffdbfb5ffad8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  1894
            or:[classes includes:classToCheck name]) not]) ifTrue:[
1461
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1895
            cls methodDictionary do:[:m |
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1896
                m package = packageName ifTrue:[
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1897
                    methods add:m
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1898
                ]
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1899
            ].
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1900
            cls class methodDictionary do:[:m |
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1901
                m package = packageName ifTrue:[
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1902
                    methods add:m
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1903
                ]
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1904
            ].
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1905
        ]
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1906
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1907
    ^ methods asArray
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1908
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1909
    "
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1910
     Project current classes
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1911
     Project current individualMethods
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1912
    "
1461
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1913
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  1914
    "Modified: 7.6.1996 / 09:16:25 / stefan"
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1915
!
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1916
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1917
isLoaded
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1918
    "return true, if all of this project-package has been loaded
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1919
     into the system"
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1920
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1921
    |binaryModule|
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1922
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1923
    isLoaded notNil ifTrue:[^ isLoaded].
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1924
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1925
    "/ check for loaded class-libraries.
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1926
    binaryModule := ObjectMemory binaryModuleInfo detect:[:i | i package = self package] ifNone:nil.
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1927
    binaryModule notNil ifTrue:[
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1928
        ^ true
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1929
    ].
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1930
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1931
    self halt.
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1932
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1933
    "
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1934
     (Project projectWithId:#'stx:libbasic') isLoaded
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1935
     (Project projectWithId:#'stx:goodies/persistency') isLoaded 
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1936
    "
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  1937
2
claus
parents: 1
diff changeset
  1938
! !
claus
parents: 1
diff changeset
  1939
claus
parents: 1
diff changeset
  1940
!Project methodsFor:'specifications'!
claus
parents: 1
diff changeset
  1941
claus
parents: 1
diff changeset
  1942
readSpec
claus
parents: 1
diff changeset
  1943
    |s chunk fileName|
claus
parents: 1
diff changeset
  1944
claus
parents: 1
diff changeset
  1945
    fileName := (properties at:#directoryName) asFilename construct:'.project'.
claus
parents: 1
diff changeset
  1946
    s := fileName readStream.
claus
parents: 1
diff changeset
  1947
    s isNil ifTrue:[^ self].
claus
parents: 1
diff changeset
  1948
    [s atEnd] whileFalse:[
203
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
  1949
	chunk := s nextChunk.
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
  1950
	Compiler evaluate:chunk receiver:properties notifying:nil
2
claus
parents: 1
diff changeset
  1951
    ].
claus
parents: 1
diff changeset
  1952
    s close.
claus
parents: 1
diff changeset
  1953
claus
parents: 1
diff changeset
  1954
    "(Project new directory:'../projects/Clock') readSpec"
claus
parents: 1
diff changeset
  1955
!
claus
parents: 1
diff changeset
  1956
claus
parents: 1
diff changeset
  1957
saveSpec
claus
parents: 1
diff changeset
  1958
    |f d s|
claus
parents: 1
diff changeset
  1959
claus
parents: 1
diff changeset
  1960
    d := (properties at:#directoryName) asFilename.
claus
parents: 1
diff changeset
  1961
    d exists ifFalse:[
4522
29a6625dc7b1 error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 4315
diff changeset
  1962
        self error:'directory does not exist' mayProceed:true.
29a6625dc7b1 error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 4315
diff changeset
  1963
        ^ self
2
claus
parents: 1
diff changeset
  1964
    ].
claus
parents: 1
diff changeset
  1965
    f := d construct:'.project'.
claus
parents: 1
diff changeset
  1966
    s := f writeStream.
claus
parents: 1
diff changeset
  1967
    s isNil ifTrue:[^ self].
claus
parents: 1
diff changeset
  1968
    properties associationsDo:[:aProp |
4522
29a6625dc7b1 error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 4315
diff changeset
  1969
        (aProp == #directoryName) ifFalse:[
29a6625dc7b1 error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 4315
diff changeset
  1970
            s nextChunkPut:('self at:' , aProp key storeString, 
29a6625dc7b1 error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 4315
diff changeset
  1971
                               ' put:' , aProp value storeString).
29a6625dc7b1 error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 4315
diff changeset
  1972
            s cr
29a6625dc7b1 error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 4315
diff changeset
  1973
        ]
2
claus
parents: 1
diff changeset
  1974
    ].
claus
parents: 1
diff changeset
  1975
    s close
claus
parents: 1
diff changeset
  1976
claus
parents: 1
diff changeset
  1977
    "((Project new directory:'../projects/Clock') readSpec
4522
29a6625dc7b1 error: vs. error:mayProceed:
Claus Gittinger <cg@exept.de>
parents: 4315
diff changeset
  1978
         directory:'../projects/xxx') saveSpec"
2
claus
parents: 1
diff changeset
  1979
! !
claus
parents: 1
diff changeset
  1980
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1981
!Project methodsFor:'views'!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1982
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1983
addView:aView
2164
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1984
    "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
  1985
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1986
    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
  1987
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1988
    "Modified: 14.2.1997 / 15:36:51 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1989
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1990
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1991
destroyViews
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1992
    "destroy all views of this project"
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1993
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1994
    views notNil ifTrue:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1995
	views do:[:aView |
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1996
	    aView notNil ifTrue:[aView destroy]
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1997
	]
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1998
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  1999
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2000
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2001
hideViews
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2002
    "hide all views of this project"
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2003
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2004
    views notNil ifTrue:[
1332
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  2005
        views do:[:aView |
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  2006
            aView notNil ifTrue:[aView unmap]
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  2007
        ]
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2008
    ].
1332
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  2009
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  2010
    "Modified: 3.5.1996 / 23:48:51 / stefan"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2011
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2012
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2013
removeView:aView
2164
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  2014
    "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
  2015
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2016
    views notNil ifTrue:[
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2017
        views remove:aView ifAbsent:nil
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2018
    ]
2164
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  2019
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  2020
    "Modified: 14.2.1997 / 15:37:20 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2021
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2022
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2023
showViews
2164
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  2024
    "show all views of this project"
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  2025
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2026
    views notNil ifTrue:[
1332
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  2027
        views do:[:aView |
2164
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  2028
            aView notNil ifTrue:[aView remap]
1332
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  2029
        ]
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2030
    ].
1332
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  2031
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  2032
    "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
  2033
    "Modified: 14.2.1997 / 15:38:47 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2034
! !
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2035
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2036
!Project::MethodInfo methodsFor:'accessing'!
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2037
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2038
className
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2039
    "return the value of the instance variable 'className' (automatically generated)"
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2040
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2041
    ^ className!
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2042
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2043
className:something
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2044
    "set the value of the instance variable 'className' (automatically generated)"
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2045
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2046
    className := something.!
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2047
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2048
fileName
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2049
    "return the value of the instance variable 'fileName' (automatically generated)"
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2050
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2051
    ^ fileName!
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2052
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2053
fileName:something
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2054
    "set the value of the instance variable 'fileName' (automatically generated)"
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2055
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2056
    fileName := something.!
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2057
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2058
methodName
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2059
    "return the value of the instance variable 'methodName' (automatically generated)"
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2060
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2061
    ^ methodName!
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2062
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2063
methodName:something
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2064
    "set the value of the instance variable 'methodName' (automatically generated)"
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2065
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2066
    methodName := something.! !
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2067
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2068
!Project::ClassInfo methodsFor:'accessing'!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2069
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2070
classFileName
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2071
    "return the value of the instance variable 'classFileName' (automatically generated)"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2072
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2073
    ^ classFileName!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2074
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2075
classFileName:something
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2076
    "set the value of the instance variable 'classFileName' (automatically generated)"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2077
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2078
    classFileName := something.!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2079
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2080
className
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2081
    "return the value of the instance variable 'className' (automatically generated)"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2082
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2083
    ^ className!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2084
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2085
className:something
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2086
    "set the value of the instance variable 'className' (automatically generated)"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2087
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2088
    className := something.!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2089
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2090
conditionForInclusion
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2091
    "return the value of the instance variable 'conditionForInclusion' (automatically generated)"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2092
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2093
    ^ conditionForInclusion!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2094
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2095
conditionForInclusion:something
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2096
    "set the value of the instance variable 'conditionForInclusion' (automatically generated)"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2097
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2098
    conditionForInclusion := something.! !
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2099
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
  2100
!Project class methodsFor:'documentation'!
630
b785d23d7c5b version at the end
Claus Gittinger <cg@exept.de>
parents: 617
diff changeset
  2101
b785d23d7c5b version at the end
Claus Gittinger <cg@exept.de>
parents: 617
diff changeset
  2102
version
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  2103
    ^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.87 1999-09-06 14:58:20 cg Exp $'
1298
23d0ba91c9be documentation
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
  2104
! !
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
  2105
Project initialize!