Skip to content

Commit

Permalink
release 2.9.1, fix issue #24
Browse files Browse the repository at this point in the history
  • Loading branch information
xjsender committed May 5, 2015
1 parent 39a80a1 commit 2acb3ff
Show file tree
Hide file tree
Showing 14 changed files with 128 additions and 126 deletions.
11 changes: 11 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ Release History

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

Release 2.9.1 (2015-05-05)
++++++++++++++++++
* Fix bug for ``switch_project``, see issue #24
* Enhancement for speeding up ``Save To Server`` operation
* Rename ``save_component`` command to ``save_to_server``
* Rename ``delete_component`` command to ``delete_file_from_server``
* Simplify ``delete_file_from_server`` and ``refresh_file_from_server``
* Add two new value issue_url and history_url into package info
* Update ``report_issue`` and ``view_release_notes`` command to read url from package info


Release 2.9.0 (2015-05-03)
++++++++++++++++++
* Fix bug for messy code in debug log detail
Expand Down
27 changes: 13 additions & 14 deletions config/commands/main.sublime-commands
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[
{"caption": "HaoIDE: Switch Project", "command": "switch_project"},
{
"caption": "HaoIDE: Switch Project",
"command": "switch_project"
},

{
"caption": "HaoIDE: Toggle Metdata Objects",
Expand Down Expand Up @@ -96,28 +99,24 @@
},

{
"caption": "HaoIDE: Save Component",
"command": "save_component"
"caption": "HaoIDE: Save To Server",
"command": "save_to_server"
},

{
"caption": "HaoIDE: Deploy Auras to Server",
"command": "save_component"
"command": "deploy_lighting_to_server",
"args": {"dirs": []}
},

{
"caption": "HaoIDE: Compile Component",
"command": "save_component",
"caption": "HaoIDE: Compile File",
"command": "save_to_server",
"args": {
"is_check_only": true
}
},

{
"caption": "HaoIDE: Compile Component",
"command": "compile_component",
},

{
"caption": "HaoIDE: Diff With Server",
"command": "diff_with_server"
Expand All @@ -139,8 +138,8 @@
},

{
"caption": "HaoIDE: Delete From Server",
"command": "delete_component"
"caption": "HaoIDE: Delete File From Server",
"command": "delete_file_from_server"
},

{
Expand Down Expand Up @@ -389,4 +388,4 @@
"operation": "delete"
}
}
]
]
2 changes: 1 addition & 1 deletion config/keymap/Default (Linux).sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{"keys": ["alt+r","alt+f"], "command": "refresh_folder"},

// Save current component to server
{"keys": ["ctrl+alt+s"], "command": "save_component"},
{"keys": ["ctrl+alt+s"], "command": "save_to_server"},

// Choose a test class in the list and run test class
{"keys": ["alt+r","alt+t"],"command": "run_one_test"},
Expand Down
4 changes: 2 additions & 2 deletions config/keymap/Default (OSX).sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
{"keys": ["super+alt+o"], "command": "open_documentation"},

// Save current component to server
{"keys": ["super+alt+s"], "command": "save_component"},
{"keys": ["super+alt+s"], "command": "save_to_server"},

// Choose a test class in the list and run test class
{"keys": ["ctrl+r","ctrl+t"],"command": "run_one_test"},
Expand All @@ -55,7 +55,7 @@
{"keys": ["super+alt+q"], "command": "execute_query"},

// Delete the current Component
{"keys": ["ctrl+alt+d"], "command": "delete_component"},
{"keys": ["ctrl+alt+d"], "command": "delete_file_from_server"},

// View Code Coverage
{"keys": ["super+alt+c"], "command": "view_code_coverage"},
Expand Down
2 changes: 1 addition & 1 deletion config/keymap/Default (Windows).sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
{"keys": ["ctrl+e"], "command": "execute_rest_test"},

// Save current component to server
{"keys": ["ctrl+alt+s"], "command": "save_component"},
{"keys": ["ctrl+alt+s"], "command": "save_to_server"},

// Choose a test class in the list and run test class
{"keys": ["alt+r","alt+t"],"command": "run_one_test"},
Expand Down
6 changes: 3 additions & 3 deletions config/menus/Context.sublime-menu
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
{"caption": "Refresh from Server", "command": "refresh_file_from_server"},

// Save component
{"caption": "Save to Server", "command": "save_component"},
{"caption": "Save to Server", "command": "save_to_server"},

{"caption": "Delete from Server", "command": "delete_component"},
{"caption": "Delete from Server", "command": "delete_file_from_server"},

// Compile component but not save
{"caption": "Compile Component", "command": "save_component",
{"caption": "Compile Component", "command": "save_to_server",
"args": {
"is_check_only": true
}
Expand Down
14 changes: 14 additions & 0 deletions config/messages/2.9.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Build 2.9.1
-----------
Release Date: 5 May 2015

* Fix bug for ``switch_project``, see issue #24
* Enhancement for speeding up ``Save To Server`` operation
* Rename ``save_component`` command to ``save_to_server``
* Rename ``delete_component`` command to ``delete_file_from_server``
* Simplify ``delete_file_from_server`` and ``refresh_file_from_server``
* Add two new value issue_url and history_url into package info
* Update ``report_issue`` and ``view_release_notes`` command to read url from package info

Notes: You should restart your sublime after ``HaoIDE`` is upgraded
-----------
6 changes: 4 additions & 2 deletions config/settings/package.sublime-settings
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"name": "haoide",
"version": "2.9.0",
"version": "2.9.1",
"description": "haoide is a Sublime Text 3 plugin for Salesforce and used for swift development on Force.com",
"author": "Hao Liu",
"email": "mouse.mliu@gmail.com",
"homepage": "https://github.com/xjsender/haoide"
"homepage": "https://github.com/xjsender/haoide",
"issue_url": "https://github.com/xjsender/haoide/issues",
"history_url": "https://github.com/xjsender/haoide/blob/master/HISTORY.rst"
}
72 changes: 31 additions & 41 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,9 @@ def run(self, view):
def is_visible(self):
if not self.view.file_name(): return False
self.filename, self.extension = util.get_file_attr(self.view.file_name())
return self.extension == ".page"
if self.extension != ".page": return False

return util.check_enabled(self.view.file_name())

class RunOneTestCommand(sublime_plugin.WindowCommand):
""" List the test classes from local cache, after any one is chosen,
Expand Down Expand Up @@ -1523,20 +1525,24 @@ def run(command):

class ReportIssueCommand(sublime_plugin.ApplicationCommand):
def run(command):
show_url = "https://github.com/xjsender/haoide/issues"
util.open_with_browser(show_url)
package_info = sublime.load_settings("package.sublime-settings")
util.open_with_browser(package_info.get("issue_url"))

class ViewReleaseNotesCommand(sublime_plugin.ApplicationCommand):
def run(command):
show_url = "https://github.com/xjsender/haoide/blob/master/HISTORY.rst"
util.open_with_browser(show_url)
package_info = sublime.load_settings("package.sublime-settings")
util.open_with_browser(package_info.get("history_url"))

class DeleteFilesFromServerCommand(sublime_plugin.WindowCommand):
class DeleteFilesFromServer(sublime_plugin.WindowCommand):
def __init__(self, *args, **kwargs):
super(DeleteFilesFromServerCommand, self).__init__(*args, **kwargs)
super(DeleteFilesFromServer, self).__init__(*args, **kwargs)

def run(self, files):
delete_components(self._files)
# Confirm Delete Action
if sublime.ok_cancel_dialog("Confirm to delete?"):
for f in files:
component_attribute = util.get_component_attribute(f)[0]
processor.handle_delete_component(component_attribute["url"], f)

def is_visible(self, files):
"""
Expand All @@ -1552,38 +1558,24 @@ def is_visible(self, files):

return True

class DeleteComponentCommand(sublime_plugin.TextCommand):
class DeleteFileFromServer(sublime_plugin.TextCommand):
def run(self, view):
files = [self.view.file_name()]
delete_components(files)
self.view.window().run_command("delete_files_from_server", {
"files" : [self.view.file_name()]
})

def is_enabled(self):
if not self.view.file_name(): return False
if self.view.file_name().endswith("-meta.xml"): return False
return util.check_enabled(self.view.file_name())

def delete_components(files):
# Confirm Delete Action
confirm = sublime.ok_cancel_dialog("Are you sure you really want to delete this?")
if confirm == False: return

# Handle Delete
for f in files:
component_attribute = util.get_component_attribute(f)[0]
processor.handle_delete_component(component_attribute["url"], f)

class CreateApexTriggerCommand(sublime_plugin.WindowCommand):
def __init__(self, *args, **kwargs):
super(CreateApexTriggerCommand, self).__init__(*args, **kwargs)

def run(self):
sobjects_describe = util.populate_sobjects_describe()

# Just for tracking issue #28
for name in sobjects_describe:
if "triggerable" not in sobjects_describe[name]:
print ('Not triggerable sobject: ' + name)

self.sobjects = sorted([name for name in sobjects_describe\
if "triggerable" in sobjects_describe[name] and sobjects_describe[name]["triggerable"]])
self.window.show_quick_panel(self.sobjects, self.on_done)
Expand Down Expand Up @@ -2057,14 +2049,14 @@ def run(self):
def is_enabled(self):
return util.check_new_component_enabled()

class SaveComponentCommand(sublime_plugin.TextCommand):
class SaveToServer(sublime_plugin.TextCommand):
def run(self, edit, is_check_only=False):
# Automatically save current file if dirty
if self.view.is_dirty():
self.view.run_command("save")

# Handle Save Current Component
processor.handle_save_component(self.view.file_name(), is_check_only)
processor.handle_save_to_server(self.view.file_name(), is_check_only)

def is_enabled(self):
if not self.view or not self.view.file_name(): return False
Expand Down Expand Up @@ -2093,6 +2085,10 @@ def on_done(self, index):
# Split with ") " and get the second project name
default_project = self.projects[index].split(") ")[1]

# Switch project but not add project to sidebar
# Just after login succeed, add it into sidebar
util.switch_project(default_project, False)

# After project is switch, login will be executed
processor.handle_login_thread(default_project)

Expand Down Expand Up @@ -2192,18 +2188,9 @@ def is_visible(self, dirs):

class RefreshFileFromServer(sublime_plugin.TextCommand):
def run(self, view):
message = "Are you sure you want to continue?"
if not sublime.ok_cancel_dialog(message, "Refresh This?"): return

# Get file_full_name and component_attribute
file_full_name = self.view.file_name()
component_attribute = util.get_component_attribute(file_full_name)[0]

# Handle Refresh Current Component
if component_attribute["type"] == "StaticResource":
processor.handle_refresh_static_resource(component_attribute, file_full_name)
else:
processor.handle_refresh_file_from_server(component_attribute, file_full_name)
self.view.window().run_command("refresh_files_from_server", {
"files": [self.view.file_name()]
})

def is_enabled(self):
return util.check_enabled(self.view.file_name())
Expand All @@ -2214,7 +2201,10 @@ def __init__(self, *args, **kwargs):

def run(self, files):
message = "Are you sure you really want to continue?"
if not sublime.ok_cancel_dialog(message, "Refresh Selected?"): return
if not sublime.ok_cancel_dialog(message, "Refresh Files?"): return

if not hasattr(self, "_files"):
self._files = files

for file_name in self._files:
if file_name.endswith("-meta.xml"): continue # Ignore -meta.xml file
Expand Down
1 change: 1 addition & 0 deletions messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
"2.8.8": "config/messages/2.8.8.md",
"2.8.9": "config/messages/2.8.9.md",
"2.9.0": "config/messages/2.9.0.md",
"2.9.1": "config/messages/2.9.1.md",
"install": "config/messages/install.txt"
}
Loading

0 comments on commit 2acb3ff

Please sign in to comment.