def METHOD_NAME(cls, PathStr):
    if TAB_WORKSPACE in PathStr:
        PathList = PathStr.split()
        if PathList:
            for i, str in enumerate(PathList):
                MacroStartPos = str.find(TAB_WORKSPACE)
                if MacroStartPos != -1:
                    Substr = str[MacroStartPos:]
                    Path = Substr.replace(TAB_WORKSPACE, cls.WORKSPACE).strip()
                    if not os.path.exists(Path):
                        for Pkg in cls.PACKAGES_PATH:
                            Path = Substr.replace(TAB_WORKSPACE, Pkg).strip()
                            if os.path.exists(Path):
                                break
                    PathList[i] = str[0:MacroStartPos] + Path
        PathStr = ' '.join(PathList)
    return PathStr