Skip to content
This repository was archived by the owner on Jun 11, 2020. It is now read-only.

Commit c60366d

Browse files
committed
Fix ref to open_documentation - last push broke it
1 parent 5544938 commit c60366d

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

SalesforceReference.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""SublimeSalesforceReference: Quick access to Salesforce Documentation from Sublime Text"""
2-
__version__ = "1.1.0"
2+
__version__ = "1.1.1"
33
__author__ = "James Hill (oblongmana@gmail.com)"
44
__copyright__ = "SublimeSalesforceReference: (C) 2014 James Hill. GNU GPL 3."
55
__credits__ = ["All Salesforce Documentation is © Copyright 2000–2014 salesforce.com, inc.", "ThreadProgress.py is under the MIT License, Will Bond <will@wbond.net>, and SalesforceReference.py's RetrieveIndexThread method is a derives in part from code under the same license"]
@@ -11,6 +11,10 @@
1111
import threading
1212
from .ThreadProgress import ThreadProgress
1313

14+
# def plugin_loaded():
15+
# thread = RetrieveIndexThread(sublime.active_window())
16+
# thread.start()
17+
# ThreadProgress(thread, 'Retrieving Salesforce Reference Index...', '')
1418

1519
class SalesforceReferenceCommand(sublime_plugin.WindowCommand):
1620

@@ -19,12 +23,6 @@ def run(self):
1923
thread.start()
2024
ThreadProgress(thread, 'Retrieving Salesforce Reference Index...', '')
2125

22-
def open_documentation(self, reference_index):
23-
if(reference_index != -1):
24-
base_url= 'http://www.salesforce.com/us/developer/docs/apexcode'
25-
webbrowser.open_new_tab(base_url + self.sf_ref_pages_links[reference_index])
26-
27-
2826

2927
class RetrieveIndexThread(threading.Thread):
3028
"""
@@ -41,6 +39,11 @@ def __init__(self, window):
4139
self.window = window
4240
threading.Thread.__init__(self)
4341

42+
def open_documentation(self, reference_index):
43+
if(reference_index != -1):
44+
base_url= 'http://www.salesforce.com/us/developer/docs/apexcode'
45+
webbrowser.open_new_tab(base_url + self.sf_ref_pages_links[reference_index])
46+
4447
def run(self):
4548
sf_xml = urllib.request.urlopen('http://www.salesforce.com/us/developer/docs/apexcode/Data/Toc.xml').read().decode('utf-8')
4649
sf_tree = ElementTree.fromstring(sf_xml)
@@ -51,4 +54,4 @@ def run(self):
5154
self.sf_ref_pages_titles.append(parent.attrib['Title'])
5255
self.sf_ref_pages_links.append(parent.attrib['Link'])
5356

54-
self.window.show_quick_panel(self.sf_ref_pages_titles, SalesforceReferenceCommand.open_documentation)
57+
self.window.show_quick_panel(self.sf_ref_pages_titles, self.open_documentation)

messages.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"install": "messages/install.txt",
33
"1.0.0": "messages/1.0.0.txt",
44
"1.0.1": "messages/1.0.1.txt",
5-
"1.1.0": "messages/1.1.0.txt"
5+
"1.1.0": "messages/1.1.0.txt",
6+
"1.1.1": "messages/1.1.1.txt"
67
}

messages/1.1.1.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Sublime Salesforce Reference 1.1.1 Release Notes:
2+
3+
Bug Fixes:
4+
- Fix reference to open_documentation - last push broke functionality

0 commit comments

Comments
 (0)