Skip to content

Commit

Permalink
Release 3.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
xjsender committed Jun 11, 2015
1 parent a7c4ca9 commit 1c8242d
Show file tree
Hide file tree
Showing 17 changed files with 58 additions and 269 deletions.
15 changes: 15 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ Release History

---------------


Release 3.0.3 (2015-06-11)
++++++++++++++++++
* Bug Fix:
- Fix duplicate save check bug caused by release 3.0.2
- Fix fields completion bug for cross sObjects between tooling and non-tooling, for example ``User``, ``RecordType``

* Enhancement:
- Add session expired message for ``describe_metadata``
- Enhancement for ``refresh_file_from_server``

* Update
- Update pop-up compile message for ``save_to_server`` command


Release 3.0.2 (2015-06-07)
++++++++++++++++++
* Bug fix:
Expand Down
21 changes: 0 additions & 21 deletions config/messages/2.9.0.md

This file was deleted.

14 changes: 0 additions & 14 deletions config/messages/2.9.1.md

This file was deleted.

35 changes: 0 additions & 35 deletions config/messages/2.9.2.md

This file was deleted.

17 changes: 0 additions & 17 deletions config/messages/2.9.3.md

This file was deleted.

26 changes: 0 additions & 26 deletions config/messages/2.9.4.md

This file was deleted.

29 changes: 0 additions & 29 deletions config/messages/2.9.5.md

This file was deleted.

26 changes: 0 additions & 26 deletions config/messages/2.9.6.md

This file was deleted.

28 changes: 0 additions & 28 deletions config/messages/2.9.7.md

This file was deleted.

19 changes: 0 additions & 19 deletions config/messages/2.9.8.md

This file was deleted.

13 changes: 0 additions & 13 deletions config/messages/2.9.9.md

This file was deleted.

17 changes: 17 additions & 0 deletions config/messages/3.0.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Build 3.0.3
-----------
Release Date: 11 June 2015

* Bug Fix:
- Fix duplicate save check bug caused by release 3.0.2
- Fix fields completion bug for cross sObjects between tooling and non-tooling, for example ``User``, ``RecordType``

* Enhancement:
- Add session expired message for ``describe_metadata``
- Enhancement for ``refresh_file_from_server``

* Update
- Update pop-up compile message for ``save_to_server`` command

* Note:
- You should restart your sublime after ``HaoIDE`` is upgraded
2 changes: 1 addition & 1 deletion config/settings/package.sublime-settings
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "HaoIDE",
"version": "3.0.2",
"version": "3.0.3",
"description": "HaoIDE is a Sublime Text 3 plugin for Salesforce and used for swift development on Force.com",
"author": "Hao Liu",
"email": "[email protected]",
Expand Down
11 changes: 1 addition & 10 deletions messages.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
{
"2.9.0": "config/messages/2.9.0.md",
"2.9.1": "config/messages/2.9.1.md",
"2.9.2": "config/messages/2.9.2.md",
"2.9.3": "config/messages/2.9.3.md",
"2.9.4": "config/messages/2.9.4.md",
"2.9.5": "config/messages/2.9.5.md",
"2.9.6": "config/messages/2.9.6.md",
"2.9.7": "config/messages/2.9.7.md",
"2.9.8": "config/messages/2.9.8.md",
"2.9.9": "config/messages/2.9.9.md",
"3.0.0": "config/messages/3.0.0.md",
"3.0.1": "config/messages/3.0.1.md",
"3.0.2": "config/messages/3.0.2.md",
"3.0.3": "config/messages/3.0.3.md",
"install": "config/messages/install.txt"
}
34 changes: 11 additions & 23 deletions processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1430,21 +1430,11 @@ def handle_thread(thread, timeout):

if hasattr(view, 'show_popup'):
error = """
<div id="content">
<div class="container">
<h1 class="panel-title">Compile Error</h1>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">%s</h3>
</div>
<div class="panel-body">
<p style="color: red">
<b>%s</b> at line <b>%s</b> column <b>%s</b>
</p>
</div>
</div>
</div>
<div>
<h3>Compile Error for %s</h3>
<p style="color: red">
<b>%s</b> at line <b>%s</b> column <b>%s</b>
</p>
</div>
""" % (
file_base_name,
Expand Down Expand Up @@ -1487,7 +1477,7 @@ def handle_thread(thread, timeout):
thread.start()

# If saving thread is started, set the flag to True
globals()[username + component_name] = True
globals()[username + file_base_name] = True

# Display thread progress
wait_message = ("Compiling " if is_check_only else "Saving ") + component_name
Expand Down Expand Up @@ -1610,7 +1600,7 @@ def handle_thread(thread, timeout):
handle_thread(thread, timeout)
ThreadProgress(api, thread, 'Diff With Server', 'Diff With Server Succeed')

def handle_refresh_file_from_server(component_attribute, file_name, timeout=120):
def handle_refresh_file_from_server(attr, file_name, timeout=120):
def handle_thread(thread, timeout):
if thread.is_alive():
sublime.set_timeout(lambda:handle_thread(thread, timeout), timeout)
Expand All @@ -1623,19 +1613,17 @@ def handle_thread(thread, timeout):

fp = open(file_name, "wb")
try:
body = bytes(result[component_body], "UTF-8")
body = bytes(result[attr["body"]], "UTF-8")
except:
body = result[component_body].encode("UTF-8")
body = result[attr["body"]].encode("UTF-8")

fp.write(body)

settings = context.get_settings()
api = ToolingApi(settings)
component_body = component_attribute["body"]
component_url = component_attribute["url"]
thread = threading.Thread(target=api.get, args=(component_url, ))
thread = threading.Thread(target=api.get, args=(attr["url"], ))
thread.start()
ThreadProgress(api, thread, 'Refreshing Component', 'Refresh Succeed')
ThreadProgress(api, thread, 'Refreshing %s' % os.path.basename(file_name), 'Refresh Succeed')
handle_thread(thread, timeout)

def handle_delete_component(component_url, file_name, timeout=120):
Expand Down
1 change: 1 addition & 0 deletions salesforce/api/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def describe_metadata(self):
if response.status_code > 399:
# If session is invalid, force to login and execute this again
if "INVALID_SESSION_ID" in response.text:
Printer.get("log").write("Session is expired, need login again")
self.login(True)
return self.describe_metadata()

Expand Down
Loading

0 comments on commit 1c8242d

Please sign in to comment.