Skip to content

Commit c123173

Browse files
author
Michael Eichhorn
committed
Allow re-enable project after an error occured
1 parent 68745d8 commit c123173

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

Default.sublime-commands

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,13 @@
1414
{
1515
"caption": "tern_for_sublime: Describe",
1616
"command": "tern_describe"
17+
},
18+
{
19+
"caption": "tern_for_sublime: Enable Project",
20+
"command": "tern_enable_project"
21+
},
22+
{
23+
"caption": "tern_for_sublime: Disable Project",
24+
"command": "tern_disable_project"
1725
}
1826
]

Main.sublime-menu

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@
2323
{
2424
"caption": "Describe",
2525
"command": "tern_describe"
26+
},
27+
{
28+
"caption": "Enable Project",
29+
"command": "tern_enable_project"
30+
},
31+
{
32+
"caption": "Disable Project",
33+
"command": "tern_disable_project"
2634
}
2735
]
2836
}

tern.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,15 @@ def run(self, edit, **args):
569569
data["type"], data.get("doc", None),
570570
data.get("url", None))
571571

572+
class TernDisableProject(sublime_plugin.TextCommand):
573+
def run(self, edit, **args):
574+
pfile = get_pfile(view)
575+
pfile.project.disabled = True
576+
577+
class TernEnableProject(sublime_plugin.TextCommand):
578+
def run(self, edit, **args):
579+
pfile = get_pfile(view)
580+
pfile.project.disabled = True
572581

573582
# fetch a certain setting from the package settings file and if it doesn't exist check the
574583
# Preferences.sublime-settings file for backwards compatibility.

0 commit comments

Comments
 (0)