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