Skip to content
This repository has been archived by the owner on Jul 11, 2019. It is now read-only.

implementation for the refresh resource bundles #765

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions mavensmate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import sublime
import sublime_plugin
import os
import shutil
import json
import sys
import re
Expand Down Expand Up @@ -955,6 +956,13 @@ class RefreshResourceBundleCommand(sublime_plugin.WindowCommand):
def run(self, dirs, files):
if sublime.ok_cancel_dialog("This command will refresh the resource bundle(s) based on your local project's corresponding static resource(s). Do you wish to continue?", "Refresh"):
#TODO: adapter refresh
for dr in dirs:
shutil.rmtree(dr)
dir_last_part=dr.split("\\")[-1]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this call cross-platform?

static_resource_path = os.path.join(util.mm_project_directory(),"src","staticresources",dir_last_part)
mm.call('new-resource-bundle', True, body={ "paths" : [ static_resource_path ] }, context=self, message="Refreshing resource bundle...")
time.sleep(1.5)

pass

def is_visible(self, dirs, files):
Expand Down