Beispiel #1
0
 def __LoadLocations(
         self, log: Log,
         xmlElement: ET.Element) -> List[XmlConfigPackageLocation]:
     res = []
     foundElements = xmlElement.findall("PackageLocation")
     for foundElement in foundElements:
         res.append(XmlConfigPackageLocation(log, foundElement))
     return res
def _LoadPackageConfigurations(log: Log, projectElem: ET.Element, filename: str) -> List[XmlConfigPackageConfiguration]:
    xmlPackageConfigurations = LoadUtil.XMLLoadPackageConfiguration(log, projectElem, filename)
    for entry in xmlPackageConfigurations:
        # if no locations has been supplied then we assume the root folder of the project file
        #if entry.Name == 'default' and len(entry.Locations) <= 0:
        if len(entry.Locations) <= 0:
            xmlConfigPackageLocation = XmlConfigPackageLocation(log, FakeXmlElementFactory.CreateWithName("PackageLocation", MagicStrings.ProjectRoot))
            entry.Locations = [xmlConfigPackageLocation]
    return xmlPackageConfigurations