1805 "generate the code of the #mandatoryPreRequisites method" |
1805 "generate the code of the #mandatoryPreRequisites method" |
1806 |
1806 |
1807 |preRequisites| |
1807 |preRequisites| |
1808 |
1808 |
1809 preRequisites := self searchForPreRequisites first. |
1809 preRequisites := self searchForPreRequisites first. |
|
1810 preRequisites removeAllKeys:self excludedFromMandatoryPreRequisites ifAbsent:[]. |
1810 preRequisites removeAllKeys:self excludedFromPreRequisites ifAbsent:[]. |
1811 preRequisites removeAllKeys:self excludedFromPreRequisites ifAbsent:[]. |
1811 |
1812 |
1812 ^ String streamContents:[:s | |
1813 ^ String streamContents:[:s | |
1813 s nextPutLine:'mandatoryPreRequisites'. |
1814 s nextPutLine:'mandatoryPreRequisites'. |
1814 s nextPutAll: ' "'; nextPutAll: (self class superclass lookupMethodFor: #mandatoryPreRequisites) comment; nextPutLine:'"'. |
1815 s nextPutAll: ' "'; nextPutAll: (self class superclass lookupMethodFor: #mandatoryPreRequisites) comment; nextPutLine:'"'. |
1892 |
1893 |
1893 preRequisitesColl := self searchForPreRequisites. |
1894 preRequisitesColl := self searchForPreRequisites. |
1894 preRequisites := preRequisitesColl second. |
1895 preRequisites := preRequisitesColl second. |
1895 preRequisites |
1896 preRequisites |
1896 removeAllKeys:self excludedFromPreRequisites ifAbsent:[]; |
1897 removeAllKeys:self excludedFromPreRequisites ifAbsent:[]; |
|
1898 removeAllKeys:self excludedFromRequiredPreRequisites ifAbsent:[]; |
1897 removeAllKeys:preRequisitesColl first keys ifAbsent:[]. "remove the mandatory prerequisites" |
1899 removeAllKeys:preRequisitesColl first keys ifAbsent:[]. "remove the mandatory prerequisites" |
1898 |
1900 |
1899 ^ String streamContents:[:s | |
1901 ^ String streamContents:[:s | |
1900 s nextPutLine:'referencedPreRequisites'. |
1902 s nextPutLine:'referencedPreRequisites'. |
1901 s nextPutAll: ' "'; nextPutAll: (self class superclass lookupMethodFor: #referencedPreRequisites) comment; nextPutLine:'"'. |
1903 s nextPutAll: ' "'; nextPutAll: (self class superclass lookupMethodFor: #referencedPreRequisites) comment; nextPutLine:'"'. |
2049 "Created: / 23-08-2006 / 14:27:32 / cg" |
2051 "Created: / 23-08-2006 / 14:27:32 / cg" |
2050 ! ! |
2052 ! ! |
2051 |
2053 |
2052 !ProjectDefinition class methodsFor:'description'! |
2054 !ProjectDefinition class methodsFor:'description'! |
2053 |
2055 |
|
2056 excludedFromMandatoryPreRequisites |
|
2057 "list packages which are to be explicitely excluded from the automatic constructed |
|
2058 mandatory prerequisites list. |
|
2059 If empty, everything that is found along the inheritance of any of |
|
2060 my classes is considered to be a prerequisite package." |
|
2061 |
|
2062 ^ #() |
|
2063 ! |
|
2064 |
2054 excludedFromPreRequisites |
2065 excludedFromPreRequisites |
|
2066 "obsolete; temporarily, this is still called for, but will eventually vanish. |
|
2067 |
|
2068 List packages which are to be explicitely excluded from the automatic constructed |
|
2069 prerequisites lists (both). |
|
2070 If empty, everything that is found along the inheritance of any of |
|
2071 my classes is considered to be a prerequisite package." |
|
2072 |
|
2073 ^ #() |
|
2074 |
|
2075 "Modified: / 17-08-2006 / 19:48:59 / cg" |
|
2076 ! |
|
2077 |
|
2078 excludedFromRequiredPreRequisites |
2055 "list packages which are to be explicitely excluded from the automatic constructed |
2079 "list packages which are to be explicitely excluded from the automatic constructed |
2056 prerequisites list. If empty, everything that is found along the inheritance of any of |
2080 required prerequisites list. |
|
2081 If empty, everything that is found along the inheritance of any of |
2057 my classes is considered to be a prerequisite package." |
2082 my classes is considered to be a prerequisite package." |
2058 |
2083 |
2059 ^ #() |
2084 ^ #() |
2060 |
2085 |
2061 "Modified: / 17-08-2006 / 19:48:59 / cg" |
2086 "Modified: / 17-08-2006 / 19:48:59 / cg" |
7136 self mandatoryPreRequisites notEmpty ifTrue:[ |
7162 self mandatoryPreRequisites notEmpty ifTrue:[ |
7137 "this is a new subclass - avoid overhead" |
7163 "this is a new subclass - avoid overhead" |
7138 ^ OrderedSet new |
7164 ^ OrderedSet new |
7139 addAll:self mandatoryPreRequisites; |
7165 addAll:self mandatoryPreRequisites; |
7140 "/ addAll:self includedInPreRequisites; |
7166 "/ addAll:self includedInPreRequisites; |
|
7167 removeAllFoundIn:self excludedFromMandatoryPreRequisites; |
7141 removeAllFoundIn:self excludedFromPreRequisites; |
7168 removeAllFoundIn:self excludedFromPreRequisites; |
7142 yourself. |
7169 yourself. |
7143 ]. |
7170 ]. |
7144 |
7171 |
7145 "I am an old subclass, where #preRequisites returns a plain array" |
7172 "I am an old subclass, where #preRequisites returns a plain array" |
7146 ^ Set new |
7173 ^ Set new |
7147 addAll:self preRequisites; |
7174 addAll:self preRequisites; |
7148 addAll:self includedInPreRequisites; |
7175 addAll:self includedInPreRequisites; |
|
7176 removeAllFoundIn:self excludedFromMandatoryPreRequisites; |
7149 removeAllFoundIn:self excludedFromPreRequisites; |
7177 removeAllFoundIn:self excludedFromPreRequisites; |
7150 remove:self package ifAbsent:[]; |
7178 remove:self package ifAbsent:[]; |
7151 yourself. |
7179 yourself. |
7152 ! |
7180 ! |
7153 |
7181 |
7154 effectivePreRequisites |
7182 effectivePreRequisites |
7155 "get the preRequisites, that are not excluded. |
7183 "get the preRequisites, that are not excluded. |
7156 This method appears to be obsolete, because its functionality |
7184 This method appears to be obsolete, because its functionality |
7157 is now included in #preRequisites. |
7185 is now included in #preRequisites. |
7158 But is to be kept for backward compatibilty with old |
7186 But is to be kept for backward compatibilty with old existing subclasses." |
7159 existing subclasses." |
|
7160 |
7187 |
7161 self mandatoryPreRequisites notEmpty ifTrue:[ |
7188 self mandatoryPreRequisites notEmpty ifTrue:[ |
7162 "this is a new subclass - avoid overhead" |
7189 "this is a new subclass - avoid overhead" |
7163 ^ self preRequisites. |
7190 ^ self preRequisites. |
7164 ]. |
7191 ]. |