Skip to content

Commit

Permalink
Merge pull request #4974 from rlaverde/split-explorer
Browse files Browse the repository at this point in the history
PR: Split Explorer module
  • Loading branch information
ccordoba12 authored Aug 17, 2017
2 parents 6b1341c + a60be15 commit 7e85cba
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 6 deletions.
2 changes: 1 addition & 1 deletion spyder/app/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ def create_edit_action(text, tr_text, icon):
# Explorer
if CONF.get('explorer', 'enable'):
self.set_splash(_("Loading file explorer..."))
from spyder.plugins.explorer import Explorer
from spyder.plugins.explorer.plugin import Explorer
self.explorer = Explorer(self)
self.explorer.register_plugin()

Expand Down
12 changes: 12 additions & 0 deletions spyder/plugins/explorer/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see spyder/__init__.py for details)

"""
spyder.plugins.explorer
=======================
Files and Directories Explorer Plugin.
"""
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from spyder.config.base import _
from spyder.api.plugins import SpyderPluginWidget
from spyder.py3compat import to_text_string
from spyder.widgets.explorer import ExplorerWidget
from spyder.plugins.explorer.widgets import ExplorerWidget


class Explorer(SpyderPluginWidget):
Expand Down
7 changes: 7 additions & 0 deletions spyder/plugins/explorer/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see spyder/__init__.py for details)

"""Explorer Tests"""
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
import pytest

# Local imports
from spyder.widgets.explorer import FileExplorerTest, ProjectExplorerTest
from spyder.plugins.explorer.widgets import (FileExplorerTest,
ProjectExplorerTest)

@pytest.fixture
def setup_file_explorer(qtbot):
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions spyder/widgets/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
EOLStatus, ReadWriteStatus)
from spyder.widgets.tabs import BaseTabs
from spyder.config.main import CONF
from spyder.widgets.explorer import show_in_external_file_explorer
from spyder.plugins.explorer.widgets import show_in_external_file_explorer

DEBUG_EDITOR = DEBUG >= 3

Expand Down Expand Up @@ -2749,7 +2749,7 @@ def test():
import time
t0 = time.time()
test.load(osp.join(spyder_dir, "widgets", "editor.py"))
test.load(osp.join(spyder_dir, "widgets", "explorer.py"))
test.load(osp.join(spyder_dir, "plugins", "explorer", "widgets.py"))
test.load(osp.join(spyder_dir, "plugins", "variableexplorer", "widgets",
"viewers", "collections.py"))
test.load(osp.join(spyder_dir, "widgets", "sourcecode", "codeeditor.py"))
Expand Down
2 changes: 1 addition & 1 deletion spyder/widgets/projects/explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from spyder.py3compat import to_text_string
from spyder.utils import misc
from spyder.utils.qthelpers import create_action
from spyder.widgets.explorer import FilteredDirView
from spyder.plugins.explorer.widgets import FilteredDirView


class ExplorerTreeWidget(FilteredDirView):
Expand Down

0 comments on commit 7e85cba

Please sign in to comment.