Project.st
author Claus Gittinger <cg@exept.de>
Wed, 13 Oct 1999 17:04:18 +0200
changeset 4909 bc474f9c0180
parent 4900 7371c0da8359
child 4912 43182d65eaf2
permissions -rw-r--r--
checkin from browser
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
89
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
     1
"
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
     2
 COPYRIGHT (c) 1993 by Claus Gittinger
203
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
     3
	      All Rights Reserved
89
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
     4
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
     5
 This software is furnished under a license and may be used
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
     6
 only in accordance with the terms of that license and with the
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
     8
 be provided or otherwise made available to, or used by, any
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
     9
 other person.  No title to or ownership of the software is
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    10
 hereby transferred.
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    11
"
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    12
a27a279701f8 Initial revision
claus
parents:
diff changeset
    13
Object subclass:#Project
939
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
    14
	instanceVariableNames:'name changeSet views directoryName properties packageName
4726
5c5e1c7f8933 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4721
diff changeset
    15
		repositoryDirectory repositoryModule overwrittenMethods
5c5e1c7f8933 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4721
diff changeset
    16
		subProjects prerequisites isLoaded'
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
    17
	classVariableNames:'CurrentProject SystemProject NextSequential AllProjects
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
    18
		LoadedProjects'
939
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
    19
	poolDictionaries:''
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
    20
	category:'System-Support'
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    21
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
    22
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
    23
Object subclass:#ClassInfo
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
    24
	instanceVariableNames:'conditionForInclusion className classFileName'
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
    25
	classVariableNames:''
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
    26
	poolDictionaries:''
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
    27
	privateIn:Project
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
    28
!
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
    29
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
    30
Object subclass:#MethodInfo
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
    31
	instanceVariableNames:'conditionForInclusion methodName className fileName'
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
    32
	classVariableNames:''
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
    33
	poolDictionaries:''
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
    34
	privateIn:Project
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
    35
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
    36
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
    37
!Project class methodsFor:'documentation'!
89
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    38
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    39
copyright
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    40
"
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    41
 COPYRIGHT (c) 1993 by Claus Gittinger
203
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
    42
	      All Rights Reserved
89
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    43
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    44
 This software is furnished under a license and may be used
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    45
 only in accordance with the terms of that license and with the
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    46
 inclusion of the above copyright notice.   This software may not
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    47
 be provided or otherwise made available to, or used by, any
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    48
 other person.  No title to or ownership of the software is
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    49
 hereby transferred.
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    50
"
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
documentation
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    54
"
338
claus
parents: 336
diff changeset
    55
    this class is still under construction (especially the build features are unfinished).
235
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
    56
    Currently, all it does is keep track of per-project views 
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
    57
    (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
    58
    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
    59
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
    60
    instance variables:
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    61
	name            <String>        the name of this project, as shown
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    62
					in a ProjectView
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    63
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    64
	changeSet       <ChangeSet>     changes done, while this was the active project
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    65
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    66
	views           <Collection>    views opened while this was the active project
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    67
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    68
	directoryName   <String>        directory name, where fileOuts are done
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    69
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    70
	properties 
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    71
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    72
	packageName     <String>        given to classes/methods which are created while
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    73
					this is the active project
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    74
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    75
	repositoryDirectory             (default) name of the repository, when a new source containers are
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    76
					created.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    77
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    78
	repositoryModule                (default) name of the module, when new source containers are
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    79
					created.
235
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
    80
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
    81
    Future: 
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    82
	- keep track of per-project changes
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    83
	- allow speficiation of the type of the project (application or library)
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    84
	- allow building of whatever the target (as defined by the type) is
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    85
	  (this will allow build of class libs and apps by clicking a button)
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    86
	- allow removal of project specific classes, methods etc.
1286
4270a0b4917d documentation
Claus Gittinger <cg@exept.de>
parents: 1115
diff changeset
    87
4270a0b4917d documentation
Claus Gittinger <cg@exept.de>
parents: 1115
diff changeset
    88
    [author:]
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
    89
	Claus Gittinger
89
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    90
"
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    91
! !
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    92
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
    93
!Project class methodsFor:'initialization'!
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
    94
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
    95
initKnownProjects
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
    96
    "this is a temporary experimental kludge -
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
    97
     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
    98
     '.prj' files ..."
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
    99
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   100
    "/ collect project info while scanning all classes
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   101
    "/ and methods ...
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   102
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   103
    |packages anyUnloaded|
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   104
4747
b642ad29477a scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents: 4743
diff changeset
   105
    packages := Dictionary new.
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   106
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   107
    AllProjects isNil ifTrue:[
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   108
        AllProjects := OrderedCollection new.
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   109
    ] ifFalse:[
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   110
        AllProjects do:[:p | packages at:p package asSymbol put:p].
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   111
    ].
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   112
    Smalltalk allClassesDo:[:aClass |
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   113
        |packageID prj classFilename pkgInfo revInfo 
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   114
         repositoryPath dir module lib nm|
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   115
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   116
        aClass isMeta ifFalse:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   117
            (aClass isNamespace not or:[aClass == Smalltalk]) ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   118
                (Smalltalk at:aClass name) == aClass ifFalse:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   119
                    Transcript showCR:'skipping obsolete/removed class: ' , aClass name.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   120
                ] ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   121
                    packageID := aClass package asSymbol.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   122
                    (packages includesKey:packageID) ifFalse:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   123
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   124
                        "/ a new one ...
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   125
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   126
                        prj := self new.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   127
                        prj package:packageID.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   128
                        prj directory:'???'.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   129
                        prj repositoryModule:'unknown'.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   130
                        prj repositoryDirectory:'unknown'.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   131
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   132
                        nm := 'unknown'.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   133
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   134
                        pkgInfo := aClass packageSourceCodeInfo.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   135
                        pkgInfo notNil ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   136
                            module := pkgInfo at:#module ifAbsent:nil.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   137
                            module notNil ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   138
                                prj repositoryModule:module    
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   139
                            ].
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   140
                            dir := pkgInfo at:#directory ifAbsent:nil.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   141
                            dir notNil ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   142
                                prj repositoryDirectory:dir    
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   143
                            ].
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   144
                            lib := pkgInfo at:#library ifAbsent:nil.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   145
                            lib notNil ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   146
                                prj type:#library.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   147
                            ].
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   148
                            prj isLoaded:true.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   149
                        ].
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   150
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   151
                        nm := (module ? 'unknown')
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   152
                              , ':'
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   153
                              , (dir ? (lib ? 'unknown')).
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   154
                            
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   155
                        prj name:nm.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   156
                        AllProjects add:prj.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   157
                        packages at:packageID put:prj.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   158
                    ] ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   159
                        prj := packages at:packageID.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   160
                        prj addClass:aClass.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   161
                    ].
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   162
                ].
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   163
            ].
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   164
        ].
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   165
    ].
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   166
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   167
    Method allSubInstancesDo:[:aMethod |
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   168
        |packageID prj who mthdClass|
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   169
4887
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
   170
        who := aMethod who.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
   171
        who notNil ifTrue:[ "/ skip unbound methods ...
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
   172
            packageID := aMethod package asSymbol.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
   173
            (packages includesKey:packageID) ifFalse:[
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   174
                "/ a new one ...
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   175
                prj := self new.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   176
        "/            prj name:libName.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   177
                prj package:packageID.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   178
                prj type:#library.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   179
                prj directory:'???'.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   180
                prj repositoryModule:'stx'.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   181
                prj repositoryDirectory:'???'.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   182
                prj isLoaded:true.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   183
                AllProjects add:prj.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   184
                packages at:packageID put:prj.
4887
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
   185
            ] ifTrue:[
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
   186
                "/ see if the methods class is in the project;
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
   187
                "/ if so, remove any patch-entry for this method.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
   188
                prj := packages at:packageID.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
   189
                ((prj classes includes:who methodClass)
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
   190
                or:[prj classes includes:who methodClass name]) ifTrue:[
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
   191
                    prj removeMethod:aMethod.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
   192
                ]
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   193
            ]
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   194
        ]
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   195
    ].
4747
b642ad29477a scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents: 4743
diff changeset
   196
b642ad29477a scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents: 4743
diff changeset
   197
    "/ walk over binary modules, to find out directory names ...
b642ad29477a scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents: 4743
diff changeset
   198
b642ad29477a scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents: 4743
diff changeset
   199
    ObjectFileLoader loadedObjectHandles do:[:h |
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   200
        |cls prj mDir|
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   201
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   202
        cls := h classes firstIfEmpty:nil.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   203
        cls notNil ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   204
            prj := packages at:cls package ifAbsent:nil.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   205
            prj notNil ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   206
                mDir := h pathName asFilename directory pathName.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   207
                prj directory = '???' ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   208
                    prj directory:mDir
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   209
                ] ifFalse:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   210
                    prj directory ~= mDir ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   211
                        ('Project [warning]: conflicting project directories for ' , cls package) infoPrintCR.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   212
                    ]
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   213
                ]
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   214
            ]
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   215
        ].
4747
b642ad29477a scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents: 4743
diff changeset
   216
    ].
b642ad29477a scan loaded modules for directory-ames
Claus Gittinger <cg@exept.de>
parents: 4743
diff changeset
   217
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   218
    self changed:#allProjects
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   219
4066
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   220
"/    |stx p|
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
"/    stx := self new name:'stx'.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   223
"/    stx packageName:'noPackage'.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   224
"/    stx changeSet:nil.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   225
"/    stx type:#smalltalk.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   226
"/    stx comment:'The ST/X project itself'.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   227
"/
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   228
"/    AllProjects add:stx.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   229
"/
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   230
"/    #(
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   231
"/        ('libbasic'      #'stx:libbasic'            'Basic (non-GUI) classes. Required for all applications')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   232
"/        ('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
   233
"/        ('libbasic3'     #'stx:libbasic3'           'More basic (non-GUI) classes. Required for development')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   234
"/        ('libcomp'       #'stx:libcomp'             'The bytecode compiler. Required for all applications')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   235
"/        ('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
   236
"/        ('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
   237
"/        ('libwidg'       #'stx:libwidg'             'Basic widgets. Required for all GUI applications')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   238
"/        ('libwidg2'      #'stx:libwidg2'            'More widgets. Required for most GUI applications')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   239
"/        ('libwidg3'      #'stx:libwidg3'            'More (fun) widgets. Seldom required')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   240
"/        ('libtool'       #'stx:libtool'             'Development applications. Required for program development')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   241
"/        ('libtool2'      #'stx:libtool2'            'More development applications. Required for GUI development')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   242
"/        ('libui'         #'stx:libui'               'UI spec classes. Required for UIPainter applications')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   243
"/        ('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
   244
"/        ('libodbc'       #'stx:libodbc'             'ODBC interface classes.')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   245
"/        ('libopengl'     #'stx:libopengl'           'OpenGL interface classes.')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   246
"/        ('persistency'   #'stx:goodies/persistency' 'Simple DB interface')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   247
"/        ('goodies'       #'stx:goodies'             'Misc goodies - not really maintained')
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   248
"/    ) do:[:entry |
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   249
"/        |libName package comment|
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   250
"/
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   251
"/        libName := entry at:1.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   252
"/        package := entry at:2.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   253
"/        comment := entry at:3.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   254
"/
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   255
"/        p := self new name:libName.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   256
"/        p packageName:package.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   257
"/        p type:#library.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   258
"/        p comment:comment.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   259
"/        stx addSubProject:p.
74e64b5cedce checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4013
diff changeset
   260
"/    ].
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   261
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   262
    "
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   263
     AllProjects := nil.
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   264
     self initKnownProjects
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   265
    "
4069
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
   266
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
   267
    "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
   268
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   269
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   270
initialize
338
claus
parents: 336
diff changeset
   271
    SystemProject isNil ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   272
	NextSequential := 1.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   273
	SystemProject := self new name:'default'.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   274
	SystemProject package:'private'.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   275
	SystemProject defaultNameSpace:Smalltalk.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   276
	SystemProject comment:'A default (dummy) project. 
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   277
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
   278
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   279
	"
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   280
	 the SystemProject does not keep a record if changes,
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   281
	 but instead depends on the changes file - recording anything there.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   282
	"
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   283
	SystemProject changeSet:nil.
338
claus
parents: 336
diff changeset
   284
    ].
claus
parents: 336
diff changeset
   285
claus
parents: 336
diff changeset
   286
    CurrentProject := SystemProject.
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   287
    AllProjects := nil.
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   288
"/ now done lazy ...
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   289
"/    self initKnownProjects.
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   290
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   291
    "
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   292
     SystemProject := nil.
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   293
     Project initialize
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   294
    "
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   295
!
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   296
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   297
reinitKnownProjects
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   298
    "rescan the image for projects"
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   299
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   300
    AllProjects := nil.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   301
    self initKnownProjects
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   302
! !
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   303
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
   304
!Project class methodsFor:'instance creation'!
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   305
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   306
new
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   307
    ^ self basicNew initialize
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   308
! !
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   309
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
   310
!Project class methodsFor:'accessing'!
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   311
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
   312
addKnownProject:aProject
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   313
    |allProjects|
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   314
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   315
    allProjects := self knownProjects.
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   316
    (allProjects detect:[:p | p package = aProject package] ifNone:nil) notNil ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   317
	self warn:'Project for ' , aProject package , ' is already present.'.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   318
	^ self.
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
   319
    ].
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   320
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
   321
    AllProjects add:aProject.
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
   322
    self changed:#allProjects
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
   323
!
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
   324
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   325
addLoadedProject:aProject
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   326
    aProject isLoaded:true.
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   327
    self addKnownProject:aProject.
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   328
!
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   329
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   330
current
10
claus
parents: 2
diff changeset
   331
    "return the currently active project"
claus
parents: 2
diff changeset
   332
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   333
    ^ CurrentProject
a27a279701f8 Initial revision
claus
parents:
diff changeset
   334
362
claus
parents: 356
diff changeset
   335
    "
claus
parents: 356
diff changeset
   336
     Project current
claus
parents: 356
diff changeset
   337
    "
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   338
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   339
a27a279701f8 Initial revision
claus
parents:
diff changeset
   340
current:aProject
10
claus
parents: 2
diff changeset
   341
    "set the currently active project"
claus
parents: 2
diff changeset
   342
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   343
    CurrentProject := aProject.
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   344
    self changed:#currentProject
334
claus
parents: 330
diff changeset
   345
!
claus
parents: 330
diff changeset
   346
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   347
currentPackageName
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   348
    CurrentProject notNil ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   349
	^ CurrentProject package
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   350
    ].
4112
5ee841c34b10 return nil (instead of 'no package') if no current package is defined.
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
   351
    ^ nil
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   352
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   353
    "
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   354
     Project currentPackageName
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   355
    "
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   356
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   357
336
claus
parents: 334
diff changeset
   358
defaultProject
claus
parents: 334
diff changeset
   359
    "return the SystemDefault project"
claus
parents: 334
diff changeset
   360
claus
parents: 334
diff changeset
   361
    ^ SystemProject.
claus
parents: 334
diff changeset
   362
!
claus
parents: 334
diff changeset
   363
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   364
knownProjects
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   365
    AllProjects isNil ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   366
	self initKnownProjects
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   367
    ].
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   368
    ^ AllProjects ? #()
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   369
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   370
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   371
loadedProjects
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   372
    ^ self knownProjects select:[:p | p isLoaded]
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   373
!
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   374
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   375
projectNamed:aProjectName
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   376
    "retrieve the named project; return nil if not known"
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   377
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   378
    ^ self knownProjects detect:[:p | p name = aProjectName] ifNone:nil.
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   379
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   380
    "
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   381
     Project projectNamed:'libbasic'
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   382
    "
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   383
!
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   384
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   385
projectWithId:aPackageId
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   386
    "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
   387
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   388
    ^ self knownProjects detect:[:p | p package = aPackageId] ifNone:nil.
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   389
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   390
    "
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   391
     Project projectWithId:#'stx:libbasic'
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   392
    "
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   393
!
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   394
334
claus
parents: 330
diff changeset
   395
setDefaultProject
claus
parents: 330
diff changeset
   396
    "set the currently active project to be the SystemDEfault project"
claus
parents: 330
diff changeset
   397
claus
parents: 330
diff changeset
   398
    self current:SystemProject.
939
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   399
!
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   400
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   401
setProject:aProjectOrNil
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   402
    "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
   403
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   404
    CurrentProject := aProjectOrNil.
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   405
ffee570b0f09 added #setProject: (does not send change notifications)
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
   406
    "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
   407
    "Modified: 7.2.1996 / 14:01:16 / cg"
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   408
! !
a27a279701f8 Initial revision
claus
parents:
diff changeset
   409
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
   410
!Project class methodsFor:'changes management'!
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   411
664
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   412
addClassDefinitionChangeFor:aClass
1115
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   413
    "add a class-def-change for aClass to the current project"
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   414
664
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   415
    |p c|
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   416
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   417
    p := CurrentProject.
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   418
    (p notNil 
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   419
    and:[(c := p changeSet) notNil]) ifTrue:[
666
6d4175de8c55 fixed primitiveDefinitions changes
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
   420
	c addClassDefinitionChangeFor:aClass 
664
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   421
    ]
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   422
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   423
    "Created: 3.12.1995 / 13:44:58 / cg"
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   424
    "Modified: 3.12.1995 / 13:58:04 / cg"
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   425
!
42ea897fbebe project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   426
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   427
addMethodCategoryChange:aMethod category:newCategory in:aClass
1115
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   428
    "add a method-category-change for aMethod in aClass to the current project"
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   429
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   430
    |p c|
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   431
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   432
    p := CurrentProject.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   433
    (p notNil 
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   434
    and:[(c := p changeSet) notNil]) ifTrue:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   435
	c addMethodCategoryChange:aMethod category:newCategory in:aClass 
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   436
    ]
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   437
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   438
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   439
addMethodChange:aMethod in:aClass
1115
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   440
    "add a method change in aClass to the current project"
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   441
235
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
   442
    |p c|
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   443
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   444
    p := CurrentProject.
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   445
    (p notNil 
235
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
   446
    and:[(c := p changeSet) notNil]) ifTrue:[
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
   447
	c addMethodChange:aMethod in:aClass 
203
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
   448
    ]
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
   449
!
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
   450
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   451
addMethodPrivacyChange:aMethod in:aClass
1115
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   452
    "add a privacy change for aMethod in aClass to the current project"
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   453
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   454
    |p c|
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   455
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   456
    p := CurrentProject.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   457
    (p notNil 
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   458
    and:[(c := p changeSet) notNil]) ifTrue:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   459
	c addMethodPrivacyChange:aMethod in:aClass 
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   460
    ]
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   461
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   462
    "Modified: 27.8.1995 / 22:48:17 / claus"
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   463
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   464
705
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   465
addPrimitiveDefinitionsChangeFor:aClass
1115
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   466
    "add a primitiveDef change for aClass to the current project"
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   467
705
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   468
    |p c|
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   469
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   470
    p := CurrentProject.
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   471
    (p notNil 
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   472
    and:[(c := p changeSet) notNil]) ifTrue:[
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   473
	c addPrimitiveDefinitionsChangeFor:aClass 
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   474
    ]
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   475
!
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   476
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   477
addPrimitiveFunctionsChangeFor:aClass
1115
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   478
    "add a primitiveFuncs change for aClass to the current project"
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   479
705
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   480
    |p c|
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   481
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   482
    p := CurrentProject.
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   483
    (p notNil 
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   484
    and:[(c := p changeSet) notNil]) ifTrue:[
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   485
	c addPrimitiveFunctionsChangeFor:aClass 
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   486
    ]
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   487
!
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   488
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   489
addPrimitiveVariablesChangeFor:aClass
1115
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   490
    "add a primitiveVars change for aClass to the current project"
16ebfd63db43 commentary
Claus Gittinger <cg@exept.de>
parents: 939
diff changeset
   491
705
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   492
    |p c|
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   493
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   494
    p := CurrentProject.
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   495
    (p notNil 
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   496
    and:[(c := p changeSet) notNil]) ifTrue:[
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   497
	c addPrimitiveVariablesChangeFor:aClass 
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   498
    ]
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   499
!
2126aba57d34 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 666
diff changeset
   500
3288
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   501
addRemoveSelectorChange:aSelector in:aClass
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   502
    "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
   503
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   504
    |p c|
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   505
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   506
    p := CurrentProject.
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   507
    (p notNil 
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   508
    and:[(c := p changeSet) notNil]) ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   509
	c addRemoveSelectorChange:aSelector in:aClass 
3288
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   510
    ]
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   511
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   512
    "Created: / 16.2.1998 / 12:45:10 / cg"
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   513
!
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 2962
diff changeset
   514
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   515
currentProjectDirectory
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   516
    "return the name of the directory to use for fileOut.
235
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
   517
     The returned name already includes a file-separator at the end, 
d8e62525bfdf *** empty log message ***
claus
parents: 203
diff changeset
   518
     so the filename can be concatenated to it."
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   519
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   520
    |p dirName|
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   521
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   522
    p := CurrentProject.
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   523
    p notNil ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   524
	dirName := p directory  
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   525
    ] ifFalse:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   526
	dirName := Filename currentDirectory name
149
a3b1bf2938c6 changeSet interface changed
claus
parents: 97
diff changeset
   527
    ].
2962
038a8f143e49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2956
diff changeset
   528
    ^ dirName
2907
1666bf27f351 VMS changes
Claus Gittinger <cg@exept.de>
parents: 2664
diff changeset
   529
1666bf27f351 VMS changes
Claus Gittinger <cg@exept.de>
parents: 2664
diff changeset
   530
    "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
   531
!
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   532
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   533
rememberOverwrittenMethod:newMethod from:oldMethod
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   534
    "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
   535
     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
   536
     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
   537
2558
07e7d6fef46d removed unused var
Claus Gittinger <cg@exept.de>
parents: 2334
diff changeset
   538
    |p|
2334
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   539
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   540
    p := CurrentProject.
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   541
    (p notNil 
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   542
    and:[p ~~ SystemProject]) ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   543
	p rememberOverwrittenMethod:newMethod from:oldMethod
2334
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   544
    ] ifFalse:[
3332
8014b817988b remove the 'does not remember ...' message.
Claus Gittinger <cg@exept.de>
parents: 3288
diff changeset
   545
"/        '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
   546
    ]
7502902385ff only remember overwritten methods if the current project
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
   547
3332
8014b817988b remove the 'does not remember ...' message.
Claus Gittinger <cg@exept.de>
parents: 3288
diff changeset
   548
    "Modified: / 7.3.1998 / 13:38:39 / cg"
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   549
! !
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   550
4909
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
   551
!Project class methodsFor:'misc'!
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
   552
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
   553
projectFileFormatVersion
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
   554
    ^ 1
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
   555
! !
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
   556
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   557
!Project methodsFor:'accessing'!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   558
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   559
addSubProject:aProject
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
   560
    "add a subproject - obsolete; we use prerequisites now"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
   561
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   562
    subProjects isNil ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   563
	subProjects := OrderedCollection new.
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   564
    ].
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   565
    subProjects add:aProject
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   566
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   567
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   568
changeSet
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   569
    "return the set of changes made in this project"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   570
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   571
    ^ changeSet
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   572
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   573
    "Modified: 27.1.1997 / 11:58:36 / cg"
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   574
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   575
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   576
changeSet:aChangeSet
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   577
    "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
   578
     the actual changeSet."
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   579
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   580
    changeSet := aChangeSet
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   581
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   582
    "Modified: 27.1.1997 / 11:59:02 / cg"
73
a6640cc96199 *** empty log message ***
claus
parents: 13
diff changeset
   583
!
a6640cc96199 *** empty log message ***
claus
parents: 13
diff changeset
   584
2028
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   585
defaultNameSpace
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   586
    "return the defaultNameSpace of this project.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   587
     New classes will (if not specified by a directive) be installed
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   588
     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
   589
     overwriting of standard classes."
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   590
4726
5c5e1c7f8933 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4721
diff changeset
   591
    ^ (self propertyAt:#defaultNameSpace) ? Smalltalk
2028
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   592
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   593
!
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   594
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   595
defaultNameSpace:aNamespace
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   596
    "set the defaultNameSpace of this project.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   597
     New classes will (if not specified by a directive) be installed
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   598
     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
   599
     overwriting of standard classes."
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   600
4726
5c5e1c7f8933 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4721
diff changeset
   601
    |prevDefault|
5c5e1c7f8933 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4721
diff changeset
   602
5c5e1c7f8933 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4721
diff changeset
   603
    prevDefault := self defaultNameSpace.
5c5e1c7f8933 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4721
diff changeset
   604
    aNamespace ~~ prevDefault ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   605
	self propertyAt:#defaultNameSpace put:aNamespace.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   606
	self changed:#defaultNameSpace.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   607
	self == CurrentProject ifTrue:[
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   608
	    Project changed:#defaultNameSpace 
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   609
	]
2032
e39ca6532e1a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
   610
    ]
2028
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   611
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   612
    "Created: 2.1.1997 / 19:54:37 / cg"
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   613
    "Modified: 27.1.1997 / 12:00:01 / cg"
2028
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   614
!
85ef24870d8a hold the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 1854
diff changeset
   615
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   616
directory
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   617
    "return the projects directory.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   618
     If not specified, a fileOut will be done into that directory"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   619
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   620
    directoryName isNil ifTrue:[^ '.'].
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   621
    ^ directoryName
2276
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
    "Modified: 27.1.1997 / 12:00:41 / cg"
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   624
!
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   625
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   626
directory:aDirectoryName
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   627
    "set the projects directory.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   628
     If not specified, a fileOut will be done into that directory"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   629
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   630
    directoryName := aDirectoryName.
4070
682f720cd0f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4069
diff changeset
   631
    self changed:#directory.
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   632
    self == CurrentProject ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   633
	Project changed:#directory 
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   634
    ]
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   635
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   636
    "Modified: 27.1.1997 / 12:00:47 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   637
!
356
claus
parents: 338
diff changeset
   638
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   639
isLoaded:aBoolean
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   640
    isLoaded := aBoolean
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   641
!
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   642
4789
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   643
libraryName
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   644
    "return the projects library name.
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   645
     This is the name of a classLibrary, created from this project"
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   646
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   647
    |nm|
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   648
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   649
    nm := self name.
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   650
    ^ nm copyFrom:(nm lastIndexOfAny:':/')+1
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   651
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   652
"/    ^ (self name copyReplaceAll:$/ with:$_) replaceAll:$: with:$_
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   653
!
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
   654
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   655
name
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   656
    "return the projects name.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   657
     This is for the user only - shown in the projectViews label"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   658
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   659
    ^ name
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   660
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   661
    "Modified: 27.1.1997 / 12:01:16 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   662
!
356
claus
parents: 338
diff changeset
   663
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   664
name:aString
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   665
    "set the projects name.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   666
     This is for the user only - shown in the projectViews label"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   667
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   668
    name := aString.
4070
682f720cd0f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4069
diff changeset
   669
    self changed:#name.
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   670
    self == CurrentProject ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   671
	Project changed:#name
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   672
    ]
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   673
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   674
    "Modified: 27.1.1997 / 12:01:09 / cg"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   675
!
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   676
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   677
overwrittenMethods
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   678
    "return the set of methods which were overwritten in this project.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   679
     This information allows uninstalling, by switching back to the
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   680
     original methods."
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   681
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   682
    ^ overwrittenMethods
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   683
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   684
    "Created: 27.1.1997 / 11:57:21 / cg"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   685
    "Modified: 27.1.1997 / 12:09:14 / cg"
356
claus
parents: 338
diff changeset
   686
!
claus
parents: 338
diff changeset
   687
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   688
package
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   689
    "return the projects package identifier.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   690
     This identifier marks all methods and new classes which were created
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   691
     in this project."
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   692
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   693
    ^ packageName
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   694
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   695
    "Modified: 27.1.1997 / 12:10:00 / cg"
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   696
!
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   697
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   698
package:aPackageId
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   699
    "set the projects package identifier.
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   700
     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
   701
     in this project."
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   702
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   703
    packageName := aPackageId
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   704
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   705
    "Modified: 27.1.1997 / 12:10:00 / cg"
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   706
!
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
   707
4727
ec580e5f9b22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4726
diff changeset
   708
packageName:aPackageId
ec580e5f9b22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4726
diff changeset
   709
    "set the projects package identifier.
ec580e5f9b22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4726
diff changeset
   710
     This identifier marks all methods and new classes which were created
ec580e5f9b22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4726
diff changeset
   711
     in this project."
ec580e5f9b22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4726
diff changeset
   712
ec580e5f9b22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4726
diff changeset
   713
    self package:aPackageId
ec580e5f9b22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4726
diff changeset
   714
ec580e5f9b22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4726
diff changeset
   715
    "Modified: 27.1.1997 / 12:10:00 / cg"
ec580e5f9b22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4726
diff changeset
   716
!
ec580e5f9b22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4726
diff changeset
   717
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   718
prerequisiteClasses
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   719
    "return the prerequisiteClasses of the project"
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   720
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   721
    ^ (self propertyAt:#prerequisiteClasses) ? #()
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   722
!
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   723
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   724
prerequisiteClasses:aCollectionOfClassesOrClassNames
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   725
    "set the prerequisiteClasses of the project"
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   726
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   727
    ^ self propertyAt:#prerequisiteClasses put:aCollectionOfClassesOrClassNames
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   728
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   729
    "Modified: / 26.4.1999 / 23:33:44 / cg"
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   730
!
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   731
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   732
prerequisitePackages
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   733
    "return the prerequisitePackages of the project"
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   734
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   735
    ^ self prerequisites
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   736
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   737
    "Created: / 26.4.1999 / 23:33:22 / cg"
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   738
!
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   739
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   740
prerequisitePackages:aCollectionOfPackagesOrPackageNames
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   741
    "set the prerequisitePackages of the project"
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   742
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   743
    ^ self prerequisites:aCollectionOfPackagesOrPackageNames
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   744
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
   745
    "Modified: / 26.4.1999 / 23:34:40 / cg"
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   746
!
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
   747
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   748
prerequisites
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
   749
    "return the prerequisites of the project"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
   750
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   751
    ^ prerequisites ? #()
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   752
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   753
3973
7065a27b136b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3972
diff changeset
   754
prerequisites:aCollectionOfProjects
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
   755
    "set the prerequisites of the project"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
   756
3973
7065a27b136b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3972
diff changeset
   757
    prerequisites := aCollectionOfProjects
7065a27b136b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3972
diff changeset
   758
!
7065a27b136b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3972
diff changeset
   759
654
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   760
repositoryDirectory
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   761
    "return the projects default repository location.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   762
     This is offered initially, when classes are checked into the
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   763
     source repository initially"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   764
725
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   765
    ^ repositoryDirectory
654
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   766
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   767
    "Created: 25.11.1995 / 18:04:51 / cg"
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   768
    "Modified: 27.1.1997 / 12:13:35 / cg"
654
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   769
!
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   770
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   771
repositoryDirectory:aRelativePathName
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   772
    "set the projects default repository location.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   773
     This will be offered initially, when classes are checked into the
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   774
     source repository initially"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   775
725
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   776
    repositoryDirectory := aRelativePathName
654
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   777
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   778
    "Created: 25.11.1995 / 18:05:06 / cg"
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   779
    "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
   780
!
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   781
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   782
repositoryModule
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   783
    "return the projects default repository module name.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   784
     This is offered initially, when classes are checked into the
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   785
     source repository initially"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   786
725
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   787
    ^ repositoryModule
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   788
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   789
    "Created: 25.11.1995 / 18:04:51 / cg"
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   790
    "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
   791
!
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   792
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   793
repositoryModule:aString
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   794
    "set the projects default repository module name.
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   795
     This is offered initially, when classes are checked into the
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   796
     source repository initially"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   797
725
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   798
    repositoryModule := aString
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   799
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   800
    "Created: 25.11.1995 / 18:05:06 / cg"
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   801
    "Modified: 27.1.1997 / 12:13:57 / cg"
654
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   802
!
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   803
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   804
subProjects
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
   805
    "return the subprojects - obsolete; we use prerequisites now"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
   806
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   807
    ^ subProjects ? #()
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   808
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   809
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   810
views
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   811
    "return a collection of views which were opened in this project"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   812
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   813
    ^ views asArray
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   814
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   815
    "Modified: 27.1.1997 / 12:14:18 / cg"
338
claus
parents: 336
diff changeset
   816
!
claus
parents: 336
diff changeset
   817
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   818
views:aSetOfViews
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   819
    "set the collection of views which were opened in this project"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   820
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   821
    views := WeakIdentitySet withAll:aSetOfViews
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   822
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   823
    "Modified: 27.1.1997 / 12:14:26 / cg"
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   824
! !
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   825
4079
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   826
!Project methodsFor:'administration'!
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   827
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   828
removeClassesFromSystem
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   829
    "remove the all of my classes & patches from the system"
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   830
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   831
    self classInfo do:[:clsInfo |
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   832
	|clsName cls|
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   833
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   834
	clsName := clsInfo className.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   835
	clsName isSymbol ifTrue:[
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   836
	    cls := Smalltalk at:clsName.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   837
	    cls notNil ifTrue:[
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   838
		cls removeFromSystem.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   839
	    ].
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   840
	] ifFalse:[
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   841
	    self halt
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   842
	].
4079
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   843
    ].
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   844
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   845
!
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   846
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   847
removeFromSystem
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   848
    "remove the project and all of its classes & patches from the
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   849
     system"
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   850
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   851
    self removeClassesFromSystem.
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   852
    AllProjects remove:self ifAbsent:nil.
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   853
! !
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   854
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   855
!Project methodsFor:'changes'!
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   856
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   857
rememberOverwrittenMethod:newMethod from:oldMethod
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   858
    "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
   859
     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
   860
     Allows previous methods to be reconstructed."
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   861
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   862
    overwrittenMethods isNil ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   863
	overwrittenMethods := IdentityDictionary new.
2276
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   864
    ].
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   865
    overwrittenMethods at:newMethod put:oldMethod
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   866
4efec5219eef remember overwritten methods
Claus Gittinger <cg@exept.de>
parents: 2164
diff changeset
   867
    "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
   868
    "Modified: 30.1.1997 / 21:10:51 / cg"
10
claus
parents: 2
diff changeset
   869
! !
claus
parents: 2
diff changeset
   870
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   871
!Project methodsFor:'initialization'!
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   872
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   873
initialize
338
claus
parents: 336
diff changeset
   874
    |numString|
claus
parents: 336
diff changeset
   875
330
claus
parents: 318
diff changeset
   876
    views := WeakIdentitySet new.
338
claus
parents: 336
diff changeset
   877
    numString := NextSequential printString.
315
7683685383d6 *** empty log message ***
claus
parents: 236
diff changeset
   878
    NextSequential := NextSequential + 1.
338
claus
parents: 336
diff changeset
   879
claus
parents: 336
diff changeset
   880
    name := 'new Project-' , numString.
claus
parents: 336
diff changeset
   881
    packageName := 'private-' , numString.
2034
1c96469c3df8 preinit the defaultNamespace of new projects (to Smalltalk)
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
   882
848
76a83f34c26a moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
   883
    "/
76a83f34c26a moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
   884
    "/ for tiny-configurations, allow ChangeSet to be absent
76a83f34c26a moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
   885
    "/
76a83f34c26a moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
   886
    ChangeSet notNil ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   887
	changeSet := ChangeSet new.
848
76a83f34c26a moved ExtBytes & ExtFunc from libbasic2
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
   888
    ].
654
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   889
    self directory:'.'.
725
02759b2003a8 keep module & directory separately (as defaults when creating a container)
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   890
    self repositoryModule:(OperatingSystem getLoginName).
654
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   891
    self repositoryDirectory:'private'
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   892
1e039f69fdee added repository
Claus Gittinger <cg@exept.de>
parents: 630
diff changeset
   893
    "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
   894
    "Modified: 3.1.1997 / 13:24:10 / cg"
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   895
! !
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
   896
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   897
!Project methodsFor:'load & save'!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   898
4805
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   899
conditionForAutoloadIsTrue:cond
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   900
    "check condition ..."
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   901
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   902
    ^ cond == #autoload 
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   903
!
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   904
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   905
conditionForInclusionIsTrue:cond
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   906
    "check condition ..."
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   907
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   908
    cond == #always ifTrue:[^ true].
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   909
    cond == #autoload ifTrue:[^ true].
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   910
    cond == #never ifTrue:[^ false].
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   911
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   912
    cond == #unix ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   913
	^ OperatingSystem isUNIXlike
4805
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   914
    ].
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   915
    cond == #win32 ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   916
	^ OperatingSystem isMSWINDOWSlike
4805
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   917
    ].
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   918
    cond == #vms ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   919
	^ OperatingSystem isVMSlike
4805
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   920
    ].
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   921
    cond == #macos ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
   922
	^ OperatingSystem isMAClike
4805
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   923
    ].
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   924
    self halt:'bad condition'
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   925
!
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   926
4079
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   927
loadClassesFromProjectDirectory
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   928
    "load my classes into the system.
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   929
     The classes are loaded from the directory as defined by my
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   930
     directory insTvar"
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   931
4805
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   932
    |myDirectory firstTrip|
4079
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   933
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   934
    myDirectory := self directory asFilename.
4805
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   935
    firstTrip := true.
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   936
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   937
    "/ read twice; if the load order was not correct,
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   938
    "/ this will fix things (i.e. nil superclasses ...)
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   939
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
   940
    2 timesRepeat:[
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   941
        self classInfo do:[:clsInfo |
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   942
            |clsName clsFileNameString cls clsFilename 
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   943
             cond include asAutoload|
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   944
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   945
            clsName := clsInfo className.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   946
            (clsName startsWith:'Smalltalk::') ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   947
                clsInfo className:(clsName := clsName copyFrom:'Smalltalk::' size + 1).
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   948
            ].
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   949
            clsName := clsName asSymbol.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   950
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   951
            clsFileNameString := clsInfo classFileName.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   952
            clsFileNameString isNil ifTrue:[clsFileNameString := clsName , '.st'].
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   953
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   954
            clsName isSymbol ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   955
                clsFilename := myDirectory construct:clsFileNameString.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   956
                cls := Smalltalk at:clsName.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   957
                (cls isNil or:[firstTrip]) ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   958
                    "/ ok - really not yet loaded.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   959
                    Transcript showCR:'loading ' , clsFilename pathName , ' ...'.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   960
                ] ifFalse:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   961
                    Transcript showCR:'reloading ' , clsFilename pathName , ' ...'.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   962
                ].
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   963
                "/ check condition ...
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   964
                cond := clsInfo conditionForInclusion.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   965
                (self conditionForInclusionIsTrue:cond) ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   966
                    (self conditionForAutoloadIsTrue:cond) ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   967
                        Smalltalk
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   968
                            installAutoloadedClassNamed:clsName
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   969
                            category:'autoloaded'
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   970
                            package:self package    
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   971
                            revision:nil
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   972
                    ] ifFalse:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   973
                        Smalltalk fileIn:clsFilename
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   974
                    ]
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   975
                ]
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   976
            ] ifFalse:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   977
                self halt
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   978
            ].
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   979
        ].
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   980
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
   981
        firstTrip := false.
4079
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   982
    ].
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   983
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   984
!
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
   985
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   986
loadFromProjectFile:aFilename
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
   987
    "fill all of my attributes from a projects file (.prj-file)"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
   988
4909
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
   989
    |f l pack targetConditions s sourcesSubDir files module methodsFile
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
   990
     formatVersion|
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   991
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   992
    f := aFilename asFilename.
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   993
    directoryName := f directory pathName.
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   994
    self directory:(f directory pathName).
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   995
    pack := ResourcePack fromFile:f baseName directory:directoryName.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   996
4909
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
   997
    formatVersion := pack at:'fileFormatVersion' ifAbsent:nil.
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
   998
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   999
    "/ convert the resourcePack ...
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1000
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1001
    packageName := pack at:'package' ifAbsent:packageName.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1002
    name := pack at:'name' ifAbsent:name.
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1003
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1004
    self type:(pack at:'type' ifAbsent:#application) asSymbol.
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1005
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1006
    module := pack at:'repository.module' ifAbsent:nil.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1007
    module notNil ifTrue:[
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1008
        repositoryModule := module.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1009
        repositoryDirectory := pack at:'repository.directory' ifAbsent:''.
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1010
    ].
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1011
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1012
    prerequisites := pack at:'prerequisites' ifAbsent:#().
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1013
    self prerequisiteClasses:(pack at:'prerequisiteClasses' ifAbsent:#()).
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1014
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1015
    s := pack at:'nameSpace' ifAbsent:nil.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1016
    s notNil ifTrue:[
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1017
        self defaultNameSpace:(Namespace name:s asSymbol).
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1018
    ].
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1019
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1020
    subProjects := pack at:'subProjects' ifAbsent:subProjects.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1021
    (s := pack at:'comment' ifAbsent:nil) notNil ifTrue:[
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1022
        self comment:s
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1023
    ].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1024
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1025
    "/ first, all of the conditions ...
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1026
    targetConditions := Dictionary new.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1027
    pack keysAndValuesDo:[:key :val |
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1028
        |conditionKey|
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1029
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1030
        (key startsWith:'target.condition.') ifTrue:[
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1031
            conditionKey := key copyFrom:'target.condition.' size + 1.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1032
            targetConditions at:conditionKey put:val.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1033
        ]
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1034
    ].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1035
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1036
    properties isNil ifTrue:[
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1037
        properties := IdentityDictionary new
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1038
    ].
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1039
    properties at:#'targetconditions' put:targetConditions.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1040
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1041
    sourcesSubDir := pack at:'sources' ifAbsent:nil.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1042
    sourcesSubDir notNil ifTrue:[
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1043
        properties at:#'sourcesDirectory' put:sourcesSubDir.
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1044
    ].
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1045
"/    methodsFile := pack at:'methodsFile' ifAbsent:nil.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1046
"/    methodsFile size > 0 ifTrue:[
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1047
"/        properties at:#'methodsFile' put:methodsFile.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1048
"/    ].
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1049
    properties declare:#methodsFile from:pack.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1050
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1051
"/    files := pack at:'files' ifAbsent:nil.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1052
"/    files notNil ifTrue:[
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1053
"/        properties at:#'files' put:files.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1054
"/    ].
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1055
    properties declare:#files from:pack.
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1056
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1057
    "/ fetch class info
4805
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
  1058
    "/
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
  1059
    "/ each entry consist of:
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
  1060
    "/    full-name-of-class
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
  1061
    "/    condition (optional)  - #unix / #win32 / #vms / #macos / #always / #never / #autoload
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
  1062
    "/    fileName (optional)
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1063
    (pack at:'classes' default:#()) do:[:info |
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1064
        |condKey className optionalFileName|
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1065
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1066
        condKey := #always.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1067
        info isSymbol ifTrue:[
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1068
            className := info.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1069
        ] ifFalse:[
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1070
            className := info at:1.
4909
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1071
            formatVersion == 0 ifTrue:[
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1072
                info size > 1 ifTrue:[
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1073
                    optionalFileName := info at:2.
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1074
                    info size > 2 ifTrue:[
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1075
                        condKey := info at:3.
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1076
                    ]
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1077
                ].
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1078
            ] ifFalse:[
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1079
                className := info at:1.
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1080
                info size > 1 ifTrue:[
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1081
                    condKey := info at:2.
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1082
                    info size > 2 ifTrue:[
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1083
                        optionalFileName := info at:3.
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1084
                    ]
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1085
                ].
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1086
            ].
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1087
        ].
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1088
        self 
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1089
            addClass:className 
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1090
            conditionForInclusion:condKey 
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1091
            classFileName:optionalFileName
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1092
    ].
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1093
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  1094
    "/ fetch methods info
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  1095
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  1096
    (pack at:'methods' default:#()) do:[:info |
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1097
        |condKey className methodName optionalFileName|
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1098
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1099
        condKey := #always.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1100
        className := info at:1.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1101
        methodName := info at:2.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1102
        info size > 2 ifTrue:[
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1103
            optionalFileName := info at:3.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1104
            info size > 3 ifTrue:[
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1105
                condKey := info at:4.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1106
            ]
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1107
        ].
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1108
        self 
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1109
            addMethod:methodName inClass:className 
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1110
            conditionForInclusion:condKey 
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1111
            fileName:optionalFileName
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  1112
    ].
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  1113
4069
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  1114
    self wasLoadedFromFile:true.
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  1115
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1116
    "/ all remaining properties
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1117
    pack keysAndValuesDo:[:key :val |
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1118
        (key startsWith:'property.') ifTrue:[
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1119
            self propertyAt:(key copyFrom:'property.' size+1) asSymbol put:val.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1120
        ]
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1121
    ].
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1122
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1123
    "
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1124
     Project current saveAsProjectFile.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1125
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1126
     Project new loadFromProjectFile:'default.prj'
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1127
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1128
     Project new loadFromProjectFile:'../../libbasic/libbasic.prj'
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1129
    "
4069
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  1130
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1131
    "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
  1132
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1133
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1134
saveAsProjectFile
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1135
    "store all of my attributes into a projects file (.prj-file)
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1136
     (in the project-directory and named as <projectName>.prj)"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1137
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1138
    |dir fn nm s|
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1139
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1140
    dir := self directory asFilename.
4790
38030fd8b681 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  1141
    nm := self libraryName.
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1142
    fn := dir construct:nm.
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1143
    fn := fn withSuffix:'prj'.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1144
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1145
    fn exists ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  1146
	fn copyTo:(fn pathName , '.bak')
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1147
    ].
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1148
    s := fn writeStream.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1149
    self saveAsProjectFileOn:s.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1150
    s close.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1151
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1152
    "
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1153
     Project current saveAsProjectFile
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1154
    "
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1155
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1156
    "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
  1157
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1158
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1159
saveAsProjectFileOn:aStream
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1160
    "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
  1161
     and somehow readable for humans.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1162
     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
  1163
     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
  1164
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1165
    |s coll first maxLen t defNS methodsFile classes|
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1166
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1167
    s := aStream.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1168
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1169
    s nextPutLine:'; $Header' , '$'; nextPutLine:';'.
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1170
    s nextPutLine:'; Project saved ' , Smalltalk timeStamp; nextPutLine:';'.
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1171
    s nextPutAll:'; Be careful when editing - do not corrupt the files syntax.
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1172
; Lines starting with a semicolon are comment lines.
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1173
; Lines ending with a backslash are concatenated with the following line.
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1174
; Entries are key-value pairs, separated by whitespace;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1175
; the value is a smalltalk literal expression.
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1176
'.
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1177
4909
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1178
    s nextPutAll:'fileFormatVersion'; tab; nextPutLine:(self class projectFileFormatVersion printString).
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1179
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1180
    s nextPutAll:'
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1181
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1182
; general:
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1183
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1184
'.
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1185
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1186
    s nextPutAll:'comment'. 
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1187
    s tab. s nextPutLine:(self comment storeString).
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1188
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1189
    s nextPutAll:'name'. 
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1190
    s tab. s nextPutLine:(name storeString).
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1191
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1192
    s nextPutAll:'type'. 
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1193
    s tab. s nextPutLine:(self type storeString).
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1194
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1195
    s nextPutAll:'package'. 
4726
5c5e1c7f8933 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4721
diff changeset
  1196
    s tab. s nextPutLine:(self package storeString).
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1197
4726
5c5e1c7f8933 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4721
diff changeset
  1198
    defNS := self defaultNameSpace.
5c5e1c7f8933 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4721
diff changeset
  1199
    (defNS ~~ Smalltalk) ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1200
        s nextPutAll:'nameSpace'. 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1201
        s tab. s nextPutLine:(defNS name storeString).
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1202
    ].
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1203
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1204
    s nextPutAll:'
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1205
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1206
; repository:
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1207
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1208
'.
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1209
    s nextPutAll:'repository.module'. 
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1210
    s tab. s nextPutLine:(repositoryModule ? 'private') storeString.
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1211
    s nextPutAll:'repository.directory'. 
4726
5c5e1c7f8933 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4721
diff changeset
  1212
    s tab. s nextPutLine:(repositoryDirectory ? self package) storeString.
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1213
    s cr.
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1214
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1215
    (t := properties at:#'sourcesDirectory' ifAbsent:nil) notNil ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1216
        s nextPutAll:'sources'. 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1217
        s tab. s nextPutLine:(t storeString).
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1218
    ].
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1219
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1220
    first := true.
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1221
    properties keysAndValuesDo:[:key :val |
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1222
        (#(
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1223
            comment
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1224
            wasLoadedFromFile
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1225
            targetconditions
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1226
            classes
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1227
            classInfo
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1228
            methodInfo
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1229
            prerequisiteClasses
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1230
            files
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1231
            sourcesDirectory
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1232
            methodsFile
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1233
            type
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1234
            defaultNameSpace
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1235
        ) includes:key) ifFalse:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1236
            first ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1237
                first := false.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1238
                s nextPutAll:'
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1239
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1240
; properties:
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1241
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1242
'.
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1243
            ].    
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1244
            s nextPutAll:'property.'; nextPutAll:key. 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1245
            s tab. 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1246
            key == #defaultNameSpace ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1247
                s nextPutLine:val name storeString.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1248
            ] ifFalse:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1249
                s nextPutLine:val storeString.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1250
            ]
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1251
        ]
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1252
    ].
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1253
        
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1254
"/    coll := self subProjects.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1255
"/    coll size > 0 ifTrue:[
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1256
"/        s nextPutLine:'[subprojects]'. 
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1257
"/        coll do:[:aSubProject |
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1258
"/            s tab. s nextPutLine:(aSubProject name soreString).
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1259
"/        ].
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1260
"/    ].
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1261
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1262
    s nextPutAll:'
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1263
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1264
; required packages:
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1265
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1266
'.
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1267
    s nextPutAll:'prerequisites'; tab.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1268
    coll := self prerequisites.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1269
    coll size = 0 ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1270
        s nextPutLine:'#()'. 
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1271
    ] ifFalse:[    
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1272
        s nextPutLine:'#( \'. 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1273
        coll do:[:aProjectOrProjectNameList |
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1274
            |pName pPath|
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1275
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1276
            aProjectOrProjectNameList isString ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1277
                pName := aProjectOrProjectNameList.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1278
            ] ifFalse:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1279
                aProjectOrProjectNameList isArray ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1280
                    pName := aProjectOrProjectNameList at:1.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1281
                    pPath := aProjectOrProjectNameList at:2.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1282
                ] ifFalse:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1283
                    pName := aProjectOrProjectNameList name.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1284
                    pPath := aProjectOrProjectNameList repositoryPath.    
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1285
                ]
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1286
            ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1287
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1288
            pPath isNil ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1289
                s tab. s nextPutAll:(pName storeString); nextPutLine:' \'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1290
            ] ifFalse:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1291
                s tab. s nextPutAll:'( '.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1292
                s nextPutAll:(pName storeString); space;
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1293
                  nextPutAll:(pPath storeString); nextPutLine:') \'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1294
            ]
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1295
        ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1296
        s nextPutLine:')'.
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1297
    ].
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1298
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1299
    s nextPutAll:'
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1300
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1301
; required classes:
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1302
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1303
'.
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1304
    s nextPutAll:'prerequisiteClasses'; tab.
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1305
    coll := self prerequisiteClasses.
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1306
    coll size = 0 ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1307
        s nextPutLine:'#()'. 
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1308
    ] ifFalse:[    
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1309
        s nextPutLine:'#( \'. 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1310
        coll do:[:aClassOrSymbol | |className|
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1311
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1312
            (className := aClassOrSymbol) isSymbol ifFalse:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1313
                className := aClassOrSymbol name
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1314
            ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1315
            s tab. s nextPutAll:(className storeString); nextPutLine:' \'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1316
        ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1317
        s nextPutLine:')'.
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1318
    ].
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1319
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1320
    s nextPutAll:'
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1321
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1322
; classes:
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1323
; (for each class, one line of the form: ( #''className'' [condition [fileName]] )
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1324
; (where fileName and condition are optional)
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1325
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1326
'.
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1327
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1328
    s nextPutAll:'classes'; tab.
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1329
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1330
    classes := self classesInOrderFor:'save ''prj''-file.'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1331
    classes isNil ifTrue:[^ self].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1332
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1333
    classes size = 0 ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1334
        s nextPutLine:'#()'. 
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1335
    ] ifFalse:[    
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1336
        s nextPutLine:'#( \'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1337
        "/ find the longest className (for layout only)
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1338
        
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1339
        maxLen := classes inject:0 into:[:maxSoFar :aClass |
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1340
                                        |clsName|
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1341
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1342
                                        clsName := aClass name.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1343
                                        maxSoFar max:clsName storeString size
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1344
                                     ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1345
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1346
        classes do:[:aClass |
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1347
            |clsInfo clsName fileName cond|
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1348
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1349
            clsInfo := self classInfoFor:aClass.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1350
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1351
            clsName := aClass name.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1352
            fileName := clsInfo classFileName.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1353
            fileName = (clsName , '.st') ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1354
                fileName := nil
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1355
            ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1356
            cond := (clsInfo conditionForInclusion) ? #always.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1357
            s tab. s nextPutAll:'( '; 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1358
                     nextPutAll:(clsName storeString paddedTo:maxLen).
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1359
            (cond ~~ #always or:[fileName notNil]) ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1360
                s tab; nextPutAll:cond storeString.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1361
            ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1362
            fileName notNil ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1363
                s tab; nextPutAll:fileName storeString.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1364
            ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1365
            s nextPutLine:') \'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1366
        ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1367
        s nextPutLine:')'.
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1368
    ].
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1369
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1370
    s nextPutAll:'
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1371
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1372
; methods (patches & extensions):
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1373
; (for each method, one line of the form: ( #''className'' #''methodName'' )
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1374
; (for metaclasses, #''name class'' is used)
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1375
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1376
'.
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1377
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1378
    s nextPutAll:'methods'; tab.
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1379
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1380
    coll := self methodInfo.
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1381
    coll size = 0 ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1382
        s nextPutLine:'#()'. 
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1383
    ] ifFalse:[    
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1384
        s nextPutLine:'#( \'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1385
        "/ find the longest className (for layout only)
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1386
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1387
        maxLen := coll inject:0 into:[:maxSoFar :aMethodInfo |
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1388
                                        |clsName|
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1389
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1390
                                        clsName := aMethodInfo className.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1391
                                        maxSoFar max:clsName storeString size
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1392
                                     ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1393
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1394
        coll do:[:aMethodInfo |
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1395
            |clsName mthdName fileName cond|
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1396
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1397
            clsName := aMethodInfo className.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1398
            mthdName := aMethodInfo methodName.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1399
            s tab. s nextPutAll:'( '; 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1400
                     nextPutAll:(clsName storeString paddedTo:maxLen); 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1401
                     tab; nextPutAll:mthdName storeString.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1402
            s nextPutLine:') \'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1403
        ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1404
        s nextPutLine:')'.
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1405
    ].
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1406
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1407
    methodsFile := properties at:#methodsFile ifAbsent:nil.
4792
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  1408
    methodsFile size > 0 ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1409
        s cr; nextPutLine:';'; nextPutLine:'; methods above are stored in:'; nextPutLine:';'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1410
        s nextPutLine:';'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1411
        s nextPutAll:'methodsFile'; tab; nextPutLine:'''' , methodsFile , ''''.
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1412
    ].
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1413
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1414
    s nextPutAll:'
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1415
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1416
; files (for deployment):
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1417
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1418
'.
4314
b973832ffe15 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4124
diff changeset
  1419
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1420
    s nextPutAll:'files'; tab.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1421
    coll := properties at:#'files' ifAbsent:#().
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1422
    coll size = 0 ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1423
        s nextPutLine:'#()'. 
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1424
    ] ifFalse:[    
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1425
        s nextPutLine:'#( \'. 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1426
        coll do:[:aFileEntry |
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1427
            s tab. s nextPutAll:(aFileEntry storeString); nextPutLine:' \'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1428
        ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1429
        s nextPutLine:')'.
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1430
    ].
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1431
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1432
    "
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1433
     Project current saveOn:Transcript
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1434
    "
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1435
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1436
    "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
  1437
! !
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1438
2
claus
parents: 1
diff changeset
  1439
!Project methodsFor:'maintenance'!
claus
parents: 1
diff changeset
  1440
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1441
buildProject
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1442
    "invoke 'make' in the project directory"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1443
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1444
    OperatingSystem executeCommand:('cd ' , self directory , ' ; make')
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1445
!
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1446
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1447
buildProjectWithOutputTo:aStream
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1448
    "invoke 'make' in the project directory"
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1449
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1450
    |p cmdOutStream cmdInStream readerProcess|
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1451
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1452
    aStream notNil ifTrue:[
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1453
        "/ need an external stream for that.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1454
        aStream isExternalStream ifTrue:[
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1455
            cmdOutStream := aStream
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1456
        ] ifFalse:[
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1457
            p := ExternalStream makePipe.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1458
            cmdOutStream := p at:2.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1459
            "/ start a reader process
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1460
            readerProcess := [
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1461
                |data|
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1462
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1463
                cmdInStream := p at:1.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1464
                [cmdInStream atEnd] whileFalse:[
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1465
                    data := cmdInStream nextAvailable:512.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1466
                    aStream nextPutAll:data.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1467
                ]
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1468
            ] newProcess.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1469
            readerProcess name:'cmd output reader'.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1470
            readerProcess resume.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1471
        ]   
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1472
    ].
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1473
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1474
    OperatingSystem 
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1475
        executeCommand:('cd ' , self directory , ' ; make')
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1476
        inputFrom:nil 
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1477
        outputTo:cmdOutStream 
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1478
        errorTo:cmdOutStream 
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1479
        inDirectory:nil
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1480
        onError:[:status| false].
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1481
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1482
    readerProcess terminate.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1483
    cmdInStream close.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1484
    cmdOutStream close.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1485
!
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1486
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1487
classesInOrderFor:whatMsg
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1488
    |classes numBad firstBad msg|
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1489
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1490
    classes := self classes.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1491
    numBad := 0.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1492
    firstBad := nil.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1493
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1494
    classes := classes collect:[:clsOrSymbol |  |cls|
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1495
                                        clsOrSymbol isBehavior ifFalse:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1496
                                            cls := Smalltalk at:clsOrSymbol asSymbol.
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1497
                                            cls isNil ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1498
                                                numBad := numBad + 1.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1499
                                                firstBad := firstBad ? clsOrSymbol.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1500
                                            ] ifFalse:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1501
                                                cls isLoaded ifFalse:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1502
                                                    cls autoLoad.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1503
                                                    cls isLoaded ifFalse:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1504
                                                        cls := nil
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1505
                                                    ]
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1506
                                                ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1507
                                            ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1508
                                            cls.
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1509
                                        ] ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1510
                                            clsOrSymbol
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1511
                                        ]
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1512
                              ].
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1513
    numBad ~~ 0 ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1514
        msg := 'Cannot ' , whatMsg.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1515
        msg := msg , 'Reason: Class ''' , firstBad asText allBold
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1516
                   , ''' is not loaded.'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1517
        numBad ~~ 1 ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1518
            msg := msg , '\(' , (numBad-1) printString , ' more unloaded classes were found)'
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1519
        ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1520
        self warn:msg withCRs.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1521
        ^ nil.
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1522
    ].
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1523
4785
4ced52c817e6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4779
diff changeset
  1524
    "/ to not list private classes
4ced52c817e6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4779
diff changeset
  1525
    classes := classes select:[:cls | cls owningClass isNil].
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1526
    classes := classes copy topologicalSort:[:a :b | b isSubclassOf:a].
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1527
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1528
    ^ classes
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1529
!
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1530
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1531
createLoadAllFile
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1532
    "creates a 'loadAll' file, which will load all classes
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1533
     of the project - this loadAll file is supposed to be located
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1534
     in the projects source directory."
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1535
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1536
    |d f out in topName classes classInfo myPackage   
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1537
     methodsFile prerequisitePackages transcript|
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1538
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1539
    classes := self classesInOrderFor:'generate ''loadAll''-file.'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1540
    classes isNil ifTrue:[^ self].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1541
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1542
    transcript := Transcript current.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1543
    transcript showCR:'creating loadAll file'.
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1544
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1545
    d := directoryName asFilename.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1546
    f := d construct:'loadAll'.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1547
    f exists ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1548
        f renameTo:(d construct:'loadAll.bak')
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1549
    ].
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1550
    out := f writeStream.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1551
    out isNil ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1552
        self warn:'cannot create loadAll'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1553
        (d construct:'loadAll.bak') renameTo:f.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1554
        ^ self
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1555
    ].
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1556
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1557
    myPackage := self package.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1558
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  1559
    out nextPutLine:'"/
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  1560
"/ $' , 'Header' , '$'.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  1561
    out nextPutLine:'"/
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1562
"/ loadAll-file to fileIn code for: ' , myPackage.
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  1563
    
4776
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  1564
    out nextPutAll:'"/
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  1565
"/ Automatically generated from project definition.
4786
2375c3d2bffc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4785
diff changeset
  1566
"/ DO NOT MODIFY THIS fILE;
4789
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  1567
"/ modify the .prj file instead, and regenerate this file
4786
2375c3d2bffc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4785
diff changeset
  1568
"/ with the ProjectBrowser tool.
4776
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  1569
"/
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  1570
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  1571
"/
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  1572
"/ Prerequisites:
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  1573
"/'.
4796
eee167a75fcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4792
diff changeset
  1574
    prerequisitePackages := self prerequisitePackages 
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1575
                                collect:[:entry |
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1576
                                    |pName|
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1577
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1578
                                    entry isString ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1579
                                        pName := entry
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1580
                                    ] ifFalse:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1581
                                        entry isArray ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1582
                                            pName := entry at:1
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1583
                                        ] ifFalse:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1584
                                            pName := entry name
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1585
                                        ]
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1586
                                    ]
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1587
                                ].
4796
eee167a75fcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4792
diff changeset
  1588
eee167a75fcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4792
diff changeset
  1589
    prerequisitePackages size == 0 ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1590
        out nextPutLine:''.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1591
        out nextPutLine:'"/ Smalltalk loadPackage:''module:directory''.'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1592
        out nextPutLine:'"/ Smalltalk loadPackage:''....''.'.
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  1593
    ] ifFalse:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1594
        out cr.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1595
        prerequisitePackages do:[:packName |
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1596
            out nextPutLine:'Smalltalk loadPackage:''' , packName , '''.'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1597
        ]
4796
eee167a75fcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4792
diff changeset
  1598
    ].
eee167a75fcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4792
diff changeset
  1599
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  1600
    out nextPutAll:'!!
4776
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  1601
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1602
"{ package:''' , myPackage , ''' }"!!
4776
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  1603
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1604
|files|
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1605
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1606
''loading package ' , myPackage , ' ...'' infoPrintCR.
4776
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  1607
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1608
files := #(
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1609
'.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1610
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1611
    classes do:[:cls |
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1612
        |clsInfo cond fileName|
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1613
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1614
        clsInfo := self classInfoFor:cls.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1615
        cond := clsInfo conditionForInclusion.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1616
        (cond == #always or:[cond == #autoload]) ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1617
            out nextPutAll:'  '''.
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1618
            fileName := clsInfo classFileName.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1619
            fileName isNil ifTrue:[
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1620
                fileName := cls nameWithoutNameSpacePrefix
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1621
            ].
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1622
            (fileName endsWith:'.st') ifFalse:[
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1623
                fileName := fileName , '.st'
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1624
            ].
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1625
            fileName printOn:out.
4887
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  1626
            out nextPutAll:''''; cr.
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1627
        ]
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1628
    ].
4792
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  1629
    (methodsFile := self propertyAt:#methodsFile) size > 0 ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1630
         out 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1631
            nextPutAll:'  ''';
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1632
            nextPutAll:methodsFile;
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1633
            nextPutAll:'''';
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1634
            cr.
4785
4ced52c817e6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4779
diff changeset
  1635
    ].
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1636
4776
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  1637
    out nextPutAll:') asOrderedCollection.
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  1638
4789
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  1639
(Smalltalk loadClassLibraryIfAbsent:''' , self libraryName , ''') ifTrue:[
4776
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  1640
    |handle loaded|
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  1641
4785
4ced52c817e6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4779
diff changeset
  1642
    handle := ObjectFileLoader loadedObjectHandles 
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1643
                    detect:[:h | h package = ''' , myPackage , '''] ifNone:nil.
4776
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  1644
    handle ifNotNil:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1645
        loaded := Set new:(handle classes size).
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1646
        handle classes do:[:c| c isMeta ifFalse:[loaded add:c classFilename]].
4785
4ced52c817e6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4779
diff changeset
  1647
'.
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  1648
    
4792
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  1649
    methodsFile size > 0 ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1650
        out nextPutLine:('        loaded add:''' , methodsFile , '''.').
4785
4ced52c817e6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4779
diff changeset
  1651
    ].
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  1652
    out nextPutAll:'        files := files asOrderedCollection select:[:f| (loaded includes:f) not].
4776
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  1653
    ].
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  1654
].
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1655
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1656
files do:[:s |
4785
4ced52c817e6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4779
diff changeset
  1657
    ''.'' infoPrint.
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1658
    Smalltalk fileIn:s.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1659
].
4785
4ced52c817e6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4779
diff changeset
  1660
'' '' infoPrintCR.
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1661
'' done (' , myPackage , ').'' infoPrintCR.
4887
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  1662
'.
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1663
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1664
    out close
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1665
!
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1666
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1667
createMacMakefile
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1668
    "creates an mac-os makefile"
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1669
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1670
    Transcript current showCR:'Mac support not yet implemented - no mac.mak created for Mac'.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1671
!
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1672
2
claus
parents: 1
diff changeset
  1673
createMakefile
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  1674
    "creates an initial Makefile from a Make.proto file.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  1675
     Requires the stmkmf script"
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  1676
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1677
    |d top transcript|
2
claus
parents: 1
diff changeset
  1678
4821
c73b170cb6e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  1679
    OperatingSystem isUNIXlike ifTrue:[
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1680
        Transcript current showCR:'creating Makefile'.
4821
c73b170cb6e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  1681
c73b170cb6e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  1682
        d := directoryName asFilename pathName.
c73b170cb6e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  1683
        top := (d , '/' , (self findTopFrom:directoryName)) asFilename pathName.
c73b170cb6e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  1684
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1685
        transcript := Transcript current.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1686
4821
c73b170cb6e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  1687
        (OperatingSystem 
c73b170cb6e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  1688
            executeCommand:('sh ' , top , '/rules/stmkmf')
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1689
            outputTo:transcript
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1690
            errorTo:transcript
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1691
            inDirectory:d
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1692
        ) ifFalse:[
4821
c73b170cb6e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  1693
            self warn:'Could not execute stmkmf - no Makefile built.'
c73b170cb6e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  1694
        ].
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1695
    ].
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1696
    self createNTMakefile.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1697
    self createVMSMakefile.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1698
    self createMacMakefile.
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  1699
4821
c73b170cb6e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  1700
    "Modified: / 26.9.1999 / 16:18:29 / cg"
2
claus
parents: 1
diff changeset
  1701
!
claus
parents: 1
diff changeset
  1702
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1703
createNTMakefile
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1704
    "creates an nt.mak makefile"
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1705
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1706
    |d f s type appName libName startUpClass startUpSelector
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1707
     topName classes methodsFile transcript|
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1708
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1709
    classes := self classesInOrderFor:'generate ''nt.mak''-file.'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1710
    classes isNil ifTrue:[^ self].
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1711
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1712
    topName := self findTopFrom:directoryName.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1713
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1714
    transcript := Transcript current.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1715
    transcript showCR:'Generating make support for Win9x/WinNT...'.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1716
    transcript showCR:'creating bmake.bat'.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1717
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1718
    d := directoryName asFilename.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1719
    f := d construct:'bmake.bat'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1720
    s := f writeStream.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1721
    s isNil ifTrue:[
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1722
        self warn:'cannot create bmake.bat'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1723
        ^ self
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1724
    ].
4824
1dad345e6e14 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4823
diff changeset
  1725
    s nextPutLine:'if not exist object\nul mkdir objbc'. 
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1726
    s nextPutLine:'make.exe -N -f nt.mak %1 %'. 
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1727
    s close.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1728
4823
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1729
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1730
    transcript showCR:'creating bc.def'.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1731
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1732
    d := directoryName asFilename.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1733
    f := d construct:'bc.def'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1734
    s := f writeStream.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1735
    s isNil ifTrue:[
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1736
        self warn:'cannot create bc.def'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1737
        ^ self
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1738
    ].
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1739
    s nextPutLine:'LIBRARY         ' , self libraryName.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1740
    s nextPutLine:'DESCRIPTION     ''AddOn library for ST/X''
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1741
CODE            PRELOAD MOVEABLE DISCARDABLE
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1742
SEGMENTS
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1743
    INITCODE PRELOAD SHARED DISCARDABLE
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1744
EXPORTS
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1745
    __' , self libraryName , '_Init     @1'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1746
    s close.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1747
4823
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1748
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1749
    transcript showCR:'creating nt.def'.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1750
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1751
    d := directoryName asFilename.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1752
    f := d construct:'nt.def'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1753
    s := f writeStream.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1754
    s isNil ifTrue:[
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1755
        self warn:'cannot create nt.def'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1756
        ^ self
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1757
    ].
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1758
    s nextPutLine:'LIBRARY         ' , self libraryName.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1759
    s nextPutLine:'DESCRIPTION     ''AddOn library for ST/X''
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1760
CODE            EXECUTE READ SHARED
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1761
DATA            READ WRITE
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1762
SECTIONS
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1763
    INITCODE READ EXECUTE SHARED
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1764
    INITDATA READ WRITE
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1765
EXPORTS
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1766
    _' , self libraryName , '_Init'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1767
    s close.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1768
4823
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1769
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1770
    transcript showCR:'creating libInit.cc'.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1771
4823
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1772
    d := directoryName asFilename.
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1773
    f := d construct:'libInit.cc'.
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1774
    s := f writeStream.
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1775
    s isNil ifTrue:[
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1776
        self warn:'cannot create libInit.cc'.
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1777
        ^ self
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1778
    ].
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1779
    s nextPutAll:'/*
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1780
 * DO NOT EDIT 
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1781
 * automatically generated from project.prj
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1782
 */
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1783
#define __INDIRECTVMINITCALLS__
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1784
#include <stc.h>
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1785
#define INIT_TEXT_SECT /* as nothing */
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1786
#ifdef WIN32
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1787
# pragma codeseg INITCODE "INITCODE"
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1788
#else /* not WIN32 */
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1789
# if defined(__GNUC__)
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1790
#  if (__GNUC__  == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ > 2
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1791
#   undef INIT_TEXT_SECT
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1792
#   define INIT_TEXT_SECT __attribute__((section(".stxitext")))
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1793
#  endif
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1794
# endif /* not GNUC */
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1795
#endif /* not WIN32 */
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1796
#ifdef INIT_TEXT_SECT
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1797
extern void _' , self libraryName , '_Init() INIT_TEXT_SECT;
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1798
#endif
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1799
void _' , self libraryName , '_Init(pass, __pRT__, snd)
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1800
OBJ snd; struct __vmData__ *__pRT__; {
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1801
__BEGIN_PACKAGE2__("' , self libraryName , '", _' , self libraryName , '_Init, "' , self package , '");
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1802
'.
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1803
    classes notNil ifTrue:[
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1804
        classes do:[:aClass |
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1805
            |abbrev|
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1806
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1807
            abbrev := Smalltalk fileNameForClass:aClass name.
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1808
            s nextPutAll:'_'; nextPutAll:abbrev; nextPutLine:'_Init(pass,__pRT__,snd);'.
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1809
        ].
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1810
    ].
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1811
    s nextPutAll:'__END_PACKAGE__();
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1812
}
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1813
'.
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1814
    s close.
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1815
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1816
    transcript showCR:'creating nt.mak'.
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1817
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1818
    d := directoryName asFilename.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1819
    f := d construct:'nt.mak'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1820
    f exists ifTrue:[
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1821
        f renameTo:(d construct:'nt.mak.bak')
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1822
    ].
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1823
    s := f writeStream.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1824
    s isNil ifTrue:[
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1825
        self warn:'cannot create nt.mak'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1826
        ^ self
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1827
    ].
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1828
    s nextPutAll:'# $' , 'Header'. 
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1829
    s nextPutLine:'$'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1830
    s nextPutAll:'#
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1831
# -- nt.mak created from project at ' . 
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1832
    s nextPutAll:Smalltalk timeStamp. 
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1833
    s nextPutAll:'
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1834
#
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1835
# Warning: YOU SHOULD NOT MODIFY THIS FILE - MODIFY THE .prj FILE INSTEAD
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1836
# and let the ProjectBrowser recreate this file.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1837
# once you modify this file, do not recreate nt.mak again 
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1838
# - otherwise, your changes are lost.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1839
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1840
# module and directory-in-module;
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1841
# these should correspond to the directory hierarchy
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1842
# location (otherwise, ST/X will have a hard time to
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1843
# find out the packages location from its packageID)
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1844
MODULE=' , self repositoryModule ? 'unknown' , '
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1845
MODULE_DIR=' , self repositoryDirectory ? 'unknown' , '
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1846
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1847
# default installation directory:
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1848
# (overwrite with ''make INSTALLTOP_DIR=... install'')
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1849
# the INSTALLBASE is imported from configurations... and usually
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1850
# defaults to something like /opt/smalltalk.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1851
# (overwrite with ''make INSTALLBASE=... install'')
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1852
INSTALLTOP_DIR=$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR)
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1853
INSTALLLIB_DIR=$(INSTALLTOP_DIR)
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1854
INSTALLBIN_DIR=$(INSTALLTOP_DIR)
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1855
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1856
#
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1857
# position (of this package) in directory hierarchy:
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1858
# (must point to ST/X top directory, for tools and includes)
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1859
TOP=' , topName ,'
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1860
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1861
!!INCLUDE "$(TOP)\rules\stdHdrNT"
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1862
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1863
# subdirectories where targets are to be made:
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1864
SUBDIRS=
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1865
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1866
# subdirectories where Makefiles are to be made:
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1867
# (only define if different from SUBDIRS)
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1868
# ALLSUBDIRS=
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1869
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1870
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1871
# the name of your classLibrary:
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1872
# ********** REQUIRED: CHECK the next line ***
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1873
LIBNAME=' , self libraryName , '
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1874
4823
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  1875
LIB_BASE   =0x05000000
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1876
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1877
# the next define suppresses installation of 
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1878
# the classes as autoloaded (i.e. not added to abbrev.stc). 
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1879
SUPPRESS_LOCAL_ABBREVS=1
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1880
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1881
# the package is stored as an ID in classes and methods
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1882
# to identify code belonging to this project.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1883
# It also specifies the position in the source repository
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1884
# and directory tree, when packages are loaded by packageID.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1885
# ********** REQUIRED: CHECK the next line ***
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1886
PACKAGE=$(MODULE):$(MODULE_DIR)
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1887
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1888
# Argument(s) to the stc compiler.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1889
#  -H.         : create header files locally
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1890
#                (if removed, they will be created as common
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1891
#  -Pxxx       : defines the package
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1892
#  -Zxxx       : a prefix for variables within the classLib
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1893
#  -Dxxx       : defines passed to to CC for inline C-code
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1894
#  -Ixxx       : include path passed to CC for inline C-code
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1895
#  +optspace   : optimized for space
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1896
#  +optspace2  : optimized more for space
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1897
#  +optspace3  : optimized even more for space
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1898
#  +optinline  : generate inline code for some ST constructs
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1899
#  +inlineNew  : additionally inline new
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1900
#  +inlineMath : additionally inline some floatPnt math stuff
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1901
#
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1902
# ********** OPTIONAL: MODIFY the next line(s) ***
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1903
# STCLOCALOPTIMIZATIONS=+optinline +inlineNew
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1904
# STCLOCALOPTIMIZATIONS=+optspace3
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1905
STCLOCALOPTIMIZATIONS=+optspace3
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1906
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1907
# Argument(s) to the stc compiler.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1908
#  -warn            : no warnings
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1909
#  -warnNonStandard : no warnings about ST/X extensions
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1910
#  -warnEOLComments : no warnings about EOL comment extension
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1911
#  -warnPrivacy     : no warnings about privateClass extension
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1912
#
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1913
# ********** OPTIONAL: MODIFY the next line(s) ***
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1914
# STCWARNINGS=-warn
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1915
# STCWARNINGS=-warnNonStandard
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1916
# STCWARNINGS=-warnEOLComments
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1917
STCWARNINGS='.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1918
        (self propertyAt:#'make.stc.warnEOLComments') == false ifTrue:[
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1919
            s nextPutAll:'-warnEOLComments '.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1920
        ].
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1921
        (self propertyAt:#'make.stc.warnNonStandard') == false ifTrue:[
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1922
            s nextPutAll:'-warnNonStandard '.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1923
        ].
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1924
        s nextPutAll:((self propertyAt:#'make.stc.WARNINGOPTIONS') ? '') , '
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1925
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1926
# if your embedded C code requires any system includes, 
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1927
# add the path(es) here:, 
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1928
# ********** OPTIONAL: MODIFY the next lines ***
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1929
# LOCALINCLUDES=-Ifoo -Ibar
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1930
LOCALINCLUDES=' , ((self propertyAt:#'make.stc.LOCALINCLUDES') ? '') , '
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1931
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1932
# if you need any additional defines for embedded C code, 
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1933
# add them here:, 
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1934
# ********** OPTIONAL: MODIFY the next lines ***
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1935
# LOCALDEFINES=-Dfoo -Dbar -DDEBUG
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1936
LOCALDEFINES=' , ((self propertyAt:#'make.stc.LOCALDEFINES') ? '') , '
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1937
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1938
STCLOCALOPT=-I. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALINCLUDES) $(LOCALDEFINES) -H. ''-P$(PACKAGE)'' ''-varPrefix=$(LIBNAME)'' $(COMMONSYMFLAG) $(INITCODESEPFLAG)
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1939
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1940
# ********** OPTIONAL: MODIFY the next line ***
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1941
# additional C-libraries that should be pre-linked with the class-objects
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1942
LD_OBJ_LIBS=' , ((self propertyAt:#'make.LD_OBJ_LIBS') ? '') , '
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1943
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1944
# ********** OPTIONAL: MODIFY the next line ***
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1945
# additional C targets or libraries should be added below
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1946
LOCAL_EXTRA_TARGETS=' , ((self propertyAt:#'make.LOCAL_EXTRA_TARGETS') ? '') , '
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1947
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1948
#ALL:: preMake $(LIBDIR)\$(LIBNAME).lib $(BINDIR)\$(LIBNAME).dll postMake
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1949
ALL:: $(LIBDIR)\$(LIBNAME).lib $(BINDIR)\$(LIBNAME).dll
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1950
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1951
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1952
'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1953
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1954
"/    type := #library.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1955
"/    appName := 'app'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1956
"/    libName := 'lib'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1957
"/    startUpClass := 'Smalltalk'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1958
"/    startUpSelector := 'start'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1959
"/
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1960
"/    properties notNil ifTrue:[
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1961
"/        type := properties at:#projectType ifAbsent:type.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1962
"/        appName := properties at:#applicationName ifAbsent:appName.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1963
"/        startUpClass := properties at:#startupClass ifAbsent:startUpClass.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1964
"/        startUpSelector := properties at:#startupSelector ifAbsent:startUpSelector.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1965
"/    ].
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1966
"/
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1967
"/    s nextPutAll:'#
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1968
"/# define the name of the library to create
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1969
"/#
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1970
"/'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1971
"/    s nextPutAll:'LIBNAME=lib' , appName; cr; cr.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1972
"/
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1973
"/    s nextPutAll:'#
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1974
"/# the target rule:
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1975
"/#
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1976
"/all::   abbrev.stc objs genClassList $(OBJTARGET)
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1977
"/
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1978
"/'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1979
"/
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1980
"/    type == #executable ifTrue:[
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1981
"/        s nextPutAll:'PROGS = ' , appName; cr.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1982
"/        s nextPutAll:('STARTUP_CLASS=' , startUpClass); cr.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1983
"/        s nextPutAll:'STARTUP_SELECTOR="' , startUpSelector; nextPutAll:'"'; cr.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1984
"/    ].
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1985
"/
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1986
"/    s nextPutAll:'#
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1987
"/# define the object files that are to be created
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1988
"/#
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1989
"/'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1990
    s nextPutAll:'OBJS='.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1991
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1992
    classes do:[:aClass |
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1993
        |fileName clsInfo cond include|
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1994
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1995
        clsInfo := self classInfoFor:aClass.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1996
        include := true.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1997
        clsInfo notNil ifTrue:[
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1998
            cond := clsInfo conditionForInclusion.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  1999
            (self conditionForInclusionIsTrue:cond) ifFalse:[
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2000
                include := false.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2001
            ] ifTrue:[
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2002
                (self conditionForAutoloadIsTrue:cond) ifTrue:[
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2003
                    include := false
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2004
                ]
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2005
            ].
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2006
        ].
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2007
        include ifTrue:[
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2008
            s nextPutAll:' \'. s cr.
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2009
            fileName := clsInfo classFileName.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2010
            fileName isNil ifTrue:[
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2011
                fileName := Smalltalk fileNameForClass:aClass name.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2012
            ].
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2013
            fileName := fileName asFilename withoutSuffix name.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2014
            s nextPutAll:'  $(OUTDIR)'; nextPutAll:fileName; nextPutAll:'.$(O)'.
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2015
        ]
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2016
    ].
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2017
    (methodsFile := self propertyAt:#methodsFile) size > 0 ifTrue:[
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2018
         s nextPutAll:' \'. s cr.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2019
         s nextPutAll:'  $(OUTDIR)'; 
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2020
           nextPutAll:(methodsFile asFilename withoutSuffix baseName);
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2021
           nextPutAll:'.$(O)'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2022
    ].
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2023
    s cr.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2024
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2025
    s nextPutAll:'
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2026
# add more install actions here
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2027
install:
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2028
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2029
# add more install actions for aux-files (resources) here
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2030
installAux:
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2031
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2032
# add more preMake actions here
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2033
preMake:
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2034
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2035
# add more postMake actions here
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2036
postMake: cleanjunk
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2037
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2038
#clean::
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2039
#' , Character tab , '-del $(OUTDIR)*.obj
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2040
#' , Character tab , '-del *.sc
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2041
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2042
#clobber::
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2043
#' , Character tab , '-del $(OUTDIR)*.obj
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2044
#' , Character tab , '-del *.sc
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2045
#' , Character tab , '-del *.dll
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2046
#' , Character tab , '-del *.lib
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2047
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2048
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2049
!!INCLUDE $(TOP)\rules\stdRulNT
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2050
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2051
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2052
'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2053
    classes notNil ifTrue:[
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2054
        classes do:[:aClass |
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2055
            |fileName clsInfo|
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2056
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2057
            clsInfo := self classInfoFor:aClass.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2058
            fileName := clsInfo classFileName.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2059
            fileName isNil ifTrue:[
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2060
                fileName := Smalltalk fileNameForClass:aClass name.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2061
            ].
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2062
            fileName := fileName asFilename withoutSuffix name.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2063
            s nextPutAll:'$(OUTDIR)'; nextPutAll:fileName; nextPutAll:'.$(O): '.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2064
            s nextPutAll:fileName; nextPutAll:'.st '.
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2065
"/            aClass allSuperclassesDo:[:superClass|
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2066
"/                s nextPutAll:(Smalltalk fileNameForClass:superClass name) , '.$(H) '.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2067
"/            ].
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2068
            s nextPutAll:'$(STCHDR)';  cr.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2069
        ].
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2070
    ].
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2071
    s nextPutAll:'# ENDMAKEDEPEND --- do not remove this line'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2072
    s cr; cr.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2073
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2074
    type == #executable ifTrue:[
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2075
        s nextPutAll:'ALL:: $(PROGS)'; cr.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2076
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2077
        s nextPutAll:appName.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2078
        s nextPutAll:':: main.$(O) classList.$(O) $(OBJS)'; cr.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2079
        s tab;      nextPutAll:'$(LD) $(ST_LDFLAG) $(LDFLAGS) -o ';
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2080
                    nextPutAll:appName;
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2081
                    nextPutAll:' \'; cr.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2082
        s tab; tab; nextPutAll:'$(CRT0) main.$(O) classList.$(O) $(OBJS) $(EXTRA_OBJ) $(LIBOBJS) \'; cr.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2083
        s tab; tab; nextPutAll:'$(LIBRUNDIR)/hidata.o $(LIBRUN) \'; cr.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2084
        s tab; tab; nextPutAll:'$(MATHLIB) $(EXTRALIBS) -lXext $(SYSLIBS) $(OTHERLIBS) $(CRTN)'; cr.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2085
    ].
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2086
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2087
    s close
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2088
4824
1dad345e6e14 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4823
diff changeset
  2089
    "Modified: / 27.9.1999 / 00:23:16 / cg"
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2090
!
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2091
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2092
createProjectFiles
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2093
    "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
  2094
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2095
    directoryName asFilename exists ifFalse:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2096
	(self confirm:'create new projectDirectory: ' , directoryName) 
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2097
	    ifFalse:[^ self].
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2098
	OperatingSystem recursiveCreateDirectory:directoryName.
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2099
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2100
    self createMakefile.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2101
    self createSourcefiles.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2102
    self createProtoMakefile.
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2103
    (self propertyAt:#deliverLoadAllFile) == true ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2104
	self createLoadAllFile
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2105
    ].
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2106
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2107
2
claus
parents: 1
diff changeset
  2108
createProtoMakefile
claus
parents: 1
diff changeset
  2109
    "creates a Make.proto file"
claus
parents: 1
diff changeset
  2110
362
claus
parents: 356
diff changeset
  2111
    |d f s type appName libName startUpClass startUpSelector
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2112
     topName classes methodsFile|
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2113
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2114
    classes := self classesInOrderFor:'generate ''Make.proto''-file.'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2115
    classes isNil ifTrue:[^ self].
2
claus
parents: 1
diff changeset
  2116
362
claus
parents: 356
diff changeset
  2117
    topName := self findTopFrom:directoryName.
2
claus
parents: 1
diff changeset
  2118
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2119
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2120
    Transcript current showCR:'creating Make.proto'.
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  2121
356
claus
parents: 338
diff changeset
  2122
    d := directoryName asFilename.
2
claus
parents: 1
diff changeset
  2123
    f := d construct:'Make.proto'.
claus
parents: 1
diff changeset
  2124
    f exists ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2125
        f renameTo:(d construct:'Make.proto.bak')
2
claus
parents: 1
diff changeset
  2126
    ].
claus
parents: 1
diff changeset
  2127
    s := f writeStream.
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  2128
    s isNil ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2129
        self warn:'cannot create prototype Makefile'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2130
        ^ self
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  2131
    ].
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2132
    s nextPutAll:'# $' , 'Header'. 
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2133
    s nextPutLine:'$'.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2134
    s nextPutAll:'#
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2135
# -- Make.proto created from project at ' . 
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2136
    s nextPutAll:Smalltalk timeStamp. 
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2137
    s nextPutAll:'
2
claus
parents: 1
diff changeset
  2138
#
4786
2375c3d2bffc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4785
diff changeset
  2139
# Warning: YOU SHOULD NOT MODIFY THIS FILE - MODIFY THE .prj FILE INSTEAD
2375c3d2bffc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4785
diff changeset
  2140
# and let the ProjectBrowser recreate this file.
2375c3d2bffc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4785
diff changeset
  2141
# once you modify this file, do not rerun
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2142
# stmkmp or recreate the Make.proto again - otherwise, your changes are lost.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2143
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2144
# module and directory-in-module;
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2145
# these should correspond to the directory hierarchy
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2146
# location (otherwise, ST/X will have a hard time to
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2147
# find out the packages location from its packageID)
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2148
MODULE=' , self repositoryModule ? 'unknown' , '
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2149
MODULE_DIR=' , self repositoryDirectory ? 'unknown' , '
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2150
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2151
# default installation directory:
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2152
# (overwrite with ''make INSTALLTOP_DIR=... install'')
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2153
# the INSTALLBASE is imported from configurations... and usually
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2154
# defaults to something like /opt/smalltalk.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2155
# (overwrite with ''make INSTALLBASE=... install'')
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2156
INSTALLTOP_DIR=$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR)
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2157
INSTALLLIB_DIR=$(INSTALLTOP_DIR)
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2158
INSTALLBIN_DIR=$(INSTALLTOP_DIR)
362
claus
parents: 356
diff changeset
  2159
claus
parents: 356
diff changeset
  2160
#
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2161
# position (of this package) in directory hierarchy:
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2162
# (must point to ST/X top directory, for tools and includes)
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2163
TOP=' , topName ,'
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2164
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2165
# subdirectories where targets are to be made:
362
claus
parents: 356
diff changeset
  2166
SUBDIRS=
claus
parents: 356
diff changeset
  2167
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2168
# subdirectories where Makefiles are to be made:
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2169
# (only define if different from SUBDIRS)
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2170
# ALLSUBDIRS=
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2171
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2172
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2173
# the name of your classLibrary:
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2174
# ********** REQUIRED: CHECK the next line ***
4789
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2175
LIBNAME=' , self libraryName , '
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2176
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2177
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2178
# the next define suppresses installation of 
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2179
# the classes as autoloaded (i.e. not added to abbrev.stc). 
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2180
SUPPRESS_LOCAL_ABBREVS=1
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2181
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2182
# the package is stored as an ID in classes and methods
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2183
# to identify code belonging to this project.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2184
# It also specifies the position in the source repository
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2185
# and directory tree, when packages are loaded by packageID.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2186
# ********** REQUIRED: CHECK the next line ***
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2187
PACKAGE=$(MODULE):$(MODULE_DIR)
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2188
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2189
# Argument(s) to the stc compiler.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2190
#  -H.         : create header files locally
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2191
#                (if removed, they will be created as common
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2192
#  -Pxxx       : defines the package
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2193
#  -Zxxx       : a prefix for variables within the classLib
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2194
#  -Dxxx       : defines passed to to CC for inline C-code
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2195
#  -Ixxx       : include path passed to CC for inline C-code
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2196
#  +optspace   : optimized for space
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2197
#  +optspace2  : optimized more for space
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2198
#  +optspace3  : optimized even more for space
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2199
#  +optinline  : generate inline code for some ST constructs
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2200
#  +inlineNew  : additionally inline new
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2201
#  +inlineMath : additionally inline some floatPnt math stuff
362
claus
parents: 356
diff changeset
  2202
#
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2203
# ********** OPTIONAL: MODIFY the next line(s) ***
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2204
# STCLOCALOPTIMIZATIONS=+optinline +inlineNew
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2205
# STCLOCALOPTIMIZATIONS=+optspace3
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2206
STCLOCALOPTIMIZATIONS=+optspace3
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2207
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2208
# Argument(s) to the stc compiler.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2209
#  -warn            : no warnings
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2210
#  -warnNonStandard : no warnings about ST/X extensions
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2211
#  -warnEOLComments : no warnings about EOL comment extension
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2212
#  -warnPrivacy     : no warnings about privateClass extension
362
claus
parents: 356
diff changeset
  2213
#
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2214
# ********** OPTIONAL: MODIFY the next line(s) ***
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2215
# STCWARNINGS=-warn
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2216
# STCWARNINGS=-warnNonStandard
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2217
# STCWARNINGS=-warnEOLComments
4796
eee167a75fcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4792
diff changeset
  2218
STCWARNINGS='.
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2219
        (self propertyAt:#'make.stc.warnEOLComments') == false ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2220
            s nextPutAll:'-warnEOLComments '.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2221
        ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2222
        (self propertyAt:#'make.stc.warnNonStandard') == false ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2223
            s nextPutAll:'-warnNonStandard '.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2224
        ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2225
        s nextPutAll:((self propertyAt:#'make.stc.WARNINGOPTIONS') ? '') , '
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2226
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2227
# if your embedded C code requires any system includes, 
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2228
# add the path(es) here:, 
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2229
# ********** OPTIONAL: MODIFY the next lines ***
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2230
# LOCALINCLUDES=-Ifoo -Ibar
4796
eee167a75fcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4792
diff changeset
  2231
LOCALINCLUDES=' , ((self propertyAt:#'make.stc.LOCALINCLUDES') ? '') , '
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2232
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2233
# if you need any additional defines for embedded C code, 
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2234
# add them here:, 
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2235
# ********** OPTIONAL: MODIFY the next lines ***
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2236
# LOCALDEFINES=-Dfoo -Dbar -DDEBUG
4796
eee167a75fcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4792
diff changeset
  2237
LOCALDEFINES=' , ((self propertyAt:#'make.stc.LOCALDEFINES') ? '') , '
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2238
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2239
STCLOCALOPT=-I. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALINCLUDES) $(LOCALDEFINES) -H. ''-P$(PACKAGE)'' ''-Z$(LIBNAME)'' $(COMMONSYMFLAG) $(INITCODESEPFLAG)
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2240
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2241
# ********** OPTIONAL: MODIFY the next line ***
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2242
# additional C-libraries that should be pre-linked with the class-objects
4796
eee167a75fcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4792
diff changeset
  2243
LD_OBJ_LIBS=' , ((self propertyAt:#'make.LD_OBJ_LIBS') ? '') , '
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2244
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2245
# ********** OPTIONAL: MODIFY the next line ***
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2246
# additional C targets or libraries should be added below
4796
eee167a75fcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4792
diff changeset
  2247
LOCAL_EXTRA_TARGETS=' , ((self propertyAt:#'make.LOCAL_EXTRA_TARGETS') ? '') , '
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2248
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2249
all:: preMake classLibRule postMake
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2250
2
claus
parents: 1
diff changeset
  2251
claus
parents: 1
diff changeset
  2252
'.
claus
parents: 1
diff changeset
  2253
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2254
"/    type := #library.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2255
"/    appName := 'app'.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2256
"/    libName := 'lib'.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2257
"/    startUpClass := 'Smalltalk'.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2258
"/    startUpSelector := 'start'.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2259
"/
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2260
"/    properties notNil ifTrue:[
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2261
"/        type := properties at:#projectType ifAbsent:type.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2262
"/        appName := properties at:#applicationName ifAbsent:appName.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2263
"/        startUpClass := properties at:#startupClass ifAbsent:startUpClass.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2264
"/        startUpSelector := properties at:#startupSelector ifAbsent:startUpSelector.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2265
"/    ].
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2266
"/
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2267
"/    s nextPutAll:'#
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2268
"/# define the name of the library to create
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2269
"/#
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2270
"/'.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2271
"/    s nextPutAll:'LIBNAME=lib' , appName; cr; cr.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2272
"/
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2273
"/    s nextPutAll:'#
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2274
"/# the target rule:
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2275
"/#
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2276
"/all::   abbrev.stc objs genClassList $(OBJTARGET)
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2277
"/
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2278
"/'.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2279
"/
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2280
"/    type == #executable ifTrue:[
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2281
"/        s nextPutAll:'PROGS = ' , appName; cr.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2282
"/        s nextPutAll:('STARTUP_CLASS=' , startUpClass); cr.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2283
"/        s nextPutAll:'STARTUP_SELECTOR="' , startUpSelector; nextPutAll:'"'; cr.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2284
"/    ].
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2285
"/
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2286
"/    s nextPutAll:'#
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2287
"/# define the object files that are to be created
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2288
"/#
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2289
"/'.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2290
    s nextPutAll:'OBJS='.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2291
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2292
    classes do:[:aClass |
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2293
        |clsInfo cond include fileName|
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2294
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2295
        clsInfo := self classInfoFor:aClass.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2296
        include := true.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2297
        clsInfo notNil ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2298
            cond := clsInfo conditionForInclusion.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2299
            (self conditionForInclusionIsTrue:cond) ifFalse:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2300
                include := false.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2301
            ] ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2302
                (self conditionForAutoloadIsTrue:cond) ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2303
                    include := false
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2304
                ]
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2305
            ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2306
        ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2307
        include ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2308
            s nextPutAll:' \'. s cr.
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2309
            fileName := clsInfo classFileName.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2310
            fileName isNil ifTrue:[
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2311
                fileName := Smalltalk fileNameForClass:aClass name.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2312
            ].
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2313
            fileName := fileName asFilename withoutSuffix name.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2314
            s nextPutAll:'  '; nextPutAll:fileName; nextPutAll:'.$(O)'.
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2315
        ]
2
claus
parents: 1
diff changeset
  2316
    ].
4792
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  2317
    (methodsFile := self propertyAt:#methodsFile) size > 0 ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2318
         s nextPutAll:' \'. s cr.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2319
         s nextPutAll:'  '; 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2320
           nextPutAll:(methodsFile asFilename withoutSuffix baseName);
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2321
           nextPutAll:'.$(O)'.
4785
4ced52c817e6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4779
diff changeset
  2322
    ].
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2323
    s cr.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2324
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2325
    s nextPutAll:'
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2326
# add more install actions here
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2327
install::
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2328
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2329
# add more install actions for aux-files (resources) here
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2330
installAux::
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2331
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2332
# add more preMake actions here
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2333
preMake::
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2334
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2335
# add more postMake actions here
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2336
postMake:: cleanjunk
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2337
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2338
cleanjunk::
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2339
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2340
clean::
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2341
' , Character tab , '-rm -f *.o *.H
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2342
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2343
clobber::
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2344
' , Character tab , '-rm -f *.so *.dll
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2345
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2346
$(INSTALLBASE)::
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2347
' , Character tab , '@test -d $@ || mkdir $@
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2348
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2349
$(INSTALLBASE)/packages:: $(INSTALLBASE)
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2350
' , Character tab , '@test -d $@ || mkdir $@
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2351
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2352
$(INSTALLBASE)/packages/$(MODULE):: $(INSTALLBASE)/packages
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2353
' , Character tab , '@test -d $@ || mkdir $@
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2354
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2355
$(INSTALLBASE)/packages/$(MODULE)/osi:: $(INSTALLBASE)/packages/$(MODULE)
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2356
' , Character tab , '@test -d $@ || mkdir $@
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2357
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2358
$(INSTALLBASE)/packages/$(MODULE)/osi/asn1:: $(INSTALLBASE)/packages/$(MODULE)/osi
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2359
' , Character tab , '@test -d $@ || mkdir $@
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2360
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2361
$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR):: $(INSTALLBASE)/packages/$(MODULE)
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2362
' , Character tab , '@test -d $@ || mkdir $@
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2363
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2364
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
362
claus
parents: 356
diff changeset
  2365
'.
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2366
"/    classes notNil ifTrue:[
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2367
"/        classes do:[:aClass |
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2368
"/            |abbrev|
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2369
"/
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2370
"/            abbrev := Smalltalk fileNameForClass:aClass name.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2371
"/            s nextPutAll:abbrev; nextPutAll:'.$(O): '.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2372
"/            s nextPutAll:abbrev; nextPutAll:'.st '.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2373
"/            aClass allSuperclassesDo:[:superClass|
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2374
"/                s nextPutAll:(Smalltalk fileNameForClass:superClass name) , '.$(H) '.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2375
"/            ].
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2376
"/            s nextPutAll:'$(STCHDR)';  cr.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2377
"/        ].
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2378
"/    ].
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2379
    s nextPutAll:'# ENDMAKEDEPEND --- do not remove this line'.
362
claus
parents: 356
diff changeset
  2380
    s cr; cr.
2
claus
parents: 1
diff changeset
  2381
claus
parents: 1
diff changeset
  2382
    type == #executable ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2383
        s nextPutAll:'all:: $(PROGS)'; cr.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2384
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2385
        s nextPutAll:appName.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2386
        s nextPutAll:':: main.o classList.o $(OBJS)'; cr.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2387
        s tab;      nextPutAll:'$(LD) $(ST_LDFLAG) $(LDFLAGS) -o ';
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2388
                    nextPutAll:appName;
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2389
                    nextPutAll:' \'; cr.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2390
        s tab; tab; nextPutAll:'$(CRT0) main.$(O) classList.$(O) $(OBJS) $(EXTRA_OBJ) $(LIBOBJS) \'; cr.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2391
        s tab; tab; nextPutAll:'$(LIBRUNDIR)/hidata.o $(LIBRUN) \'; cr.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2392
        s tab; tab; nextPutAll:'$(MATHLIB) $(EXTRALIBS) -lXext $(SYSLIBS) $(OTHERLIBS) $(CRTN)'; cr.
2
claus
parents: 1
diff changeset
  2393
    ].
claus
parents: 1
diff changeset
  2394
claus
parents: 1
diff changeset
  2395
    s close
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  2396
4069
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  2397
    "Modified: / 23.3.1999 / 14:20:09 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2398
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2399
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2400
createSourcefiles
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2401
    "creates all Smalltalk-source files in the project directory"
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2402
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2403
    |classes methods methodClasses dir stream|
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2404
2956
952a09bdeed1 Use Filename instead of obsolete FileDirectory
Stefan Vogel <sv@exept.de>
parents: 2907
diff changeset
  2405
    dir := self directory asFilename.
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2406
    Transcript current showCR:'creating sources in ' , dir pathName , ' ...'; endEntry.
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2407
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2408
    classes := self classes.
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2409
    classes size == 0 ifTrue:[
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2410
        self warn:'no classes in current project'
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2411
    ] ifFalse:[
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2412
        classes do:[:aClass |
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2413
            aClass isLoaded ifFalse:[
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2414
                aClass autoload.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2415
            ].
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2416
        ].
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2417
        "/ to not list private classes
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2418
        classes := classes select:[:cls | cls owningClass isNil].
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2419
        classes := classes topologicalSort:[:a :b | a isSubclassOf:b].
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2420
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2421
        classes do:[:aClass |
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2422
            Transcript current show:' ... '; showCR:aClass name, '.st'; endEntry.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2423
            aClass fileOutIn:dir
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2424
        ]
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2425
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2426
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2427
    methods := self individualMethods.
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2428
    methods size > 0 ifTrue:[
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2429
        methods := methods asIdentitySet.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2430
        "
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2431
         get classes ...
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2432
        "
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2433
        methodClasses := IdentitySet new.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2434
        methods do:[:m | 
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2435
                        |mCls|
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2436
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2437
                        mCls := m containingClass.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2438
                        mCls isMeta ifTrue:[
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2439
                            mCls := mCls soleInstance.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2440
                        ].
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2441
                        methodClasses add:mCls].
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2442
        "
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2443
         fileOut by class
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2444
        "
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2445
        methodClasses do:[:cls |
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2446
            stream := (self directory asFilename construct:(cls name , '.chg')) writeStream.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2447
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2448
            Transcript current show:' ... '; showCR:cls name, '.chg'; endEntry.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2449
            methods do:[:m |
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2450
                |mCls|
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2451
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2452
                mCls := m containingClass.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2453
                (mCls == cls or:[mCls == cls class]) ifTrue:[
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2454
                    mCls fileOutMethod:m on:stream.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2455
                ].
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2456
                stream cr.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2457
            ].
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2458
            stream close.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2459
        ].
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2460
    ].
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  2461
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
  2462
    "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
  2463
    "Modified: 18.9.1997 / 18:50:34 / stefan"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2464
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2465
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2466
createVMSMakefile
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2467
    "creates an vms.mak makefile"
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2468
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2469
    Transcript current showCR:'VMS support not yet implemented - no vms.mak created'.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2470
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2471
!
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2472
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2473
findTopFrom:directoryName
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2474
    "returns the relative path from directoryName to the TOP
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2475
     directory."
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2476
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2477
    |topName relParent foundTop|
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2478
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2479
    "/ find TOP
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2480
    relParent := '..'.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2481
    foundTop := false.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2482
    [foundTop] whileFalse:[
4820
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  2483
        topName := directoryName asFilename construct:relParent.
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  2484
        ((topName construct:'stx') construct:'configurations') exists ifTrue:[
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  2485
            ((topName construct:'stx') construct:'include') exists ifTrue:[
4821
c73b170cb6e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  2486
                ^ relParent asFilename constructString:'stx'.
4820
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  2487
            ]
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  2488
        ].
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  2489
        (topName construct:'configurations') exists ifTrue:[
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  2490
            (topName construct:'include') exists ifTrue:[
4888
8a44ac394b75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4887
diff changeset
  2491
                ^ relParent asFilename name
4820
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  2492
            ]
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  2493
        ].
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  2494
        relParent := relParent asFilename constructString:'..'.
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  2495
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  2496
        topName isRootDirectory ifTrue:[
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  2497
            self warn:'could not find TOP; assume absolute path to TOP'.
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  2498
            ^ nil.
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2499
"/            topName := '/usr/local/lib/smalltalk'.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2500
"/            foundTop := true.
4820
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  2501
        ]
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2502
    ].
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2503
    ^ topName pathName
4820
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  2504
4821
c73b170cb6e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  2505
    "Modified: / 26.9.1999 / 16:15:14 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2506
! !
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2507
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2508
!Project methodsFor:'printing & storing'!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2509
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2510
displayString
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2511
    ^ super displayString , '(''' , (name ? '<unnamed>') , ''')'
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2512
! !
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2513
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2514
!Project methodsFor:'properties'!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2515
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2516
addClass:classOrClassName
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2517
    "add a class to the project"
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2518
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2519
    |fn|
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2520
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2521
    (classOrClassName isBehavior and:[classOrClassName isLoaded]) ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2522
        fn := classOrClassName classFilename.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2523
    ].
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2524
    fn isNil ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2525
        fn := (Smalltalk fileNameForClass:classOrClassName) , '.st'
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2526
    ].
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2527
    self addClass:classOrClassName classFileName:fn
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2528
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2529
!
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2530
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2531
addClass:classOrClassName classFileName:fileName
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2532
    "add a class to the project"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2533
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2534
    self
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2535
	addClass:classOrClassName 
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2536
	conditionForInclusion:#always 
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2537
	classFileName:fileName
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2538
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2539
!
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2540
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2541
addClass:classOrClassName conditionForInclusion:conditionBlock classFileName:fileName
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2542
    "add a class to the project"
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2543
4789
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2544
    |i clsName|
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2545
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2546
    (clsName := classOrClassName) isBehavior ifTrue:[
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2547
        clsName := classOrClassName name
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2548
    ].
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2549
    (clsName startsWith:'Smalltalk::') ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2550
        clsName := clsName copyFrom:'Smalltalk::' size + 1.
4789
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2551
    ].
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2552
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2553
    i := ClassInfo new.
4789
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2554
    i className:clsName.
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2555
    i classFileName:fileName.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2556
    i conditionForInclusion:conditionBlock.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2557
    self addClassInfo:i
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2558
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2559
4089
abcd3430bb9c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  2560
addClassInfo:newInfo
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2561
    "add a class info to the project"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2562
4315
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  2563
    |infoCollection index nm prefix|
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2564
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2565
    (infoCollection := self classInfo) isNil ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2566
	self classInfo:(infoCollection := OrderedCollection new).
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2567
    ].
4315
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  2568
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  2569
    index := infoCollection findFirst:[:i | |nm1 nm2|
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2570
					nm1 := i className.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2571
					nm2 := newInfo className.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2572
					nm1 = nm2
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2573
				      ].
4089
abcd3430bb9c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  2574
    index ~~ 0 ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2575
	infoCollection at:index put:newInfo
4089
abcd3430bb9c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  2576
    ] ifFalse:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2577
	infoCollection add:newInfo
4089
abcd3430bb9c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  2578
    ]
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2579
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2580
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2581
addMethod:methodName inClass:classOrClassName conditionForInclusion:condition fileName:optionalFileName
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2582
    "add a method to the project"
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2583
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2584
    |i|
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2585
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2586
    i := MethodInfo new.
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2587
    i className:classOrClassName.
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2588
    i methodName:methodName.
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2589
    i fileName:optionalFileName.
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2590
    i conditionForInclusion:condition.
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2591
    self addMethodInfo:i
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2592
!
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2593
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2594
addMethod:methodOrSelector inClass:aClassOrClassName fileName:fileName
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2595
    "add an individual method to the project"
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2596
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2597
    |i|
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2598
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2599
    i := MethodInfo new.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2600
    i methodName:methodOrSelector.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2601
    i className:aClassOrClassName.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2602
    i fileName:fileName.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2603
    self addMethodInfo:i
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2604
!
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  2605
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2606
addMethodInfo:newInfo
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2607
    "add a method info to the project"
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2608
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2609
    |infoCollection index nm prefix|
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2610
4887
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2611
    infoCollection := self methodInfo.
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2612
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2613
    index := infoCollection findFirst:[:i | |cnm1 cnm2|
4887
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2614
                                        cnm1 := i className.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2615
                                        cnm2 := newInfo className.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2616
                                        (cnm1 includes:$:) ifFalse:[
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2617
                                            cnm1 := self defaultNameSpace name , '::' , cnm1
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2618
                                        ].
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2619
                                        (cnm2 includes:$:) ifFalse:[
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2620
                                            cnm2 := self defaultNameSpace name , '::' , cnm2
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2621
                                        ].
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2622
                                        cnm1 = cnm2 and:[i methodName = newInfo methodName]
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2623
                                      ].
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2624
    "/ strip off nameSpace prefix, if its the same as
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2625
    "/ the default ...
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2626
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2627
    nm := newInfo className.
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2628
    prefix := self defaultNameSpace name , '::'.
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2629
    (nm startsWith:prefix) ifTrue:[
4887
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2630
        nm := nm copyFrom:(prefix size + 1).
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2631
        newInfo className:nm asSymbol.
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2632
    ].
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2633
    index ~~ 0 ifTrue:[
4887
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2634
        infoCollection at:index put:newInfo
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2635
    ] ifFalse:[
4887
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2636
        infoCollection add:newInfo
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2637
    ]
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2638
!
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2639
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2640
classInfo:aClassInfoCollection
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2641
    "set the class info of the project"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2642
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  2643
    self propertyAt:#classInfo put:aClassInfoCollection
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2644
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2645
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2646
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2647
comment
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2648
    "return the comment of the project"
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2649
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2650
    properties isNil ifTrue:[^ ''].
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2651
    ^ properties at:#comment ifAbsent:''
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2652
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2653
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2654
comment:aString
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2655
    "set the projects comment"
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2656
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  2657
    self propertyAt:#comment put:aString
4070
682f720cd0f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4069
diff changeset
  2658
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2659
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2660
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2661
documentationURL
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2662
    "return the documentation-URL of the project"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2663
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2664
    properties isNil ifTrue:[^ nil].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2665
    ^ properties at:#documentationURL ifAbsent:nil
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2666
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2667
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2668
documentationURL:anURLString
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2669
    "set the projects documentation-URL"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2670
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  2671
    self propertyAt:#documentationURL put:anURLString
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  2672
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2673
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2674
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2675
methodInfo:aMethodInfoCollection
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2676
    "set the method info of the project"
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2677
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2678
    self propertyAt:#methodInfo put:aMethodInfoCollection
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2679
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2680
!
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2681
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2682
properties
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2683
    "return the property dictionary"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2684
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2685
    ^ properties
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2686
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2687
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2688
properties:p
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2689
    "set the property dictionary"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2690
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2691
    properties := p
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2692
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2693
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  2694
propertyAt:aKey
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2695
    "return a property; the key is a symbol"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2696
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  2697
    properties isNil ifTrue:[^ nil].
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  2698
    ^ properties at:aKey ifAbsent:nil.
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  2699
!
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  2700
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  2701
propertyAt:aKey put:aValue
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2702
    "set a property; the key is a symbol"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2703
4077
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  2704
    |oldValue|
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  2705
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  2706
    oldValue := self propertyAt:aKey.
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  2707
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  2708
    properties isNil ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2709
	properties := IdentityDictionary new
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  2710
    ].
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  2711
    properties at:aKey put:aValue.
4077
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  2712
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  2713
    oldValue ~~ aValue ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2714
	self changed:aKey.
4077
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  2715
    ].
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  2716
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  2717
    "Created: / 23.3.1999 / 14:21:11 / cg"
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  2718
!
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  2719
4792
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  2720
removeClass:classOrClassName
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  2721
    "remove a class from the project"
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  2722
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  2723
    |infoCollection index className|
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  2724
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  2725
    (infoCollection := self classInfo) isNil ifTrue:[^ self].
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  2726
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  2727
    (className := classOrClassName) isBehavior ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2728
	className := classOrClassName name
4792
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  2729
    ].
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  2730
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  2731
    index := infoCollection findFirst:[:i | i className = className.].
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  2732
    index ~~ 0 ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2733
	infoCollection removeIndex:index
4792
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  2734
    ]
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  2735
!
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  2736
4834
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  2737
removeMethod:method
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  2738
    "remove a method from the project"
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  2739
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  2740
    |infoCollection index className selector|
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  2741
4887
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2742
    (infoCollection := self methodInfo) size == 0 ifTrue:[^ self].
4834
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  2743
    className := method who methodClass name.
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  2744
    selector := method who methodSelector.
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  2745
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  2746
    index := infoCollection findFirst:[:i | i className = className.].
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  2747
    index ~~ 0 ifTrue:[
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  2748
        infoCollection removeIndex:index
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  2749
    ]
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  2750
!
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  2751
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2752
type
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2753
    "return the type of project (one of #application, #library, #smalltalk)"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2754
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2755
    properties isNil ifTrue:[^ #application].
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2756
    ^ properties at:#type ifAbsent:#application
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2757
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2758
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2759
type:aSymbol
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2760
    "set the projects type (one of #application, #library, #smalltalk)"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2761
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  2762
    |sym|
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  2763
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  2764
    (sym := aSymbol) == #classLibrary ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2765
	sym := #library
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  2766
    ].
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  2767
    (#(application library extension smalltalk) includes:sym) ifFalse:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2768
	self warn:'invalid project type'.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2769
	^ self
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2770
    ].
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  2771
    self propertyAt:#type put:sym
4069
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  2772
!
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  2773
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  2774
wasLoadedFromFile
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  2775
    "return true, if the project was loaded from a file"
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  2776
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  2777
    properties isNil ifTrue:[^ nil].
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  2778
    ^ properties at:#wasLoadedFromFile ifAbsent:false
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  2779
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  2780
    "Modified: / 23.3.1999 / 13:59:32 / cg"
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  2781
    "Created: / 23.3.1999 / 14:21:06 / cg"
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  2782
!
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  2783
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  2784
wasLoadedFromFile:aBoolean
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2785
    "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
  2786
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  2787
    self propertyAt:#wasLoadedFromFile put:aBoolean
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2788
! !
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2789
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2790
!Project methodsFor:'queries'!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2791
4688
1b27165b9f97 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4685
diff changeset
  2792
areAllClassesLoaded
1b27165b9f97 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4685
diff changeset
  2793
    "return true, if all classes of the package are loaded
1b27165b9f97 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4685
diff changeset
  2794
     (i.e. there are no autoloaded stubs present)"
1b27165b9f97 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4685
diff changeset
  2795
4690
563f4d832234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4688
diff changeset
  2796
    |classes|
563f4d832234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4688
diff changeset
  2797
563f4d832234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4688
diff changeset
  2798
    classes := self classes.
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2799
    classes size == 0 ifTrue:[^ isLoaded ? false].
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2800
4690
563f4d832234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4688
diff changeset
  2801
    classes do:[:aClass |
4900
7371c0da8359 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4888
diff changeset
  2802
        aClass isBehavior ifFalse:[^ false].
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2803
        aClass isLoaded ifFalse:[^ false].
4688
1b27165b9f97 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4685
diff changeset
  2804
    ].
1b27165b9f97 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4685
diff changeset
  2805
    ^ true
1b27165b9f97 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4685
diff changeset
  2806
1b27165b9f97 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4685
diff changeset
  2807
!
1b27165b9f97 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4685
diff changeset
  2808
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2809
classInfo
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2810
    "return a classInfo collection of classes belonging to that project"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2811
4073
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  2812
    |classInfo classes|
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2813
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2814
    properties notNil ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2815
	classInfo := properties at:#classInfo ifAbsent:nil.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2816
	classInfo notNil ifTrue:[^ classInfo].
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2817
    ].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2818
4073
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  2819
    classes := self classes.
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  2820
    classes size == 0 ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2821
	classInfo := OrderedCollection new
4073
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  2822
    ] ifFalse:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2823
	classInfo := classes asOrderedCollection
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2824
			collect:[:class |
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2825
			    |i fn|
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2826
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2827
			    i := ClassInfo new.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2828
			    i conditionForInclusion:#always.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2829
			    i className:class name.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2830
			    fn := class classFilename ? ((Smalltalk fileNameForClass:class) , '.st').
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2831
			    i classFileName:fn.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2832
			    i
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2833
			]
4073
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  2834
    ].
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  2835
    self propertyAt:#classInfo put:classInfo.
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  2836
    ^ classInfo
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2837
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2838
    "Modified: 4.1.1997 / 16:51:18 / cg"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2839
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2840
4789
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2841
classInfoFor:aClassOrClassName
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2842
    "return a classInfo for a particular class"
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2843
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2844
    |classInfo clsName index|
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2845
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2846
    (classInfo := self classInfo) isNil ifTrue:[^ nil].
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2847
    (clsName := aClassOrClassName) isBehavior ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2848
	clsName := aClassOrClassName name
4789
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2849
    ].
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2850
    ^ classInfo detect:[:i | i className = clsName] ifNone:nil.
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2851
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2852
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2853
    "Modified: 4.1.1997 / 16:51:18 / cg"
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2854
!
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2855
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2856
classes
4013
f06d31702f2a ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents: 4010
diff changeset
  2857
    "return a collection of classes belonging to that project.
f06d31702f2a ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents: 4010
diff changeset
  2858
     This excludes any private classes."
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2859
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2860
    |classes classInfo|
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2861
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2862
    properties notNil ifTrue:[
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2863
        classInfo := properties at:#classInfo ifAbsent:nil.
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2864
        classInfo notNil ifTrue:[
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2865
            classes := classInfo collect:[:i | i className]
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2866
        ] ifFalse:[
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2867
            classes := properties at:#classes ifAbsent:nil
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2868
        ]
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2869
    ].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  2870
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2871
    classes isNil ifTrue:[
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2872
        classes := OrderedCollection new.
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2873
        Smalltalk 
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2874
            allClassesDo:[:aClass |
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2875
                (true "aClass owningClass isNil"
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2876
                and:[aClass isMeta not
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2877
                and:[aClass package = packageName
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2878
                and:[aClass isNamespace not or:[aClass == Smalltalk]]]]) ifTrue:[
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2879
                    classes add:aClass
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2880
                ]
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2881
            ].
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2882
    ].
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2883
    ^ classes ? #()
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2884
2056
1beb5756e9e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2034
diff changeset
  2885
    "Modified: 4.1.1997 / 16:51:18 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2886
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2887
4887
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2888
includesClass:aClassOrClassName
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2889
    "return true, if a class is contained in the project"
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2890
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2891
    |infoCollection index className|
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2892
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2893
    (infoCollection := self classInfo) isNil ifTrue:[^ false].
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2894
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2895
    aClassOrClassName isBehavior ifTrue:[
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2896
        className := aClassOrClassName name
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2897
    ] ifFalse:[
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2898
        className := aClassOrClassName
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2899
    ].
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2900
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2901
    index := infoCollection findFirst:[:i | |nm1 nm2|
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2902
                                        i className = className
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2903
                                      ].
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2904
    ^ index ~~ 0 
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2905
!
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2906
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2907
includesMethod:aMethod
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2908
    "return true, if the given method is contained in the project
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2909
     (either as patch/extension or as class"
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2910
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2911
    |who methodClass|
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2912
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2913
    who := aMethod who.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2914
    who isNil ifTrue:[^ false].
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2915
    methodClass := who methodClass.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2916
    (self includesClass:methodClass) ifTrue:[^ true].
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2917
    ^ self includesMethodPatch:aMethod
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2918
!
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2919
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2920
includesMethodPatch:aMethod
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2921
    "return true, if the given method is contained in the project
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2922
     as patch/extension"
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2923
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2924
    |who methodClass methodClassName methodSelector infoCollection index className selector|
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2925
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2926
    who := aMethod who.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2927
    who isNil ifTrue:[^ false].
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2928
    methodClass := who methodClass.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2929
    methodClassName := methodClass name.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2930
    methodSelector := who methodSelector.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2931
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2932
    infoCollection := self methodInfo.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2933
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2934
    index := infoCollection findFirst:[:i | 
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2935
                        (i className = methodClassName 
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2936
                        and:[i methodName = methodSelector])
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2937
             ].
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2938
    ^ index ~~ 0 
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2939
!
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2940
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2941
individualMethods
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2942
    "return a collection of individual methods belonging to that project,
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2943
     only methods are returned which are not contained in the
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2944
     projects class set."
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2945
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2946
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2947
"/
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2948
"/ obsoleted by #methods ...
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  2949
"/
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2950
    |classes methods|
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2951
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2952
    classes := self classes.
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2953
    classes size > 0 ifTrue:[
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2954
        classes := classes asIdentitySet.
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2955
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2956
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2957
    methods := IdentitySet new.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2958
    Smalltalk allBehaviorsDo:[:cls |
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2959
        |classToCheck|
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2960
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2961
        classToCheck := cls.
4670
21eec331e1e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4668
diff changeset
  2962
"/        cls isPrivate ifTrue:[
21eec331e1e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4668
diff changeset
  2963
"/            classToCheck := cls topOwningClass
21eec331e1e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4668
diff changeset
  2964
"/        ].
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2965
        ((classes includes:classToCheck) 
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2966
        or:[classes includes:classToCheck name]) not 
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2967
        ifTrue:[
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2968
            cls methodDictionary do:[:m |
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2969
                m package = packageName ifTrue:[
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2970
                    methods add:m
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2971
                ]
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2972
            ].
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2973
            cls class methodDictionary do:[:m |
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2974
                m package = packageName ifTrue:[
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2975
                    methods add:m
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2976
                ]
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2977
            ].
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2978
        ]
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2979
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2980
    ^ methods asArray
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2981
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2982
    "
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2983
     Project current classes
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2984
     Project current individualMethods
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2985
    "
1461
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  2986
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  2987
    "Modified: 7.6.1996 / 09:16:25 / stefan"
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  2988
!
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  2989
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  2990
isLoaded
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  2991
    "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
  2992
     into the system"
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  2993
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  2994
    |binaryModule cls|
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  2995
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  2996
    isLoaded notNil ifTrue:[^ isLoaded].
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  2997
4791
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  2998
    "/ check for loaded class-library - assume loaded if present.
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  2999
    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
  3000
    binaryModule notNil ifTrue:[
4819
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3001
        ^ true
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3002
    ].
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3003
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  3004
    "/ check for all classes ...
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  3005
    self classes do:[:aClassOrClassName |
4819
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3006
        aClassOrClassName isBehavior ifFalse:[
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3007
            aClassOrClassName isSymbol ifTrue:[
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3008
                (cls := Smalltalk at:aClassOrClassName) isNil ifTrue:[
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3009
                    ^ false
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3010
                ].
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3011
                cls isBehavior ifFalse:[^ false].
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3012
                cls isLoaded ifFalse:[^ false].
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3013
            ] ifFalse:[
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3014
                self halt.
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3015
                ^ false
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3016
            ]
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3017
        ]
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  3018
    ].
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  3019
4791
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3020
    "/ check for all patches & extensions ...
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3021
    self methods do:[:aMethodInfo |
4819
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3022
        aMethodInfo theMethod isNil ifTrue:[
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3023
            ^ false
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3024
        ].
4791
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3025
    ].
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3026
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3027
    ^ true
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3028
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3029
    "
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3030
     (Project projectWithId:#'stx:libbasic') isLoaded
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3031
     (Project projectWithId:#'stx:goodies/persistency') isLoaded 
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3032
    "
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3033
4819
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3034
    "Modified: / 26.9.1999 / 13:39:55 / cg"
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3035
!
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3036
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3037
methodInfo
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3038
    "return a methodInfo collection of methods belonging to that project"
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3039
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3040
    |methodInfo methods|
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3041
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3042
    properties notNil ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3043
	methodInfo := properties at:#methodInfo ifAbsent:nil.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3044
	methodInfo notNil ifTrue:[^ methodInfo].
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3045
    ].
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3046
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3047
    methods := self methods.
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3048
    methods size == 0 ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3049
	methodInfo := OrderedCollection new
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3050
    ] ifFalse:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3051
	methodInfo := methods asOrderedCollection
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3052
			collect:[:mthd |
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3053
			    |i fn who className selector|
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3054
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3055
			    mthd isMethod ifTrue:[   
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3056
				who := mthd who.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3057
				className := who methodClass name.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3058
				selector := who methodSelector.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3059
				i := MethodInfo new.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3060
				i conditionForInclusion:#always.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3061
				i className:className.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3062
				i methodName:className.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3063
				fn := mthd sourceFilename.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3064
				i fileName:fn.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3065
				i
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3066
			    ] ifFalse:[
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3067
				mthd "/ already a methodInfo
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3068
			    ]
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3069
			]
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3070
    ].
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3071
    self propertyAt:#methodInfo put:methodInfo.
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3072
    ^ methodInfo
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3073
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3074
    "Modified: 4.1.1997 / 16:51:18 / cg"
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3075
!
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3076
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3077
methods
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3078
    "return a collection of methods belonging to that project.
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3079
     This excludes any methods which are already in my class-set."
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3080
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3081
    |methods methodsInfo|
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3082
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3083
    properties notNil ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3084
	methodsInfo := properties at:#methodsInfo ifAbsent:nil.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3085
	methodsInfo notNil ifTrue:[
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3086
	    methods := methodsInfo collect:[:i | i className]
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3087
	] ifFalse:[
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3088
	    methods := properties at:#methods ifAbsent:nil
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3089
	]
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3090
    ].
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3091
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3092
    methods isNil ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3093
	methods := OrderedCollection new.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3094
	Smalltalk allClassesDo:[:aClass |
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3095
	    (true "aClass owningClass isNil"
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3096
	    and:[aClass isMeta not
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3097
	    and:[aClass package ~= packageName
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3098
	    and:[aClass isNamespace not or:[aClass == Smalltalk]]]]) ifTrue:[
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3099
	    
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3100
		aClass methodDictionary keysAndValuesDo:[:sel :mthd |
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3101
		    mthd package = packageName ifTrue:[
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3102
			methods add:(MethodInfo new
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3103
					className:aClass name;
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3104
					methodName:sel;
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3105
					yourself)
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3106
		    ].
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3107
		].
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3108
		aClass class methodDictionary keysAndValuesDo:[:sel :mthd |
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3109
		    mthd package = packageName ifTrue:[
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3110
			methods add:(MethodInfo new
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3111
					className:(aClass name , ' class');
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3112
					methodName:sel;
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3113
					yourself)
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3114
		    ].
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3115
		]
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3116
	    ]
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3117
	].
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3118
	methods isEmpty ifTrue:[^ #()].
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3119
    ].
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3120
    ^ methods
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3121
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3122
    "Modified: 4.1.1997 / 16:51:18 / cg"
2
claus
parents: 1
diff changeset
  3123
! !
claus
parents: 1
diff changeset
  3124
claus
parents: 1
diff changeset
  3125
!Project methodsFor:'specifications'!
claus
parents: 1
diff changeset
  3126
claus
parents: 1
diff changeset
  3127
readSpec
claus
parents: 1
diff changeset
  3128
    |s chunk fileName|
claus
parents: 1
diff changeset
  3129
claus
parents: 1
diff changeset
  3130
    fileName := (properties at:#directoryName) asFilename construct:'.project'.
claus
parents: 1
diff changeset
  3131
    s := fileName readStream.
claus
parents: 1
diff changeset
  3132
    s isNil ifTrue:[^ self].
claus
parents: 1
diff changeset
  3133
    [s atEnd] whileFalse:[
203
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
  3134
	chunk := s nextChunk.
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
  3135
	Compiler evaluate:chunk receiver:properties notifying:nil
2
claus
parents: 1
diff changeset
  3136
    ].
claus
parents: 1
diff changeset
  3137
    s close.
claus
parents: 1
diff changeset
  3138
claus
parents: 1
diff changeset
  3139
    "(Project new directory:'../projects/Clock') readSpec"
claus
parents: 1
diff changeset
  3140
!
claus
parents: 1
diff changeset
  3141
claus
parents: 1
diff changeset
  3142
saveSpec
claus
parents: 1
diff changeset
  3143
    |f d s|
claus
parents: 1
diff changeset
  3144
claus
parents: 1
diff changeset
  3145
    d := (properties at:#directoryName) asFilename.
claus
parents: 1
diff changeset
  3146
    d exists ifFalse:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3147
	self error:'directory does not exist' mayProceed:true.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3148
	^ self
2
claus
parents: 1
diff changeset
  3149
    ].
claus
parents: 1
diff changeset
  3150
    f := d construct:'.project'.
claus
parents: 1
diff changeset
  3151
    s := f writeStream.
claus
parents: 1
diff changeset
  3152
    s isNil ifTrue:[^ self].
claus
parents: 1
diff changeset
  3153
    properties associationsDo:[:aProp |
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3154
	(aProp == #directoryName) ifFalse:[
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3155
	    s nextChunkPut:('self at:' , aProp key storeString, 
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3156
			       ' put:' , aProp value storeString).
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3157
	    s cr
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3158
	]
2
claus
parents: 1
diff changeset
  3159
    ].
claus
parents: 1
diff changeset
  3160
    s close
claus
parents: 1
diff changeset
  3161
claus
parents: 1
diff changeset
  3162
    "((Project new directory:'../projects/Clock') readSpec
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3163
	 directory:'../projects/xxx') saveSpec"
2
claus
parents: 1
diff changeset
  3164
! !
claus
parents: 1
diff changeset
  3165
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3166
!Project methodsFor:'views'!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3167
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3168
addView:aView
2164
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3169
    "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
  3170
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3171
    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
  3172
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3173
    "Modified: 14.2.1997 / 15:36:51 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3174
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3175
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3176
destroyViews
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3177
    "destroy all views of this project"
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3178
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3179
    views notNil ifTrue:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3180
	views do:[:aView |
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3181
	    aView notNil ifTrue:[aView destroy]
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3182
	]
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3183
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3184
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3185
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3186
hideViews
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3187
    "hide all views of this project"
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3188
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3189
    views notNil ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3190
	views do:[:aView |
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3191
	    aView notNil ifTrue:[aView unmap]
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3192
	]
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3193
    ].
1332
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  3194
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  3195
    "Modified: 3.5.1996 / 23:48:51 / stefan"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3196
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3197
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3198
removeView:aView
2164
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3199
    "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
  3200
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3201
    views notNil ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3202
	views remove:aView ifAbsent:nil
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3203
    ]
2164
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3204
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3205
    "Modified: 14.2.1997 / 15:37:20 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3206
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3207
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3208
showViews
2164
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3209
    "show all views of this project"
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3210
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3211
    views notNil ifTrue:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3212
	views do:[:aView |
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3213
	    aView notNil ifTrue:[aView remap]
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3214
	]
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3215
    ].
1332
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  3216
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  3217
    "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
  3218
    "Modified: 14.2.1997 / 15:38:47 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3219
! !
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3220
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3221
!Project::ClassInfo methodsFor:'accessing'!
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3222
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3223
classFileName
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3224
    "return the value of the instance variable 'classFileName' (automatically generated)"
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3225
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3226
    ^ classFileName!
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3227
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3228
classFileName:something
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3229
    "set the value of the instance variable 'classFileName' (automatically generated)"
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3230
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3231
    classFileName := something.!
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3232
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3233
className
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3234
    "return the value of the instance variable 'className' (automatically generated)"
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3235
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3236
    ^ className!
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3237
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3238
className:something
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3239
    "set the value of the instance variable 'className' (automatically generated)"
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3240
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3241
    className := something.!
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3242
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3243
conditionForInclusion
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3244
    "return the value of the instance variable 'conditionForInclusion' (automatically generated)"
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3245
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3246
    ^ conditionForInclusion!
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3247
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3248
conditionForInclusion:something
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3249
    "set the value of the instance variable 'conditionForInclusion' (automatically generated)"
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3250
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3251
    conditionForInclusion := something.! !
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3252
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3253
!Project::ClassInfo methodsFor:'printing & storing'!
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3254
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3255
displayString
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3256
    ^ 'ClassInfo: ' , className
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3257
! !
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3258
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3259
!Project::ClassInfo methodsFor:'queries'!
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3260
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3261
theClass
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3262
    |cls|
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3263
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3264
    cls := Smalltalk classNamed:className.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3265
    cls isNil ifTrue:[ ^ nil].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3266
    ^ cls
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3267
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3268
    "Created: / 26.9.1999 / 13:39:00 / cg"
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3269
! !
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  3270
4743
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3271
!Project::MethodInfo methodsFor:'accessing'!
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3272
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3273
className
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3274
    "return the value of the instance variable 'className' (automatically generated)"
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3275
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3276
    ^ className!
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3277
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3278
className:something
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3279
    "set the value of the instance variable 'className' (automatically generated)"
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3280
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3281
    className := something.!
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3282
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3283
conditionForInclusion
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3284
    "return the value of the instance variable 'conditionForInclusion' (automatically generated)"
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3285
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3286
    ^ conditionForInclusion!
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3287
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3288
conditionForInclusion:something
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3289
    "set the value of the instance variable 'conditionForInclusion' (automatically generated)"
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3290
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3291
    conditionForInclusion := something.!
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3292
4743
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3293
fileName
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3294
    "return the value of the instance variable 'fileName' (automatically generated)"
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3295
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3296
    ^ fileName!
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3297
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3298
fileName:something
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3299
    "set the value of the instance variable 'fileName' (automatically generated)"
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3300
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3301
    fileName := something.!
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3302
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3303
methodName
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3304
    "return the value of the instance variable 'methodName' (automatically generated)"
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3305
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3306
    ^ methodName!
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3307
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3308
methodName:something
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3309
    "set the value of the instance variable 'methodName' (automatically generated)"
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3310
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3311
    methodName := something.! !
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3312
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3313
!Project::MethodInfo methodsFor:'printing & storing'!
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3314
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3315
displayString
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3316
    ^ 'MethodInfo: ' , className , ' ' , methodName
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3317
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3318
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3319
! !
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3320
4791
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3321
!Project::MethodInfo methodsFor:'queries'!
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3322
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3323
method
4819
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3324
    self obsoleteMethodWarning.
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3325
    ^ self theMethod.
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3326
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3327
    "Modified: / 26.9.1999 / 13:40:16 / cg"
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3328
!
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3329
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3330
theMethod
4791
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3331
    |cls|
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3332
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3333
    cls := Smalltalk classNamed:className.
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3334
    cls isNil ifTrue:[ ^ nil].
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3335
    ^ cls compiledMethodAt:methodName asSymbol.
4819
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3336
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3337
    "Created: / 26.9.1999 / 13:39:07 / cg"
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3338
! !
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3339
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
  3340
!Project class methodsFor:'documentation'!
630
b785d23d7c5b version at the end
Claus Gittinger <cg@exept.de>
parents: 617
diff changeset
  3341
b785d23d7c5b version at the end
Claus Gittinger <cg@exept.de>
parents: 617
diff changeset
  3342
version
4909
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  3343
    ^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.127 1999-10-13 15:04:18 cg Exp $'
1298
23d0ba91c9be documentation
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
  3344
! !
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
  3345
Project initialize!