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