forked from platformio/platformio-core
Refactor project IDE integration
This commit is contained in:
1 parent
029e66cd06
commit
2a5de43964
41 files changed
+20
-7
No files matched your search
@@ -26,8 +26,8 @@ from platformio.home.rpc.handlers.piocore import PIOCoreRPC
|
||||
from platformio.package.manager.platform import PlatformPackageManager
|
||||
from platformio.project.config import ProjectConfig
|
||||
from platformio.project.exception import ProjectError
|
||||
from platformio.project.generator import ProjectGenerator
|
||||
from platformio.project.helpers import get_project_dir, is_platformio_project
|
||||
from platformio.project.integration.generator import ProjectGenerator
|
||||
from platformio.project.options import get_config_options_schema
|
||||
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ from platformio.package.commands.install import install_project_dependencies
|
||||
from platformio.package.manager.platform import PlatformPackageManager
|
||||
from platformio.platform.exception import UnknownBoard
|
||||
from platformio.project.config import ProjectConfig
|
||||
from platformio.project.generator import ProjectGenerator
|
||||
from platformio.project.helpers import is_platformio_project
|
||||
from platformio.project.integration.generator import ProjectGenerator
|
||||
|
||||
|
||||
def validate_boards(ctx, param, value): # pylint: disable=W0613
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# Copyright (c) 2014-present PlatformIO <contact@platformio.org>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
@@ -15,6 +15,7 @@
|
||||
import codecs
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import bottle
|
||||
|
||||
@@ -51,12 +52,11 @@ class ProjectGenerator:
|
||||
|
||||
@staticmethod
|
||||
def get_supported_ides():
|
||||
tpls_dir = os.path.join(fs.get_source_dir(), "project", "tpls")
|
||||
return sorted(
|
||||
[
|
||||
d
|
||||
for d in os.listdir(tpls_dir)
|
||||
if os.path.isdir(os.path.join(tpls_dir, d))
|
||||
item.name
|
||||
for item in (Path(__file__).parent / "tpls").iterdir()
|
||||
if item.is_dir()
|
||||
]
|
||||
)
|
||||
|
||||
@@ -132,7 +132,7 @@ class ProjectGenerator:
|
||||
|
||||
def get_tpls(self):
|
||||
tpls = []
|
||||
tpls_dir = os.path.join(fs.get_source_dir(), "project", "tpls", self.ide)
|
||||
tpls_dir = str(Path(__file__).parent / "tpls" / self.ide)
|
||||
for root, _, files in os.walk(tpls_dir):
|
||||
for f in files:
|
||||
if not f.endswith(".tpl"):
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user