Project.st
author fm
Wed, 09 Aug 2006 21:35:18 +0200
changeset 9498 7b12d2911a1a
parent 9228 605ad9b74e2f
child 9507 e57da1426ca4
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
89
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
     1
"
236
fa6d1f330010 *** empty log message ***
claus
parents: 235
diff changeset
     2
 COPYRIGHT (c) 1993 by Claus Gittinger
203
3d88fa870de0 *** empty log message ***
claus
parents: 150
diff changeset
     3
	      All Rights Reserved
89
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
     4
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
     5
 This software is furnished under a license and may be used
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
     6
 only in accordance with the terms of that license and with the
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
     8
 be provided or otherwise made available to, or used by, any
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
     9
 other person.  No title to or ownership of the software is
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    10
 hereby transferred.
7be0b86ef80f *** empty log message ***
claus
parents: 87
diff changeset
    11
"
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    12
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.
8842
f9132fc3e425 refadctored intention revealing code:
Claus Gittinger <cg@exept.de>
parents: 8761
diff changeset
   335
    (allProjects contains:[:p | p package = aProject package])  ifTrue:[
f9132fc3e425 refadctored intention revealing code:
Claus Gittinger <cg@exept.de>
parents: 8761
diff changeset
   336
        self warn:'Project for ' , aProject package , ' is already present.'.
f9132fc3e425 refadctored intention revealing code:
Claus Gittinger <cg@exept.de>
parents: 8761
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
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1322
            clsName isSymbol ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1323
                clsFilename := myDirectory construct:clsFileNameString.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1324
                cls := Smalltalk at:clsName.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1325
                (cls isNil or:[firstTrip]) ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1326
                    "/ ok - really not yet loaded.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1327
                    Transcript showCR:'loading ' , clsFilename pathName , ' ...'.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1328
                ] ifFalse:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1329
                    Transcript showCR:'reloading ' , clsFilename pathName , ' ...'.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1330
                ].
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1331
                "/ check condition ...
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1332
                cond := clsInfo conditionForInclusion.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1333
                (self conditionForInclusionIsTrue:cond) ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1334
                    (self conditionForAutoloadIsTrue:cond) ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1335
                        Smalltalk
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1336
                            installAutoloadedClassNamed:clsName
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1337
                            category:'autoloaded'
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1338
                            package:self package    
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1339
                            revision:nil
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1340
                    ] ifFalse:[
7095
54183681e86c Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents: 7090
diff changeset
  1341
                        Error handle:[:ex |
7207
2382822f9abc #errorSignal -> #description
Stefan Vogel <sv@exept.de>
parents: 7182
diff changeset
  1342
                            self warn:'error during fileIn: ' , ex description
5199
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1343
                        ] do:[
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1344
                            Class packageQuerySignal answer:packageName do:[    
5690
e5efb5ecbe6a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5671
diff changeset
  1345
                                Parser::UndefinedSuperclassError handle:[:ex |
e5efb5ecbe6a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5671
diff changeset
  1346
                                    firstTrip ifFalse:[
e5efb5ecbe6a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5671
diff changeset
  1347
                                        ex reject.
e5efb5ecbe6a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5671
diff changeset
  1348
                                    ]
e5efb5ecbe6a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5671
diff changeset
  1349
                                ] do:[
e5efb5ecbe6a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5671
diff changeset
  1350
                                    clsFilename fileIn.
e5efb5ecbe6a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5671
diff changeset
  1351
                                    "/ Smalltalk fileIn:clsFilename
e5efb5ecbe6a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5671
diff changeset
  1352
                                ]
5199
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1353
                            ]
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1354
                        ]
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1355
                    ]
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
            ] ifFalse:[
8315
5e53d6ff08d4 Streamline autoloading.
Stefan Vogel <sv@exept.de>
parents: 8086
diff changeset
  1358
                self error:'non-symbol class name' mayProceed:true.
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1359
            ].
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
        firstTrip := false.
4079
84ad7326cc62 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4078
diff changeset
  1363
    ].
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
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1366
loadFromProjectFile:aFilename
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1367
    "fill all of my attributes from a projects file (.prj-file)"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1368
5819
b46dd00555c6 Cleanup unused method vars
Stefan Vogel <sv@exept.de>
parents: 5734
diff changeset
  1369
    |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
  1370
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1371
    f := aFilename asFilename.
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1372
    directoryName := f directory pathName.
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1373
    self directory:(f directory pathName).
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1374
    pack := ResourcePack fromFile:f baseName directory:directoryName.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1375
4909
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1376
    formatVersion := pack at:'fileFormatVersion' ifAbsent:nil.
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1377
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1378
    "/ convert the resourcePack ...
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1379
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1380
    packageName := pack at:'package' ifAbsent:packageName.
5232
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1381
    repositoryModule := packageName upTo:$:.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1382
    repositoryDirectory := packageName restAfter:$:.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1383
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1384
    name := pack at:'name' ifAbsent:name.
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1385
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1386
    self type:(pack at:'type' ifAbsent:#application) asSymbol.
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1387
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1388
    module := pack at:'repository.module' ifAbsent:nil.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1389
    module notNil ifTrue:[
5232
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1390
        repositoryModule ~= module ifTrue:[
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1391
            'Project [warning]: module does not correspond to packageId' infoPrintCR.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1392
            'Project [info]: this will be not supported in future versions' infoPrintCR.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1393
        ].
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1394
        repositoryModule := module.
5232
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1395
        dir := pack at:'repository.directory' ifAbsent:nil.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1396
        dir notNil ifTrue:[
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1397
            repositoryDirectory ~= dir ifTrue:[
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1398
                'Project [warning]: directory does not correspond to packageId' infoPrintCR.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1399
                'Project [info]: this will be not supported in future versions' infoPrintCR.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1400
            ].
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1401
            repositoryDirectory := dir.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1402
        ]
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1403
    ].
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1404
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1405
    prerequisites := pack at:'prerequisites' ifAbsent:#().
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1406
    self prerequisiteClasses:(pack at:'prerequisiteClasses' ifAbsent:#()).
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1407
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1408
    s := pack at:'nameSpace' ifAbsent:nil.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1409
    s notNil ifTrue:[
5328
319b8e3ee60e renamed Namespace to NameSpace
Claus Gittinger <cg@exept.de>
parents: 5327
diff changeset
  1410
        self defaultNameSpace:(NameSpace name:s asSymbol).
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1411
    ].
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1412
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1413
    subProjects := pack at:'subProjects' ifAbsent:subProjects.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1414
    (s := pack at:'comment' ifAbsent:nil) notNil ifTrue:[
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1415
        self comment:s
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1416
    ].
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
    "/ first, all of the conditions ...
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1419
    targetConditions := Dictionary new.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1420
    pack keysAndValuesDo:[:key :val |
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1421
        |conditionKey|
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1422
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1423
        (key startsWith:'target.condition.') ifTrue:[
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1424
            conditionKey := key copyFrom:'target.condition.' size + 1.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1425
            targetConditions at:conditionKey put:val.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1426
        ]
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1427
    ].
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
    properties isNil ifTrue:[
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1430
        properties := IdentityDictionary new
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1431
    ].
5819
b46dd00555c6 Cleanup unused method vars
Stefan Vogel <sv@exept.de>
parents: 5734
diff changeset
  1432
    properties at:#targetconditions put:targetConditions.
b46dd00555c6 Cleanup unused method vars
Stefan Vogel <sv@exept.de>
parents: 5734
diff changeset
  1433
    properties declare:#sourcesDirectory from:pack.
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1434
    properties declare:#methodsFile from:pack.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1435
    properties declare:#files from:pack.
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1436
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1437
    "/ fetch class info
4805
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
  1438
    "/
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
  1439
    "/ each entry consist of:
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
  1440
    "/    full-name-of-class
a7e6d2cb9b29 care for conditions when generatong loadAll / Make.proto files.
Claus Gittinger <cg@exept.de>
parents: 4796
diff changeset
  1441
    "/    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
  1442
    "/    fileName (optional)
5201
Claus Gittinger <cg@exept.de>
parents: 5199
diff changeset
  1443
    properties at:#autoIncludeImageClasses put:false.
Claus Gittinger <cg@exept.de>
parents: 5199
diff changeset
  1444
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1445
    (pack at:'classes' default:#()) do:[:info |
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1446
        |condKey className optionalFileName|
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1447
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1448
        condKey := #always.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1449
        info isSymbol ifTrue:[
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1450
            className := info.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1451
        ] ifFalse:[
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1452
            className := info at:1.
4909
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1453
            formatVersion == 0 ifTrue:[
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1454
                info size > 1 ifTrue:[
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1455
                    optionalFileName := info at:2.
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1456
                    info size > 2 ifTrue:[
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1457
                        condKey := info at:3.
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1458
                    ]
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
            ] ifFalse:[
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1461
                className := info at:1.
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1462
                info size > 1 ifTrue:[
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1463
                    condKey := info at:2.
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1464
                    info size > 2 ifTrue:[
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1465
                        optionalFileName := info at:3.
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1466
                    ]
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1467
                ].
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1468
            ].
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
        self 
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1471
            addClass:className 
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1472
            conditionForInclusion:condKey 
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1473
            classFileName:optionalFileName
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1474
    ].
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1475
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  1476
    "/ fetch methods info
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  1477
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  1478
    (pack at:'methods' default:#()) do:[:info |
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1479
        |condKey className methodName optionalFileName|
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1480
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1481
        condKey := #always.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1482
        className := info at:1.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1483
        methodName := info at:2.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1484
        info size > 2 ifTrue:[
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1485
            optionalFileName := info at:3.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1486
            info size > 3 ifTrue:[
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1487
                condKey := info at:4.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1488
            ]
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
        self 
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1491
            addMethod:methodName inClass:className 
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1492
            conditionForInclusion:condKey 
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1493
            fileName:optionalFileName
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  1494
    ].
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  1495
4069
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  1496
    self wasLoadedFromFile:true.
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  1497
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1498
    "/ all remaining properties
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1499
    pack keysAndValuesDo:[:key :val |
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1500
        (key startsWith:'property.') ifTrue:[
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1501
            self propertyAt:(key copyFrom:'property.' size+1) asSymbol put:val.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  1502
        ]
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1503
    ].
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1504
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1505
    "
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1506
     Project current saveAsProjectFile.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1507
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1508
     Project new loadFromProjectFile:'default.prj'
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1509
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1510
     Project new loadFromProjectFile:'../../libbasic/libbasic.prj'
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1511
    "
4069
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  1512
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1513
    "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
  1514
!
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
saveAsProjectFile
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1517
    "store all of my attributes into a projects file (.prj-file)
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1518
     (in the project-directory and named as <projectName>.prj)"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1519
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1520
    |dir fn nm s|
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1521
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1522
    dir := self directory asFilename.
4790
38030fd8b681 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4789
diff changeset
  1523
    nm := self libraryName.
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1524
    fn := dir construct:nm.
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1525
    fn := fn withSuffix:'prj'.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1526
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1527
    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
  1528
	fn copyTo:(fn pathName , '.bak')
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1529
    ].
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1530
    s := fn writeStream.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1531
    self saveAsProjectFileOn:s.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1532
    s close.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1533
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
     Project current saveAsProjectFile
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1536
    "
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1537
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1538
    "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
  1539
!
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
saveAsProjectFileOn:aStream
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1542
    "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
  1543
     and somehow readable for humans.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1544
     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
  1545
     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
  1546
5232
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1547
    |s coll first maxLen t defNS methodsFile classes packageId
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1548
     moduleFromPackageId directoryFromPackageId|
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1549
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1550
    packageId := self package.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1551
    packageId isNil ifTrue:[
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1552
        'Project [warning]: no valid packageId - generating a default' infoPrintCR.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1553
        packageId := OperatingSystem getLoginName , ':private'.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1554
    ] ifFalse:[
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1555
        (packageId includes:$:) ifFalse:[
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1556
            'Project [warning]: no module in packageId - generating a default' infoPrintCR.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1557
            packageId := OperatingSystem getLoginName , ':' , packageId.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1558
        ]
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
    moduleFromPackageId := packageId upTo:$:.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1561
    directoryFromPackageId := packageId restAfter:$:.
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1562
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1563
    s := aStream.
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1564
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1565
    s nextPutLine:'; $Header' , '$'; nextPutLine:';'.
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1566
    s nextPutLine:'; Project saved ' , Smalltalk timeStamp; nextPutLine:';'.
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1567
    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
  1568
; Lines starting with a semicolon are comment lines.
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1569
; Lines ending with a backslash are concatenated with the following line.
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1570
; Entries are key-value pairs, separated by whitespace;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1571
; the value is a smalltalk literal expression.
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1572
'.
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1573
4909
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1574
    s nextPutAll:'fileFormatVersion'; tab; nextPutLine:(self class projectFileFormatVersion printString).
bc474f9c0180 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4900
diff changeset
  1575
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1576
    s nextPutAll:'
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1577
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1578
; general:
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1579
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1580
'.
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1581
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1582
    s nextPutAll:'comment'. 
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1583
    s tab. s nextPutLine:(self comment storeString).
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1584
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1585
    s nextPutAll:'name'. 
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1586
    s tab. s nextPutLine:(name storeString).
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1587
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1588
    s nextPutAll:'type'. 
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1589
    s tab. s nextPutLine:(self type storeString).
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1590
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1591
    s nextPutAll:'package'. 
5232
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1592
    s tab. s nextPutLine:(packageId storeString).
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1593
4726
5c5e1c7f8933 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4721
diff changeset
  1594
    defNS := self defaultNameSpace.
5199
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1595
    (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
  1596
        s nextPutAll:'nameSpace'. 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1597
        s tab. s nextPutLine:(defNS name storeString).
5199
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1598
    ] ifFalse:[
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1599
        defNS := nil.
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1600
    ].
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1601
5232
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1602
    "/ skip if same as what the packageID implies;
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1603
    "/ this will be enforced in future versions.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1604
    repositoryModule isNil ifTrue:[
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1605
        repositoryModule := moduleFromPackageId.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1606
    ].
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1607
    repositoryDirectory isNil ifTrue:[
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1608
        repositoryDirectory := directoryFromPackageId
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1609
    ].
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
    (repositoryModule ~= moduleFromPackageId
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1612
    or:[repositoryDirectory ~= directoryFromPackageId]) ifTrue:[
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1613
        'Project [warning]: module/directory does not correspond to packageId' infoPrintCR.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1614
        'Project [info]: this will be not supported in future versions' infoPrintCR.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1615
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1616
        s nextPutAll:'
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1617
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1618
; repository:
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1619
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1620
'.
5232
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1621
        s nextPutAll:'repository.module'. 
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1622
        s tab. s nextPutLine:(repositoryModule ? 'private') storeString.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1623
        s nextPutAll:'repository.directory'. 
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1624
        s tab. s nextPutLine:(repositoryDirectory ? packageId) storeString.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1625
        s cr.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1626
    ].
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1627
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1628
    (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
  1629
        s nextPutAll:'sources'. 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1630
        s tab. s nextPutLine:(t storeString).
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1631
    ].
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1632
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1633
    first := true.
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1634
    properties keysAndValuesDo:[:key :val |
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1635
        (#(
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1636
            comment
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1637
            wasLoadedFromFile
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1638
            targetconditions
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1639
            classes
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1640
            classInfo
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1641
            methodInfo
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1642
            prerequisiteClasses
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1643
            files
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1644
            sourcesDirectory
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1645
            methodsFile
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1646
            type
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1647
            defaultNameSpace
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1648
        ) includes:key) ifFalse:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1649
            first ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1650
                first := false.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1651
                s nextPutAll:'
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1652
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1653
; properties:
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1654
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1655
'.
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1656
            ].    
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1657
            s nextPutAll:'property.'; nextPutAll:key. 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1658
            s tab. 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1659
            key == #defaultNameSpace ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1660
                s nextPutLine:val name storeString.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1661
            ] ifFalse:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1662
                s nextPutLine:val storeString.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1663
            ]
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1664
        ]
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  1665
    ].
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1666
        
5232
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1667
    s nextPutAll:'
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1668
;
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1669
; sub-projects:
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1670
;
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
    s nextPutAll:'subProjects'; tab.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1673
    coll := self subProjects.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1674
    coll size = 0 ifTrue:[
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1675
        s nextPutLine:'#()'. 
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1676
    ] ifFalse:[    
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1677
        s nextPutLine:'#( \'. 
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1678
        coll do:[:aProjectOrProjectNameList |
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1679
            |pName pPath|
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1680
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1681
            aProjectOrProjectNameList isString ifTrue:[
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1682
                pName := aProjectOrProjectNameList.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1683
            ] ifFalse:[
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1684
                aProjectOrProjectNameList isArray ifTrue:[
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1685
                    pName := aProjectOrProjectNameList at:1.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1686
                    pPath := aProjectOrProjectNameList at:2.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1687
                ] ifFalse:[
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1688
                    pName := aProjectOrProjectNameList name.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1689
                    pPath := aProjectOrProjectNameList repositoryPath.    
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1690
                ]
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
            pPath isNil ifTrue:[
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1694
                s tab. s nextPutAll:(pName storeString); nextPutLine:' \'.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1695
            ] ifFalse:[
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1696
                s tab. s nextPutAll:'( '.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1697
                s nextPutAll:(pName storeString); space;
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1698
                  nextPutAll:(pPath storeString); nextPutLine:') \'.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1699
            ]
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
        s nextPutLine:')'.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1702
    ].
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1703
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1704
    s nextPutAll:'
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1705
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1706
; required packages:
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1707
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1708
'.
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1709
    s nextPutAll:'prerequisites'; tab.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1710
    coll := self prerequisites.
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1711
    coll size = 0 ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1712
        s nextPutLine:'#()'. 
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1713
    ] ifFalse:[    
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1714
        s nextPutLine:'#( \'. 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1715
        coll do:[:aProjectOrProjectNameList |
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1716
            |pName pPath|
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1717
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1718
            aProjectOrProjectNameList isString ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1719
                pName := aProjectOrProjectNameList.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1720
            ] ifFalse:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1721
                aProjectOrProjectNameList isArray ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1722
                    pName := aProjectOrProjectNameList at:1.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1723
                    pPath := aProjectOrProjectNameList at:2.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1724
                ] ifFalse:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1725
                    pName := aProjectOrProjectNameList name.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1726
                    pPath := aProjectOrProjectNameList repositoryPath.    
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1727
                ]
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
            pPath isNil ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1731
                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
  1732
            ] ifFalse:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1733
                s tab. s nextPutAll:'( '.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1734
                s nextPutAll:(pName storeString); space;
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1735
                  nextPutAll:(pPath storeString); nextPutLine:') \'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1736
            ]
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
        s nextPutLine:')'.
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1739
    ].
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1740
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1741
    s nextPutAll:'
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1742
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1743
; required classes:
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1744
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1745
'.
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1746
    s nextPutAll:'prerequisiteClasses'; tab.
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1747
    coll := self prerequisiteClasses.
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1748
    coll size = 0 ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1749
        s nextPutLine:'#()'. 
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1750
    ] ifFalse:[    
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1751
        s nextPutLine:'#( \'. 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1752
        coll do:[:aClassOrSymbol | |className|
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1753
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1754
            (className := aClassOrSymbol) isSymbol ifFalse:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1755
                className := aClassOrSymbol name
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1756
            ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1757
            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
  1758
        ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1759
        s nextPutLine:')'.
4099
f6984fc5cb6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4097
diff changeset
  1760
    ].
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1761
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1762
    s nextPutAll:'
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1763
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1764
; classes:
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1765
; (for each class, one line of the form: ( #''className'' [condition [fileName]] )
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1766
; (where fileName and condition are optional)
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1767
;
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
    s nextPutAll:'classes'; tab.
4074
4db3db1fe7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4073
diff changeset
  1771
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1772
    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
  1773
    classes isNil ifTrue:[^ self].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1774
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1775
    classes size = 0 ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1776
        s nextPutLine:'#()'. 
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1777
    ] ifFalse:[    
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1778
        s nextPutLine:'#( \'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1779
        "/ 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
  1780
        
5199
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1781
        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
  1782
                                        |clsName|
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1783
5199
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1784
                                        aClassOrName isBehavior ifTrue:[
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1785
                                            clsName := aClassOrName name.
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1786
                                        ] ifFalse:[
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1787
                                            clsName := aClassOrName.
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1788
                                            defNS notNil ifTrue:[
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1789
                                                (clsName startsWith:(defNS name , '::')) ifFalse:[
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1790
                                                    clsName := (defNS name , '::' , clsName)
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1791
                                                ]
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
                                            clsName := clsName asSymbol.
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1794
                                        ].
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1795
                                        maxSoFar max:clsName storeString size
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1796
                                     ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1797
5199
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1798
        classes do:[:aClassOrName |
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1799
            |clsInfo clsName fileName cond|
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1800
5199
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1801
            aClassOrName isBehavior ifTrue:[
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1802
                clsName := aClassOrName name.
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1803
            ] ifFalse:[
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1804
                clsName := aClassOrName.
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1805
                defNS notNil ifTrue:[
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1806
                    (clsName startsWith:(defNS name , '::')) ifFalse:[
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1807
                        clsName := (defNS name , '::' , clsName)
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1808
                    ]
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
                clsName := clsName asSymbol.
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1811
            ].
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1812
            clsInfo := self classInfoFor:clsName.
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1813
            clsInfo isNil ifTrue:[
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1814
                clsInfo := self classInfoFor:aClassOrName.
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1815
            ].
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1816
            fileName := clsInfo classFileName.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1817
            fileName = (clsName , '.st') ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1818
                fileName := nil
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1819
            ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1820
            cond := (clsInfo conditionForInclusion) ? #always.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1821
            s tab. s nextPutAll:'( '; 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1822
                     nextPutAll:(clsName storeString paddedTo:maxLen).
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1823
            (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
  1824
                s tab; nextPutAll:cond storeString.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1825
            ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1826
            fileName notNil ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1827
                s tab; nextPutAll:fileName storeString.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1828
            ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1829
            s nextPutLine:') \'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1830
        ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1831
        s nextPutLine:')'.
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1832
    ].
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1833
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1834
    s nextPutAll:'
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1835
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1836
; methods (patches & extensions):
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1837
; (for each method, one line of the form: ( #''className'' #''methodName'' )
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1838
; (for metaclasses, #''name class'' is used)
5232
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1839
; These are stored in the methodsFile (see below)
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1840
'.
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
    s nextPutAll:'methods'; tab.
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1843
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1844
    coll := self methodInfo.
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1845
    coll size = 0 ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1846
        s nextPutLine:'#()'. 
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1847
    ] ifFalse:[    
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1848
        s nextPutLine:'#( \'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1849
        "/ 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
  1850
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1851
        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
  1852
                                        |clsName|
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1853
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1854
                                        clsName := aMethodInfo className.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1855
                                        maxSoFar max:clsName storeString size
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1856
                                     ].
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
        coll do:[:aMethodInfo |
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1859
            |clsName mthdName fileName cond|
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1860
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1861
            clsName := aMethodInfo className.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1862
            mthdName := aMethodInfo methodName.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1863
            s tab. s nextPutAll:'( '; 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1864
                     nextPutAll:(clsName storeString paddedTo:maxLen); 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1865
                     tab; nextPutAll:mthdName storeString.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1866
            s nextPutLine:') \'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1867
        ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1868
        s nextPutLine:')'.
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1869
    ].
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
    methodsFile := properties at:#methodsFile ifAbsent:nil.
5232
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1872
    methodsFile size == 0 ifTrue:[
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1873
        self methodInfo size > 0 ifTrue:[
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1874
            'Project [warning]: no methodsFile defined - generating a default' infoPrintCR.
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1875
            methodsFile := 'extensions.st'
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1876
        ]
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1877
    ].
4792
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  1878
    methodsFile size > 0 ifTrue:[
5232
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1879
        s nextPutAll:'
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1880
;
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1881
; methods above are stored in:
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1882
;
0ee28b0cfa50 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5229
diff changeset
  1883
'.
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1884
        s nextPutAll:'methodsFile'; tab; nextPutLine:'''' , methodsFile , ''''.
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1885
    ].
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
    s nextPutAll:'
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1888
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1889
; files (for deployment):
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1890
;
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1891
'.
4314
b973832ffe15 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4124
diff changeset
  1892
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1893
    s nextPutAll:'files'; tab.
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1894
    coll := properties at:#'files' ifAbsent:#().
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1895
    coll size = 0 ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1896
        s nextPutLine:'#()'. 
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  1897
    ] ifFalse:[    
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1898
        s nextPutLine:'#( \'. 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1899
        coll do:[:aFileEntry |
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1900
            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
  1901
        ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1902
        s nextPutLine:')'.
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1903
    ].
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1904
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
     Project current saveOn:Transcript
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1907
    "
4124
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1908
06bfbaba171a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4119
diff changeset
  1909
    "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
  1910
! !
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  1911
2
claus
parents: 1
diff changeset
  1912
!Project methodsFor:'maintenance'!
claus
parents: 1
diff changeset
  1913
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1914
buildProject
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1915
    "invoke 'make' in the project directory"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1916
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1917
    OperatingSystem executeCommand:('cd ' , self directory , ' ; make')
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1918
!
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  1919
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1920
buildProjectWithOutputTo:aStream
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1921
    "invoke 'make' in the project directory"
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1922
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1923
    OperatingSystem 
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1924
        executeCommand:('cd ' , self directory , ' ; make')
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1925
        inputFrom:nil 
7496
2ca58af0baba No need to use makePipe.
Stefan Vogel <sv@exept.de>
parents: 7229
diff changeset
  1926
        outputTo:aStream 
2ca58af0baba No need to use makePipe.
Stefan Vogel <sv@exept.de>
parents: 7229
diff changeset
  1927
        errorTo:aStream 
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1928
        inDirectory:nil
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1929
        onError:[:status| false].
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1930
!
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  1931
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1932
classesInOrderFor:whatMsg
5199
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1933
    |classesOrNames classes numBad firstBad msg|
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1934
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1935
    classesOrNames := self classes.
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1936
    numBad := 0.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1937
    firstBad := nil.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1938
5199
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1939
    classes := classesOrNames collect:[:clsOrSymbol |  |cls|
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1940
                                        clsOrSymbol isBehavior ifFalse:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1941
                                            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
  1942
                                            cls isNil ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1943
                                                numBad := numBad + 1.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1944
                                                firstBad := firstBad ? clsOrSymbol.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1945
                                            ] ifFalse:[
8315
5e53d6ff08d4 Streamline autoloading.
Stefan Vogel <sv@exept.de>
parents: 8086
diff changeset
  1946
                                                cls := cls autoload.
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1947
                                                cls isLoaded ifFalse:[
8315
5e53d6ff08d4 Streamline autoloading.
Stefan Vogel <sv@exept.de>
parents: 8086
diff changeset
  1948
                                                    cls := nil
5e53d6ff08d4 Streamline autoloading.
Stefan Vogel <sv@exept.de>
parents: 8086
diff changeset
  1949
                                                ]
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1950
                                            ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1951
                                            cls.
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  1952
                                        ] ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1953
                                            clsOrSymbol
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1954
                                        ]
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1955
                              ].
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1956
    numBad ~~ 0 ifTrue:[
5199
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1957
        msg := 'Cannot determine load/compile order when about to ' , whatMsg.
5734
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  1958
        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
  1959
                   , ''' is not loaded.'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1960
        numBad ~~ 1 ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1961
            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
  1962
        ].
5199
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1963
        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
  1964
        self warn:msg withCRs.
5199
feb18acac2b2 project class handling
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1965
        ^ classesOrNames.
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1966
    ].
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1967
4785
4ced52c817e6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4779
diff changeset
  1968
    "/ to not list private classes
4ced52c817e6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4779
diff changeset
  1969
    classes := classes select:[:cls | cls owningClass isNil].
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1970
    classes := classes copy topologicalSort:[:a :b | b isSubclassOf:a].
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  1971
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1972
    ^ classes
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1973
!
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  1974
5314
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  1975
createAbbrevFile
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  1976
    "creates a 'abbrev.stc' file, for autoloading classes."
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  1977
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  1978
    |d f out classes myPackage transcript notEmpty|
5314
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  1979
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  1980
    classes := self classesInOrderFor:'generate ''abbrev.stc''-file.'.
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  1981
    classes isNil ifTrue:[^ self].
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  1982
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  1983
    notEmpty := (classes size > 0).
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  1984
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  1985
    transcript := Transcript current.
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  1986
    transcript showCR:'creating abbrev.stc file'.
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  1987
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  1988
    d := directoryName asFilename.
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  1989
    f := d construct:'abbrev.stc'.
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  1990
    [
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  1991
        out := f writeStream.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  1992
    ] on:FileStream openErrorSignal do:[:ex|
5314
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  1993
        self warn:'cannot create abbrev.stc'.
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  1994
        ^ self
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  1995
    ].
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
    myPackage := self package.
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  1998
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  1999
    notEmpty ifTrue:[
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  2000
        classes do:[:cls |
5338
7316969f2faf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5337
diff changeset
  2001
            |clsInfo cond fileName clsName clsCategory|
5314
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  2002
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  2003
            clsInfo := self classInfoFor:cls.
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  2004
            cond := clsInfo conditionForInclusion.
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  2005
            (cond == #always or:[cond == #autoload]) ifTrue:[
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  2006
                fileName := clsInfo classFileName.
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  2007
                fileName isNil ifTrue:[
5338
7316969f2faf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5337
diff changeset
  2008
                    cls isBehavior ifTrue:[
7316969f2faf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5337
diff changeset
  2009
                        fileName := cls nameWithoutNameSpacePrefix
7316969f2faf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5337
diff changeset
  2010
                    ] ifFalse:[
7316969f2faf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5337
diff changeset
  2011
                        fileName := cls
7316969f2faf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5337
diff changeset
  2012
                    ]
5314
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  2013
                ].
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  2014
                (fileName endsWith:'.st') ifTrue:[
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  2015
                    fileName := fileName copyWithoutLast:3
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  2016
                ].
5338
7316969f2faf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5337
diff changeset
  2017
                cls isBehavior ifTrue:[
7316969f2faf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5337
diff changeset
  2018
                    clsName := cls name.
7316969f2faf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5337
diff changeset
  2019
                    clsCategory := cls category.
7316969f2faf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5337
diff changeset
  2020
                ] ifFalse:[
7316969f2faf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5337
diff changeset
  2021
                    clsName := cls.
7316969f2faf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5337
diff changeset
  2022
                    clsCategory := 'unknown category'.
7316969f2faf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5337
diff changeset
  2023
                ].
7316969f2faf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5337
diff changeset
  2024
                out nextPutAll:clsName.
5314
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  2025
                out space.
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  2026
                out nextPutAll:fileName.
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  2027
                out space.
5338
7316969f2faf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5337
diff changeset
  2028
                out nextPutAll:self package.
5314
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  2029
                out space.
5338
7316969f2faf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5337
diff changeset
  2030
                out nextPut:$'; nextPutAll:clsCategory; nextPut:$'.
5314
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  2031
                out cr.
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  2032
            ]
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
    out close
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  2036
!
8a4b8d5726a5 create abbrev file added
Claus Gittinger <cg@exept.de>
parents: 5293
diff changeset
  2037
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2038
createLoadAllFile
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2039
    "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
  2040
     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
  2041
     in the projects source directory."
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2042
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2043
    |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
  2044
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2045
    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
  2046
    classes isNil ifTrue:[^ self].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2047
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2048
    transcript := Transcript current.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2049
    transcript showCR:'creating loadAll file'.
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2050
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2051
    d := directoryName asFilename.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2052
    f := d construct:'loadAll'.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2053
    f exists ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2054
        f renameTo:(d construct:'loadAll.bak')
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2055
    ].
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2056
    [
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2057
        out := f writeStream.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2058
    ] 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
  2059
        self warn:'cannot create loadAll'.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2060
        (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
  2061
        ^ self
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2062
    ].
5670
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2063
    self createLoadAllFileOn:out.
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2064
    out close
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2065
!
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
createLoadAllFileOn:outStream
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2068
    "creates a 'loadAll' file, which will load all classes
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2069
     of the project - this loadAll file is supposed to be located
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2070
     in the projects source directory."
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2071
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2072
    |in classes classInfo myPackage   
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2073
     methodsFile prerequisitePackages transcript notEmpty|
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2074
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2075
    classes := self classesInOrderFor:'generate ''loadAll''-file.'.
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2076
    classes isNil ifTrue:[^ self].
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2077
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2078
    methodsFile := self propertyAt:#methodsFile.
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2079
    notEmpty := (classes size > 0 or:[methodsFile size > 0]).
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2080
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2081
    myPackage := self package.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2082
5670
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2083
    outStream nextPutLine:'"/
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2084
"/ $' , 'Header' , '$'.
5670
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2085
    outStream nextPutLine:'"/
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2086
"/ 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
  2087
    
5670
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2088
    outStream nextPutAll:'"/
4776
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  2089
"/ Automatically generated from project definition.
4786
2375c3d2bffc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4785
diff changeset
  2090
"/ DO NOT MODIFY THIS fILE;
4789
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2091
"/ modify the .prj file instead, and regenerate this file
4786
2375c3d2bffc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4785
diff changeset
  2092
"/ with the ProjectBrowser tool.
4776
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  2093
"/
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
"/ Prerequisites:
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2097
"/'.
4796
eee167a75fcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4792
diff changeset
  2098
    prerequisitePackages := self prerequisitePackages 
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2099
                                collect:[:entry |
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2100
                                    |pName|
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2101
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2102
                                    entry isString ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2103
                                        pName := entry
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2104
                                    ] ifFalse:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2105
                                        entry isArray ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2106
                                            pName := entry at:1
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2107
                                        ] ifFalse:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2108
                                            pName := entry name
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2109
                                        ]
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
                                ].
4796
eee167a75fcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4792
diff changeset
  2112
eee167a75fcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4792
diff changeset
  2113
    prerequisitePackages size == 0 ifTrue:[
5670
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2114
        outStream nextPutLine:''.
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2115
        outStream nextPutLine:'"/ Smalltalk loadPackage:''module:directory''.'.
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2116
        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
  2117
    ] ifFalse:[
5670
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2118
        outStream cr.
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2119
        prerequisitePackages do:[:packName |
5670
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2120
            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
  2121
        ]
4796
eee167a75fcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4792
diff changeset
  2122
    ].
eee167a75fcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4792
diff changeset
  2123
5167
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2124
    methodsFile := self propertyAt:#methodsFile.
5177
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2125
    notEmpty ifTrue:[
5167
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2126
5670
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2127
        outStream nextPutAll:'!!
4776
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  2128
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2129
"{ package:''' , myPackage , ''' }"!!
4776
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  2130
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2131
|files|
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2132
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2133
''loading package ' , myPackage , ' ...'' infoPrintCR.
4776
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  2134
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2135
files := #(
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2136
'.
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2137
5167
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2138
        classes do:[:cls |
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2139
            |clsInfo cond fileName|
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2140
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2141
            clsInfo := self classInfoFor:cls.
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2142
            cond := clsInfo conditionForInclusion.
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2143
            (cond == #always or:[cond == #autoload]) ifTrue:[
5670
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2144
                outStream nextPutAll:'  '''.
5167
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2145
                fileName := clsInfo classFileName.
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2146
                fileName isNil ifTrue:[
5337
c25a74972343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5328
diff changeset
  2147
                    cls isBehavior ifFalse:[
c25a74972343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5328
diff changeset
  2148
                        fileName := cls
c25a74972343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5328
diff changeset
  2149
                    ] ifTrue:[
c25a74972343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5328
diff changeset
  2150
                        fileName := cls nameWithoutNameSpacePrefix
c25a74972343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5328
diff changeset
  2151
                    ]
5167
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2152
                ].
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2153
                (fileName endsWith:'.st') ifFalse:[
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2154
                    fileName := fileName , '.st'
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2155
                ].
5670
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2156
                fileName printOn:outStream.
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2157
                outStream nextPutAll:''''; cr.
5167
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2158
            ]
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
        methodsFile size > 0 ifTrue:[
5670
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2161
             outStream 
5167
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2162
                nextPutAll:'  ''';
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2163
                nextPutAll:methodsFile;
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2164
                nextPutAll:'''';
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2165
                cr.
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2166
        ].
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2167
5670
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2168
        outStream nextPutAll:') asOrderedCollection.
4776
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  2169
4960
a047d70c18f6 *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 4912
diff changeset
  2170
"/ see if there is a classLibrary
5173
935228a12bfc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5167
diff changeset
  2171
(Smalltalk fileInClassLibrary:''' , self libraryName , ''') ifTrue:[
4776
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  2172
    |handle loaded|
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  2173
4785
4ced52c817e6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4779
diff changeset
  2174
    handle := ObjectFileLoader loadedObjectHandles 
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2175
                    detect:[:h | h package = ''' , myPackage , '''] ifNone:nil.
4776
9e7ef3a357a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4773
diff changeset
  2176
    handle ifNotNil:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2177
        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
  2178
        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
  2179
'.
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2180
    
5167
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2181
        methodsFile size > 0 ifTrue:[
5670
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2182
            outStream nextPutLine:('        loaded add:''' , methodsFile , '''.').
5167
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2183
        ].
5670
5e1a1a8ab2a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5655
diff changeset
  2184
        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
  2185
    ].
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2186
].
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2187
4960
a047d70c18f6 *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 4912
diff changeset
  2188
"/ 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
  2189
files size > 0 ifTrue:[
5165
212867b779e7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5156
diff changeset
  2190
  files do:[:f |
4785
4ced52c817e6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4779
diff changeset
  2191
    ''.'' infoPrint.
5165
212867b779e7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5156
diff changeset
  2192
    f asFilename exists ifTrue:[
212867b779e7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5156
diff changeset
  2193
        Smalltalk fileIn:f.
212867b779e7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5156
diff changeset
  2194
    ] ifFalse:[
212867b779e7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5156
diff changeset
  2195
        Smalltalk fileIn:(''source/'' , f)
212867b779e7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5156
diff changeset
  2196
    ]
4960
a047d70c18f6 *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 4912
diff changeset
  2197
  ].
a047d70c18f6 *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 4912
diff changeset
  2198
  '' '' infoPrintCR.
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2199
].
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  2200
'' done (' , myPackage , ').'' infoPrintCR.
4887
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  2201
'.
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2202
5167
e9fdd899b44e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5166
diff changeset
  2203
    ].
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2204
!
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2205
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2206
createMacMakefile
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2207
    "creates an mac-os makefile"
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2208
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2209
    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
  2210
!
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2211
2
claus
parents: 1
diff changeset
  2212
createMakefile
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2213
    "creates an initial Makefile from a Make.proto file.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2214
     Requires the stmkmf script"
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2215
5166
acea9e627935 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5165
diff changeset
  2216
    |d top transcript stmkmf|
2
claus
parents: 1
diff changeset
  2217
4821
c73b170cb6e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  2218
    OperatingSystem isUNIXlike ifTrue:[
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2219
        Transcript current showCR:'creating Makefile'.
4821
c73b170cb6e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  2220
c73b170cb6e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  2221
        d := directoryName asFilename pathName.
5166
acea9e627935 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5165
diff changeset
  2222
        top := (d , '/' , (self findTopFrom:directoryName)) asFilename.
acea9e627935 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5165
diff changeset
  2223
acea9e627935 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5165
diff changeset
  2224
        (top construct:'rules') exists ifFalse:[
acea9e627935 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5165
diff changeset
  2225
            self warn:'Could not execute stmkmf - no TOP/rules directory found.'
acea9e627935 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5165
diff changeset
  2226
        ].
acea9e627935 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5165
diff changeset
  2227
        (stmkmf := ((top construct:'rules') construct:'stmkmf')) exists ifFalse:[
acea9e627935 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5165
diff changeset
  2228
            self warn:'Could not execute stmkmf - no TOP/rules/stmkmf found.'
acea9e627935 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5165
diff changeset
  2229
        ].
4821
c73b170cb6e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  2230
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2231
        transcript := Transcript current.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2232
4821
c73b170cb6e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  2233
        (OperatingSystem 
5166
acea9e627935 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5165
diff changeset
  2234
            executeCommand:('sh ' , stmkmf pathName)
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2235
            outputTo:transcript
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2236
            errorTo:transcript
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2237
            inDirectory:d
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2238
        ) ifFalse:[
5166
acea9e627935 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5165
diff changeset
  2239
            self warn:'Error executing stmkmf - no Makefile built.'
4821
c73b170cb6e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  2240
        ].
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  2241
    ].
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2242
    self createNTMakefile.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2243
    self createVMSMakefile.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2244
    self createMacMakefile.
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2245
4821
c73b170cb6e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  2246
    "Modified: / 26.9.1999 / 16:18:29 / cg"
2
claus
parents: 1
diff changeset
  2247
!
claus
parents: 1
diff changeset
  2248
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2249
createNTMakefile
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2250
    "creates an nt.mak makefile"
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2251
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2252
    |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
  2253
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2254
    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
  2255
    classes isNil ifTrue:[^ self].
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2256
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2257
    topName := self findTopFrom:directoryName.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2258
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2259
    transcript := Transcript current.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2260
    transcript showCR:'Generating make support for Win9x/WinNT...'.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2261
    transcript showCR:'creating bmake.bat'.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2262
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2263
    [
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2264
        d := directoryName asFilename.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2265
        f := d construct:'bmake.bat'.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2266
        s := f writeStream.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2267
        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
  2268
        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
  2269
        s close.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2270
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
        transcript showCR:'creating bc.def'.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2273
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2274
        d := directoryName asFilename.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2275
        f := d construct:'bc.def'.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2276
        s := f writeStream.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2277
        s nextPutLine:'LIBRARY         ' , self libraryName.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2278
        s nextPutLine:'DESCRIPTION     ''AddOn library for ST/X''
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2279
CODE            PRELOAD MOVEABLE DISCARDABLE
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2280
SEGMENTS
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2281
    INITCODE PRELOAD SHARED DISCARDABLE
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2282
EXPORTS
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2283
        __' , self libraryName , '_Init     @1'.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2284
        s close.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2285
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
        transcript showCR:'creating nt.def'.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2288
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2289
        d := directoryName asFilename.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2290
        f := d construct:'nt.def'.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2291
        s := f writeStream.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2292
        s nextPutLine:'LIBRARY         ' , self libraryName.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2293
        s nextPutLine:'DESCRIPTION     ''AddOn library for ST/X''
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2294
CODE            EXECUTE READ SHARED
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2295
DATA            READ WRITE
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2296
SECTIONS
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2297
    INITCODE READ EXECUTE SHARED
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2298
    INITDATA READ WRITE
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2299
EXPORTS
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2300
        _' , self libraryName , '_Init'.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2301
        s close.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2302
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
        transcript showCR:'creating libInit.cc'.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2305
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2306
        d := directoryName asFilename.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2307
        f := d construct:'libInit.cc'.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2308
        s := f writeStream.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2309
        s nextPutAll:'/*
4823
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2310
 * DO NOT EDIT 
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2311
 * automatically generated from project.prj
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2312
 */
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2313
#define __INDIRECTVMINITCALLS__
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2314
#include <stc.h>
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2315
#define INIT_TEXT_SECT /* as nothing */
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2316
#ifdef WIN32
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2317
# pragma codeseg INITCODE "INITCODE"
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2318
#else /* not WIN32 */
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2319
# if defined(__GNUC__)
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2320
#  if (__GNUC__  == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ > 2
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2321
#   undef INIT_TEXT_SECT
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2322
#   define INIT_TEXT_SECT __attribute__((section(".stxitext")))
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2323
#  endif
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2324
# endif /* not GNUC */
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2325
#endif /* not WIN32 */
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2326
#ifdef INIT_TEXT_SECT
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2327
extern void _' , self libraryName , '_Init() INIT_TEXT_SECT;
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2328
#endif
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2329
void _' , self libraryName , '_Init(pass, __pRT__, snd)
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2330
OBJ snd; struct __vmData__ *__pRT__; {
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2331
__BEGIN_PACKAGE2__("' , self libraryName , '", _' , self libraryName , '_Init, "' , self package , '");
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2332
'.
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2333
        classes notNil ifTrue:[
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2334
            classes do:[:aClass |
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2335
                |abbrev|
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2336
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2337
                abbrev := Smalltalk fileNameForClass:aClass name.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2338
                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
  2339
            ].
4823
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2340
        ].
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2341
        s nextPutAll:'__END_PACKAGE__();
4823
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2342
}
7308f4a53be6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4822
diff changeset
  2343
'.
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2344
        s close.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2345
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2346
        transcript showCR:'creating nt.mak'.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2347
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2348
        d := directoryName asFilename.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2349
        f := d construct:'nt.mak'.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2350
        f exists ifTrue:[
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2351
            f renameTo:(d construct:'nt.mak.bak')
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2352
        ].
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2353
        s := f writeStream.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2354
        s nextPutAll:'# $' , 'Header'. 
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2355
        s nextPutLine:'$'.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2356
        s nextPutAll:'#
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2357
# -- nt.mak created from project at ' . 
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2358
        s nextPutAll:Smalltalk timeStamp. 
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2359
        s nextPutAll:'
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2360
#
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2361
# 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
  2362
# and let the ProjectBrowser recreate this file.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2363
# once you modify this file, do not recreate nt.mak again 
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2364
# - otherwise, your changes are lost.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2365
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2366
# module and directory-in-module;
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2367
# these should correspond to the directory hierarchy
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2368
# location (otherwise, ST/X will have a hard time to
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2369
# find out the packages location from its packageID)
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2370
MODULE=' , self repositoryModule ? 'unknown' , '
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2371
MODULE_DIR=' , self repositoryDirectory ? 'unknown' , '
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2372
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2373
# default installation directory:
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2374
# (overwrite with ''make INSTALLTOP_DIR=... install'')
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2375
# the INSTALLBASE is imported from configurations... and usually
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2376
# defaults to something like /opt/smalltalk.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2377
# (overwrite with ''make INSTALLBASE=... install'')
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2378
INSTALLTOP_DIR=$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR)
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2379
INSTALLLIB_DIR=$(INSTALLTOP_DIR)
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2380
INSTALLBIN_DIR=$(INSTALLTOP_DIR)
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2381
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
# position (of this package) in directory hierarchy:
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2384
# (must point to ST/X top directory, for tools and includes)
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2385
TOP=' , topName ,'
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2386
5126
3395d5b1c464 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5125
diff changeset
  2387
!!INCLUDE "$(TOP)\rules\stdHeader_nt"
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2388
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2389
# subdirectories where targets are to be made:
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2390
SUBDIRS=
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2391
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2392
# subdirectories where Makefiles are to be made:
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2393
# (only define if different from SUBDIRS)
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2394
# ALLSUBDIRS=
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2395
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
# the name of your classLibrary:
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2398
# ********** REQUIRED: CHECK the next line ***
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2399
LIBNAME=' , self libraryName , '
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2400
5196
395147c4e481 nt makefiles.
Claus Gittinger <cg@exept.de>
parents: 5181
diff changeset
  2401
#### LIB_BASE   =0x05000000
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2402
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2403
# the next define suppresses installation of 
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2404
# the classes as autoloaded (i.e. not added to abbrev.stc). 
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2405
SUPPRESS_LOCAL_ABBREVS=1
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2406
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2407
# the package is stored as an ID in classes and methods
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2408
# to identify code belonging to this project.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2409
# It also specifies the position in the source repository
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2410
# and directory tree, when packages are loaded by packageID.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2411
# ********** REQUIRED: CHECK the next line ***
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2412
PACKAGE=$(MODULE):$(MODULE_DIR)
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2413
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2414
# Argument(s) to the stc compiler.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2415
#  -H.         : create header files locally
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2416
#                (if removed, they will be created as common
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2417
#  -Pxxx       : defines the package
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2418
#  -Zxxx       : a prefix for variables within the classLib
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2419
#  -Dxxx       : defines passed to to CC for inline C-code
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2420
#  -Ixxx       : include path passed to CC for inline C-code
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2421
#  +optspace   : optimized for space
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2422
#  +optspace2  : optimized more for space
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2423
#  +optspace3  : optimized even more for space
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2424
#  +optinline  : generate inline code for some ST constructs
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2425
#  +inlineNew  : additionally inline new
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2426
#  +inlineMath : additionally inline some floatPnt math stuff
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2427
#
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2428
# ********** OPTIONAL: MODIFY the next line(s) ***
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2429
# STCLOCALOPTIMIZATIONS=+optinline +inlineNew
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2430
# STCLOCALOPTIMIZATIONS=+optspace3
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
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2433
# Argument(s) to the stc compiler.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2434
#  -warn            : no warnings
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2435
#  -warnNonStandard : no warnings about ST/X extensions
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2436
#  -warnEOLComments : no warnings about EOL comment extension
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2437
#  -warnPrivacy     : no warnings about privateClass extension
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2438
#
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2439
# ********** OPTIONAL: MODIFY the next line(s) ***
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2440
# STCWARNINGS=-warn
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2441
# STCWARNINGS=-warnNonStandard
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2442
# STCWARNINGS=-warnEOLComments
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2443
STCWARNINGS='.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2444
        (self propertyAt:#'make.stc.warnEOLComments') == false ifTrue:[
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2445
            s nextPutAll:'-warnEOLComments '.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2446
        ].
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2447
        (self propertyAt:#'make.stc.warnNonStandard') == false ifTrue:[
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2448
            s nextPutAll:'-warnNonStandard '.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2449
        ].
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2450
        s nextPutAll:((self propertyAt:#'make.stc.WARNINGOPTIONS') ? '') , '
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2451
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2452
# if your embedded C code requires any system includes, 
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2453
# add the path(es) here:, 
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2454
# ********** OPTIONAL: MODIFY the next lines ***
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2455
# LOCALINCLUDES=-Ifoo -Ibar
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2456
LOCALINCLUDES=' , ((self propertyAt:#'make.stc.LOCALINCLUDES') ? '') , '
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2457
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2458
# if you need any additional defines for embedded C code, 
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2459
# add them here:, 
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2460
# ********** OPTIONAL: MODIFY the next lines ***
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2461
# LOCALDEFINES=-Dfoo -Dbar -DDEBUG
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2462
LOCALDEFINES=' , ((self propertyAt:#'make.stc.LOCALDEFINES') ? '') , '
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2463
5125
85f6bbbee584 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4960
diff changeset
  2464
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
  2465
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2466
# ********** OPTIONAL: MODIFY the next line ***
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2467
# 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
  2468
LD_OBJ_LIBS=' , ((self propertyAt:#'make.LD_OBJ_LIBS') ? '') , '
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2469
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2470
# ********** OPTIONAL: MODIFY the next line ***
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2471
# additional C targets or libraries should be added below
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2472
LOCAL_EXTRA_TARGETS=' , ((self propertyAt:#'make.LOCAL_EXTRA_TARGETS') ? '') , '
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2473
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2474
#ALL:: preMake $(LIBDIR)\$(LIBNAME).lib $(BINDIR)\$(LIBNAME).dll postMake
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2475
ALL:: $(LIBDIR)\$(LIBNAME).lib $(BINDIR)\$(LIBNAME).dll
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2476
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
"/    type := #library.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2481
"/    appName := 'app'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2482
"/    libName := 'lib'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2483
"/    startUpClass := 'Smalltalk'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2484
"/    startUpSelector := 'start'.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2485
"/
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2486
"/    properties notNil ifTrue:[
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2487
"/        type := properties at:#projectType ifAbsent:type.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2488
"/        appName := properties at:#applicationName ifAbsent:appName.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2489
"/        startUpClass := properties at:#startupClass ifAbsent:startUpClass.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2490
"/        startUpSelector := properties at:#startupSelector ifAbsent:startUpSelector.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2491
"/    ].
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
"/    s nextPutAll:'#
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2494
"/# define the name of the library to create
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2495
"/#
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
"/    s nextPutAll:'LIBNAME=lib' , appName; cr; cr.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2498
"/
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2499
"/    s nextPutAll:'#
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2500
"/# the target rule:
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2501
"/#
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2502
"/all::   abbrev.stc objs genClassList $(OBJTARGET)
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2503
"/
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
"/    type == #executable ifTrue:[
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2507
"/        s nextPutAll:'PROGS = ' , appName; cr.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2508
"/        s nextPutAll:('STARTUP_CLASS=' , startUpClass); cr.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2509
"/        s nextPutAll:'STARTUP_SELECTOR="' , startUpSelector; nextPutAll:'"'; cr.
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2510
"/    ].
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
"/    s nextPutAll:'#
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2513
"/# define the object files that are to be created
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2514
"/#
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2515
"/'.
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2516
        s nextPutAll:'OBJS='.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2517
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2518
        classes do:[:aClass |
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2519
            |fileName clsInfo cond include|
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2520
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2521
            clsInfo := self classInfoFor:aClass.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2522
            include := true.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2523
            clsInfo notNil ifTrue:[
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2524
                cond := clsInfo conditionForInclusion.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2525
                (self conditionForInclusionIsTrue:cond) ifFalse:[
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2526
                    include := false.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2527
                ] ifTrue:[
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2528
                    (self conditionForAutoloadIsTrue:cond) ifTrue:[
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2529
                        include := false
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2530
                    ]
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2531
                ].
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2532
            ].
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2533
            include ifTrue:[
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2534
                s nextPutAll:' \'. s cr.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2535
                fileName := clsInfo classFileName.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2536
                fileName isNil ifTrue:[
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2537
                    fileName := Smalltalk fileNameForClass:aClass name.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2538
                ].
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2539
                fileName := fileName asFilename withoutSuffix name.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2540
                s nextPutAll:'  $(OUTDIR)'; nextPutAll:fileName; nextPutAll:'.$(O)'.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2541
            ]
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2542
        ].
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2543
        (methodsFile := self propertyAt:#methodsFile) size > 0 ifTrue:[
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2544
             s nextPutAll:' \'. s cr.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2545
             s nextPutAll:'  $(OUTDIR)'; 
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2546
               nextPutAll:(methodsFile asFilename withoutSuffix baseName);
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2547
               nextPutAll:'.$(O)'.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2548
        ].
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2549
        s cr.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2550
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2551
        s nextPutAll:'
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2552
# add more install actions here
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2553
install:
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2554
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2555
# add more install actions for aux-files (resources) here
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2556
installAux:
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2557
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2558
# add more preMake actions here
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2559
preMake:
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2560
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2561
# add more postMake actions here
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2562
postMake: cleanjunk
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2563
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2564
#clean::
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2565
#' , Character tab , '-del $(OUTDIR)*.obj
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2566
#' , Character tab , '-del *.sc
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2567
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2568
#clobber::
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2569
#' , Character tab , '-del $(OUTDIR)*.obj
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2570
#' , Character tab , '-del *.sc
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2571
#' , Character tab , '-del *.dll
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2572
#' , Character tab , '-del *.lib
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2573
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2574
5126
3395d5b1c464 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5125
diff changeset
  2575
!!INCLUDE $(TOP)\rules\stdRules_nt
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2576
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2577
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2578
'.
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2579
        classes notNil ifTrue:[
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2580
            classes do:[:aClass |
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2581
                |fileName clsInfo|
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2582
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2583
                clsInfo := self classInfoFor:aClass.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2584
                fileName := clsInfo classFileName.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2585
                fileName isNil ifTrue:[
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2586
                    fileName := Smalltalk fileNameForClass:aClass name.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2587
                ].
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2588
                fileName := fileName asFilename withoutSuffix name.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2589
                s nextPutAll:'$(OUTDIR)'; nextPutAll:fileName; nextPutAll:'.$(O): '.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2590
                s nextPutAll:fileName; nextPutAll:'.st '.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2591
    "/            aClass allSuperclassesDo:[:superClass|
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2592
    "/                s nextPutAll:(Smalltalk fileNameForClass:superClass name) , '.$(H) '.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2593
    "/            ].
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2594
                s nextPutAll:'$(STCHDR)';  cr.
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2595
            ].
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2596
        ].
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2597
        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
  2598
        s cr; cr.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2599
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2600
        type == #executable ifTrue:[
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2601
            s nextPutAll:'ALL:: $(PROGS)'; cr.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2602
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2603
            s nextPutAll:appName.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2604
            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
  2605
            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
  2606
                        nextPutAll:appName;
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2607
                        nextPutAll:' \'; cr.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2608
            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
  2609
            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
  2610
            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
  2611
        ].
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
        s close
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2614
    ] on:FileStream openErrorSignal do:[:ex|
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2615
        self warn:'cannot create ', ex parameter printString.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2616
    ]
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2617
5196
395147c4e481 nt makefiles.
Claus Gittinger <cg@exept.de>
parents: 5181
diff changeset
  2618
    "Modified: / 19.1.2000 / 16:55:34 / cg"
4822
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2619
!
5f37058e56c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4821
diff changeset
  2620
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2621
createProjectFiles
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2622
    "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
  2623
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2624
    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
  2625
	(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
  2626
	    ifFalse:[^ self].
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2627
	OperatingSystem recursiveCreateDirectory:directoryName.
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2628
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2629
    self createMakefile.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2630
    self createSourcefiles.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2631
    self createProtoMakefile.
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2632
    (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
  2633
	self createLoadAllFile
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  2634
    ].
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2635
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2636
2
claus
parents: 1
diff changeset
  2637
createProtoMakefile
claus
parents: 1
diff changeset
  2638
    "creates a Make.proto file"
claus
parents: 1
diff changeset
  2639
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2640
    |d f s type appName
5177
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2641
     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
  2642
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2643
    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
  2644
    classes isNil ifTrue:[^ self].
2
claus
parents: 1
diff changeset
  2645
5177
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2646
    methodsFile := self propertyAt:#methodsFile.
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2647
    notEmpty := (classes size > 0 or:[methodsFile size > 0]).
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2648
362
claus
parents: 356
diff changeset
  2649
    topName := self findTopFrom:directoryName.
2
claus
parents: 1
diff changeset
  2650
5177
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2651
    repositoryModule :=  self repositoryModule ? 'unknown'.
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2652
    repositoryDirectory := self repositoryDirectory ? 'unknown'.
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2653
    pkg := repositoryModule , ':' , repositoryDirectory.
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2654
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2655
    Transcript current showCR:'creating Make.proto'.
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  2656
356
claus
parents: 338
diff changeset
  2657
    d := directoryName asFilename.
2
claus
parents: 1
diff changeset
  2658
    f := d construct:'Make.proto'.
claus
parents: 1
diff changeset
  2659
    f exists ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2660
        f renameTo:(d construct:'Make.proto.bak')
2
claus
parents: 1
diff changeset
  2661
    ].
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2662
    [
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2663
        s := f writeStream.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  2664
    ] 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
  2665
        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
  2666
        ^ self
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
  2667
    ].
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2668
    s nextPutAll:'# $' , 'Header'. 
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2669
    s nextPutLine:'$'.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2670
    s nextPutAll:'#
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  2671
# -- 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
  2672
    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
  2673
    s nextPutAll:'
2
claus
parents: 1
diff changeset
  2674
#
4786
2375c3d2bffc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4785
diff changeset
  2675
# 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
  2676
# and let the ProjectBrowser recreate this file.
2375c3d2bffc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4785
diff changeset
  2677
# once you modify this file, do not rerun
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2678
# 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
  2679
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2680
# module and directory-in-module;
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2681
# these should correspond to the directory hierarchy
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2682
# location (otherwise, ST/X will have a hard time to
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2683
# find out the packages location from its packageID)
5177
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2684
MODULE=' , repositoryModule , '
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2685
MODULE_DIR=' , repositoryDirectory , '
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2686
'.
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2687
    s nextPutAll:'
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2688
# default installation directory:
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2689
# (overwrite with ''make INSTALLTOP_DIR=... install'')
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2690
# the INSTALLBASE is imported from configurations... and usually
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2691
# defaults to something like /opt/smalltalk.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2692
# (overwrite with ''make INSTALLBASE=... install'')
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2693
INSTALLTOP_DIR=$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR)
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2694
INSTALLLIB_DIR=$(INSTALLTOP_DIR)
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2695
INSTALLBIN_DIR=$(INSTALLTOP_DIR)
5177
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2696
'.
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2697
    s nextPutAll:'
362
claus
parents: 356
diff changeset
  2698
#
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2699
# position (of this package) in directory hierarchy:
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2700
# (must point to ST/X top directory, for tools and includes)
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2701
TOP=' , topName ,'
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2702
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2703
# subdirectories where targets are to be made:
5177
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2704
SUBDIRS='.
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2705
    self prerequisitePackages do:[:aPackageId |
5179
37fa0ca0a226 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5178
diff changeset
  2706
        |p|
37fa0ca0a226 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5178
diff changeset
  2707
5229
9808b01ca5e6 *** empty log message ***
tm
parents: 5224
diff changeset
  2708
        "/ add sub-packages only
5177
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2709
        (aPackageId startsWith:pkg) ifTrue:[
5179
37fa0ca0a226 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5178
diff changeset
  2710
            p := aPackageId copyFrom:pkg size + 1.
37fa0ca0a226 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5178
diff changeset
  2711
            (p startsWith:$/) ifTrue:[
37fa0ca0a226 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5178
diff changeset
  2712
                p := p copyFrom:2
37fa0ca0a226 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5178
diff changeset
  2713
            ].
37fa0ca0a226 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5178
diff changeset
  2714
            s nextPutAll:p.
5177
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2715
            s space.
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2716
        ]
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
    s nextPutAll:'
362
claus
parents: 356
diff changeset
  2720
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2721
# subdirectories where Makefiles are to be made:
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2722
# (only define if different from SUBDIRS)
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2723
# ALLSUBDIRS=
5177
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2724
'.
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2725
    notEmpty ifTrue:[
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2726
        s nextPutAll:'
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2727
# the name of your classLibrary:
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2728
# ********** REQUIRED: CHECK the next line ***
4789
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  2729
LIBNAME=' , self libraryName , '
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2730
5177
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2731
'.
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
    false ifTrue:[
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2735
        s nextPutAll:'
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2736
# the next define suppresses installation of 
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2737
# the classes as autoloaded (i.e. not added to abbrev.stc). 
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2738
SUPPRESS_LOCAL_ABBREVS=1
5177
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2739
'.
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
    s nextPutAll:'
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2742
# the package is stored as an ID in classes and methods
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2743
# to identify code belonging to this project.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2744
# It also specifies the position in the source repository
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2745
# and directory tree, when packages are loaded by packageID.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2746
# ********** REQUIRED: CHECK the next line ***
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2747
PACKAGE=$(MODULE):$(MODULE_DIR)
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2748
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2749
# Argument(s) to the stc compiler.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2750
#  -H.         : create header files locally
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2751
#                (if removed, they will be created as common
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2752
#  -Pxxx       : defines the package
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2753
#  -Zxxx       : a prefix for variables within the classLib
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2754
#  -Dxxx       : defines passed to to CC for inline C-code
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2755
#  -Ixxx       : include path passed to CC for inline C-code
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2756
#  +optspace   : optimized for space
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2757
#  +optspace2  : optimized more for space
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2758
#  +optspace3  : optimized even more for space
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2759
#  +optinline  : generate inline code for some ST constructs
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2760
#  +inlineNew  : additionally inline new
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2761
#  +inlineMath : additionally inline some floatPnt math stuff
362
claus
parents: 356
diff changeset
  2762
#
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2763
# ********** OPTIONAL: MODIFY the next line(s) ***
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2764
# STCLOCALOPTIMIZATIONS=+optinline +inlineNew
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2765
# STCLOCALOPTIMIZATIONS=+optspace3
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
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2768
# Argument(s) to the stc compiler.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2769
#  -warn            : no warnings
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2770
#  -warnNonStandard : no warnings about ST/X extensions
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2771
#  -warnEOLComments : no warnings about EOL comment extension
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2772
#  -warnPrivacy     : no warnings about privateClass extension
362
claus
parents: 356
diff changeset
  2773
#
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2774
# ********** OPTIONAL: MODIFY the next line(s) ***
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2775
# STCWARNINGS=-warn
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2776
# STCWARNINGS=-warnNonStandard
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2777
# STCWARNINGS=-warnEOLComments
4796
eee167a75fcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4792
diff changeset
  2778
STCWARNINGS='.
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2779
        (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
  2780
            s nextPutAll:'-warnEOLComments '.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2781
        ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2782
        (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
  2783
            s nextPutAll:'-warnNonStandard '.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2784
        ].
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2785
        s nextPutAll:((self propertyAt:#'make.stc.WARNINGOPTIONS') ? '') , '
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2786
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2787
# if your embedded C code requires any system includes, 
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2788
# add the path(es) here:, 
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2789
# ********** OPTIONAL: MODIFY the next lines ***
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2790
# LOCALINCLUDES=-Ifoo -Ibar
5229
9808b01ca5e6 *** empty log message ***
tm
parents: 5224
diff changeset
  2791
LOCALINCLUDES='.
9808b01ca5e6 *** empty log message ***
tm
parents: 5224
diff changeset
  2792
        s nextPutAll:((self propertyAt:#'make.stc.LOCALINCLUDES') ? '').
9808b01ca5e6 *** empty log message ***
tm
parents: 5224
diff changeset
  2793
        self prerequisitePackages do:[:aPackageId |
9808b01ca5e6 *** empty log message ***
tm
parents: 5224
diff changeset
  2794
            |prj|
9808b01ca5e6 *** empty log message ***
tm
parents: 5224
diff changeset
  2795
9808b01ca5e6 *** empty log message ***
tm
parents: 5224
diff changeset
  2796
            s nextPutAll:'-I$(TOP)/../' , (aPackageId copyReplaceAll:$: with:$/) , ' '.
9808b01ca5e6 *** empty log message ***
tm
parents: 5224
diff changeset
  2797
        ].
9808b01ca5e6 *** empty log message ***
tm
parents: 5224
diff changeset
  2798
        s nextPutAll:'
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2799
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2800
# if you need any additional defines for embedded C code, 
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2801
# add them here:, 
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2802
# ********** OPTIONAL: MODIFY the next lines ***
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2803
# LOCALDEFINES=-Dfoo -Dbar -DDEBUG
4796
eee167a75fcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4792
diff changeset
  2804
LOCALDEFINES=' , ((self propertyAt:#'make.stc.LOCALDEFINES') ? '') , '
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2805
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2806
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
  2807
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2808
# ********** OPTIONAL: MODIFY the next line ***
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2809
# 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
  2810
LD_OBJ_LIBS=' , ((self propertyAt:#'make.LD_OBJ_LIBS') ? '') , '
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2811
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2812
# ********** OPTIONAL: MODIFY the next line ***
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2813
# additional C targets or libraries should be added below
4796
eee167a75fcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4792
diff changeset
  2814
LOCAL_EXTRA_TARGETS=' , ((self propertyAt:#'make.LOCAL_EXTRA_TARGETS') ? '') , '
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2815
5177
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2816
'.
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
    s nextPutAll:'
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2819
all:: preMake '.
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2820
    notEmpty ifTrue:[
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2821
        s nextPutAll:'classLibRule '
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2822
    ].
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2823
    s nextPutAll:'postMake
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2824
2
claus
parents: 1
diff changeset
  2825
claus
parents: 1
diff changeset
  2826
'.
claus
parents: 1
diff changeset
  2827
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2828
"/    type := #library.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2829
"/    appName := 'app'.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2830
"/    libName := 'lib'.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2831
"/    startUpClass := 'Smalltalk'.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2832
"/    startUpSelector := 'start'.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2833
"/
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2834
"/    properties notNil ifTrue:[
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2835
"/        type := properties at:#projectType ifAbsent:type.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2836
"/        appName := properties at:#applicationName ifAbsent:appName.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2837
"/        startUpClass := properties at:#startupClass ifAbsent:startUpClass.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2838
"/        startUpSelector := properties at:#startupSelector ifAbsent:startUpSelector.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2839
"/    ].
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
"/    s nextPutAll:'#
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2842
"/# define the name of the library to create
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2843
"/#
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
"/    s nextPutAll:'LIBNAME=lib' , appName; cr; cr.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2846
"/
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2847
"/    s nextPutAll:'#
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2848
"/# the target rule:
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2849
"/#
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2850
"/all::   abbrev.stc objs genClassList $(OBJTARGET)
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2851
"/
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
"/    type == #executable ifTrue:[
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2855
"/        s nextPutAll:'PROGS = ' , appName; cr.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2856
"/        s nextPutAll:('STARTUP_CLASS=' , startUpClass); cr.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2857
"/        s nextPutAll:'STARTUP_SELECTOR="' , startUpSelector; nextPutAll:'"'; cr.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2858
"/    ].
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
"/    s nextPutAll:'#
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2861
"/# define the object files that are to be created
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2862
"/#
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
    s nextPutAll:'OBJS='.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2865
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2866
    classes do:[:aClass |
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2867
        |clsInfo cond include fileName|
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2868
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2869
        clsInfo := self classInfoFor:aClass.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2870
        include := true.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2871
        clsInfo notNil ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2872
            cond := clsInfo conditionForInclusion.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2873
            (self conditionForInclusionIsTrue:cond) ifFalse:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2874
                include := false.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2875
            ] ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2876
                (self conditionForAutoloadIsTrue:cond) ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2877
                    include := false
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2878
                ]
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
        include ifTrue:[
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2882
            s nextPutAll:' \'. s cr.
4833
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2883
            fileName := clsInfo classFileName.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2884
            fileName isNil ifTrue:[
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2885
                fileName := Smalltalk fileNameForClass:aClass name.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2886
            ].
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2887
            fileName := fileName asFilename withoutSuffix name.
5652aec1b08a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4832
diff changeset
  2888
            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
  2889
        ]
2
claus
parents: 1
diff changeset
  2890
    ].
4792
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  2891
    (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
  2892
         s nextPutAll:' \'. s cr.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2893
         s nextPutAll:'  '; 
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2894
           nextPutAll:(methodsFile asFilename withoutSuffix baseName);
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2895
           nextPutAll:'.$(O)'.
4785
4ced52c817e6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4779
diff changeset
  2896
    ].
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2897
    s cr.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2898
5229
9808b01ca5e6 *** empty log message ***
tm
parents: 5224
diff changeset
  2899
    self prerequisitePackages size > 0 ifTrue:[
9808b01ca5e6 *** empty log message ***
tm
parents: 5224
diff changeset
  2900
        s nextPutAll:'
9808b01ca5e6 *** empty log message ***
tm
parents: 5224
diff changeset
  2901
# make required packages
9808b01ca5e6 *** empty log message ***
tm
parents: 5224
diff changeset
  2902
prerequisites::
9808b01ca5e6 *** empty log message ***
tm
parents: 5224
diff changeset
  2903
'.
9808b01ca5e6 *** empty log message ***
tm
parents: 5224
diff changeset
  2904
        self prerequisitePackages do:[:aPackageId |
9808b01ca5e6 *** empty log message ***
tm
parents: 5224
diff changeset
  2905
            |prj|
9808b01ca5e6 *** empty log message ***
tm
parents: 5224
diff changeset
  2906
9808b01ca5e6 *** empty log message ***
tm
parents: 5224
diff changeset
  2907
            s tab; nextPutAll:'(cd $(TOP)/../' , (aPackageId copyReplaceAll:$: with:$/) , '; $(MAKE) ) '; cr.
9808b01ca5e6 *** empty log message ***
tm
parents: 5224
diff changeset
  2908
        ].
9808b01ca5e6 *** empty log message ***
tm
parents: 5224
diff changeset
  2909
        s cr.
9808b01ca5e6 *** empty log message ***
tm
parents: 5224
diff changeset
  2910
    ].
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2911
    s nextPutAll:'
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2912
# add more install actions here
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2913
install::
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2914
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2915
# add more install actions for aux-files (resources) here
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2916
installAux::
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2917
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2918
# add more preMake actions here
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2919
preMake::
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2920
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2921
# add more postMake actions here
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2922
postMake:: cleanjunk
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2923
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2924
cleanjunk::
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2925
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2926
clean::
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2927
' , Character tab , '-rm -f *.o *.H
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2928
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2929
clobber::
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2930
' , Character tab , '-rm -f *.so *.dll
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2931
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2932
$(INSTALLBASE)::
5177
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2933
' , Character tab , '@test -d $@ || mkdir -p $@
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2934
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2935
$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR):: $(INSTALLBASE)/packages/$(MODULE)
5177
3b6861109161 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5173
diff changeset
  2936
' , Character tab , '@test -d $@ || mkdir -p $@
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2937
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2938
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
362
claus
parents: 356
diff changeset
  2939
'.
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2940
"/    classes notNil ifTrue:[
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2941
"/        classes do:[:aClass |
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2942
"/            |abbrev|
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2943
"/
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2944
"/            abbrev := Smalltalk fileNameForClass:aClass name.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2945
"/            s nextPutAll:abbrev; nextPutAll:'.$(O): '.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2946
"/            s nextPutAll:abbrev; nextPutAll:'.st '.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2947
"/            aClass allSuperclassesDo:[:superClass|
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2948
"/                s nextPutAll:(Smalltalk fileNameForClass:superClass name) , '.$(H) '.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2949
"/            ].
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2950
"/            s nextPutAll:'$(STCHDR)';  cr.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  2951
"/        ].
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
    s nextPutAll:'# ENDMAKEDEPEND --- do not remove this line'.
362
claus
parents: 356
diff changeset
  2954
    s cr; cr.
2
claus
parents: 1
diff changeset
  2955
claus
parents: 1
diff changeset
  2956
    type == #executable ifTrue:[
4832
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2957
        s nextPutAll:'all:: $(PROGS)'; cr.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2958
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2959
        s nextPutAll:appName.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2960
        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
  2961
        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
  2962
                    nextPutAll:appName;
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2963
                    nextPutAll:' \'; cr.
d335c43bf297 care for inheritance order, when saving a project file.
Claus Gittinger <cg@exept.de>
parents: 4824
diff changeset
  2964
        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
  2965
        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
  2966
        s tab; tab; nextPutAll:'$(MATHLIB) $(EXTRALIBS) -lXext $(SYSLIBS) $(OTHERLIBS) $(CRTN)'; cr.
2
claus
parents: 1
diff changeset
  2967
    ].
claus
parents: 1
diff changeset
  2968
claus
parents: 1
diff changeset
  2969
    s close
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  2970
4069
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  2971
    "Modified: / 23.3.1999 / 14:20:09 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2972
!
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
createSourcefiles
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2975
    "creates all Smalltalk-source files in the project directory"
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2976
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2977
    |classes methods methodClasses dir stream|
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2978
2956
952a09bdeed1 Use Filename instead of obsolete FileDirectory
Stefan Vogel <sv@exept.de>
parents: 2907
diff changeset
  2979
    dir := self directory asFilename.
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2980
    Transcript current showCR:'creating sources in ' , dir pathName , ' ...'; endEntry.
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2981
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2982
    classes := self classes.
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2983
    classes size == 0 ifTrue:[
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2984
        self warn:'no classes in current project'
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  2985
    ] ifFalse:[
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2986
        classes do:[:aClass |
7229
1c008aaa2022 autoload is understood by all classes (dummy if already loaded)
Claus Gittinger <cg@exept.de>
parents: 7207
diff changeset
  2987
            aClass autoload.
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2988
        ].
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2989
        "/ to not list private classes
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2990
        classes := classes select:[:cls | cls owningClass isNil].
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2991
        classes := classes topologicalSort:[:a :b | a isSubclassOf:b].
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2992
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2993
        classes do:[:aClass |
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2994
            Transcript current show:' ... '; showCR:aClass name, '.st'; endEntry.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2995
            aClass fileOutIn:dir
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  2996
        ]
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  2997
    ].
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
    methods := self individualMethods.
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3000
    methods size > 0 ifTrue:[
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3001
        methods := methods asIdentitySet.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3002
        "
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3003
         get classes ...
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3004
        "
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3005
        methodClasses := IdentitySet new.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3006
        methods do:[:m | 
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3007
                        |mCls|
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3008
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3009
                        mCls := m containingClass.
6152
b987f345234e condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents: 6141
diff changeset
  3010
                        mCls := mCls theNonMetaclass.
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3011
                        methodClasses add:mCls].
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3012
        "
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3013
         fileOut by class
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3014
        "
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3015
        methodClasses do:[:cls |
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3016
            stream := (self directory asFilename construct:(cls name , '.chg')) writeStream.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3017
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3018
            Transcript current show:' ... '; showCR:cls name, '.chg'; endEntry.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3019
            methods do:[:m |
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3020
                |mCls|
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3021
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3022
                mCls := m containingClass.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3023
                (mCls == cls or:[mCls == cls class]) ifTrue:[
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3024
                    mCls fileOutMethod:m on:stream.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3025
                ].
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3026
                stream cr.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3027
            ].
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3028
            stream close.
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3029
        ].
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3030
    ].
1420
be5f8e9574cc showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 1332
diff changeset
  3031
6152
b987f345234e condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents: 6141
diff changeset
  3032
    "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
  3033
    "Modified: / 5.11.2001 / 16:46:17 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3034
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3035
4850
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3036
createVMSMakefile
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3037
    "creates an vms.mak makefile"
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3038
43b7eac07273 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4834
diff changeset
  3039
    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
  3040
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
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3043
findTopFrom:directoryName
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3044
    "returns the relative path from directoryName to the TOP
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3045
     directory."
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3046
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3047
    |topName relParent foundTop|
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3048
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3049
    "/ find TOP
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3050
    relParent := '..'.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3051
    foundTop := false.
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3052
    [foundTop] whileFalse:[
4820
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  3053
        topName := directoryName asFilename construct:relParent.
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  3054
        ((topName construct:'stx') construct:'configurations') exists ifTrue:[
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  3055
            ((topName construct:'stx') construct:'include') exists ifTrue:[
4821
c73b170cb6e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  3056
                ^ relParent asFilename constructString:'stx'.
4820
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  3057
            ]
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
        (topName construct:'configurations') exists ifTrue:[
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  3060
            (topName construct:'include') exists ifTrue:[
4888
8a44ac394b75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4887
diff changeset
  3061
                ^ relParent asFilename name
4820
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  3062
            ]
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
        relParent := relParent asFilename constructString:'..'.
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  3065
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  3066
        topName isRootDirectory ifTrue:[
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  3067
            self warn:'could not find TOP; assume absolute path to TOP'.
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  3068
            ^ nil.
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  3069
"/            topName := '/usr/local/lib/smalltalk'.
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  3070
"/            foundTop := true.
4820
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  3071
        ]
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3072
    ].
4779
767b94dabb98 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4776
diff changeset
  3073
    ^ topName pathName
4820
481593067423 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4819
diff changeset
  3074
4821
c73b170cb6e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4820
diff changeset
  3075
    "Modified: / 26.9.1999 / 16:15:14 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3076
! !
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3077
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3078
!Project methodsFor:'printing & storing'!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3079
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3080
displayString
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3081
    ^ super displayString , '(''' , (name ? '<unnamed>') , ''')'
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3082
! !
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3083
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3084
!Project methodsFor:'properties'!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3085
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  3086
addClass:classOrClassName
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  3087
    "add a class to the project"
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  3088
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  3089
    |fn|
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  3090
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  3091
    (classOrClassName isBehavior and:[classOrClassName isLoaded]) ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  3092
        fn := classOrClassName classFilename.
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  3093
    ].
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  3094
    self addClass:classOrClassName classFileName:fn
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  3095
!
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  3096
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  3097
addClass:classOrClassName classFileName:fileName
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  3098
    "add a class to the project"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  3099
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  3100
    self
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3101
	addClass:classOrClassName 
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3102
	conditionForInclusion:#always 
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3103
	classFileName:fileName
4097
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
!
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  3106
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  3107
addClass:classOrClassName conditionForInclusion:conditionBlock classFileName:fileName
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  3108
    "add a class to the project"
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3109
4789
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  3110
    |i clsName|
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  3111
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  3112
    (clsName := classOrClassName) isBehavior ifTrue:[
4886
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  3113
        clsName := classOrClassName name
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  3114
    ].
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  3115
    (clsName startsWith:'Smalltalk::') ifTrue:[
63d9275b8210 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4885
diff changeset
  3116
        clsName := clsName copyFrom:'Smalltalk::' size + 1.
4789
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  3117
    ].
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3118
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3119
    i := ClassInfo new.
4789
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  3120
    i className:clsName.
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3121
    i classFileName:fileName.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3122
    i conditionForInclusion:conditionBlock.
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3123
    self addClassInfo:i
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3124
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3125
4089
abcd3430bb9c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3126
addClassInfo:newInfo
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3127
    "add a class info to the project"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3128
4315
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  3129
    |infoCollection index nm prefix|
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3130
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3131
    (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
  3132
	self classInfo:(infoCollection := OrderedCollection new).
3996
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
047c3c925f2f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4314
diff changeset
  3135
    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
  3136
					nm1 := i className.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3137
					nm2 := newInfo className.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3138
					nm1 = nm2
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3139
				      ].
4089
abcd3430bb9c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3140
    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
  3141
	infoCollection at:index put:newInfo
4089
abcd3430bb9c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3142
    ] ifFalse:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3143
	infoCollection add:newInfo
4089
abcd3430bb9c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3144
    ]
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3145
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3146
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3147
addMethod:methodName inClass:classOrClassName conditionForInclusion:condition fileName:optionalFileName
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3148
    "add a method to the project"
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3149
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3150
    |i|
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3151
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3152
    i := MethodInfo new.
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3153
    i className:classOrClassName.
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3154
    i methodName:methodName.
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3155
    i fileName:optionalFileName.
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3156
    i conditionForInclusion:condition.
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3157
    self addMethodInfo:i
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3158
!
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3159
4668
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  3160
addMethod:methodOrSelector inClass:aClassOrClassName fileName:fileName
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  3161
    "add an individual method to the project"
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  3162
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  3163
    |i|
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  3164
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  3165
    i := MethodInfo new.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  3166
    i methodName:methodOrSelector.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  3167
    i className:aClassOrClassName.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  3168
    i fileName:fileName.
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  3169
    self addMethodInfo:i
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  3170
!
a4e061d91251 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
  3171
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3172
addMethodInfo:newInfo
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3173
    "add a method info to the project"
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3174
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3175
    |infoCollection index nm prefix|
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3176
5655
d1bc7daf5add *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
  3177
    prefix := self defaultNameSpace name , '::'.
d1bc7daf5add *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
  3178
4887
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3179
    infoCollection := self methodInfo.
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3180
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3181
    index := infoCollection findFirst:[:i | |cnm1 cnm2|
4887
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3182
                                        cnm1 := i className.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3183
                                        cnm2 := newInfo className.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3184
                                        (cnm1 includes:$:) ifFalse:[
5655
d1bc7daf5add *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
  3185
                                            cnm1 := prefix , cnm1
4887
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3186
                                        ].
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3187
                                        (cnm2 includes:$:) ifFalse:[
5655
d1bc7daf5add *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
  3188
                                            cnm2 := prefix , cnm2
4887
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3189
                                        ].
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3190
                                        cnm1 = cnm2 and:[i methodName = newInfo methodName]
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3191
                                      ].
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3192
    "/ 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
  3193
    "/ the default ...
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3194
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3195
    nm := newInfo className.
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3196
    (nm startsWith:prefix) ifTrue:[
4887
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3197
        nm := nm copyFrom:(prefix size + 1).
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3198
        newInfo className:nm asSymbol.
4755
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
    index ~~ 0 ifTrue:[
4887
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3201
        infoCollection at:index put:newInfo
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3202
    ] ifFalse:[
4887
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3203
        infoCollection add:newInfo
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
!
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3206
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3207
classInfo:aClassInfoCollection
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3208
    "set the class info of the project"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3209
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  3210
    self propertyAt:#classInfo put:aClassInfoCollection
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3211
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3212
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3213
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3214
comment
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3215
    "return the comment of the project"
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3216
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3217
    properties isNil ifTrue:[^ ''].
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3218
    ^ properties at:#comment ifAbsent:''
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3219
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3220
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3221
comment:aString
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3222
    "set the projects comment"
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3223
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  3224
    self propertyAt:#comment put:aString
4070
682f720cd0f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4069
diff changeset
  3225
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3226
!
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3227
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3228
documentationURL
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3229
    "return the documentation-URL of the project"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3230
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3231
    properties isNil ifTrue:[^ nil].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3232
    ^ properties at:#documentationURL ifAbsent:nil
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3233
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3234
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3235
documentationURL:anURLString
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3236
    "set the projects documentation-URL"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3237
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  3238
    self propertyAt:#documentationURL put:anURLString
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  3239
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3240
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3241
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3242
methodInfo:aMethodInfoCollection
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3243
    "set the method info of the project"
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3244
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3245
    self propertyAt:#methodInfo put:aMethodInfoCollection
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3246
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3247
!
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3248
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3249
properties
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  3250
    "return the property dictionary"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  3251
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3252
    ^ properties
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3253
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3254
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3255
properties:p
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  3256
    "set the property dictionary"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  3257
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3258
    properties := p
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
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  3261
propertyAt:aKey
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  3262
    "return a property; the key is a symbol"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  3263
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  3264
    properties isNil ifTrue:[^ nil].
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  3265
    ^ properties at:aKey ifAbsent:nil.
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  3266
!
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  3267
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  3268
propertyAt:aKey put:aValue
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  3269
    "set a property; the key is a symbol"
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  3270
4077
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  3271
    |oldValue|
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  3272
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  3273
    oldValue := self propertyAt:aKey.
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  3274
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  3275
    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
  3276
	properties := IdentityDictionary new
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  3277
    ].
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  3278
    properties at:aKey put:aValue.
4077
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  3279
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  3280
    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
  3281
	self changed:aKey.
4077
cc1f4c165ace checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4074
diff changeset
  3282
    ].
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  3283
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  3284
    "Created: / 23.3.1999 / 14:21:11 / cg"
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  3285
!
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  3286
4792
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  3287
removeClass:classOrClassName
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  3288
    "remove a class from the project"
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  3289
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  3290
    |infoCollection index className|
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  3291
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  3292
    (infoCollection := self classInfo) isNil ifTrue:[^ self].
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  3293
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  3294
    (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
  3295
	className := classOrClassName name
4792
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
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  3298
    index := infoCollection findFirst:[:i | i className = className.].
8e50b8218546 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4791
diff changeset
  3299
    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
  3300
	infoCollection removeIndex:index
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
4834
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  3304
removeMethod:method
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  3305
    "remove a method from the project"
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  3306
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  3307
    |infoCollection index className selector|
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  3308
4887
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3309
    (infoCollection := self methodInfo) size == 0 ifTrue:[^ self].
4834
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  3310
    className := method who methodClass name.
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  3311
    selector := method who methodSelector.
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  3312
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  3313
    index := infoCollection findFirst:[:i | i className = className.].
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  3314
    index ~~ 0 ifTrue:[
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  3315
        infoCollection removeIndex:index
522f10359ce9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4833
diff changeset
  3316
    ]
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
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3319
type
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  3320
    "return the type of project (one of #application, #library, #smalltalk)"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3321
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3322
    properties isNil ifTrue:[^ #application].
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3323
    ^ properties at:#type ifAbsent:#application
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3324
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3325
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3326
type:aSymbol
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  3327
    "set the projects type (one of #application, #library, #smalltalk)"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3328
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  3329
    |sym|
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  3330
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  3331
    (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
  3332
	sym := #library
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  3333
    ].
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  3334
    (#(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
  3335
	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
  3336
	^ self
3972
efc25c2863e9 more attributes; some preparations for the ProjectBrowser.
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3337
    ].
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  3338
    self propertyAt:#type put:sym
4069
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  3339
!
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  3340
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  3341
wasLoadedFromFile
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  3342
    "return true, if the project was loaded from a file"
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  3343
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  3344
    properties isNil ifTrue:[^ nil].
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  3345
    ^ properties at:#wasLoadedFromFile ifAbsent:false
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  3346
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  3347
    "Modified: / 23.3.1999 / 13:59:32 / cg"
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  3348
    "Created: / 23.3.1999 / 14:21:06 / cg"
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  3349
!
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  3350
7d36633a470a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
  3351
wasLoadedFromFile:aBoolean
4097
66466729c1de more PBrowser support
Claus Gittinger <cg@exept.de>
parents: 4089
diff changeset
  3352
    "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
  3353
4071
2b6946e843c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4070
diff changeset
  3354
    self propertyAt:#wasLoadedFromFile put:aBoolean
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3355
! !
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3356
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3357
!Project methodsFor:'queries'!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3358
4688
1b27165b9f97 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4685
diff changeset
  3359
areAllClassesLoaded
1b27165b9f97 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4685
diff changeset
  3360
    "return true, if all classes of the package are loaded
1b27165b9f97 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4685
diff changeset
  3361
     (i.e. there are no autoloaded stubs present)"
1b27165b9f97 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4685
diff changeset
  3362
4690
563f4d832234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4688
diff changeset
  3363
    |classes|
563f4d832234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4688
diff changeset
  3364
563f4d832234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4688
diff changeset
  3365
    classes := self classes.
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3366
    classes size == 0 ifTrue:[^ isLoaded ? false].
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3367
4690
563f4d832234 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4688
diff changeset
  3368
    classes do:[:aClass |
4900
7371c0da8359 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4888
diff changeset
  3369
        aClass isBehavior ifFalse:[^ false].
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3370
        aClass isLoaded ifFalse:[^ false].
4688
1b27165b9f97 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4685
diff changeset
  3371
    ].
1b27165b9f97 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4685
diff changeset
  3372
    ^ true
1b27165b9f97 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4685
diff changeset
  3373
1b27165b9f97 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4685
diff changeset
  3374
!
1b27165b9f97 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4685
diff changeset
  3375
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3376
classInfo
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3377
    "return a classInfo collection of classes belonging to that project"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3378
4073
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  3379
    |classInfo classes|
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3380
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3381
    properties notNil ifTrue:[
9498
7b12d2911a1a *** empty log message ***
fm
parents: 9228
diff changeset
  3382
        classInfo := properties at:#classInfo ifAbsent:nil.
7b12d2911a1a *** empty log message ***
fm
parents: 9228
diff changeset
  3383
        classInfo notNil ifTrue:[^ classInfo].
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3384
    ].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3385
4073
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  3386
    classes := self classes.
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  3387
    classes size == 0 ifTrue:[
9498
7b12d2911a1a *** empty log message ***
fm
parents: 9228
diff changeset
  3388
        classInfo := OrderedCollection new
4073
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  3389
    ] ifFalse:[
9498
7b12d2911a1a *** empty log message ***
fm
parents: 9228
diff changeset
  3390
        classInfo := classes asOrderedCollection
7b12d2911a1a *** empty log message ***
fm
parents: 9228
diff changeset
  3391
                        collect:[:class |
7b12d2911a1a *** empty log message ***
fm
parents: 9228
diff changeset
  3392
                            |i fn|
7b12d2911a1a *** empty log message ***
fm
parents: 9228
diff changeset
  3393
7b12d2911a1a *** empty log message ***
fm
parents: 9228
diff changeset
  3394
                            i := ClassInfo new.
7b12d2911a1a *** empty log message ***
fm
parents: 9228
diff changeset
  3395
                            i conditionForInclusion:#always.
7b12d2911a1a *** empty log message ***
fm
parents: 9228
diff changeset
  3396
                            i className:class name.
7b12d2911a1a *** empty log message ***
fm
parents: 9228
diff changeset
  3397
                            fn := class classFilename.
7b12d2911a1a *** empty log message ***
fm
parents: 9228
diff changeset
  3398
                            i classFileName:fn.
7b12d2911a1a *** empty log message ***
fm
parents: 9228
diff changeset
  3399
                            i
7b12d2911a1a *** empty log message ***
fm
parents: 9228
diff changeset
  3400
                        ]
4073
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  3401
    ].
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  3402
    self propertyAt:#classInfo put:classInfo.
21939187f19c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4071
diff changeset
  3403
    ^ classInfo
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3404
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3405
    "Modified: 4.1.1997 / 16:51:18 / cg"
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3406
!
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3407
4789
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  3408
classInfoFor:aClassOrClassName
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  3409
    "return a classInfo for a particular class"
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  3410
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  3411
    |classInfo clsName index|
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  3412
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  3413
    (classInfo := self classInfo) isNil ifTrue:[^ nil].
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  3414
    (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
  3415
	clsName := aClassOrClassName name
4789
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  3416
    ].
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  3417
    ^ classInfo detect:[:i | i className = clsName] ifNone:nil.
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  3418
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  3419
72a61dc595ad loadAll/Make.proto file generation
Claus Gittinger <cg@exept.de>
parents: 4787
diff changeset
  3420
    "Modified: 4.1.1997 / 16:51:18 / cg"
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
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3423
classes
4013
f06d31702f2a ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents: 4010
diff changeset
  3424
    "return a collection of classes belonging to that project.
f06d31702f2a ignore private classes in classList
Claus Gittinger <cg@exept.de>
parents: 4010
diff changeset
  3425
     This excludes any private classes."
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3426
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3427
    |classes classInfo|
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3428
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3429
    properties notNil ifTrue:[
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3430
        classInfo := properties at:#classInfo ifAbsent:nil.
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3431
        classInfo notNil ifTrue:[
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3432
            classes := classInfo collect:[:i | i className]
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3433
        ] ifFalse:[
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3434
            classes := properties at:#classes ifAbsent:nil
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3435
        ]
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3436
    ].
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3437
5201
Claus Gittinger <cg@exept.de>
parents: 5199
diff changeset
  3438
    (properties isNil
Claus Gittinger <cg@exept.de>
parents: 5199
diff changeset
  3439
    or:[properties at:#autoIncludeImageClasses ifAbsent:true])
Claus Gittinger <cg@exept.de>
parents: 5199
diff changeset
  3440
    ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 5199
diff changeset
  3441
        classes isNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 5199
diff changeset
  3442
            classes := OrderedCollection new.
Claus Gittinger <cg@exept.de>
parents: 5199
diff changeset
  3443
            Smalltalk 
Claus Gittinger <cg@exept.de>
parents: 5199
diff changeset
  3444
                allClassesDo:[:aClass |
Claus Gittinger <cg@exept.de>
parents: 5199
diff changeset
  3445
                    (true "aClass owningClass isNil"
Claus Gittinger <cg@exept.de>
parents: 5199
diff changeset
  3446
                    and:[aClass isMeta not
Claus Gittinger <cg@exept.de>
parents: 5199
diff changeset
  3447
                    and:[aClass package = packageName
5327
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3448
                    and:[aClass isNameSpace not or:[aClass == Smalltalk]]]]) ifTrue:[
5201
Claus Gittinger <cg@exept.de>
parents: 5199
diff changeset
  3449
                        classes add:aClass
Claus Gittinger <cg@exept.de>
parents: 5199
diff changeset
  3450
                    ]
Claus Gittinger <cg@exept.de>
parents: 5199
diff changeset
  3451
                ].
Claus Gittinger <cg@exept.de>
parents: 5199
diff changeset
  3452
        ].
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3453
    ].
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3454
    ^ classes ? #()
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3455
2056
1beb5756e9e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2034
diff changeset
  3456
    "Modified: 4.1.1997 / 16:51:18 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3457
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3458
4887
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3459
includesClass:aClassOrClassName
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3460
    "return true, if a class is contained in the project"
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3461
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3462
    |infoCollection index className|
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3463
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3464
    (infoCollection := self classInfo) isNil ifTrue:[^ false].
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3465
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3466
    aClassOrClassName isBehavior ifTrue:[
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3467
        className := aClassOrClassName name
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3468
    ] ifFalse:[
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3469
        className := aClassOrClassName
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
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3472
    index := infoCollection findFirst:[:i | |nm1 nm2|
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3473
                                        i className = className
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3474
                                      ].
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3475
    ^ index ~~ 0 
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
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3478
includesMethod:aMethod
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3479
    "return true, if the given method is contained in the project
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3480
     (either as patch/extension or as class"
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
    |who methodClass|
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3483
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3484
    who := aMethod who.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3485
    who isNil ifTrue:[^ false].
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3486
    methodClass := who methodClass.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3487
    (self includesClass:methodClass) ifTrue:[^ true].
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3488
    ^ self includesMethodPatch:aMethod
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3489
!
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3490
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3491
includesMethodPatch:aMethod
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3492
    "return true, if the given method is contained in the project
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3493
     as patch/extension"
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
    |who methodClass methodClassName methodSelector infoCollection index className selector|
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3496
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3497
    who := aMethod who.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3498
    who isNil ifTrue:[^ false].
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3499
    methodClass := who methodClass.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3500
    methodClassName := methodClass name.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3501
    methodSelector := who methodSelector.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3502
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3503
    infoCollection := self methodInfo.
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3504
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3505
    index := infoCollection findFirst:[:i | 
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3506
                        (i className = methodClassName 
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3507
                        and:[i methodName = methodSelector])
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3508
             ].
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3509
    ^ index ~~ 0 
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3510
!
f9e375e800a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4886
diff changeset
  3511
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3512
individualMethods
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3513
    "return a collection of individual methods belonging to that project,
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3514
     only methods are returned which are not contained in the
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3515
     projects class set."
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3516
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3517
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3518
"/
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3519
"/ obsoleted by #methods ...
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3520
"/
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3521
    |classes methods|
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3522
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3523
    classes := self classes.
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3524
    classes size > 0 ifTrue:[
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3525
        classes := classes asIdentitySet.
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3526
    ].
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
    methods := IdentitySet new.
5581
7bef1c75fb06 allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  3529
    Smalltalk allClassesDo:[:cls |
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3530
        |classToCheck|
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3531
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3532
        classToCheck := cls.
4670
21eec331e1e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4668
diff changeset
  3533
"/        cls isPrivate ifTrue:[
21eec331e1e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4668
diff changeset
  3534
"/            classToCheck := cls topOwningClass
21eec331e1e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4668
diff changeset
  3535
"/        ].
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3536
        ((classes includes:classToCheck) 
7640
3a88d6dd9eba not ifTrue -> ifFalse
Claus Gittinger <cg@exept.de>
parents: 7496
diff changeset
  3537
        or:[classes includes:classToCheck name]) 
3a88d6dd9eba not ifTrue -> ifFalse
Claus Gittinger <cg@exept.de>
parents: 7496
diff changeset
  3538
        ifFalse:[
6079
c18b15a12fe5 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 6032
diff changeset
  3539
            cls instAndClassSelectorsAndMethodsDo:[:sel :m |
4885
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3540
                m package = packageName ifTrue:[
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3541
                    methods add:m
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3542
                ]
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3543
            ].
bdbdb37f4252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4850
diff changeset
  3544
        ]
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3545
    ].
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3546
    ^ methods asArray
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3547
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3548
    "
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3549
     Project current classes
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3550
     Project current individualMethods
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3551
    "
1461
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  3552
dd25bb1e9973 Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 1420
diff changeset
  3553
    "Modified: 7.6.1996 / 09:16:25 / stefan"
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3554
!
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3555
5897
793b0adad934 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5819
diff changeset
  3556
isDefaultProject
793b0adad934 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5819
diff changeset
  3557
    ^ self == Project defaultProject
793b0adad934 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5819
diff changeset
  3558
!
793b0adad934 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5819
diff changeset
  3559
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3560
isLoaded
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3561
    "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
  3562
     into the system"
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3563
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  3564
    |binaryModule cls|
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3565
5178
5cc5f9ed5313 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5177
diff changeset
  3566
    isLoaded == true ifTrue:[^ isLoaded].
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3567
4791
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3568
    "/ check for loaded class-library - assume loaded if present.
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3569
    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
  3570
    binaryModule notNil ifTrue:[
5178
5cc5f9ed5313 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5177
diff changeset
  3571
        isLoaded := true.
4819
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3572
        ^ true
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3573
    ].
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3574
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  3575
    "/ check for all classes ...
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  3576
    self classes do:[:aClassOrClassName |
4819
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3577
        aClassOrClassName isBehavior ifFalse:[
5165
212867b779e7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5156
diff changeset
  3578
            aClassOrClassName isString ifTrue:[
212867b779e7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5156
diff changeset
  3579
                (cls := Smalltalk at:aClassOrClassName asSymbol) isNil ifTrue:[
4819
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3580
                    ^ false
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3581
                ].
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3582
                cls isBehavior ifFalse:[^ false].
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3583
                cls isLoaded ifFalse:[^ false].
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3584
            ] ifFalse:[
8315
5e53d6ff08d4 Streamline autoloading.
Stefan Vogel <sv@exept.de>
parents: 8086
diff changeset
  3585
                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
  3586
                ^ false
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3587
            ]
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3588
        ]
4769
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  3589
    ].
202c54048ce4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4755
diff changeset
  3590
4791
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3591
    "/ check for all patches & extensions ...
9228
605ad9b74e2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8842
diff changeset
  3592
    (self methods contains:[:aMethodInfo | aMethodInfo theMethod isNil]) ifTrue:[^ false].
4791
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3593
5178
5cc5f9ed5313 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5177
diff changeset
  3594
    isLoaded := true.
4791
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3595
    ^ true
4685
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3596
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3597
    "
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3598
     (Project projectWithId:#'stx:libbasic') isLoaded
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3599
     (Project projectWithId:#'stx:goodies/persistency') isLoaded 
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3600
    "
d145298696b7 more package loading support
Claus Gittinger <cg@exept.de>
parents: 4670
diff changeset
  3601
4819
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3602
    "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
  3603
!
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3604
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3605
methodInfo
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3606
    "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
  3607
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3608
    |methodInfo methods|
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3609
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3610
    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
  3611
	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
  3612
	methodInfo notNil ifTrue:[^ methodInfo].
4755
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
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3615
    methods := self methods.
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3616
    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
  3617
	methodInfo := OrderedCollection new
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3618
    ] ifFalse:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3619
	methodInfo := methods asOrderedCollection
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3620
			collect:[:mthd |
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3621
			    |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
  3622
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3623
			    mthd isMethod ifTrue:[   
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3624
				who := mthd who.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3625
				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
  3626
				selector := who methodSelector.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3627
				i := MethodInfo new.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3628
				i conditionForInclusion:#always.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3629
				i className:className.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3630
				i methodName:className.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3631
				fn := mthd sourceFilename.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3632
				i fileName:fn.
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3633
				i
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3634
			    ] ifFalse:[
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3635
				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
  3636
			    ]
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3637
			]
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3638
    ].
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3639
    self propertyAt:#methodInfo put:methodInfo.
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3640
    ^ methodInfo
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3641
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3642
    "Modified: 4.1.1997 / 16:51:18 / cg"
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3643
!
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3644
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3645
methods
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3646
    "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
  3647
     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
  3648
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3649
    |methods methodsInfo|
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
    properties notNil ifTrue:[
5327
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3652
        methodsInfo := properties at:#methodsInfo ifAbsent:nil.
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3653
        methodsInfo notNil ifTrue:[
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3654
            methods := methodsInfo collect:[:i | i className]
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3655
        ] ifFalse:[
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3656
            methods := properties at:#methods ifAbsent:nil
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3657
        ]
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3658
    ].
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
    methods isNil ifTrue:[
5327
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3661
        methods := OrderedCollection new.
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3662
        Smalltalk allClassesDo:[:aClass |
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3663
            (true "aClass owningClass isNil"
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3664
            and:[aClass isMeta not
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3665
            and:[aClass package ~= packageName
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3666
            and:[aClass isNameSpace not or:[aClass == Smalltalk]]]]) ifTrue:[
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3667
            
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3668
                aClass methodDictionary keysAndValuesDo:[:sel :mthd |
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3669
                    mthd package = packageName ifTrue:[
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3670
                        methods add:(MethodInfo new
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3671
                                        className:aClass name;
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3672
                                        methodName:sel;
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3673
                                        yourself)
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3674
                    ].
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3675
                ].
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3676
                aClass class methodDictionary keysAndValuesDo:[:sel :mthd |
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3677
                    mthd package = packageName ifTrue:[
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3678
                        methods add:(MethodInfo new
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3679
                                        className:(aClass name , ' class');
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3680
                                        methodName:sel;
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3681
                                        yourself)
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3682
                    ].
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
        ].
5e5602d156fa #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 5314
diff changeset
  3686
        methods isEmpty ifTrue:[^ #()].
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3687
    ].
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3688
    ^ methods
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3689
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3690
    "Modified: 4.1.1997 / 16:51:18 / cg"
2
claus
parents: 1
diff changeset
  3691
! !
claus
parents: 1
diff changeset
  3692
claus
parents: 1
diff changeset
  3693
!Project methodsFor:'specifications'!
claus
parents: 1
diff changeset
  3694
claus
parents: 1
diff changeset
  3695
readSpec
claus
parents: 1
diff changeset
  3696
    |s chunk fileName|
claus
parents: 1
diff changeset
  3697
claus
parents: 1
diff changeset
  3698
    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
  3699
    s := fileName readStreamOrNil.
2
claus
parents: 1
diff changeset
  3700
    s isNil ifTrue:[^ self].
claus
parents: 1
diff changeset
  3701
    [s atEnd] whileFalse:[
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  3702
        chunk := s nextChunk.
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  3703
        Compiler evaluate:chunk receiver:properties notifying:nil
2
claus
parents: 1
diff changeset
  3704
    ].
claus
parents: 1
diff changeset
  3705
    s close.
claus
parents: 1
diff changeset
  3706
claus
parents: 1
diff changeset
  3707
    "(Project new directory:'../projects/Clock') readSpec"
claus
parents: 1
diff changeset
  3708
!
claus
parents: 1
diff changeset
  3709
claus
parents: 1
diff changeset
  3710
saveSpec
claus
parents: 1
diff changeset
  3711
    |f d s|
claus
parents: 1
diff changeset
  3712
claus
parents: 1
diff changeset
  3713
    d := (properties at:#directoryName) asFilename.
claus
parents: 1
diff changeset
  3714
    d exists ifFalse:[
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  3715
        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
  3716
        ^ self
2
claus
parents: 1
diff changeset
  3717
    ].
claus
parents: 1
diff changeset
  3718
    f := d construct:'.project'.
claus
parents: 1
diff changeset
  3719
    s := f writeStream.
claus
parents: 1
diff changeset
  3720
    properties associationsDo:[:aProp |
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  3721
        (aProp == #directoryName) ifFalse:[
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  3722
            s nextChunkPut:('self at:' , aProp key storeString, 
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  3723
                               ' put:' , aProp value storeString).
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  3724
            s cr
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  3725
        ]
2
claus
parents: 1
diff changeset
  3726
    ].
claus
parents: 1
diff changeset
  3727
    s close
claus
parents: 1
diff changeset
  3728
claus
parents: 1
diff changeset
  3729
    "((Project new directory:'../projects/Clock') readSpec
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  3730
         directory:'../projects/xxx') saveSpec"
2
claus
parents: 1
diff changeset
  3731
! !
claus
parents: 1
diff changeset
  3732
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3733
!Project methodsFor:'views'!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3734
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3735
addView:aView
2164
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3736
    "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
  3737
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3738
    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
  3739
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3740
    "Modified: 14.2.1997 / 15:36:51 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3741
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3742
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3743
destroyViews
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3744
    "destroy all views of this project"
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3745
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3746
    views notNil ifTrue:[
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3747
	views do:[:aView |
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3748
	    aView notNil ifTrue:[aView destroy]
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3749
	]
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3750
    ].
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
hideViews
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3754
    "hide 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:[
4814
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3757
	views do:[:aView |
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3758
	    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
  3759
	]
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3760
    ].
1332
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  3761
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  3762
    "Modified: 3.5.1996 / 23:48:51 / stefan"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3763
!
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3764
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3765
removeView:aView
2164
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3766
    "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
  3767
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3768
    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
  3769
	views remove:aView ifAbsent:nil
3996
3183ccccabaa more support for projectBrowser
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3770
    ]
2164
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3771
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3772
    "Modified: 14.2.1997 / 15:37:20 / cg"
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
showViews
2164
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3776
    "show all views of this project"
063b0227aeda use #remap instead of #map to show views
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3777
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
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 do:[:aView |
7825b9141f01 changes to allow compilation under win32 (does not like strings beginning
Claus Gittinger <cg@exept.de>
parents: 4813
diff changeset
  3780
	    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
  3781
	]
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3782
    ].
1332
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  3783
a1d72522f5fc Rename unrealize-->unmap, rerealize->map.
Stefan Vogel <sv@exept.de>
parents: 1298
diff changeset
  3784
    "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
  3785
    "Modified: 14.2.1997 / 15:38:47 / cg"
617
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3786
! !
427245e28240 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
  3787
5734
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3788
!Project::ClassInfo methodsFor:'accessing'!
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3789
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3790
classFileName
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3791
    "return the value of the instance variable 'classFileName' (automatically generated)"
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3792
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3793
    ^ classFileName
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3794
!
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3795
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3796
classFileName:something
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3797
    "set the value of the instance variable 'classFileName' (automatically generated)"
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3798
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3799
    classFileName := something.
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3800
!
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3801
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3802
className
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3803
    "return the value of the instance variable 'className' (automatically generated)"
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
    ^ className
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3806
!
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3807
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3808
className:something
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3809
    "set the value of the instance variable 'className' (automatically generated)"
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
    className := something.
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3812
!
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3813
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3814
conditionForInclusion
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3815
    "return the value of the instance variable 'conditionForInclusion' (automatically generated)"
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
    ^ conditionForInclusion
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3818
!
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3819
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3820
conditionForInclusion:something
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3821
    "set the value of the instance variable 'conditionForInclusion' (automatically generated)"
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
    conditionForInclusion := something.
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3824
! !
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3825
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3826
!Project::ClassInfo methodsFor:'printing & storing'!
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3827
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3828
displayString
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3829
    ^ 'ClassInfo: ' , className
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3830
! !
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3831
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3832
!Project::ClassInfo methodsFor:'queries'!
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3833
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3834
theClass
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3835
    |cls|
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3836
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3837
    cls := Smalltalk classNamed:className.
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3838
    cls isNil ifTrue:[ ^ nil].
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3839
    ^ cls
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
    "Created: / 26.9.1999 / 13:39:00 / cg"
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3842
! !
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3843
4743
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3844
!Project::MethodInfo methodsFor:'accessing'!
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3845
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3846
className
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3847
    "return the value of the instance variable 'className' (automatically generated)"
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3848
5734
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3849
    ^ className
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3850
!
4743
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3851
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3852
className:something
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3853
    "set the value of the instance variable 'className' (automatically generated)"
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3854
5734
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3855
    className := something.
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3856
!
4743
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3857
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3858
conditionForInclusion
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3859
    "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
  3860
5734
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3861
    ^ conditionForInclusion
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3862
!
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3863
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3864
conditionForInclusion:something
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3865
    "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
  3866
5734
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3867
    conditionForInclusion := something.
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3868
!
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3869
4743
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3870
fileName
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3871
    "return the value of the instance variable 'fileName' (automatically generated)"
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3872
5734
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3873
    ^ fileName
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3874
!
4743
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3875
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3876
fileName:something
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3877
    "set the value of the instance variable 'fileName' (automatically generated)"
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3878
5734
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3879
    fileName := something.
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3880
!
4743
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3881
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3882
methodName
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3883
    "return the value of the instance variable 'methodName' (automatically generated)"
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3884
5734
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3885
    ^ methodName
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3886
!
4743
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3887
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3888
methodName:something
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3889
    "set the value of the instance variable 'methodName' (automatically generated)"
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3890
5734
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3891
    methodName := something.
c734386ad598 asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 5692
diff changeset
  3892
! !
4743
11f9e45976cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4727
diff changeset
  3893
4755
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3894
!Project::MethodInfo methodsFor:'printing & storing'!
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3895
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3896
displayString
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3897
    ^ 'MethodInfo: ' , className , ' ' , methodName
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3898
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3899
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3900
! !
2d866f87d1da preps to keep track of methods
Claus Gittinger <cg@exept.de>
parents: 4747
diff changeset
  3901
4791
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3902
!Project::MethodInfo methodsFor:'queries'!
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3903
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3904
method
4819
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3905
    self obsoleteMethodWarning.
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3906
    ^ self theMethod.
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3907
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3908
    "Modified: / 26.9.1999 / 13:40:16 / cg"
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3909
!
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3910
19b89da166c0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
  3911
theMethod
4791
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3912
    |cls|
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
    cls := Smalltalk classNamed:className.
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3915
    cls isNil ifTrue:[ ^ nil].
c2cdad0ab823 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
  3916
    ^ cls compiledMethodAt:methodName asSymbol.
4819
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
    "Created: / 26.9.1999 / 13:39:07 / 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
1854
b44227fd2b3d use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 1636
diff changeset
  3921
!Project class methodsFor:'documentation'!
630
b785d23d7c5b version at the end
Claus Gittinger <cg@exept.de>
parents: 617
diff changeset
  3922
b785d23d7c5b version at the end
Claus Gittinger <cg@exept.de>
parents: 617
diff changeset
  3923
version
9498
7b12d2911a1a *** empty log message ***
fm
parents: 9228
diff changeset
  3924
    ^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.194 2006-08-09 19:35:18 fm Exp $'
1298
23d0ba91c9be documentation
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
  3925
! !
7090
7afcbe4a5264 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6746
diff changeset
  3926
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
  3927
Project initialize!